diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000..9cecc1d
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ {one line to give the program's name and a brief idea of what it does.}
+ Copyright (C) {year} {name of author}
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ {project} Copyright (C) {year} {fullname}
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/README.md b/README.md
index 79bacbe..44a540b 100644
--- a/README.md
+++ b/README.md
@@ -13,16 +13,17 @@ Supreme Auto Checkout is a Google Chrome extension to automate the process of bu
Supreme Auto Checkout provides many features such as:
- **Auto Checkout** - The product will automatically be added to your cart and will straight go to the checkout page.
- **AutoFill** - All of your billing informations will be automaticaly filled on the checkout page.
+ - **Multi profiles** - You can setup multiple profiles to quickly switch settings during drop day!
- **Configurable delays for every steps of the checkout process.**
- **Size choice for every category of product.**
- **Captcha bypass** (beta feature).
- **Option to set a minimum/maximum price for a product.**
- **Option to hide sold out products.**
- **Easy configuration.**
+ - **AutoCop** - You can set keywords for products and they will automatically be added to cart when they are available on the shop.
# Coming soon
Features that will be added in the future:
- - **AutoCop** - You can set keywords for products and they will automatically be added to cart when they are available on the shop.
- **Product Monitor** - Be notified when new products are added to the shop.
# Installation
@@ -33,6 +34,14 @@ Once it's done, follow these steps:
>- Extract the downloaded release to a folder of your choice.
>- Open Google Chrome and type in your address bar **chrome://extensions/** and enable the **Developer** mode option at the top of the page.
>- Drag the **bot/build** folder containing the extension into Google Chrome.
+
+
+# Updating
+
+If you already have a previous version of the bot installed, I recommend you to **uninstall it before installing the new version**
+as it can cause issues if the new version introduced some changes in the way the data is saved to the local storage.
+
+Note: You'll have to reconfigure the bot when you reinstall it.
# Configuration
@@ -40,6 +49,8 @@ After the extension is installed, the extension logo should appear on the Chrome
Make sure to configure all the required options otherwise the bot won't load.
+It is also recommended to clear your cookies on the Supreme shop before using the bot.
+
# Usage
After you have configured the extension, go to the Supreme website. If the extension is installed correctly you should see a message on the top of the webpage stating that the bot is running.
@@ -53,6 +64,36 @@ If you have set the **Minimum Price** or **Maximum Price** option, the product w
If **Auto Payment** is enabled, the bot will automatically submit the checkout form once you're on the checkout page, otherwise, your billing infos will still be automatically filled but you will need to manually click on the checkout button.
+# AutoCop
+
+Autocop is a feature to automatically add to cart products who matches some specific keywords.
+
+You **MUST** keep your browser open for this feature to work.
+
+To set it up, you first must enable **AutoCheckout** and **Enable AutoCop** in the Options tab.
+
+You'll then have to setup an **ATC Start Time**, which would most likely be the time when the online shop updates (11AM).
+
+You will have to set the time as a 24hour format (hh:mm:ss), note that it will be based on your system's time.
+
+A recommended value would be **11:00:10** to make sure that the shop has updated before running the ATC.
+
+Once the ATC time is reached, the bot will automatically open tabs to add to cart matching products.
+
+The product who matches the most the keywords will be added to the cart.
+
+# Setting up AutoCop products
+
+To setup AutoCop products, you need to go in the **AutoCop** tab of your bot then click on the **Add new** button.
+
+This will open a form requesting the following informations:
+ - **Name** - A name to distinct your atc products, not really important
+ - **Product keywords** - This field is a multi-selectable input, you can add keywords by pressing the Enter key,
+ thoses keywords are **case insensitive** and white-spaces at the end and start of the keyword will be removed.
+ - **Color** (optional) - If set, the ATC will try to checkout the product matching this color, also **case insensitive**
+ - **Product category** - The category of the product
+ - **Enabled**
+
# Captcha Bypass
The **Captcha Bypass** feature works by deleting from the DOM the node containing the re-captcha input.
diff --git a/bot/build/background.js b/bot/build/background.js
new file mode 100644
index 0000000..a034b20
--- /dev/null
+++ b/bot/build/background.js
@@ -0,0 +1,3099 @@
+/******/ (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 = 38);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var store = __webpack_require__(27)('wks')
+ , uid = __webpack_require__(28)
+ , Symbol = __webpack_require__(1).Symbol
+ , USE_SYMBOL = typeof Symbol == 'function';
+
+var $exports = module.exports = function(name){
+ return store[name] || (store[name] =
+ USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
+};
+
+$exports.store = store;
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports) {
+
+// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+var global = module.exports = typeof window != 'undefined' && window.Math == Math
+ ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
+if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports) {
+
+var core = module.exports = {version: '2.4.0'};
+if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var dP = __webpack_require__(8)
+ , createDesc = __webpack_require__(24);
+module.exports = __webpack_require__(5) ? function(object, key, value){
+ return dP.f(object, key, createDesc(1, value));
+} : function(object, key, value){
+ object[key] = value;
+ return object;
+};
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isObject = __webpack_require__(9);
+module.exports = function(it){
+ if(!isObject(it))throw TypeError(it + ' is not an object!');
+ return it;
+};
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// Thank's IE8 for his funny defineProperty
+module.exports = !__webpack_require__(17)(function(){
+ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
+});
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports) {
+
+module.exports = {};
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// optional / simple context binding
+var aFunction = __webpack_require__(16);
+module.exports = function(fn, that, length){
+ aFunction(fn);
+ if(that === undefined)return fn;
+ switch(length){
+ case 1: return function(a){
+ return fn.call(that, a);
+ };
+ case 2: return function(a, b){
+ return fn.call(that, a, b);
+ };
+ case 3: return function(a, b, c){
+ return fn.call(that, a, b, c);
+ };
+ }
+ return function(/* ...args */){
+ return fn.apply(that, arguments);
+ };
+};
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var anObject = __webpack_require__(4)
+ , IE8_DOM_DEFINE = __webpack_require__(44)
+ , toPrimitive = __webpack_require__(45)
+ , dP = Object.defineProperty;
+
+exports.f = __webpack_require__(5) ? Object.defineProperty : function defineProperty(O, P, Attributes){
+ anObject(O);
+ P = toPrimitive(P, true);
+ anObject(Attributes);
+ if(IE8_DOM_DEFINE)try {
+ return dP(O, P, Attributes);
+ } catch(e){ /* empty */ }
+ if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
+ if('value' in Attributes)O[P] = Attributes.value;
+ return O;
+};
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports) {
+
+module.exports = function(it){
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
+};
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports) {
+
+var hasOwnProperty = {}.hasOwnProperty;
+module.exports = function(it, key){
+ return hasOwnProperty.call(it, key);
+};
+
+/***/ }),
+/* 11 */
+/***/ (function(module, exports) {
+
+var toString = {}.toString;
+
+module.exports = function(it){
+ return toString.call(it).slice(8, -1);
+};
+
+/***/ }),
+/* 12 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(40), __esModule: true };
+
+/***/ }),
+/* 13 */
+/***/ (function(module, exports) {
+
+// 7.1.4 ToInteger
+var ceil = Math.ceil
+ , floor = Math.floor;
+module.exports = function(it){
+ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
+};
+
+/***/ }),
+/* 14 */
+/***/ (function(module, exports) {
+
+// 7.2.1 RequireObjectCoercible(argument)
+module.exports = function(it){
+ if(it == undefined)throw TypeError("Can't call method on " + it);
+ return it;
+};
+
+/***/ }),
+/* 15 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var global = __webpack_require__(1)
+ , core = __webpack_require__(2)
+ , ctx = __webpack_require__(7)
+ , hide = __webpack_require__(3)
+ , PROTOTYPE = 'prototype';
+
+var $export = function(type, name, source){
+ var IS_FORCED = type & $export.F
+ , IS_GLOBAL = type & $export.G
+ , IS_STATIC = type & $export.S
+ , IS_PROTO = type & $export.P
+ , IS_BIND = type & $export.B
+ , IS_WRAP = type & $export.W
+ , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
+ , expProto = exports[PROTOTYPE]
+ , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
+ , key, own, out;
+ if(IS_GLOBAL)source = name;
+ for(key in source){
+ // contains in native
+ own = !IS_FORCED && target && target[key] !== undefined;
+ if(own && key in exports)continue;
+ // export native or passed
+ out = own ? target[key] : source[key];
+ // prevent global pollution for namespaces
+ exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
+ // bind timers to global for call from export context
+ : IS_BIND && own ? ctx(out, global)
+ // wrap global constructors for prevent change them in library
+ : IS_WRAP && target[key] == out ? (function(C){
+ var F = function(a, b, c){
+ if(this instanceof C){
+ switch(arguments.length){
+ case 0: return new C;
+ case 1: return new C(a);
+ case 2: return new C(a, b);
+ } return new C(a, b, c);
+ } return C.apply(this, arguments);
+ };
+ F[PROTOTYPE] = C[PROTOTYPE];
+ return F;
+ // make static versions for prototype methods
+ })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
+ // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
+ if(IS_PROTO){
+ (exports.virtual || (exports.virtual = {}))[key] = out;
+ // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
+ if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
+ }
+ }
+};
+// type bitmap
+$export.F = 1; // forced
+$export.G = 2; // global
+$export.S = 4; // static
+$export.P = 8; // proto
+$export.B = 16; // bind
+$export.W = 32; // wrap
+$export.U = 64; // safe
+$export.R = 128; // real proto method for `library`
+module.exports = $export;
+
+/***/ }),
+/* 16 */
+/***/ (function(module, exports) {
+
+module.exports = function(it){
+ if(typeof it != 'function')throw TypeError(it + ' is not a function!');
+ return it;
+};
+
+/***/ }),
+/* 17 */
+/***/ (function(module, exports) {
+
+module.exports = function(exec){
+ try {
+ return !!exec();
+ } catch(e){
+ return true;
+ }
+};
+
+/***/ }),
+/* 18 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isObject = __webpack_require__(9)
+ , document = __webpack_require__(1).document
+ // in old IE typeof document.createElement is 'object'
+ , is = isObject(document) && isObject(document.createElement);
+module.exports = function(it){
+ return is ? document.createElement(it) : {};
+};
+
+/***/ }),
+/* 19 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// to indexed object, toObject with fallback for non-array-like ES3 strings
+var IObject = __webpack_require__(51)
+ , defined = __webpack_require__(14);
+module.exports = function(it){
+ return IObject(defined(it));
+};
+
+/***/ }),
+/* 20 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var shared = __webpack_require__(27)('keys')
+ , uid = __webpack_require__(28);
+module.exports = function(key){
+ return shared[key] || (shared[key] = uid(key));
+};
+
+/***/ }),
+/* 21 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var def = __webpack_require__(8).f
+ , has = __webpack_require__(10)
+ , TAG = __webpack_require__(0)('toStringTag');
+
+module.exports = function(it, tag, stat){
+ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
+};
+
+/***/ }),
+/* 22 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var LIBRARY = __webpack_require__(23)
+ , $export = __webpack_require__(15)
+ , redefine = __webpack_require__(46)
+ , hide = __webpack_require__(3)
+ , has = __webpack_require__(10)
+ , Iterators = __webpack_require__(6)
+ , $iterCreate = __webpack_require__(47)
+ , setToStringTag = __webpack_require__(21)
+ , getPrototypeOf = __webpack_require__(54)
+ , ITERATOR = __webpack_require__(0)('iterator')
+ , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
+ , FF_ITERATOR = '@@iterator'
+ , KEYS = 'keys'
+ , VALUES = 'values';
+
+var returnThis = function(){ return this; };
+
+module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
+ $iterCreate(Constructor, NAME, next);
+ var getMethod = function(kind){
+ if(!BUGGY && kind in proto)return proto[kind];
+ switch(kind){
+ case KEYS: return function keys(){ return new Constructor(this, kind); };
+ case VALUES: return function values(){ return new Constructor(this, kind); };
+ } return function entries(){ return new Constructor(this, kind); };
+ };
+ var TAG = NAME + ' Iterator'
+ , DEF_VALUES = DEFAULT == VALUES
+ , VALUES_BUG = false
+ , proto = Base.prototype
+ , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
+ , $default = $native || getMethod(DEFAULT)
+ , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
+ , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
+ , methods, key, IteratorPrototype;
+ // Fix native
+ if($anyNative){
+ IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
+ if(IteratorPrototype !== Object.prototype){
+ // Set @@toStringTag to native iterators
+ setToStringTag(IteratorPrototype, TAG, true);
+ // fix for some old engines
+ if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
+ }
+ }
+ // fix Array#{values, @@iterator}.name in V8 / FF
+ if(DEF_VALUES && $native && $native.name !== VALUES){
+ VALUES_BUG = true;
+ $default = function values(){ return $native.call(this); };
+ }
+ // Define iterator
+ if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
+ hide(proto, ITERATOR, $default);
+ }
+ // Plug for library
+ Iterators[NAME] = $default;
+ Iterators[TAG] = returnThis;
+ if(DEFAULT){
+ methods = {
+ values: DEF_VALUES ? $default : getMethod(VALUES),
+ keys: IS_SET ? $default : getMethod(KEYS),
+ entries: $entries
+ };
+ if(FORCED)for(key in methods){
+ if(!(key in proto))redefine(proto, key, methods[key]);
+ } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
+ }
+ return methods;
+};
+
+/***/ }),
+/* 23 */
+/***/ (function(module, exports) {
+
+module.exports = true;
+
+/***/ }),
+/* 24 */
+/***/ (function(module, exports) {
+
+module.exports = function(bitmap, value){
+ return {
+ enumerable : !(bitmap & 1),
+ configurable: !(bitmap & 2),
+ writable : !(bitmap & 4),
+ value : value
+ };
+};
+
+/***/ }),
+/* 25 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// 19.1.2.14 / 15.2.3.14 Object.keys(O)
+var $keys = __webpack_require__(50)
+ , enumBugKeys = __webpack_require__(29);
+
+module.exports = Object.keys || function keys(O){
+ return $keys(O, enumBugKeys);
+};
+
+/***/ }),
+/* 26 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// 7.1.15 ToLength
+var toInteger = __webpack_require__(13)
+ , min = Math.min;
+module.exports = function(it){
+ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
+};
+
+/***/ }),
+/* 27 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var global = __webpack_require__(1)
+ , SHARED = '__core-js_shared__'
+ , store = global[SHARED] || (global[SHARED] = {});
+module.exports = function(key){
+ return store[key] || (store[key] = {});
+};
+
+/***/ }),
+/* 28 */
+/***/ (function(module, exports) {
+
+var id = 0
+ , px = Math.random();
+module.exports = function(key){
+ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
+};
+
+/***/ }),
+/* 29 */
+/***/ (function(module, exports) {
+
+// IE 8- don't enum bug keys
+module.exports = (
+ 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
+).split(',');
+
+/***/ }),
+/* 30 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(1).document && document.documentElement;
+
+/***/ }),
+/* 31 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// 7.1.13 ToObject(argument)
+var defined = __webpack_require__(14);
+module.exports = function(it){
+ return Object(defined(it));
+};
+
+/***/ }),
+/* 32 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// getting tag from 19.1.3.6 Object.prototype.toString()
+var cof = __webpack_require__(11)
+ , TAG = __webpack_require__(0)('toStringTag')
+ // ES3 wrong here
+ , ARG = cof(function(){ return arguments; }()) == 'Arguments';
+
+// fallback for IE11 Script Access Denied error
+var tryGet = function(it, key){
+ try {
+ return it[key];
+ } catch(e){ /* empty */ }
+};
+
+module.exports = function(it){
+ var O, T, B;
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
+ // @@toStringTag case
+ : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
+ // builtinTag case
+ : ARG ? cof(O)
+ // ES3 arguments fallback
+ : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
+};
+
+/***/ }),
+/* 33 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var ctx = __webpack_require__(7)
+ , invoke = __webpack_require__(66)
+ , html = __webpack_require__(30)
+ , cel = __webpack_require__(18)
+ , global = __webpack_require__(1)
+ , process = global.process
+ , setTask = global.setImmediate
+ , clearTask = global.clearImmediate
+ , MessageChannel = global.MessageChannel
+ , counter = 0
+ , queue = {}
+ , ONREADYSTATECHANGE = 'onreadystatechange'
+ , defer, channel, port;
+var run = function(){
+ var id = +this;
+ if(queue.hasOwnProperty(id)){
+ var fn = queue[id];
+ delete queue[id];
+ fn();
+ }
+};
+var listener = function(event){
+ run.call(event.data);
+};
+// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
+if(!setTask || !clearTask){
+ setTask = function setImmediate(fn){
+ var args = [], i = 1;
+ while(arguments.length > i)args.push(arguments[i++]);
+ queue[++counter] = function(){
+ invoke(typeof fn == 'function' ? fn : Function(fn), args);
+ };
+ defer(counter);
+ return counter;
+ };
+ clearTask = function clearImmediate(id){
+ delete queue[id];
+ };
+ // Node.js 0.8-
+ if(__webpack_require__(11)(process) == 'process'){
+ defer = function(id){
+ process.nextTick(ctx(run, id, 1));
+ };
+ // Browsers with MessageChannel, includes WebWorkers
+ } else if(MessageChannel){
+ channel = new MessageChannel;
+ port = channel.port2;
+ channel.port1.onmessage = listener;
+ defer = ctx(port.postMessage, port, 1);
+ // Browsers with postMessage, skip WebWorkers
+ // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
+ } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){
+ defer = function(id){
+ global.postMessage(id + '', '*');
+ };
+ global.addEventListener('message', listener, false);
+ // IE8-
+ } else if(ONREADYSTATECHANGE in cel('script')){
+ defer = function(id){
+ html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){
+ html.removeChild(this);
+ run.call(id);
+ };
+ };
+ // Rest old browsers
+ } else {
+ defer = function(id){
+ setTimeout(ctx(run, id, 1), 0);
+ };
+ }
+}
+module.exports = {
+ set: setTask,
+ clear: clearTask
+};
+
+/***/ }),
+/* 34 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(71);
+
+
+/***/ }),
+/* 35 */
+/***/ (function(module, exports) {
+
+var g;
+
+// This works in non-strict mode
+g = (function() {
+ return this;
+})();
+
+try {
+ // This works if eval is allowed (see CSP)
+ g = g || Function("return this")() || (1,eval)("this");
+} catch(e) {
+ // This works if the window reference is available
+ if(typeof window === "object")
+ g = window;
+}
+
+// g can still be undefined, but nothing to do about it...
+// We return undefined, instead of nothing here, so it's
+// easier to handle this case. if(!global) { ...}
+
+module.exports = g;
+
+
+/***/ }),
+/* 36 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _promise = __webpack_require__(12);
+
+var _promise2 = _interopRequireDefault(_promise);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = function (fn) {
+ return function () {
+ var gen = fn.apply(this, arguments);
+ return new _promise2.default(function (resolve, reject) {
+ function step(key, arg) {
+ try {
+ var info = gen[key](arg);
+ var value = info.value;
+ } catch (error) {
+ reject(error);
+ return;
+ }
+
+ if (info.done) {
+ resolve(value);
+ } else {
+ return _promise2.default.resolve(value).then(function (value) {
+ step("next", value);
+ }, function (err) {
+ step("throw", err);
+ });
+ }
+ }
+
+ return step("next");
+ });
+ };
+};
+
+/***/ }),
+/* 37 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _keys = __webpack_require__(77);
+
+var _keys2 = _interopRequireDefault(_keys);
+
+exports.isObjectEmpty = isObjectEmpty;
+exports.getQueryStringValue = getQueryStringValue;
+exports.pageHasNodeOfClass = pageHasNodeOfClass;
+exports.hasStringInPath = hasStringInPath;
+exports.pathCount = pathCount;
+exports.setTimeForToday = setTimeForToday;
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function isObjectEmpty(obj) {
+ return (0, _keys2.default)(obj).length === 0 && obj.constructor === Object;
+}
+
+function getQueryStringValue(key) {
+ var urlParams = new URLSearchParams(window.location.search);
+ return urlParams.get(key);
+}
+
+function pageHasNodeOfClass(className) {
+ return document.getElementsByClassName(className).length > 0;
+}
+
+function hasStringInPath(value) {
+ return location.pathname.substring(1).split('/').filter(function (x) {
+ return !!x && x === value;
+ }).length > 0;
+}
+
+function pathCount() {
+ return location.pathname.substring(1).split('/').length;
+}
+
+function setTimeForToday(time) {
+ var d = new Date();
+ var split = time.split(':');
+ if (!split.length || split.length > 3) {
+ return null;
+ }
+ var hour = +split[0];
+ var minute = +split[1];
+ var seconds = +split[2];
+ if (isNaN(hour) || hour > 24) {
+ return null;
+ }
+
+ if (isNaN(minute) || minute > 60 || hour === 24 && minute > 0) {
+ return null;
+ }
+
+ if (isNaN(seconds) || seconds > 60) {
+ return null;
+ }
+ if (hour < 0 || minute < 0 || seconds < 0) return null;
+ d.setHours(hour);
+ d.setMinutes(minute);
+ d.setSeconds(seconds);
+ return d;
+}
+
+/***/ }),
+/* 38 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(39);
+
+
+/***/ }),
+/* 39 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _promise = __webpack_require__(12);
+
+var _promise2 = _interopRequireDefault(_promise);
+
+var _regenerator = __webpack_require__(34);
+
+var _regenerator2 = _interopRequireDefault(_regenerator);
+
+var _asyncToGenerator2 = __webpack_require__(36);
+
+var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
+
+var getEnabledAtcProducts = function () {
+ var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee() {
+ var atc;
+ return _regenerator2.default.wrap(function _callee$(_context) {
+ while (1) {
+ switch (_context.prev = _context.next) {
+ case 0:
+ _context.next = 2;
+ return (0, _StorageManager.getFromChromeStorage)('atc');
+
+ case 2:
+ atc = _context.sent;
+
+ if (!(atc && atc.atcProducts)) {
+ _context.next = 5;
+ break;
+ }
+
+ return _context.abrupt('return', atc.atcProducts.filter(function (x) {
+ return x.enabled;
+ }));
+
+ case 5:
+ return _context.abrupt('return', []);
+
+ case 6:
+ case 'end':
+ return _context.stop();
+ }
+ }
+ }, _callee, this);
+ }));
+
+ return function getEnabledAtcProducts() {
+ return _ref.apply(this, arguments);
+ };
+}();
+
+var getSettings = function () {
+ var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2() {
+ var settings;
+ return _regenerator2.default.wrap(function _callee2$(_context2) {
+ while (1) {
+ switch (_context2.prev = _context2.next) {
+ case 0:
+ _context2.next = 2;
+ return (0, _StorageManager.getFromChromeStorage)('settings');
+
+ case 2:
+ settings = _context2.sent;
+
+ if (!(settings && settings['Supreme'])) {
+ _context2.next = 5;
+ break;
+ }
+
+ return _context2.abrupt('return', settings['Supreme']);
+
+ case 5:
+ return _context2.abrupt('return', null);
+
+ case 6:
+ case 'end':
+ return _context2.stop();
+ }
+ }
+ }, _callee2, this);
+ }));
+
+ return function getSettings() {
+ return _ref2.apply(this, arguments);
+ };
+}();
+
+var processProducts = function () {
+ var _ref3 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee3(products) {
+ var i, product, category, keywords, color, url;
+ return _regenerator2.default.wrap(function _callee3$(_context3) {
+ while (1) {
+ switch (_context3.prev = _context3.next) {
+ case 0:
+ for (i = 0; i < products.length; i += 1) {
+ product = products[i];
+ category = product.category;
+
+ if (category === 'tops-sweaters') {
+ category = 'tops_sweaters';
+ }
+ keywords = product.keywords;
+ color = product.color;
+ url = 'http://supremenewyork.com/shop/all/' + category + '?atc-kw=' + keywords.join(';');
+
+ if (color) {
+ url = url + '&atc-color=' + color;
+ }
+ chrome.tabs.create({ url: url });
+ }
+
+ case 1:
+ case 'end':
+ return _context3.stop();
+ }
+ }
+ }, _callee3, this);
+ }));
+
+ return function processProducts(_x) {
+ return _ref3.apply(this, arguments);
+ };
+}();
+
+var sleep = function () {
+ var _ref4 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee4(ms) {
+ return _regenerator2.default.wrap(function _callee4$(_context4) {
+ while (1) {
+ switch (_context4.prev = _context4.next) {
+ case 0:
+ return _context4.abrupt('return', new _promise2.default(function (resolve) {
+ setTimeout(function () {
+ return resolve();
+ }, ms);
+ }));
+
+ case 1:
+ case 'end':
+ return _context4.stop();
+ }
+ }
+ }, _callee4, this);
+ }));
+
+ return function sleep(_x2) {
+ return _ref4.apply(this, arguments);
+ };
+}();
+
+var timeout = function () {
+ var _ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee5(ms, callback) {
+ return _regenerator2.default.wrap(function _callee5$(_context5) {
+ while (1) {
+ switch (_context5.prev = _context5.next) {
+ case 0:
+ _context5.next = 2;
+ return sleep(ms);
+
+ case 2:
+ callback();
+
+ case 3:
+ case 'end':
+ return _context5.stop();
+ }
+ }
+ }, _callee5, this);
+ }));
+
+ return function timeout(_x3, _x4) {
+ return _ref5.apply(this, arguments);
+ };
+}();
+
+var loop = function () {
+ var _ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee6() {
+ var now, settings, startTime, diffTime, products;
+ return _regenerator2.default.wrap(function _callee6$(_context6) {
+ while (1) {
+ switch (_context6.prev = _context6.next) {
+ case 0:
+ now = new Date();
+ _context6.next = 3;
+ return getSettings();
+
+ case 3:
+ settings = _context6.sent;
+ startTime = getAtcStartTime(settings);
+
+ if (startTime) {
+ _context6.next = 9;
+ break;
+ }
+
+ _context6.next = 8;
+ return timeout(1000, function () {
+ return loop();
+ });
+
+ case 8:
+ return _context6.abrupt('return');
+
+ case 9:
+ diffTime = (startTime.getTime() - now.getTime()) / 1000;
+
+ console.log('ATC starting in ' + diffTime + ' seconds...');
+
+ if (!(diffTime <= 0 && Math.abs(diffTime) < 3)) {
+ _context6.next = 20;
+ break;
+ }
+
+ _context6.next = 14;
+ return getEnabledAtcProducts();
+
+ case 14:
+ products = _context6.sent;
+ _context6.next = 17;
+ return processProducts(products);
+
+ case 17:
+ _context6.next = 19;
+ return timeout(4000, function () {
+ return loop();
+ });
+
+ case 19:
+ return _context6.abrupt('return');
+
+ case 20:
+ _context6.next = 22;
+ return timeout(1000, function () {
+ return loop();
+ });
+
+ case 22:
+ case 'end':
+ return _context6.stop();
+ }
+ }
+ }, _callee6, this);
+ }));
+
+ return function loop() {
+ return _ref6.apply(this, arguments);
+ };
+}();
+
+var start = function () {
+ var _ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee7() {
+ return _regenerator2.default.wrap(function _callee7$(_context7) {
+ while (1) {
+ switch (_context7.prev = _context7.next) {
+ case 0:
+ _context7.next = 2;
+ return loop();
+
+ case 2:
+ case 'end':
+ return _context7.stop();
+ }
+ }
+ }, _callee7, this);
+ }));
+
+ return function start() {
+ return _ref7.apply(this, arguments);
+ };
+}();
+
+var _StorageManager = __webpack_require__(74);
+
+var _Menus = __webpack_require__(81);
+
+var menus = _interopRequireWildcard(_Menus);
+
+var _Helpers = __webpack_require__(37);
+
+var Helpers = _interopRequireWildcard(_Helpers);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function getAtcStartTime(settings) {
+ if (!settings || !settings[menus.MENU_OPTIONS] || !settings[menus.MENU_OPTIONS].atcEnabled) {
+ return null;
+ }
+ var atcStartTime = settings[menus.MENU_OPTIONS].atcStartTime;
+ if (!atcStartTime) {
+ return null;
+ }
+ return Helpers.setTimeForToday(atcStartTime);
+}
+
+start();
+
+/***/ }),
+/* 40 */
+/***/ (function(module, exports, __webpack_require__) {
+
+__webpack_require__(41);
+__webpack_require__(42);
+__webpack_require__(55);
+__webpack_require__(59);
+module.exports = __webpack_require__(2).Promise;
+
+/***/ }),
+/* 41 */
+/***/ (function(module, exports) {
+
+
+
+/***/ }),
+/* 42 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var $at = __webpack_require__(43)(true);
+
+// 21.1.3.27 String.prototype[@@iterator]()
+__webpack_require__(22)(String, 'String', function(iterated){
+ this._t = String(iterated); // target
+ this._i = 0; // next index
+// 21.1.5.2.1 %StringIteratorPrototype%.next()
+}, function(){
+ var O = this._t
+ , index = this._i
+ , point;
+ if(index >= O.length)return {value: undefined, done: true};
+ point = $at(O, index);
+ this._i += point.length;
+ return {value: point, done: false};
+});
+
+/***/ }),
+/* 43 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var toInteger = __webpack_require__(13)
+ , defined = __webpack_require__(14);
+// true -> String#at
+// false -> String#codePointAt
+module.exports = function(TO_STRING){
+ return function(that, pos){
+ var s = String(defined(that))
+ , i = toInteger(pos)
+ , l = s.length
+ , a, b;
+ if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
+ a = s.charCodeAt(i);
+ return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
+ ? TO_STRING ? s.charAt(i) : a
+ : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
+ };
+};
+
+/***/ }),
+/* 44 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = !__webpack_require__(5) && !__webpack_require__(17)(function(){
+ return Object.defineProperty(__webpack_require__(18)('div'), 'a', {get: function(){ return 7; }}).a != 7;
+});
+
+/***/ }),
+/* 45 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// 7.1.1 ToPrimitive(input [, PreferredType])
+var isObject = __webpack_require__(9);
+// instead of the ES6 spec version, we didn't implement @@toPrimitive case
+// and the second argument - flag - preferred type is a string
+module.exports = function(it, S){
+ if(!isObject(it))return it;
+ var fn, val;
+ if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ throw TypeError("Can't convert object to primitive value");
+};
+
+/***/ }),
+/* 46 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(3);
+
+/***/ }),
+/* 47 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var create = __webpack_require__(48)
+ , descriptor = __webpack_require__(24)
+ , setToStringTag = __webpack_require__(21)
+ , IteratorPrototype = {};
+
+// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
+__webpack_require__(3)(IteratorPrototype, __webpack_require__(0)('iterator'), function(){ return this; });
+
+module.exports = function(Constructor, NAME, next){
+ Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
+ setToStringTag(Constructor, NAME + ' Iterator');
+};
+
+/***/ }),
+/* 48 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+var anObject = __webpack_require__(4)
+ , dPs = __webpack_require__(49)
+ , enumBugKeys = __webpack_require__(29)
+ , IE_PROTO = __webpack_require__(20)('IE_PROTO')
+ , Empty = function(){ /* empty */ }
+ , PROTOTYPE = 'prototype';
+
+// Create object with fake `null` prototype: use iframe Object with cleared prototype
+var createDict = function(){
+ // Thrash, waste and sodomy: IE GC bug
+ var iframe = __webpack_require__(18)('iframe')
+ , i = enumBugKeys.length
+ , lt = '<'
+ , gt = '>'
+ , iframeDocument;
+ iframe.style.display = 'none';
+ __webpack_require__(30).appendChild(iframe);
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
+ // createDict = iframe.contentWindow.Object;
+ // html.removeChild(iframe);
+ iframeDocument = iframe.contentWindow.document;
+ iframeDocument.open();
+ iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
+ iframeDocument.close();
+ createDict = iframeDocument.F;
+ while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
+ return createDict();
+};
+
+module.exports = Object.create || function create(O, Properties){
+ var result;
+ if(O !== null){
+ Empty[PROTOTYPE] = anObject(O);
+ result = new Empty;
+ Empty[PROTOTYPE] = null;
+ // add "__proto__" for Object.getPrototypeOf polyfill
+ result[IE_PROTO] = O;
+ } else result = createDict();
+ return Properties === undefined ? result : dPs(result, Properties);
+};
+
+
+/***/ }),
+/* 49 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var dP = __webpack_require__(8)
+ , anObject = __webpack_require__(4)
+ , getKeys = __webpack_require__(25);
+
+module.exports = __webpack_require__(5) ? Object.defineProperties : function defineProperties(O, Properties){
+ anObject(O);
+ var keys = getKeys(Properties)
+ , length = keys.length
+ , i = 0
+ , P;
+ while(length > i)dP.f(O, P = keys[i++], Properties[P]);
+ return O;
+};
+
+/***/ }),
+/* 50 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var has = __webpack_require__(10)
+ , toIObject = __webpack_require__(19)
+ , arrayIndexOf = __webpack_require__(52)(false)
+ , IE_PROTO = __webpack_require__(20)('IE_PROTO');
+
+module.exports = function(object, names){
+ var O = toIObject(object)
+ , i = 0
+ , result = []
+ , key;
+ for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
+ // Don't enum bug & hidden keys
+ while(names.length > i)if(has(O, key = names[i++])){
+ ~arrayIndexOf(result, key) || result.push(key);
+ }
+ return result;
+};
+
+/***/ }),
+/* 51 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// fallback for non-array-like ES3 and non-enumerable old V8 strings
+var cof = __webpack_require__(11);
+module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
+ return cof(it) == 'String' ? it.split('') : Object(it);
+};
+
+/***/ }),
+/* 52 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// false -> Array#indexOf
+// true -> Array#includes
+var toIObject = __webpack_require__(19)
+ , toLength = __webpack_require__(26)
+ , toIndex = __webpack_require__(53);
+module.exports = function(IS_INCLUDES){
+ return function($this, el, fromIndex){
+ var O = toIObject($this)
+ , length = toLength(O.length)
+ , index = toIndex(fromIndex, length)
+ , value;
+ // Array#includes uses SameValueZero equality algorithm
+ if(IS_INCLUDES && el != el)while(length > index){
+ value = O[index++];
+ if(value != value)return true;
+ // Array#toIndex ignores holes, Array#includes - not
+ } else for(;length > index; index++)if(IS_INCLUDES || index in O){
+ if(O[index] === el)return IS_INCLUDES || index || 0;
+ } return !IS_INCLUDES && -1;
+ };
+};
+
+/***/ }),
+/* 53 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var toInteger = __webpack_require__(13)
+ , max = Math.max
+ , min = Math.min;
+module.exports = function(index, length){
+ index = toInteger(index);
+ return index < 0 ? max(index + length, 0) : min(index, length);
+};
+
+/***/ }),
+/* 54 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
+var has = __webpack_require__(10)
+ , toObject = __webpack_require__(31)
+ , IE_PROTO = __webpack_require__(20)('IE_PROTO')
+ , ObjectProto = Object.prototype;
+
+module.exports = Object.getPrototypeOf || function(O){
+ O = toObject(O);
+ if(has(O, IE_PROTO))return O[IE_PROTO];
+ if(typeof O.constructor == 'function' && O instanceof O.constructor){
+ return O.constructor.prototype;
+ } return O instanceof Object ? ObjectProto : null;
+};
+
+/***/ }),
+/* 55 */
+/***/ (function(module, exports, __webpack_require__) {
+
+__webpack_require__(56);
+var global = __webpack_require__(1)
+ , hide = __webpack_require__(3)
+ , Iterators = __webpack_require__(6)
+ , TO_STRING_TAG = __webpack_require__(0)('toStringTag');
+
+for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
+ var NAME = collections[i]
+ , Collection = global[NAME]
+ , proto = Collection && Collection.prototype;
+ if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
+ Iterators[NAME] = Iterators.Array;
+}
+
+/***/ }),
+/* 56 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var addToUnscopables = __webpack_require__(57)
+ , step = __webpack_require__(58)
+ , Iterators = __webpack_require__(6)
+ , toIObject = __webpack_require__(19);
+
+// 22.1.3.4 Array.prototype.entries()
+// 22.1.3.13 Array.prototype.keys()
+// 22.1.3.29 Array.prototype.values()
+// 22.1.3.30 Array.prototype[@@iterator]()
+module.exports = __webpack_require__(22)(Array, 'Array', function(iterated, kind){
+ this._t = toIObject(iterated); // target
+ this._i = 0; // next index
+ this._k = kind; // kind
+// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
+}, function(){
+ var O = this._t
+ , kind = this._k
+ , index = this._i++;
+ if(!O || index >= O.length){
+ this._t = undefined;
+ return step(1);
+ }
+ if(kind == 'keys' )return step(0, index);
+ if(kind == 'values')return step(0, O[index]);
+ return step(0, [index, O[index]]);
+}, 'values');
+
+// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
+Iterators.Arguments = Iterators.Array;
+
+addToUnscopables('keys');
+addToUnscopables('values');
+addToUnscopables('entries');
+
+/***/ }),
+/* 57 */
+/***/ (function(module, exports) {
+
+module.exports = function(){ /* empty */ };
+
+/***/ }),
+/* 58 */
+/***/ (function(module, exports) {
+
+module.exports = function(done, value){
+ return {value: value, done: !!done};
+};
+
+/***/ }),
+/* 59 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var LIBRARY = __webpack_require__(23)
+ , global = __webpack_require__(1)
+ , ctx = __webpack_require__(7)
+ , classof = __webpack_require__(32)
+ , $export = __webpack_require__(15)
+ , isObject = __webpack_require__(9)
+ , aFunction = __webpack_require__(16)
+ , anInstance = __webpack_require__(60)
+ , forOf = __webpack_require__(61)
+ , speciesConstructor = __webpack_require__(65)
+ , task = __webpack_require__(33).set
+ , microtask = __webpack_require__(67)()
+ , PROMISE = 'Promise'
+ , TypeError = global.TypeError
+ , process = global.process
+ , $Promise = global[PROMISE]
+ , process = global.process
+ , isNode = classof(process) == 'process'
+ , empty = function(){ /* empty */ }
+ , Internal, GenericPromiseCapability, Wrapper;
+
+var USE_NATIVE = !!function(){
+ try {
+ // correct subclassing with @@species support
+ var promise = $Promise.resolve(1)
+ , FakePromise = (promise.constructor = {})[__webpack_require__(0)('species')] = function(exec){ exec(empty, empty); };
+ // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
+ return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
+ } catch(e){ /* empty */ }
+}();
+
+// helpers
+var sameConstructor = function(a, b){
+ // with library wrapper special case
+ return a === b || a === $Promise && b === Wrapper;
+};
+var isThenable = function(it){
+ var then;
+ return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
+};
+var newPromiseCapability = function(C){
+ return sameConstructor($Promise, C)
+ ? new PromiseCapability(C)
+ : new GenericPromiseCapability(C);
+};
+var PromiseCapability = GenericPromiseCapability = function(C){
+ var resolve, reject;
+ this.promise = new C(function($$resolve, $$reject){
+ if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');
+ resolve = $$resolve;
+ reject = $$reject;
+ });
+ this.resolve = aFunction(resolve);
+ this.reject = aFunction(reject);
+};
+var perform = function(exec){
+ try {
+ exec();
+ } catch(e){
+ return {error: e};
+ }
+};
+var notify = function(promise, isReject){
+ if(promise._n)return;
+ promise._n = true;
+ var chain = promise._c;
+ microtask(function(){
+ var value = promise._v
+ , ok = promise._s == 1
+ , i = 0;
+ var run = function(reaction){
+ var handler = ok ? reaction.ok : reaction.fail
+ , resolve = reaction.resolve
+ , reject = reaction.reject
+ , domain = reaction.domain
+ , result, then;
+ try {
+ if(handler){
+ if(!ok){
+ if(promise._h == 2)onHandleUnhandled(promise);
+ promise._h = 1;
+ }
+ if(handler === true)result = value;
+ else {
+ if(domain)domain.enter();
+ result = handler(value);
+ if(domain)domain.exit();
+ }
+ if(result === reaction.promise){
+ reject(TypeError('Promise-chain cycle'));
+ } else if(then = isThenable(result)){
+ then.call(result, resolve, reject);
+ } else resolve(result);
+ } else reject(value);
+ } catch(e){
+ reject(e);
+ }
+ };
+ while(chain.length > i)run(chain[i++]); // variable length - can't use forEach
+ promise._c = [];
+ promise._n = false;
+ if(isReject && !promise._h)onUnhandled(promise);
+ });
+};
+var onUnhandled = function(promise){
+ task.call(global, function(){
+ var value = promise._v
+ , abrupt, handler, console;
+ if(isUnhandled(promise)){
+ abrupt = perform(function(){
+ if(isNode){
+ process.emit('unhandledRejection', value, promise);
+ } else if(handler = global.onunhandledrejection){
+ handler({promise: promise, reason: value});
+ } else if((console = global.console) && console.error){
+ console.error('Unhandled promise rejection', value);
+ }
+ });
+ // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
+ promise._h = isNode || isUnhandled(promise) ? 2 : 1;
+ } promise._a = undefined;
+ if(abrupt)throw abrupt.error;
+ });
+};
+var isUnhandled = function(promise){
+ if(promise._h == 1)return false;
+ var chain = promise._a || promise._c
+ , i = 0
+ , reaction;
+ while(chain.length > i){
+ reaction = chain[i++];
+ if(reaction.fail || !isUnhandled(reaction.promise))return false;
+ } return true;
+};
+var onHandleUnhandled = function(promise){
+ task.call(global, function(){
+ var handler;
+ if(isNode){
+ process.emit('rejectionHandled', promise);
+ } else if(handler = global.onrejectionhandled){
+ handler({promise: promise, reason: promise._v});
+ }
+ });
+};
+var $reject = function(value){
+ var promise = this;
+ if(promise._d)return;
+ promise._d = true;
+ promise = promise._w || promise; // unwrap
+ promise._v = value;
+ promise._s = 2;
+ if(!promise._a)promise._a = promise._c.slice();
+ notify(promise, true);
+};
+var $resolve = function(value){
+ var promise = this
+ , then;
+ if(promise._d)return;
+ promise._d = true;
+ promise = promise._w || promise; // unwrap
+ try {
+ if(promise === value)throw TypeError("Promise can't be resolved itself");
+ if(then = isThenable(value)){
+ microtask(function(){
+ var wrapper = {_w: promise, _d: false}; // wrap
+ try {
+ then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
+ } catch(e){
+ $reject.call(wrapper, e);
+ }
+ });
+ } else {
+ promise._v = value;
+ promise._s = 1;
+ notify(promise, false);
+ }
+ } catch(e){
+ $reject.call({_w: promise, _d: false}, e); // wrap
+ }
+};
+
+// constructor polyfill
+if(!USE_NATIVE){
+ // 25.4.3.1 Promise(executor)
+ $Promise = function Promise(executor){
+ anInstance(this, $Promise, PROMISE, '_h');
+ aFunction(executor);
+ Internal.call(this);
+ try {
+ executor(ctx($resolve, this, 1), ctx($reject, this, 1));
+ } catch(err){
+ $reject.call(this, err);
+ }
+ };
+ Internal = function Promise(executor){
+ this._c = []; // <- awaiting reactions
+ this._a = undefined; // <- checked in isUnhandled reactions
+ this._s = 0; // <- state
+ this._d = false; // <- done
+ this._v = undefined; // <- value
+ this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
+ this._n = false; // <- notify
+ };
+ Internal.prototype = __webpack_require__(68)($Promise.prototype, {
+ // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
+ then: function then(onFulfilled, onRejected){
+ var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
+ reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
+ reaction.fail = typeof onRejected == 'function' && onRejected;
+ reaction.domain = isNode ? process.domain : undefined;
+ this._c.push(reaction);
+ if(this._a)this._a.push(reaction);
+ if(this._s)notify(this, false);
+ return reaction.promise;
+ },
+ // 25.4.5.1 Promise.prototype.catch(onRejected)
+ 'catch': function(onRejected){
+ return this.then(undefined, onRejected);
+ }
+ });
+ PromiseCapability = function(){
+ var promise = new Internal;
+ this.promise = promise;
+ this.resolve = ctx($resolve, promise, 1);
+ this.reject = ctx($reject, promise, 1);
+ };
+}
+
+$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});
+__webpack_require__(21)($Promise, PROMISE);
+__webpack_require__(69)(PROMISE);
+Wrapper = __webpack_require__(2)[PROMISE];
+
+// statics
+$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
+ // 25.4.4.5 Promise.reject(r)
+ reject: function reject(r){
+ var capability = newPromiseCapability(this)
+ , $$reject = capability.reject;
+ $$reject(r);
+ return capability.promise;
+ }
+});
+$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
+ // 25.4.4.6 Promise.resolve(x)
+ resolve: function resolve(x){
+ // instanceof instead of internal slot check because we should fix it without replacement native Promise core
+ if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;
+ var capability = newPromiseCapability(this)
+ , $$resolve = capability.resolve;
+ $$resolve(x);
+ return capability.promise;
+ }
+});
+$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(70)(function(iter){
+ $Promise.all(iter)['catch'](empty);
+})), PROMISE, {
+ // 25.4.4.1 Promise.all(iterable)
+ all: function all(iterable){
+ var C = this
+ , capability = newPromiseCapability(C)
+ , resolve = capability.resolve
+ , reject = capability.reject;
+ var abrupt = perform(function(){
+ var values = []
+ , index = 0
+ , remaining = 1;
+ forOf(iterable, false, function(promise){
+ var $index = index++
+ , alreadyCalled = false;
+ values.push(undefined);
+ remaining++;
+ C.resolve(promise).then(function(value){
+ if(alreadyCalled)return;
+ alreadyCalled = true;
+ values[$index] = value;
+ --remaining || resolve(values);
+ }, reject);
+ });
+ --remaining || resolve(values);
+ });
+ if(abrupt)reject(abrupt.error);
+ return capability.promise;
+ },
+ // 25.4.4.4 Promise.race(iterable)
+ race: function race(iterable){
+ var C = this
+ , capability = newPromiseCapability(C)
+ , reject = capability.reject;
+ var abrupt = perform(function(){
+ forOf(iterable, false, function(promise){
+ C.resolve(promise).then(capability.resolve, reject);
+ });
+ });
+ if(abrupt)reject(abrupt.error);
+ return capability.promise;
+ }
+});
+
+/***/ }),
+/* 60 */
+/***/ (function(module, exports) {
+
+module.exports = function(it, Constructor, name, forbiddenField){
+ if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){
+ throw TypeError(name + ': incorrect invocation!');
+ } return it;
+};
+
+/***/ }),
+/* 61 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var ctx = __webpack_require__(7)
+ , call = __webpack_require__(62)
+ , isArrayIter = __webpack_require__(63)
+ , anObject = __webpack_require__(4)
+ , toLength = __webpack_require__(26)
+ , getIterFn = __webpack_require__(64)
+ , BREAK = {}
+ , RETURN = {};
+var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){
+ var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)
+ , f = ctx(fn, that, entries ? 2 : 1)
+ , index = 0
+ , length, step, iterator, result;
+ if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');
+ // fast case for arrays with default iterator
+ if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){
+ result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
+ if(result === BREAK || result === RETURN)return result;
+ } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){
+ result = call(iterator, f, step.value, entries);
+ if(result === BREAK || result === RETURN)return result;
+ }
+};
+exports.BREAK = BREAK;
+exports.RETURN = RETURN;
+
+/***/ }),
+/* 62 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// call something on iterator step with safe closing on error
+var anObject = __webpack_require__(4);
+module.exports = function(iterator, fn, value, entries){
+ try {
+ return entries ? fn(anObject(value)[0], value[1]) : fn(value);
+ // 7.4.6 IteratorClose(iterator, completion)
+ } catch(e){
+ var ret = iterator['return'];
+ if(ret !== undefined)anObject(ret.call(iterator));
+ throw e;
+ }
+};
+
+/***/ }),
+/* 63 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// check on default Array iterator
+var Iterators = __webpack_require__(6)
+ , ITERATOR = __webpack_require__(0)('iterator')
+ , ArrayProto = Array.prototype;
+
+module.exports = function(it){
+ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
+};
+
+/***/ }),
+/* 64 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var classof = __webpack_require__(32)
+ , ITERATOR = __webpack_require__(0)('iterator')
+ , Iterators = __webpack_require__(6);
+module.exports = __webpack_require__(2).getIteratorMethod = function(it){
+ if(it != undefined)return it[ITERATOR]
+ || it['@@iterator']
+ || Iterators[classof(it)];
+};
+
+/***/ }),
+/* 65 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// 7.3.20 SpeciesConstructor(O, defaultConstructor)
+var anObject = __webpack_require__(4)
+ , aFunction = __webpack_require__(16)
+ , SPECIES = __webpack_require__(0)('species');
+module.exports = function(O, D){
+ var C = anObject(O).constructor, S;
+ return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
+};
+
+/***/ }),
+/* 66 */
+/***/ (function(module, exports) {
+
+// fast apply, http://jsperf.lnkit.com/fast-apply/5
+module.exports = function(fn, args, that){
+ var un = that === undefined;
+ switch(args.length){
+ case 0: return un ? fn()
+ : fn.call(that);
+ case 1: return un ? fn(args[0])
+ : fn.call(that, args[0]);
+ case 2: return un ? fn(args[0], args[1])
+ : fn.call(that, args[0], args[1]);
+ case 3: return un ? fn(args[0], args[1], args[2])
+ : fn.call(that, args[0], args[1], args[2]);
+ case 4: return un ? fn(args[0], args[1], args[2], args[3])
+ : fn.call(that, args[0], args[1], args[2], args[3]);
+ } return fn.apply(that, args);
+};
+
+/***/ }),
+/* 67 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var global = __webpack_require__(1)
+ , macrotask = __webpack_require__(33).set
+ , Observer = global.MutationObserver || global.WebKitMutationObserver
+ , process = global.process
+ , Promise = global.Promise
+ , isNode = __webpack_require__(11)(process) == 'process';
+
+module.exports = function(){
+ var head, last, notify;
+
+ var flush = function(){
+ var parent, fn;
+ if(isNode && (parent = process.domain))parent.exit();
+ while(head){
+ fn = head.fn;
+ head = head.next;
+ try {
+ fn();
+ } catch(e){
+ if(head)notify();
+ else last = undefined;
+ throw e;
+ }
+ } last = undefined;
+ if(parent)parent.enter();
+ };
+
+ // Node.js
+ if(isNode){
+ notify = function(){
+ process.nextTick(flush);
+ };
+ // browsers with MutationObserver
+ } else if(Observer){
+ var toggle = true
+ , node = document.createTextNode('');
+ new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
+ notify = function(){
+ node.data = toggle = !toggle;
+ };
+ // environments with maybe non-completely correct, but existent Promise
+ } else if(Promise && Promise.resolve){
+ var promise = Promise.resolve();
+ notify = function(){
+ promise.then(flush);
+ };
+ // for other environments - macrotask based on:
+ // - setImmediate
+ // - MessageChannel
+ // - window.postMessag
+ // - onreadystatechange
+ // - setTimeout
+ } else {
+ notify = function(){
+ // strange IE + webpack dev server bug - use .call(global)
+ macrotask.call(global, flush);
+ };
+ }
+
+ return function(fn){
+ var task = {fn: fn, next: undefined};
+ if(last)last.next = task;
+ if(!head){
+ head = task;
+ notify();
+ } last = task;
+ };
+};
+
+/***/ }),
+/* 68 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var hide = __webpack_require__(3);
+module.exports = function(target, src, safe){
+ for(var key in src){
+ if(safe && target[key])target[key] = src[key];
+ else hide(target, key, src[key]);
+ } return target;
+};
+
+/***/ }),
+/* 69 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+var global = __webpack_require__(1)
+ , core = __webpack_require__(2)
+ , dP = __webpack_require__(8)
+ , DESCRIPTORS = __webpack_require__(5)
+ , SPECIES = __webpack_require__(0)('species');
+
+module.exports = function(KEY){
+ var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];
+ if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {
+ configurable: true,
+ get: function(){ return this; }
+ });
+};
+
+/***/ }),
+/* 70 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var ITERATOR = __webpack_require__(0)('iterator')
+ , SAFE_CLOSING = false;
+
+try {
+ var riter = [7][ITERATOR]();
+ riter['return'] = function(){ SAFE_CLOSING = true; };
+ Array.from(riter, function(){ throw 2; });
+} catch(e){ /* empty */ }
+
+module.exports = function(exec, skipClosing){
+ if(!skipClosing && !SAFE_CLOSING)return false;
+ var safe = false;
+ try {
+ var arr = [7]
+ , iter = arr[ITERATOR]();
+ iter.next = function(){ return {done: safe = true}; };
+ arr[ITERATOR] = function(){ return iter; };
+ exec(arr);
+ } catch(e){ /* empty */ }
+ return safe;
+};
+
+/***/ }),
+/* 71 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(global) {// This method of obtaining a reference to the global object needs to be
+// kept identical to the way it is obtained in runtime.js
+var g =
+ typeof global === "object" ? global :
+ typeof window === "object" ? window :
+ typeof self === "object" ? self : this;
+
+// Use `getOwnPropertyNames` because not all browsers support calling
+// `hasOwnProperty` on the global `self` object in a worker. See #183.
+var hadRuntime = g.regeneratorRuntime &&
+ Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
+
+// Save the old regeneratorRuntime in case it needs to be restored later.
+var oldRuntime = hadRuntime && g.regeneratorRuntime;
+
+// Force reevalutation of runtime.js.
+g.regeneratorRuntime = undefined;
+
+module.exports = __webpack_require__(72);
+
+if (hadRuntime) {
+ // Restore the original runtime.
+ g.regeneratorRuntime = oldRuntime;
+} else {
+ // Remove the global property added by runtime.js.
+ try {
+ delete g.regeneratorRuntime;
+ } catch(e) {
+ g.regeneratorRuntime = undefined;
+ }
+}
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(35)))
+
+/***/ }),
+/* 72 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/* WEBPACK VAR INJECTION */(function(global, process) {/**
+ * Copyright (c) 2014, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
+ * additional grant of patent rights can be found in the PATENTS file in
+ * the same directory.
+ */
+
+!(function(global) {
+ "use strict";
+
+ var Op = Object.prototype;
+ var hasOwn = Op.hasOwnProperty;
+ var undefined; // More compressible than void 0.
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
+
+ var inModule = typeof module === "object";
+ var runtime = global.regeneratorRuntime;
+ if (runtime) {
+ if (inModule) {
+ // If regeneratorRuntime is defined globally and we're in a module,
+ // make the exports object identical to regeneratorRuntime.
+ module.exports = runtime;
+ }
+ // Don't bother evaluating the rest of this file if the runtime was
+ // already defined globally.
+ return;
+ }
+
+ // Define the runtime globally (as expected by generated code) as either
+ // module.exports (if we're in a module) or a new, empty object.
+ runtime = global.regeneratorRuntime = inModule ? module.exports : {};
+
+ function wrap(innerFn, outerFn, self, tryLocsList) {
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
+ var generator = Object.create(protoGenerator.prototype);
+ var context = new Context(tryLocsList || []);
+
+ // The ._invoke method unifies the implementations of the .next,
+ // .throw, and .return methods.
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
+
+ return generator;
+ }
+ runtime.wrap = wrap;
+
+ // Try/catch helper to minimize deoptimizations. Returns a completion
+ // record like context.tryEntries[i].completion. This interface could
+ // have been (and was previously) designed to take a closure to be
+ // invoked without arguments, but in all the cases we care about we
+ // already have an existing method we want to call, so there's no need
+ // to create a new function object. We can even get away with assuming
+ // the method takes exactly one argument, since that happens to be true
+ // in every case, so we don't have to touch the arguments object. The
+ // only additional allocation required is the completion record, which
+ // has a stable shape and so hopefully should be cheap to allocate.
+ function tryCatch(fn, obj, arg) {
+ try {
+ return { type: "normal", arg: fn.call(obj, arg) };
+ } catch (err) {
+ return { type: "throw", arg: err };
+ }
+ }
+
+ var GenStateSuspendedStart = "suspendedStart";
+ var GenStateSuspendedYield = "suspendedYield";
+ var GenStateExecuting = "executing";
+ var GenStateCompleted = "completed";
+
+ // Returning this object from the innerFn has the same effect as
+ // breaking out of the dispatch switch statement.
+ var ContinueSentinel = {};
+
+ // Dummy constructor functions that we use as the .constructor and
+ // .constructor.prototype properties for functions that return Generator
+ // objects. For full spec compliance, you may wish to configure your
+ // minifier not to mangle the names of these two functions.
+ function Generator() {}
+ function GeneratorFunction() {}
+ function GeneratorFunctionPrototype() {}
+
+ // This is a polyfill for %IteratorPrototype% for environments that
+ // don't natively support it.
+ var IteratorPrototype = {};
+ IteratorPrototype[iteratorSymbol] = function () {
+ return this;
+ };
+
+ var getProto = Object.getPrototypeOf;
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
+ if (NativeIteratorPrototype &&
+ NativeIteratorPrototype !== Op &&
+ hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
+ // This environment has a native %IteratorPrototype%; use it instead
+ // of the polyfill.
+ IteratorPrototype = NativeIteratorPrototype;
+ }
+
+ var Gp = GeneratorFunctionPrototype.prototype =
+ Generator.prototype = Object.create(IteratorPrototype);
+ GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
+ GeneratorFunctionPrototype.constructor = GeneratorFunction;
+ GeneratorFunctionPrototype[toStringTagSymbol] =
+ GeneratorFunction.displayName = "GeneratorFunction";
+
+ // Helper for defining the .next, .throw, and .return methods of the
+ // Iterator interface in terms of a single ._invoke method.
+ function defineIteratorMethods(prototype) {
+ ["next", "throw", "return"].forEach(function(method) {
+ prototype[method] = function(arg) {
+ return this._invoke(method, arg);
+ };
+ });
+ }
+
+ runtime.isGeneratorFunction = function(genFun) {
+ var ctor = typeof genFun === "function" && genFun.constructor;
+ return ctor
+ ? ctor === GeneratorFunction ||
+ // For the native GeneratorFunction constructor, the best we can
+ // do is to check its .name property.
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
+ : false;
+ };
+
+ runtime.mark = function(genFun) {
+ if (Object.setPrototypeOf) {
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
+ } else {
+ genFun.__proto__ = GeneratorFunctionPrototype;
+ if (!(toStringTagSymbol in genFun)) {
+ genFun[toStringTagSymbol] = "GeneratorFunction";
+ }
+ }
+ genFun.prototype = Object.create(Gp);
+ return genFun;
+ };
+
+ // Within the body of any async function, `await x` is transformed to
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
+ // meant to be awaited.
+ runtime.awrap = function(arg) {
+ return { __await: arg };
+ };
+
+ function AsyncIterator(generator) {
+ function invoke(method, arg, resolve, reject) {
+ var record = tryCatch(generator[method], generator, arg);
+ if (record.type === "throw") {
+ reject(record.arg);
+ } else {
+ var result = record.arg;
+ var value = result.value;
+ if (value &&
+ typeof value === "object" &&
+ hasOwn.call(value, "__await")) {
+ return Promise.resolve(value.__await).then(function(value) {
+ invoke("next", value, resolve, reject);
+ }, function(err) {
+ invoke("throw", err, resolve, reject);
+ });
+ }
+
+ return Promise.resolve(value).then(function(unwrapped) {
+ // When a yielded Promise is resolved, its final value becomes
+ // the .value of the Promise<{value,done}> result for the
+ // current iteration. If the Promise is rejected, however, the
+ // result for this iteration will be rejected with the same
+ // reason. Note that rejections of yielded Promises are not
+ // thrown back into the generator function, as is the case
+ // when an awaited Promise is rejected. This difference in
+ // behavior between yield and await is important, because it
+ // allows the consumer to decide what to do with the yielded
+ // rejection (swallow it and continue, manually .throw it back
+ // into the generator, abandon iteration, whatever). With
+ // await, by contrast, there is no opportunity to examine the
+ // rejection reason outside the generator function, so the
+ // only option is to throw it from the await expression, and
+ // let the generator function handle the exception.
+ result.value = unwrapped;
+ resolve(result);
+ }, reject);
+ }
+ }
+
+ if (typeof process === "object" && process.domain) {
+ invoke = process.domain.bind(invoke);
+ }
+
+ var previousPromise;
+
+ function enqueue(method, arg) {
+ function callInvokeWithMethodAndArg() {
+ return new Promise(function(resolve, reject) {
+ invoke(method, arg, resolve, reject);
+ });
+ }
+
+ return previousPromise =
+ // If enqueue has been called before, then we want to wait until
+ // all previous Promises have been resolved before calling invoke,
+ // so that results are always delivered in the correct order. If
+ // enqueue has not been called before, then it is important to
+ // call invoke immediately, without waiting on a callback to fire,
+ // so that the async generator function has the opportunity to do
+ // any necessary setup in a predictable way. This predictability
+ // is why the Promise constructor synchronously invokes its
+ // executor callback, and why async functions synchronously
+ // execute code before the first await. Since we implement simple
+ // async functions in terms of async generators, it is especially
+ // important to get this right, even though it requires care.
+ previousPromise ? previousPromise.then(
+ callInvokeWithMethodAndArg,
+ // Avoid propagating failures to Promises returned by later
+ // invocations of the iterator.
+ callInvokeWithMethodAndArg
+ ) : callInvokeWithMethodAndArg();
+ }
+
+ // Define the unified helper method that is used to implement .next,
+ // .throw, and .return (see defineIteratorMethods).
+ this._invoke = enqueue;
+ }
+
+ defineIteratorMethods(AsyncIterator.prototype);
+ runtime.AsyncIterator = AsyncIterator;
+
+ // Note that simple async functions are implemented on top of
+ // AsyncIterator objects; they just return a Promise for the value of
+ // the final result produced by the iterator.
+ runtime.async = function(innerFn, outerFn, self, tryLocsList) {
+ var iter = new AsyncIterator(
+ wrap(innerFn, outerFn, self, tryLocsList)
+ );
+
+ return runtime.isGeneratorFunction(outerFn)
+ ? iter // If outerFn is a generator, return the full iterator.
+ : iter.next().then(function(result) {
+ return result.done ? result.value : iter.next();
+ });
+ };
+
+ function makeInvokeMethod(innerFn, self, context) {
+ var state = GenStateSuspendedStart;
+
+ return function invoke(method, arg) {
+ if (state === GenStateExecuting) {
+ throw new Error("Generator is already running");
+ }
+
+ if (state === GenStateCompleted) {
+ if (method === "throw") {
+ throw arg;
+ }
+
+ // Be forgiving, per 25.3.3.3.3 of the spec:
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
+ return doneResult();
+ }
+
+ while (true) {
+ var delegate = context.delegate;
+ if (delegate) {
+ if (method === "return" ||
+ (method === "throw" && delegate.iterator[method] === undefined)) {
+ // A return or throw (when the delegate iterator has no throw
+ // method) always terminates the yield* loop.
+ context.delegate = null;
+
+ // If the delegate iterator has a return method, give it a
+ // chance to clean up.
+ var returnMethod = delegate.iterator["return"];
+ if (returnMethod) {
+ var record = tryCatch(returnMethod, delegate.iterator, arg);
+ if (record.type === "throw") {
+ // If the return method threw an exception, let that
+ // exception prevail over the original return or throw.
+ method = "throw";
+ arg = record.arg;
+ continue;
+ }
+ }
+
+ if (method === "return") {
+ // Continue with the outer return, now that the delegate
+ // iterator has been terminated.
+ continue;
+ }
+ }
+
+ var record = tryCatch(
+ delegate.iterator[method],
+ delegate.iterator,
+ arg
+ );
+
+ if (record.type === "throw") {
+ context.delegate = null;
+
+ // Like returning generator.throw(uncaught), but without the
+ // overhead of an extra function call.
+ method = "throw";
+ arg = record.arg;
+ continue;
+ }
+
+ // Delegate generator ran and handled its own exceptions so
+ // regardless of what the method was, we continue as if it is
+ // "next" with an undefined arg.
+ method = "next";
+ arg = undefined;
+
+ var info = record.arg;
+ if (info.done) {
+ context[delegate.resultName] = info.value;
+ context.next = delegate.nextLoc;
+ } else {
+ state = GenStateSuspendedYield;
+ return info;
+ }
+
+ context.delegate = null;
+ }
+
+ if (method === "next") {
+ // Setting context._sent for legacy support of Babel's
+ // function.sent implementation.
+ context.sent = context._sent = arg;
+
+ } else if (method === "throw") {
+ if (state === GenStateSuspendedStart) {
+ state = GenStateCompleted;
+ throw arg;
+ }
+
+ if (context.dispatchException(arg)) {
+ // If the dispatched exception was caught by a catch block,
+ // then let that catch block handle the exception normally.
+ method = "next";
+ arg = undefined;
+ }
+
+ } else if (method === "return") {
+ context.abrupt("return", arg);
+ }
+
+ state = GenStateExecuting;
+
+ var record = tryCatch(innerFn, self, context);
+ if (record.type === "normal") {
+ // If an exception is thrown from innerFn, we leave state ===
+ // GenStateExecuting and loop back for another invocation.
+ state = context.done
+ ? GenStateCompleted
+ : GenStateSuspendedYield;
+
+ var info = {
+ value: record.arg,
+ done: context.done
+ };
+
+ if (record.arg === ContinueSentinel) {
+ if (context.delegate && method === "next") {
+ // Deliberately forget the last sent value so that we don't
+ // accidentally pass it on to the delegate.
+ arg = undefined;
+ }
+ } else {
+ return info;
+ }
+
+ } else if (record.type === "throw") {
+ state = GenStateCompleted;
+ // Dispatch the exception by looping back around to the
+ // context.dispatchException(arg) call above.
+ method = "throw";
+ arg = record.arg;
+ }
+ }
+ };
+ }
+
+ // Define Generator.prototype.{next,throw,return} in terms of the
+ // unified ._invoke helper method.
+ defineIteratorMethods(Gp);
+
+ Gp[toStringTagSymbol] = "Generator";
+
+ Gp.toString = function() {
+ return "[object Generator]";
+ };
+
+ function pushTryEntry(locs) {
+ var entry = { tryLoc: locs[0] };
+
+ if (1 in locs) {
+ entry.catchLoc = locs[1];
+ }
+
+ if (2 in locs) {
+ entry.finallyLoc = locs[2];
+ entry.afterLoc = locs[3];
+ }
+
+ this.tryEntries.push(entry);
+ }
+
+ function resetTryEntry(entry) {
+ var record = entry.completion || {};
+ record.type = "normal";
+ delete record.arg;
+ entry.completion = record;
+ }
+
+ function Context(tryLocsList) {
+ // The root entry object (effectively a try statement without a catch
+ // or a finally block) gives us a place to store values thrown from
+ // locations where there is no enclosing try statement.
+ this.tryEntries = [{ tryLoc: "root" }];
+ tryLocsList.forEach(pushTryEntry, this);
+ this.reset(true);
+ }
+
+ runtime.keys = function(object) {
+ var keys = [];
+ for (var key in object) {
+ keys.push(key);
+ }
+ keys.reverse();
+
+ // Rather than returning an object with a next method, we keep
+ // things simple and return the next function itself.
+ return function next() {
+ while (keys.length) {
+ var key = keys.pop();
+ if (key in object) {
+ next.value = key;
+ next.done = false;
+ return next;
+ }
+ }
+
+ // To avoid creating an additional object, we just hang the .value
+ // and .done properties off the next function object itself. This
+ // also ensures that the minifier will not anonymize the function.
+ next.done = true;
+ return next;
+ };
+ };
+
+ function values(iterable) {
+ if (iterable) {
+ var iteratorMethod = iterable[iteratorSymbol];
+ if (iteratorMethod) {
+ return iteratorMethod.call(iterable);
+ }
+
+ if (typeof iterable.next === "function") {
+ return iterable;
+ }
+
+ if (!isNaN(iterable.length)) {
+ var i = -1, next = function next() {
+ while (++i < iterable.length) {
+ if (hasOwn.call(iterable, i)) {
+ next.value = iterable[i];
+ next.done = false;
+ return next;
+ }
+ }
+
+ next.value = undefined;
+ next.done = true;
+
+ return next;
+ };
+
+ return next.next = next;
+ }
+ }
+
+ // Return an iterator with no values.
+ return { next: doneResult };
+ }
+ runtime.values = values;
+
+ function doneResult() {
+ return { value: undefined, done: true };
+ }
+
+ Context.prototype = {
+ constructor: Context,
+
+ reset: function(skipTempReset) {
+ this.prev = 0;
+ this.next = 0;
+ // Resetting context._sent for legacy support of Babel's
+ // function.sent implementation.
+ this.sent = this._sent = undefined;
+ this.done = false;
+ this.delegate = null;
+
+ this.tryEntries.forEach(resetTryEntry);
+
+ if (!skipTempReset) {
+ for (var name in this) {
+ // Not sure about the optimal order of these conditions:
+ if (name.charAt(0) === "t" &&
+ hasOwn.call(this, name) &&
+ !isNaN(+name.slice(1))) {
+ this[name] = undefined;
+ }
+ }
+ }
+ },
+
+ stop: function() {
+ this.done = true;
+
+ var rootEntry = this.tryEntries[0];
+ var rootRecord = rootEntry.completion;
+ if (rootRecord.type === "throw") {
+ throw rootRecord.arg;
+ }
+
+ return this.rval;
+ },
+
+ dispatchException: function(exception) {
+ if (this.done) {
+ throw exception;
+ }
+
+ var context = this;
+ function handle(loc, caught) {
+ record.type = "throw";
+ record.arg = exception;
+ context.next = loc;
+ return !!caught;
+ }
+
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ var record = entry.completion;
+
+ if (entry.tryLoc === "root") {
+ // Exception thrown outside of any try block that could handle
+ // it, so set the completion value of the entire function to
+ // throw the exception.
+ return handle("end");
+ }
+
+ if (entry.tryLoc <= this.prev) {
+ var hasCatch = hasOwn.call(entry, "catchLoc");
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
+
+ if (hasCatch && hasFinally) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ } else if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+
+ } else if (hasCatch) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ }
+
+ } else if (hasFinally) {
+ if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+
+ } else {
+ throw new Error("try statement without catch or finally");
+ }
+ }
+ }
+ },
+
+ abrupt: function(type, arg) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc <= this.prev &&
+ hasOwn.call(entry, "finallyLoc") &&
+ this.prev < entry.finallyLoc) {
+ var finallyEntry = entry;
+ break;
+ }
+ }
+
+ if (finallyEntry &&
+ (type === "break" ||
+ type === "continue") &&
+ finallyEntry.tryLoc <= arg &&
+ arg <= finallyEntry.finallyLoc) {
+ // Ignore the finally entry if control is not jumping to a
+ // location outside the try/catch block.
+ finallyEntry = null;
+ }
+
+ var record = finallyEntry ? finallyEntry.completion : {};
+ record.type = type;
+ record.arg = arg;
+
+ if (finallyEntry) {
+ this.next = finallyEntry.finallyLoc;
+ } else {
+ this.complete(record);
+ }
+
+ return ContinueSentinel;
+ },
+
+ complete: function(record, afterLoc) {
+ if (record.type === "throw") {
+ throw record.arg;
+ }
+
+ if (record.type === "break" ||
+ record.type === "continue") {
+ this.next = record.arg;
+ } else if (record.type === "return") {
+ this.rval = record.arg;
+ this.next = "end";
+ } else if (record.type === "normal" && afterLoc) {
+ this.next = afterLoc;
+ }
+ },
+
+ finish: function(finallyLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.finallyLoc === finallyLoc) {
+ this.complete(entry.completion, entry.afterLoc);
+ resetTryEntry(entry);
+ return ContinueSentinel;
+ }
+ }
+ },
+
+ "catch": function(tryLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc === tryLoc) {
+ var record = entry.completion;
+ if (record.type === "throw") {
+ var thrown = record.arg;
+ resetTryEntry(entry);
+ }
+ return thrown;
+ }
+ }
+
+ // The context.catch method must only be called with a location
+ // argument that corresponds to a known catch block.
+ throw new Error("illegal catch attempt");
+ },
+
+ delegateYield: function(iterable, resultName, nextLoc) {
+ this.delegate = {
+ iterator: values(iterable),
+ resultName: resultName,
+ nextLoc: nextLoc
+ };
+
+ return ContinueSentinel;
+ }
+ };
+})(
+ // Among the various tricks for obtaining a reference to the global
+ // object, this seems to be the most reliable technique that does not
+ // use indirect eval (which violates Content Security Policy).
+ typeof global === "object" ? global :
+ typeof window === "object" ? window :
+ typeof self === "object" ? self : this
+);
+
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(35), __webpack_require__(73)))
+
+/***/ }),
+/* 73 */
+/***/ (function(module, exports) {
+
+// shim for using process in browser
+var process = module.exports = {};
+
+// cached from whatever global is present so that test runners that stub it
+// don't break things. But we need to wrap it in a try catch in case it is
+// wrapped in strict mode code which doesn't define any globals. It's inside a
+// function because try/catches deoptimize in certain engines.
+
+var cachedSetTimeout;
+var cachedClearTimeout;
+
+function defaultSetTimout() {
+ throw new Error('setTimeout has not been defined');
+}
+function defaultClearTimeout () {
+ throw new Error('clearTimeout has not been defined');
+}
+(function () {
+ try {
+ if (typeof setTimeout === 'function') {
+ cachedSetTimeout = setTimeout;
+ } else {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ } catch (e) {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ try {
+ if (typeof clearTimeout === 'function') {
+ cachedClearTimeout = clearTimeout;
+ } else {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+ } catch (e) {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+} ())
+function runTimeout(fun) {
+ if (cachedSetTimeout === setTimeout) {
+ //normal enviroments in sane situations
+ return setTimeout(fun, 0);
+ }
+ // if setTimeout wasn't available but was latter defined
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+ cachedSetTimeout = setTimeout;
+ return setTimeout(fun, 0);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedSetTimeout(fun, 0);
+ } catch(e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedSetTimeout.call(null, fun, 0);
+ } catch(e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+ return cachedSetTimeout.call(this, fun, 0);
+ }
+ }
+
+
+}
+function runClearTimeout(marker) {
+ if (cachedClearTimeout === clearTimeout) {
+ //normal enviroments in sane situations
+ return clearTimeout(marker);
+ }
+ // if clearTimeout wasn't available but was latter defined
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+ cachedClearTimeout = clearTimeout;
+ return clearTimeout(marker);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedClearTimeout(marker);
+ } catch (e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedClearTimeout.call(null, marker);
+ } catch (e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+ return cachedClearTimeout.call(this, marker);
+ }
+ }
+
+
+
+}
+var queue = [];
+var draining = false;
+var currentQueue;
+var queueIndex = -1;
+
+function cleanUpNextTick() {
+ if (!draining || !currentQueue) {
+ return;
+ }
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
+ }
+}
+
+function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = runTimeout(cleanUpNextTick);
+ draining = true;
+
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ if (currentQueue) {
+ currentQueue[queueIndex].run();
+ }
+ }
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ runClearTimeout(timeout);
+}
+
+process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ runTimeout(drainQueue);
+ }
+};
+
+// v8 likes predictible objects
+function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
+}
+Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+};
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+process.version = ''; // empty string to avoid regexp issues
+process.versions = {};
+
+function noop() {}
+
+process.on = noop;
+process.addListener = noop;
+process.once = noop;
+process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
+process.emit = noop;
+
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+};
+
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+process.umask = function() { return 0; };
+
+
+/***/ }),
+/* 74 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.saveState = exports.loadSavedState = exports.initializeLocalStorageState = undefined;
+
+var _regenerator = __webpack_require__(34);
+
+var _regenerator2 = _interopRequireDefault(_regenerator);
+
+var _asyncToGenerator2 = __webpack_require__(36);
+
+var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
+
+var _promise = __webpack_require__(12);
+
+var _promise2 = _interopRequireDefault(_promise);
+
+var _stringify = __webpack_require__(75);
+
+var _stringify2 = _interopRequireDefault(_stringify);
+
+exports.saveToChromeStorage = saveToChromeStorage;
+exports.getFromChromeStorage = getFromChromeStorage;
+
+var _Helpers = __webpack_require__(37);
+
+var Helpers = _interopRequireWildcard(_Helpers);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var initializeLocalStorageState = exports.initializeLocalStorageState = function initializeLocalStorageState(initialState, version) {
+ localStorage.setItem('state', (0, _stringify2.default)([{ value: initialState || {}, version: version }]));
+};
+
+var loadSavedState = exports.loadSavedState = function loadSavedState(version) {
+ try {
+ var items = JSON.parse(localStorage.getItem('state')) || [];
+ var state = items.filter(function (x) {
+ return x.version === version;
+ })[0];
+ if (state) {
+ return state.value;
+ }
+ return {};
+ } catch (err) {
+ initializeLocalStorageState({}, version);
+ return {};
+ }
+};
+
+var saveState = exports.saveState = function saveState(state, version) {
+ try {
+ // If no state is saved, we create it using the current version number
+ if (!localStorage.getItem('state')) {
+ initializeLocalStorageState(state, version);
+ } else {
+ var currentState = JSON.parse(localStorage.getItem('state'));
+ var currentVersionState = currentState.filter(function (x) {
+ return x.version === version;
+ })[0];
+ // If a state for the current version already exists, we update it
+ if (currentVersionState) {
+ currentVersionState.value = state;
+ } else {
+ currentState.push({ value: state, version: version });
+ }
+ localStorage.setItem('state', (0, _stringify2.default)(currentState));
+ }
+ } catch (err) {
+ console.info('Possible corrupted or incompatible state found in the localstorage, reinitializing the state...');
+ initializeLocalStorageState({}, version);
+ }
+};
+
+function saveToChromeStorage(key, value) {
+ return new _promise2.default(function (resolve) {
+ var obj = {};
+ obj[key] = value;
+ chrome.storage.local.set(obj, function () {
+ resolve();
+ });
+ });
+}
+
+function getFromChromeStorage(key) {
+ var _this = this;
+
+ return new _promise2.default(function (resolve) {
+ chrome.storage.local.get(key, function () {
+ var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(settings) {
+ return _regenerator2.default.wrap(function _callee$(_context) {
+ while (1) {
+ switch (_context.prev = _context.next) {
+ case 0:
+ resolve(Helpers.isObjectEmpty(settings) ? {} : settings[key]);
+
+ case 1:
+ case 'end':
+ return _context.stop();
+ }
+ }
+ }, _callee, _this);
+ }));
+
+ return function (_x) {
+ return _ref.apply(this, arguments);
+ };
+ }());
+ });
+}
+
+/***/ }),
+/* 75 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(76), __esModule: true };
+
+/***/ }),
+/* 76 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var core = __webpack_require__(2)
+ , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify});
+module.exports = function stringify(it){ // eslint-disable-line no-unused-vars
+ return $JSON.stringify.apply($JSON, arguments);
+};
+
+/***/ }),
+/* 77 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(78), __esModule: true };
+
+/***/ }),
+/* 78 */
+/***/ (function(module, exports, __webpack_require__) {
+
+__webpack_require__(79);
+module.exports = __webpack_require__(2).Object.keys;
+
+/***/ }),
+/* 79 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// 19.1.2.14 Object.keys(O)
+var toObject = __webpack_require__(31)
+ , $keys = __webpack_require__(25);
+
+__webpack_require__(80)('keys', function(){
+ return function keys(it){
+ return $keys(toObject(it));
+ };
+});
+
+/***/ }),
+/* 80 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// most Object methods by ES6 should accept primitives
+var $export = __webpack_require__(15)
+ , core = __webpack_require__(2)
+ , fails = __webpack_require__(17);
+module.exports = function(KEY, exec){
+ var fn = (core.Object || {})[KEY] || Object[KEY]
+ , exp = {};
+ exp[KEY] = exec(fn);
+ $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
+};
+
+/***/ }),
+/* 81 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+var MENU_OPTIONS = exports.MENU_OPTIONS = 'Options';
+var MENU_BILLING = exports.MENU_BILLING = 'Billing';
+var MENU_SIZES = exports.MENU_SIZES = 'Sizes';
+var MENU_ATC = exports.MENU_ATC = 'AutoCop';
+
+/***/ })
+/******/ ]);
\ No newline at end of file
diff --git a/bot/build/bundle.js b/bot/build/bundle.js
index 1f7e483..5148feb 100644
--- a/bot/build/bundle.js
+++ b/bot/build/bundle.js
@@ -60,7 +60,7 @@
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 335);
+/******/ return __webpack_require__(__webpack_require__.s = 346);
/******/ })
/************************************************************************/
/******/ ([
@@ -70,7 +70,7 @@
"use strict";
-module.exports = __webpack_require__(65);
+module.exports = __webpack_require__(56);
/***/ }),
@@ -97,7 +97,7 @@ exports.default = function (instance, Constructor) {
exports.__esModule = true;
-var _defineProperty = __webpack_require__(185);
+var _defineProperty = __webpack_require__(196);
var _defineProperty2 = _interopRequireDefault(_defineProperty);
@@ -125,7 +125,7 @@ exports.default = function () {
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = { "default": __webpack_require__(660), __esModule: true };
+module.exports = { "default": __webpack_require__(662), __esModule: true };
/***/ }),
/* 4 */
@@ -136,7 +136,7 @@ module.exports = { "default": __webpack_require__(660), __esModule: true };
exports.__esModule = true;
-var _typeof2 = __webpack_require__(92);
+var _typeof2 = __webpack_require__(61);
var _typeof3 = _interopRequireDefault(_typeof2);
@@ -159,15 +159,15 @@ exports.default = function (self, call) {
exports.__esModule = true;
-var _setPrototypeOf = __webpack_require__(682);
+var _setPrototypeOf = __webpack_require__(666);
var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
-var _create = __webpack_require__(686);
+var _create = __webpack_require__(670);
var _create2 = _interopRequireDefault(_create);
-var _typeof2 = __webpack_require__(92);
+var _typeof2 = __webpack_require__(61);
var _typeof3 = _interopRequireDefault(_typeof2);
@@ -215,7 +215,7 @@ module.exports = function (target) {
exports.__esModule = true;
-var _assign = __webpack_require__(49);
+var _assign = __webpack_require__(42);
var _assign2 = _interopRequireDefault(_assign);
@@ -359,47 +359,6 @@ exports.default = {
/***/ }),
/* 11 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__splice__ = __webpack_require__(500);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getIn__ = __webpack_require__(501);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setIn__ = __webpack_require__(526);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__deepEqual__ = __webpack_require__(527);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__deleteIn__ = __webpack_require__(562);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keys__ = __webpack_require__(563);
-
-
-
-
-
-
-
-var structure = {
- allowsArrayErrors: true,
- empty: {},
- emptyList: [],
- getIn: __WEBPACK_IMPORTED_MODULE_1__getIn__["a" /* default */],
- setIn: __WEBPACK_IMPORTED_MODULE_2__setIn__["a" /* default */],
- deepEqual: __WEBPACK_IMPORTED_MODULE_3__deepEqual__["a" /* default */],
- deleteIn: __WEBPACK_IMPORTED_MODULE_4__deleteIn__["a" /* default */],
- fromJS: function fromJS(value) {
- return value;
- },
- keys: __WEBPACK_IMPORTED_MODULE_5__keys__["a" /* default */],
- size: function size(array) {
- return array ? array.length : 0;
- },
- splice: __WEBPACK_IMPORTED_MODULE_0__splice__["a" /* default */],
- toJS: function toJS(value) {
- return value;
- }
-};
-
-/* harmony default export */ __webpack_exports__["a"] = (structure);
-
-/***/ }),
-/* 12 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -415,7 +374,7 @@ var structure = {
-var emptyFunction = __webpack_require__(24);
+var emptyFunction = __webpack_require__(22);
/**
* Similar to invariant but only logs a warning if the condition is not met.
@@ -427,49 +386,51 @@ var emptyFunction = __webpack_require__(24);
var warning = emptyFunction;
if (false) {
- var printWarning = function printWarning(format) {
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- if (typeof console !== 'undefined') {
- console.error(message);
- }
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- throw new Error(message);
- } catch (x) {}
- };
+ (function () {
+ var printWarning = function printWarning(format) {
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
- warning = function warning(condition, format) {
- if (format === undefined) {
- throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
- }
+ var argIndex = 0;
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
+ return args[argIndex++];
+ });
+ if (typeof console !== 'undefined') {
+ console.error(message);
+ }
+ try {
+ // --- Welcome to debugging React ---
+ // This error was thrown as a convenience so that you can use this stack
+ // to find the callsite that caused this warning to fire.
+ throw new Error(message);
+ } catch (x) {}
+ };
- if (format.indexOf('Failed Composite propType: ') === 0) {
- return; // Ignore CompositeComponent proptype check.
- }
+ warning = function warning(condition, format) {
+ if (format === undefined) {
+ throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
+ }
- if (!condition) {
- for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
- args[_key2 - 2] = arguments[_key2];
+ if (format.indexOf('Failed Composite propType: ') === 0) {
+ return; // Ignore CompositeComponent proptype check.
}
- printWarning.apply(undefined, [format].concat(args));
- }
- };
+ if (!condition) {
+ for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
+ args[_key2 - 2] = arguments[_key2];
+ }
+
+ printWarning.apply(undefined, [format].concat(args));
+ }
+ };
+ })();
}
module.exports = warning;
/***/ }),
-/* 13 */
+/* 12 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -513,43 +474,7 @@ function reactProdInvariant(code) {
module.exports = reactProdInvariant;
/***/ }),
-/* 14 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- */
-
-if (false) {
- var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
- Symbol.for &&
- Symbol.for('react.element')) ||
- 0xeac7;
-
- var isValidElement = function(object) {
- return typeof object === 'object' &&
- object !== null &&
- object.$$typeof === REACT_ELEMENT_TYPE;
- };
-
- // By explicitly using `prop-types` you are opting into new development behavior.
- // http://fb.me/prop-types-in-prod
- var throwOnDirectAccess = true;
- module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);
-} else {
- // By explicitly using `prop-types` you are opting into new production behavior.
- // http://fb.me/prop-types-in-prod
- module.exports = __webpack_require__(431)();
-}
-
-
-/***/ }),
-/* 15 */
+/* 13 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -646,7 +571,7 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
/***/ }),
-/* 16 */
+/* 14 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -662,10 +587,10 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
-var DOMProperty = __webpack_require__(67);
-var ReactDOMComponentFlags = __webpack_require__(216);
+var DOMProperty = __webpack_require__(72);
+var ReactDOMComponentFlags = __webpack_require__(225);
var invariant = __webpack_require__(9);
@@ -846,7 +771,7 @@ var ReactDOMComponentTree = {
module.exports = ReactDOMComponentTree;
/***/ }),
-/* 17 */
+/* 15 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -913,25 +838,17 @@ module.exports = warning;
/***/ }),
-/* 18 */
-/***/ (function(module, exports) {
-
-var core = module.exports = { version: '2.5.0' };
-if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
-
-
-/***/ }),
-/* 19 */
+/* 16 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-module.exports = __webpack_require__(354);
+module.exports = __webpack_require__(363);
/***/ }),
-/* 20 */
+/* 17 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -989,77 +906,86 @@ module.exports = invariant;
/***/ }),
-/* 21 */
+/* 18 */
+/***/ (function(module, exports) {
+
+var core = module.exports = {version: '2.4.0'};
+if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
+
+/***/ }),
+/* 19 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- */
+exports.__esModule = true;
+exports.connect = exports.Provider = undefined;
-var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
+var _Provider = __webpack_require__(471);
-/**
- * Simple, lightweight module assisting with the detection and context of
- * Worker. Helps avoid circular dependencies and allows code to reason about
- * whether or not they are in a Worker, even if they never include the main
- * `ReactWorker` dependency.
- */
-var ExecutionEnvironment = {
+var _Provider2 = _interopRequireDefault(_Provider);
- canUseDOM: canUseDOM,
+var _connect = __webpack_require__(472);
- canUseWorkers: typeof Worker !== 'undefined',
+var _connect2 = _interopRequireDefault(_connect);
- canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
- canUseViewport: canUseDOM && !!window.screen,
+exports.Provider = _Provider2["default"];
+exports.connect = _connect2["default"];
- isInWorker: !canUseDOM // For now, this is true - might change in the future.
+/***/ }),
+/* 20 */
+/***/ (function(module, exports, __webpack_require__) {
-};
+"use strict";
-module.exports = ExecutionEnvironment;
+
+exports.__esModule = true;
+
+var _shouldUpdate = __webpack_require__(725);
+
+var _shouldUpdate2 = _interopRequireDefault(_shouldUpdate);
+
+var _shallowEqual = __webpack_require__(63);
+
+var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
+
+var _createHelper = __webpack_require__(323);
+
+var _createHelper2 = _interopRequireDefault(_createHelper);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var pure = (0, _shouldUpdate2.default)(function (props, nextProps) {
+ return !(0, _shallowEqual2.default)(props, nextProps);
+});
+
+exports.default = (0, _createHelper2.default)(pure, 'pure', true, true);
/***/ }),
-/* 22 */
+/* 21 */
/***/ (function(module, exports, __webpack_require__) {
-var store = __webpack_require__(137)('wks');
-var uid = __webpack_require__(100);
-var Symbol = __webpack_require__(23).Symbol;
-var USE_SYMBOL = typeof Symbol == 'function';
+"use strict";
-var $exports = module.exports = function (name) {
- return store[name] || (store[name] =
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
-};
-$exports.store = store;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = undefined;
+var _SvgIcon = __webpack_require__(730);
-/***/ }),
-/* 23 */
-/***/ (function(module, exports) {
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
-// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
-var global = module.exports = typeof window != 'undefined' && window.Math == Math
- ? window : typeof self != 'undefined' && self.Math == Math ? self
- // eslint-disable-next-line no-new-func
- : Function('return this')();
-if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+exports.default = _SvgIcon2.default;
/***/ }),
-/* 24 */
+/* 22 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -1103,175 +1029,73 @@ emptyFunction.thatReturnsArgument = function (arg) {
module.exports = emptyFunction;
/***/ }),
-/* 25 */
+/* 23 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
-exports.__esModule = true;
-
-var _shouldUpdate = __webpack_require__(741);
-
-var _shouldUpdate2 = _interopRequireDefault(_shouldUpdate);
-
-var _shallowEqual = __webpack_require__(58);
-
-var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
-
-var _createHelper = __webpack_require__(318);
-
-var _createHelper2 = _interopRequireDefault(_createHelper);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var pure = (0, _shouldUpdate2.default)(function (props, nextProps) {
- return !(0, _shallowEqual2.default)(props, nextProps);
-});
-exports.default = (0, _createHelper2.default)(pure, 'pure', true, true);
+var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
-/***/ }),
-/* 26 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * Simple, lightweight module assisting with the detection and context of
+ * Worker. Helps avoid circular dependencies and allows code to reason about
+ * whether or not they are in a Worker, even if they never include the main
+ * `ReactWorker` dependency.
+ */
+var ExecutionEnvironment = {
-"use strict";
+ canUseDOM: canUseDOM,
+ canUseWorkers: typeof Worker !== 'undefined',
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = undefined;
+ canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
-var _SvgIcon = __webpack_require__(746);
+ canUseViewport: canUseDOM && !!window.screen,
-var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
+ isInWorker: !canUseDOM // For now, this is true - might change in the future.
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+};
-exports.default = _SvgIcon2.default;
+module.exports = ExecutionEnvironment;
/***/ }),
-/* 27 */
+/* 24 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-
-
-exports.__esModule = true;
-exports.connect = exports.Provider = undefined;
-
-var _Provider = __webpack_require__(463);
-
-var _Provider2 = _interopRequireDefault(_Provider);
-
-var _connect = __webpack_require__(464);
+var store = __webpack_require__(143)('wks')
+ , uid = __webpack_require__(103)
+ , Symbol = __webpack_require__(25).Symbol
+ , USE_SYMBOL = typeof Symbol == 'function';
-var _connect2 = _interopRequireDefault(_connect);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
-exports.Provider = _Provider2["default"];
-exports.connect = _connect2["default"];
-
-/***/ }),
-/* 28 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var global = __webpack_require__(23);
-var core = __webpack_require__(18);
-var ctx = __webpack_require__(61);
-var hide = __webpack_require__(50);
-var PROTOTYPE = 'prototype';
-
-var $export = function (type, name, source) {
- var IS_FORCED = type & $export.F;
- var IS_GLOBAL = type & $export.G;
- var IS_STATIC = type & $export.S;
- var IS_PROTO = type & $export.P;
- var IS_BIND = type & $export.B;
- var IS_WRAP = type & $export.W;
- var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
- var expProto = exports[PROTOTYPE];
- var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
- var key, own, out;
- if (IS_GLOBAL) source = name;
- for (key in source) {
- // contains in native
- own = !IS_FORCED && target && target[key] !== undefined;
- if (own && key in exports) continue;
- // export native or passed
- out = own ? target[key] : source[key];
- // prevent global pollution for namespaces
- exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
- // bind timers to global for call from export context
- : IS_BIND && own ? ctx(out, global)
- // wrap global constructors for prevent change them in library
- : IS_WRAP && target[key] == out ? (function (C) {
- var F = function (a, b, c) {
- if (this instanceof C) {
- switch (arguments.length) {
- case 0: return new C();
- case 1: return new C(a);
- case 2: return new C(a, b);
- } return new C(a, b, c);
- } return C.apply(this, arguments);
- };
- F[PROTOTYPE] = C[PROTOTYPE];
- return F;
- // make static versions for prototype methods
- })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
- // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
- if (IS_PROTO) {
- (exports.virtual || (exports.virtual = {}))[key] = out;
- // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
- if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
- }
- }
+var $exports = module.exports = function(name){
+ return store[name] || (store[name] =
+ USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};
-// type bitmap
-$export.F = 1; // forced
-$export.G = 2; // global
-$export.S = 4; // static
-$export.P = 8; // proto
-$export.B = 16; // bind
-$export.W = 32; // wrap
-$export.U = 64; // safe
-$export.R = 128; // real proto method for `library`
-module.exports = $export;
+$exports.store = store;
/***/ }),
-/* 29 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/**
- * Copyright 2016-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- *
- */
-
-
-
-// Trust the developer to only use ReactInstrumentation with a __DEV__ check
-
-var debugTool = null;
-
-if (false) {
- var ReactDebugTool = require('./ReactDebugTool');
- debugTool = ReactDebugTool;
-}
+/* 25 */
+/***/ (function(module, exports) {
-module.exports = { debugTool: debugTool };
+// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+var global = module.exports = typeof window != 'undefined' && window.Math == Math
+ ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
+if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
/***/ }),
-/* 30 */
+/* 26 */
/***/ (function(module, exports) {
// Source: http://jsfiddle.net/vWx8V/
@@ -1423,7 +1247,36 @@ for (var alias in aliases) {
/***/ }),
-/* 31 */
+/* 27 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2016-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
+
+
+
+// Trust the developer to only use ReactInstrumentation with a __DEV__ check
+
+var debugTool = null;
+
+if (false) {
+ var ReactDebugTool = require('./ReactDebugTool');
+ debugTool = ReactDebugTool;
+}
+
+module.exports = { debugTool: debugTool };
+
+/***/ }),
+/* 28 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -1439,14 +1292,14 @@ for (var alias in aliases) {
-var _prodInvariant = __webpack_require__(13),
- _assign = __webpack_require__(15);
+var _prodInvariant = __webpack_require__(12),
+ _assign = __webpack_require__(13);
-var CallbackQueue = __webpack_require__(220);
-var PooledClass = __webpack_require__(53);
-var ReactFeatureFlags = __webpack_require__(221);
-var ReactReconciler = __webpack_require__(70);
-var Transaction = __webpack_require__(104);
+var CallbackQueue = __webpack_require__(229);
+var PooledClass = __webpack_require__(58);
+var ReactFeatureFlags = __webpack_require__(230);
+var ReactReconciler = __webpack_require__(75);
+var Transaction = __webpack_require__(107);
var invariant = __webpack_require__(9);
@@ -1679,11 +1532,11 @@ var ReactUpdates = {
module.exports = ReactUpdates;
/***/ }),
-/* 32 */
+/* 29 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(253);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(259);
/** Detect free variable `self`. */
@@ -1696,7 +1549,7 @@ var root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */] || fr
/***/ }),
-/* 33 */
+/* 30 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -1729,7 +1582,303 @@ var isArray = Array.isArray;
/***/ }),
-/* 34 */
+/* 31 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+var red50 = exports.red50 = '#ffebee';
+var red100 = exports.red100 = '#ffcdd2';
+var red200 = exports.red200 = '#ef9a9a';
+var red300 = exports.red300 = '#e57373';
+var red400 = exports.red400 = '#ef5350';
+var red500 = exports.red500 = '#f44336';
+var red600 = exports.red600 = '#e53935';
+var red700 = exports.red700 = '#d32f2f';
+var red800 = exports.red800 = '#c62828';
+var red900 = exports.red900 = '#b71c1c';
+var redA100 = exports.redA100 = '#ff8a80';
+var redA200 = exports.redA200 = '#ff5252';
+var redA400 = exports.redA400 = '#ff1744';
+var redA700 = exports.redA700 = '#d50000';
+
+var pink50 = exports.pink50 = '#fce4ec';
+var pink100 = exports.pink100 = '#f8bbd0';
+var pink200 = exports.pink200 = '#f48fb1';
+var pink300 = exports.pink300 = '#f06292';
+var pink400 = exports.pink400 = '#ec407a';
+var pink500 = exports.pink500 = '#e91e63';
+var pink600 = exports.pink600 = '#d81b60';
+var pink700 = exports.pink700 = '#c2185b';
+var pink800 = exports.pink800 = '#ad1457';
+var pink900 = exports.pink900 = '#880e4f';
+var pinkA100 = exports.pinkA100 = '#ff80ab';
+var pinkA200 = exports.pinkA200 = '#ff4081';
+var pinkA400 = exports.pinkA400 = '#f50057';
+var pinkA700 = exports.pinkA700 = '#c51162';
+
+var purple50 = exports.purple50 = '#f3e5f5';
+var purple100 = exports.purple100 = '#e1bee7';
+var purple200 = exports.purple200 = '#ce93d8';
+var purple300 = exports.purple300 = '#ba68c8';
+var purple400 = exports.purple400 = '#ab47bc';
+var purple500 = exports.purple500 = '#9c27b0';
+var purple600 = exports.purple600 = '#8e24aa';
+var purple700 = exports.purple700 = '#7b1fa2';
+var purple800 = exports.purple800 = '#6a1b9a';
+var purple900 = exports.purple900 = '#4a148c';
+var purpleA100 = exports.purpleA100 = '#ea80fc';
+var purpleA200 = exports.purpleA200 = '#e040fb';
+var purpleA400 = exports.purpleA400 = '#d500f9';
+var purpleA700 = exports.purpleA700 = '#aa00ff';
+
+var deepPurple50 = exports.deepPurple50 = '#ede7f6';
+var deepPurple100 = exports.deepPurple100 = '#d1c4e9';
+var deepPurple200 = exports.deepPurple200 = '#b39ddb';
+var deepPurple300 = exports.deepPurple300 = '#9575cd';
+var deepPurple400 = exports.deepPurple400 = '#7e57c2';
+var deepPurple500 = exports.deepPurple500 = '#673ab7';
+var deepPurple600 = exports.deepPurple600 = '#5e35b1';
+var deepPurple700 = exports.deepPurple700 = '#512da8';
+var deepPurple800 = exports.deepPurple800 = '#4527a0';
+var deepPurple900 = exports.deepPurple900 = '#311b92';
+var deepPurpleA100 = exports.deepPurpleA100 = '#b388ff';
+var deepPurpleA200 = exports.deepPurpleA200 = '#7c4dff';
+var deepPurpleA400 = exports.deepPurpleA400 = '#651fff';
+var deepPurpleA700 = exports.deepPurpleA700 = '#6200ea';
+
+var indigo50 = exports.indigo50 = '#e8eaf6';
+var indigo100 = exports.indigo100 = '#c5cae9';
+var indigo200 = exports.indigo200 = '#9fa8da';
+var indigo300 = exports.indigo300 = '#7986cb';
+var indigo400 = exports.indigo400 = '#5c6bc0';
+var indigo500 = exports.indigo500 = '#3f51b5';
+var indigo600 = exports.indigo600 = '#3949ab';
+var indigo700 = exports.indigo700 = '#303f9f';
+var indigo800 = exports.indigo800 = '#283593';
+var indigo900 = exports.indigo900 = '#1a237e';
+var indigoA100 = exports.indigoA100 = '#8c9eff';
+var indigoA200 = exports.indigoA200 = '#536dfe';
+var indigoA400 = exports.indigoA400 = '#3d5afe';
+var indigoA700 = exports.indigoA700 = '#304ffe';
+
+var blue50 = exports.blue50 = '#e3f2fd';
+var blue100 = exports.blue100 = '#bbdefb';
+var blue200 = exports.blue200 = '#90caf9';
+var blue300 = exports.blue300 = '#64b5f6';
+var blue400 = exports.blue400 = '#42a5f5';
+var blue500 = exports.blue500 = '#2196f3';
+var blue600 = exports.blue600 = '#1e88e5';
+var blue700 = exports.blue700 = '#1976d2';
+var blue800 = exports.blue800 = '#1565c0';
+var blue900 = exports.blue900 = '#0d47a1';
+var blueA100 = exports.blueA100 = '#82b1ff';
+var blueA200 = exports.blueA200 = '#448aff';
+var blueA400 = exports.blueA400 = '#2979ff';
+var blueA700 = exports.blueA700 = '#2962ff';
+
+var lightBlue50 = exports.lightBlue50 = '#e1f5fe';
+var lightBlue100 = exports.lightBlue100 = '#b3e5fc';
+var lightBlue200 = exports.lightBlue200 = '#81d4fa';
+var lightBlue300 = exports.lightBlue300 = '#4fc3f7';
+var lightBlue400 = exports.lightBlue400 = '#29b6f6';
+var lightBlue500 = exports.lightBlue500 = '#03a9f4';
+var lightBlue600 = exports.lightBlue600 = '#039be5';
+var lightBlue700 = exports.lightBlue700 = '#0288d1';
+var lightBlue800 = exports.lightBlue800 = '#0277bd';
+var lightBlue900 = exports.lightBlue900 = '#01579b';
+var lightBlueA100 = exports.lightBlueA100 = '#80d8ff';
+var lightBlueA200 = exports.lightBlueA200 = '#40c4ff';
+var lightBlueA400 = exports.lightBlueA400 = '#00b0ff';
+var lightBlueA700 = exports.lightBlueA700 = '#0091ea';
+
+var cyan50 = exports.cyan50 = '#e0f7fa';
+var cyan100 = exports.cyan100 = '#b2ebf2';
+var cyan200 = exports.cyan200 = '#80deea';
+var cyan300 = exports.cyan300 = '#4dd0e1';
+var cyan400 = exports.cyan400 = '#26c6da';
+var cyan500 = exports.cyan500 = '#00bcd4';
+var cyan600 = exports.cyan600 = '#00acc1';
+var cyan700 = exports.cyan700 = '#0097a7';
+var cyan800 = exports.cyan800 = '#00838f';
+var cyan900 = exports.cyan900 = '#006064';
+var cyanA100 = exports.cyanA100 = '#84ffff';
+var cyanA200 = exports.cyanA200 = '#18ffff';
+var cyanA400 = exports.cyanA400 = '#00e5ff';
+var cyanA700 = exports.cyanA700 = '#00b8d4';
+
+var teal50 = exports.teal50 = '#e0f2f1';
+var teal100 = exports.teal100 = '#b2dfdb';
+var teal200 = exports.teal200 = '#80cbc4';
+var teal300 = exports.teal300 = '#4db6ac';
+var teal400 = exports.teal400 = '#26a69a';
+var teal500 = exports.teal500 = '#009688';
+var teal600 = exports.teal600 = '#00897b';
+var teal700 = exports.teal700 = '#00796b';
+var teal800 = exports.teal800 = '#00695c';
+var teal900 = exports.teal900 = '#004d40';
+var tealA100 = exports.tealA100 = '#a7ffeb';
+var tealA200 = exports.tealA200 = '#64ffda';
+var tealA400 = exports.tealA400 = '#1de9b6';
+var tealA700 = exports.tealA700 = '#00bfa5';
+
+var green50 = exports.green50 = '#e8f5e9';
+var green100 = exports.green100 = '#c8e6c9';
+var green200 = exports.green200 = '#a5d6a7';
+var green300 = exports.green300 = '#81c784';
+var green400 = exports.green400 = '#66bb6a';
+var green500 = exports.green500 = '#4caf50';
+var green600 = exports.green600 = '#43a047';
+var green700 = exports.green700 = '#388e3c';
+var green800 = exports.green800 = '#2e7d32';
+var green900 = exports.green900 = '#1b5e20';
+var greenA100 = exports.greenA100 = '#b9f6ca';
+var greenA200 = exports.greenA200 = '#69f0ae';
+var greenA400 = exports.greenA400 = '#00e676';
+var greenA700 = exports.greenA700 = '#00c853';
+
+var lightGreen50 = exports.lightGreen50 = '#f1f8e9';
+var lightGreen100 = exports.lightGreen100 = '#dcedc8';
+var lightGreen200 = exports.lightGreen200 = '#c5e1a5';
+var lightGreen300 = exports.lightGreen300 = '#aed581';
+var lightGreen400 = exports.lightGreen400 = '#9ccc65';
+var lightGreen500 = exports.lightGreen500 = '#8bc34a';
+var lightGreen600 = exports.lightGreen600 = '#7cb342';
+var lightGreen700 = exports.lightGreen700 = '#689f38';
+var lightGreen800 = exports.lightGreen800 = '#558b2f';
+var lightGreen900 = exports.lightGreen900 = '#33691e';
+var lightGreenA100 = exports.lightGreenA100 = '#ccff90';
+var lightGreenA200 = exports.lightGreenA200 = '#b2ff59';
+var lightGreenA400 = exports.lightGreenA400 = '#76ff03';
+var lightGreenA700 = exports.lightGreenA700 = '#64dd17';
+
+var lime50 = exports.lime50 = '#f9fbe7';
+var lime100 = exports.lime100 = '#f0f4c3';
+var lime200 = exports.lime200 = '#e6ee9c';
+var lime300 = exports.lime300 = '#dce775';
+var lime400 = exports.lime400 = '#d4e157';
+var lime500 = exports.lime500 = '#cddc39';
+var lime600 = exports.lime600 = '#c0ca33';
+var lime700 = exports.lime700 = '#afb42b';
+var lime800 = exports.lime800 = '#9e9d24';
+var lime900 = exports.lime900 = '#827717';
+var limeA100 = exports.limeA100 = '#f4ff81';
+var limeA200 = exports.limeA200 = '#eeff41';
+var limeA400 = exports.limeA400 = '#c6ff00';
+var limeA700 = exports.limeA700 = '#aeea00';
+
+var yellow50 = exports.yellow50 = '#fffde7';
+var yellow100 = exports.yellow100 = '#fff9c4';
+var yellow200 = exports.yellow200 = '#fff59d';
+var yellow300 = exports.yellow300 = '#fff176';
+var yellow400 = exports.yellow400 = '#ffee58';
+var yellow500 = exports.yellow500 = '#ffeb3b';
+var yellow600 = exports.yellow600 = '#fdd835';
+var yellow700 = exports.yellow700 = '#fbc02d';
+var yellow800 = exports.yellow800 = '#f9a825';
+var yellow900 = exports.yellow900 = '#f57f17';
+var yellowA100 = exports.yellowA100 = '#ffff8d';
+var yellowA200 = exports.yellowA200 = '#ffff00';
+var yellowA400 = exports.yellowA400 = '#ffea00';
+var yellowA700 = exports.yellowA700 = '#ffd600';
+
+var amber50 = exports.amber50 = '#fff8e1';
+var amber100 = exports.amber100 = '#ffecb3';
+var amber200 = exports.amber200 = '#ffe082';
+var amber300 = exports.amber300 = '#ffd54f';
+var amber400 = exports.amber400 = '#ffca28';
+var amber500 = exports.amber500 = '#ffc107';
+var amber600 = exports.amber600 = '#ffb300';
+var amber700 = exports.amber700 = '#ffa000';
+var amber800 = exports.amber800 = '#ff8f00';
+var amber900 = exports.amber900 = '#ff6f00';
+var amberA100 = exports.amberA100 = '#ffe57f';
+var amberA200 = exports.amberA200 = '#ffd740';
+var amberA400 = exports.amberA400 = '#ffc400';
+var amberA700 = exports.amberA700 = '#ffab00';
+
+var orange50 = exports.orange50 = '#fff3e0';
+var orange100 = exports.orange100 = '#ffe0b2';
+var orange200 = exports.orange200 = '#ffcc80';
+var orange300 = exports.orange300 = '#ffb74d';
+var orange400 = exports.orange400 = '#ffa726';
+var orange500 = exports.orange500 = '#ff9800';
+var orange600 = exports.orange600 = '#fb8c00';
+var orange700 = exports.orange700 = '#f57c00';
+var orange800 = exports.orange800 = '#ef6c00';
+var orange900 = exports.orange900 = '#e65100';
+var orangeA100 = exports.orangeA100 = '#ffd180';
+var orangeA200 = exports.orangeA200 = '#ffab40';
+var orangeA400 = exports.orangeA400 = '#ff9100';
+var orangeA700 = exports.orangeA700 = '#ff6d00';
+
+var deepOrange50 = exports.deepOrange50 = '#fbe9e7';
+var deepOrange100 = exports.deepOrange100 = '#ffccbc';
+var deepOrange200 = exports.deepOrange200 = '#ffab91';
+var deepOrange300 = exports.deepOrange300 = '#ff8a65';
+var deepOrange400 = exports.deepOrange400 = '#ff7043';
+var deepOrange500 = exports.deepOrange500 = '#ff5722';
+var deepOrange600 = exports.deepOrange600 = '#f4511e';
+var deepOrange700 = exports.deepOrange700 = '#e64a19';
+var deepOrange800 = exports.deepOrange800 = '#d84315';
+var deepOrange900 = exports.deepOrange900 = '#bf360c';
+var deepOrangeA100 = exports.deepOrangeA100 = '#ff9e80';
+var deepOrangeA200 = exports.deepOrangeA200 = '#ff6e40';
+var deepOrangeA400 = exports.deepOrangeA400 = '#ff3d00';
+var deepOrangeA700 = exports.deepOrangeA700 = '#dd2c00';
+
+var brown50 = exports.brown50 = '#efebe9';
+var brown100 = exports.brown100 = '#d7ccc8';
+var brown200 = exports.brown200 = '#bcaaa4';
+var brown300 = exports.brown300 = '#a1887f';
+var brown400 = exports.brown400 = '#8d6e63';
+var brown500 = exports.brown500 = '#795548';
+var brown600 = exports.brown600 = '#6d4c41';
+var brown700 = exports.brown700 = '#5d4037';
+var brown800 = exports.brown800 = '#4e342e';
+var brown900 = exports.brown900 = '#3e2723';
+
+var blueGrey50 = exports.blueGrey50 = '#eceff1';
+var blueGrey100 = exports.blueGrey100 = '#cfd8dc';
+var blueGrey200 = exports.blueGrey200 = '#b0bec5';
+var blueGrey300 = exports.blueGrey300 = '#90a4ae';
+var blueGrey400 = exports.blueGrey400 = '#78909c';
+var blueGrey500 = exports.blueGrey500 = '#607d8b';
+var blueGrey600 = exports.blueGrey600 = '#546e7a';
+var blueGrey700 = exports.blueGrey700 = '#455a64';
+var blueGrey800 = exports.blueGrey800 = '#37474f';
+var blueGrey900 = exports.blueGrey900 = '#263238';
+
+var grey50 = exports.grey50 = '#fafafa';
+var grey100 = exports.grey100 = '#f5f5f5';
+var grey200 = exports.grey200 = '#eeeeee';
+var grey300 = exports.grey300 = '#e0e0e0';
+var grey400 = exports.grey400 = '#bdbdbd';
+var grey500 = exports.grey500 = '#9e9e9e';
+var grey600 = exports.grey600 = '#757575';
+var grey700 = exports.grey700 = '#616161';
+var grey800 = exports.grey800 = '#424242';
+var grey900 = exports.grey900 = '#212121';
+
+var black = exports.black = '#000000';
+var white = exports.white = '#ffffff';
+
+var transparent = exports.transparent = 'rgba(0, 0, 0, 0)';
+var fullBlack = exports.fullBlack = 'rgba(0, 0, 0, 1)';
+var darkBlack = exports.darkBlack = 'rgba(0, 0, 0, 0.87)';
+var lightBlack = exports.lightBlack = 'rgba(0, 0, 0, 0.54)';
+var minBlack = exports.minBlack = 'rgba(0, 0, 0, 0.26)';
+var faintBlack = exports.faintBlack = 'rgba(0, 0, 0, 0.12)';
+var fullWhite = exports.fullWhite = 'rgba(255, 255, 255, 1)';
+var darkWhite = exports.darkWhite = 'rgba(255, 255, 255, 0.87)';
+var lightWhite = exports.lightWhite = 'rgba(255, 255, 255, 0.54)';
+
+/***/ }),
+/* 32 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -1740,7 +1889,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = undefined;
-var _Paper = __webpack_require__(755);
+var _Paper = __webpack_require__(741);
var _Paper2 = _interopRequireDefault(_Paper);
@@ -1749,40 +1898,104 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
exports.default = _Paper2.default;
/***/ }),
-/* 35 */
+/* 33 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var global = __webpack_require__(25)
+ , core = __webpack_require__(18)
+ , ctx = __webpack_require__(67)
+ , hide = __webpack_require__(53)
+ , PROTOTYPE = 'prototype';
+
+var $export = function(type, name, source){
+ var IS_FORCED = type & $export.F
+ , IS_GLOBAL = type & $export.G
+ , IS_STATIC = type & $export.S
+ , IS_PROTO = type & $export.P
+ , IS_BIND = type & $export.B
+ , IS_WRAP = type & $export.W
+ , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
+ , expProto = exports[PROTOTYPE]
+ , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
+ , key, own, out;
+ if(IS_GLOBAL)source = name;
+ for(key in source){
+ // contains in native
+ own = !IS_FORCED && target && target[key] !== undefined;
+ if(own && key in exports)continue;
+ // export native or passed
+ out = own ? target[key] : source[key];
+ // prevent global pollution for namespaces
+ exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
+ // bind timers to global for call from export context
+ : IS_BIND && own ? ctx(out, global)
+ // wrap global constructors for prevent change them in library
+ : IS_WRAP && target[key] == out ? (function(C){
+ var F = function(a, b, c){
+ if(this instanceof C){
+ switch(arguments.length){
+ case 0: return new C;
+ case 1: return new C(a);
+ case 2: return new C(a, b);
+ } return new C(a, b, c);
+ } return C.apply(this, arguments);
+ };
+ F[PROTOTYPE] = C[PROTOTYPE];
+ return F;
+ // make static versions for prototype methods
+ })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
+ // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
+ if(IS_PROTO){
+ (exports.virtual || (exports.virtual = {}))[key] = out;
+ // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
+ if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
+ }
+ }
+};
+// type bitmap
+$export.F = 1; // forced
+$export.G = 2; // global
+$export.S = 4; // static
+$export.P = 8; // proto
+$export.B = 16; // bind
+$export.W = 32; // wrap
+$export.U = 64; // safe
+$export.R = 128; // real proto method for `library`
+module.exports = $export;
+
+/***/ }),
+/* 34 */
/***/ (function(module, exports, __webpack_require__) {
-var anObject = __webpack_require__(36);
-var IE8_DOM_DEFINE = __webpack_require__(206);
-var toPrimitive = __webpack_require__(132);
-var dP = Object.defineProperty;
+var anObject = __webpack_require__(35)
+ , IE8_DOM_DEFINE = __webpack_require__(213)
+ , toPrimitive = __webpack_require__(138)
+ , dP = Object.defineProperty;
-exports.f = __webpack_require__(44) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
+exports.f = __webpack_require__(43) ? Object.defineProperty : function defineProperty(O, P, Attributes){
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
- if (IE8_DOM_DEFINE) try {
+ if(IE8_DOM_DEFINE)try {
return dP(O, P, Attributes);
- } catch (e) { /* empty */ }
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
- if ('value' in Attributes) O[P] = Attributes.value;
+ } catch(e){ /* empty */ }
+ if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
+ if('value' in Attributes)O[P] = Attributes.value;
return O;
};
-
/***/ }),
-/* 36 */
+/* 35 */
/***/ (function(module, exports, __webpack_require__) {
-var isObject = __webpack_require__(62);
-module.exports = function (it) {
- if (!isObject(it)) throw TypeError(it + ' is not an object!');
+var isObject = __webpack_require__(68);
+module.exports = function(it){
+ if(!isObject(it))throw TypeError(it + ' is not an object!');
return it;
};
-
/***/ }),
-/* 37 */
+/* 36 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -1816,7 +2029,7 @@ var ReactCurrentOwner = {
module.exports = ReactCurrentOwner;
/***/ }),
-/* 38 */
+/* 37 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -1832,12 +2045,12 @@ module.exports = ReactCurrentOwner;
-var _assign = __webpack_require__(15);
+var _assign = __webpack_require__(13);
-var PooledClass = __webpack_require__(53);
+var PooledClass = __webpack_require__(58);
-var emptyFunction = __webpack_require__(24);
-var warning = __webpack_require__(12);
+var emptyFunction = __webpack_require__(22);
+var warning = __webpack_require__(11);
var didWarnForAddedNewProperty = false;
var isProxySupported = typeof Proxy === 'function';
@@ -1924,6 +2137,7 @@ function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarg
}
_assign(SyntheticEvent.prototype, {
+
preventDefault: function () {
this.defaultPrevented = true;
var event = this.nativeEvent;
@@ -1933,8 +2147,8 @@ _assign(SyntheticEvent.prototype, {
if (event.preventDefault) {
event.preventDefault();
- // eslint-disable-next-line valid-typeof
} else if (typeof event.returnValue !== 'unknown') {
+ // eslint-disable-line valid-typeof
event.returnValue = false;
}
this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
@@ -1948,8 +2162,8 @@ _assign(SyntheticEvent.prototype, {
if (event.stopPropagation) {
event.stopPropagation();
- // eslint-disable-next-line valid-typeof
} else if (typeof event.cancelBubble !== 'unknown') {
+ // eslint-disable-line valid-typeof
// The ChangeEventPlugin registers a "propertychange" event for
// IE. This event does not support bubbling or cancelling, and
// any references to cancelBubble throw "Member not found". A
@@ -1998,6 +2212,7 @@ _assign(SyntheticEvent.prototype, {
Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
}
}
+
});
SyntheticEvent.Interface = EventInterface;
@@ -2013,7 +2228,7 @@ if (false) {
return new Proxy(constructor.apply(that, args), {
set: function (target, prop, value) {
if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
- process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
+ process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re adding a new property in the synthetic event object. ' + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
didWarnForAddedNewProperty = true;
}
target[prop] = value;
@@ -2082,49 +2297,12 @@ function getPooledWarningPropertyDefinition(propName, getVal) {
function warn(action, result) {
var warningCondition = false;
- false ? warning(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
+ false ? warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\'re seeing this, ' + 'you\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
}
}
/***/ }),
-/* 39 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- */
-
-
-
-var React = __webpack_require__(0);
-var factory = __webpack_require__(215);
-
-if (typeof React === 'undefined') {
- throw Error(
- 'create-react-class could not find the React object. If you are using script tags, ' +
- 'make sure that React is being loaded before create-react-class.'
- );
-}
-
-// Hack to grab NoopUpdateQueue from isomorphic React
-var ReactNoopUpdateQueue = new React.Component().updater;
-
-module.exports = factory(
- React.Component,
- React.isValidElement,
- ReactNoopUpdateQueue
-);
-
-
-/***/ }),
-/* 40 */
+/* 38 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -2141,7 +2319,7 @@ exports.default = function (prefixedValue, value, keepUnprefixed) {
module.exports = exports["default"];
/***/ }),
-/* 41 */
+/* 39 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -2178,7 +2356,7 @@ exports.default = {
};
/***/ }),
-/* 42 */
+/* 40 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -2208,19 +2386,15 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
-var _typeof2 = __webpack_require__(92);
+var _typeof2 = __webpack_require__(61);
var _typeof3 = _interopRequireDefault(_typeof2);
-var _keys = __webpack_require__(79);
+var _keys = __webpack_require__(62);
var _keys2 = _interopRequireDefault(_keys);
-var _objectWithoutProperties2 = __webpack_require__(8);
-
-var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-
-var _assign = __webpack_require__(49);
+var _assign = __webpack_require__(42);
var _assign2 = _interopRequireDefault(_assign);
@@ -2230,19 +2404,15 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _propTypes = __webpack_require__(14);
+var _reactAddonsShallowCompare = __webpack_require__(736);
-var _propTypes2 = _interopRequireDefault(_propTypes);
+var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
-var _shallowEqual = __webpack_require__(87);
-
-var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
-
-var _warning = __webpack_require__(17);
+var _warning = __webpack_require__(15);
var _warning2 = _interopRequireDefault(_warning);
-var _supports = __webpack_require__(752);
+var _supports = __webpack_require__(738);
var supports = _interopRequireWildcard(_supports);
@@ -2250,11 +2420,12 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/* eslint-disable prefer-spread */
+
var defaultEventOptions = {
capture: false,
passive: false
};
-/* eslint-disable prefer-spread */
function mergeDefaultEventOptions(options) {
return (0, _assign2.default)({}, defaultEventOptions, options);
@@ -2286,18 +2457,15 @@ function off(target, eventName, callback, options) {
}
}
-function forEachListener(props, iteratee) {
- var children = props.children,
- target = props.target,
- eventProps = (0, _objectWithoutProperties3.default)(props, ['children', 'target']);
-
+var state = {};
- (0, _keys2.default)(eventProps).forEach(function (name) {
+function forEachListener(props, iteratee) {
+ (0, _keys2.default)(props).forEach(function (name) {
if (name.substring(0, 2) !== 'on') {
return;
}
- var prop = eventProps[name];
+ var prop = props[name];
var type = typeof prop === 'undefined' ? 'undefined' : (0, _typeof3.default)(prop);
var isObject = type === 'object';
var isFunction = type === 'function';
@@ -2343,7 +2511,10 @@ var EventListener = function (_Component) {
}, {
key: 'shouldComponentUpdate',
value: function shouldComponentUpdate(nextProps) {
- return !(0, _shallowEqual2.default)(this.props, nextProps);
+ return (0, _reactAddonsShallowCompare2.default)({
+ props: this.props,
+ state: state
+ }, nextProps, state);
}
}, {
key: 'componentWillUpdate',
@@ -2399,16 +2570,16 @@ var EventListener = function (_Component) {
/**
* You can provide a single child too.
*/
- children: _propTypes2.default.element,
+ children: _react.PropTypes.element,
/**
* The DOM target to listen to.
*/
- target: _propTypes2.default.oneOfType([_propTypes2.default.object, _propTypes2.default.string]).isRequired
+ target: _react.PropTypes.oneOfType([_react.PropTypes.object, _react.PropTypes.string])
} : void 0;
exports.default = EventListener;
/***/ }),
-/* 43 */
+/* 41 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -2471,17 +2642,22 @@ function createComponent(MaterialUIComponent, mapProps) {
}
/***/ }),
-/* 44 */
+/* 42 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(347), __esModule: true };
+
+/***/ }),
+/* 43 */
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
-module.exports = !__webpack_require__(63)(function () {
- return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
+module.exports = !__webpack_require__(69)(function(){
+ return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
});
-
/***/ }),
-/* 45 */
+/* 44 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -2573,7 +2749,7 @@ function createRoutes(routes) {
}
/***/ }),
-/* 46 */
+/* 45 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -2582,17 +2758,19 @@ function createRoutes(routes) {
exports.__esModule = true;
exports.createPath = exports.parsePath = exports.getQueryStringValueFromPath = exports.stripQueryStringValueFromPath = exports.addQueryStringValueToPath = undefined;
-var _warning = __webpack_require__(17);
+var _warning = __webpack_require__(15);
var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var addQueryStringValueToPath = exports.addQueryStringValueToPath = function addQueryStringValueToPath(path, key, value) {
- var _parsePath = parsePath(path),
- pathname = _parsePath.pathname,
- search = _parsePath.search,
- hash = _parsePath.hash;
+ var _parsePath = parsePath(path);
+
+ var pathname = _parsePath.pathname;
+ var search = _parsePath.search;
+ var hash = _parsePath.hash;
+
return createPath({
pathname: pathname,
@@ -2602,10 +2780,12 @@ var addQueryStringValueToPath = exports.addQueryStringValueToPath = function add
};
var stripQueryStringValueFromPath = exports.stripQueryStringValueFromPath = function stripQueryStringValueFromPath(path, key) {
- var _parsePath2 = parsePath(path),
- pathname = _parsePath2.pathname,
- search = _parsePath2.search,
- hash = _parsePath2.hash;
+ var _parsePath2 = parsePath(path);
+
+ var pathname = _parsePath2.pathname;
+ var search = _parsePath2.search;
+ var hash = _parsePath2.hash;
+
return createPath({
pathname: pathname,
@@ -2617,8 +2797,9 @@ var stripQueryStringValueFromPath = exports.stripQueryStringValueFromPath = func
};
var getQueryStringValueFromPath = exports.getQueryStringValueFromPath = function getQueryStringValueFromPath(path, key) {
- var _parsePath3 = parsePath(path),
- search = _parsePath3.search;
+ var _parsePath3 = parsePath(path);
+
+ var search = _parsePath3.search;
var match = search.match(new RegExp('[?&]' + key + '=([a-zA-Z0-9]+)'));
return match && match[1];
@@ -2660,10 +2841,10 @@ var parsePath = exports.parsePath = function parsePath(path) {
var createPath = exports.createPath = function createPath(location) {
if (location == null || typeof location === 'string') return location;
- var basename = location.basename,
- pathname = location.pathname,
- search = location.search,
- hash = location.hash;
+ var basename = location.basename;
+ var pathname = location.pathname;
+ var search = location.search;
+ var hash = location.hash;
var path = (basename || '') + pathname;
@@ -2675,7 +2856,7 @@ var createPath = exports.createPath = function createPath(location) {
};
/***/ }),
-/* 47 */
+/* 46 */
/***/ (function(module, exports) {
var g;
@@ -2702,7 +2883,7 @@ module.exports = g;
/***/ }),
-/* 48 */
+/* 47 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -2740,228 +2921,67 @@ function isObject(value) {
/***/ }),
-/* 49 */
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = { "default": __webpack_require__(336), __esModule: true };
-
-/***/ }),
-/* 50 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var dP = __webpack_require__(35);
-var createDesc = __webpack_require__(82);
-module.exports = __webpack_require__(44) ? function (object, key, value) {
- return dP.f(object, key, createDesc(1, value));
-} : function (object, key, value) {
- object[key] = value;
- return object;
-};
-
-
-/***/ }),
-/* 51 */
-/***/ (function(module, exports) {
-
-var hasOwnProperty = {}.hasOwnProperty;
-module.exports = function (it, key) {
- return hasOwnProperty.call(it, key);
-};
-
-
-/***/ }),
-/* 52 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// to indexed object, toObject with fallback for non-array-like ES3 strings
-var IObject = __webpack_require__(208);
-var defined = __webpack_require__(133);
-module.exports = function (it) {
- return IObject(defined(it));
-};
-
-
-/***/ }),
-/* 53 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 48 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- *
- */
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__splice__ = __webpack_require__(604);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getIn__ = __webpack_require__(292);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setIn__ = __webpack_require__(605);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__deepEqual__ = __webpack_require__(606);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__deleteIn__ = __webpack_require__(607);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keys__ = __webpack_require__(608);
-var _prodInvariant = __webpack_require__(13);
-
-var invariant = __webpack_require__(9);
-
-/**
- * Static poolers. Several custom versions for each potential number of
- * arguments. A completely generic pooler is easy to implement, but would
- * require accessing the `arguments` object. In each of these, `this` refers to
- * the Class itself, not an instance. If any others are needed, simply add them
- * here, or in their own files.
- */
-var oneArgumentPooler = function (copyFieldsFrom) {
- var Klass = this;
- if (Klass.instancePool.length) {
- var instance = Klass.instancePool.pop();
- Klass.call(instance, copyFieldsFrom);
- return instance;
- } else {
- return new Klass(copyFieldsFrom);
- }
-};
-
-var twoArgumentPooler = function (a1, a2) {
- var Klass = this;
- if (Klass.instancePool.length) {
- var instance = Klass.instancePool.pop();
- Klass.call(instance, a1, a2);
- return instance;
- } else {
- return new Klass(a1, a2);
- }
-};
-
-var threeArgumentPooler = function (a1, a2, a3) {
- var Klass = this;
- if (Klass.instancePool.length) {
- var instance = Klass.instancePool.pop();
- Klass.call(instance, a1, a2, a3);
- return instance;
- } else {
- return new Klass(a1, a2, a3);
- }
-};
-var fourArgumentPooler = function (a1, a2, a3, a4) {
- var Klass = this;
- if (Klass.instancePool.length) {
- var instance = Klass.instancePool.pop();
- Klass.call(instance, a1, a2, a3, a4);
- return instance;
- } else {
- return new Klass(a1, a2, a3, a4);
- }
-};
-var standardReleaser = function (instance) {
- var Klass = this;
- !(instance instanceof Klass) ? false ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
- instance.destructor();
- if (Klass.instancePool.length < Klass.poolSize) {
- Klass.instancePool.push(instance);
- }
-};
-var DEFAULT_POOL_SIZE = 10;
-var DEFAULT_POOLER = oneArgumentPooler;
-/**
- * Augments `CopyConstructor` to be a poolable class, augmenting only the class
- * itself (statically) not adding any prototypical fields. Any CopyConstructor
- * you give this may have a `poolSize` property, and will look for a
- * prototypical `destructor` on instances.
- *
- * @param {Function} CopyConstructor Constructor that can be used to reset.
- * @param {Function} pooler Customizable pooler.
- */
-var addPoolingTo = function (CopyConstructor, pooler) {
- // Casting as any so that flow ignores the actual implementation and trusts
- // it to match the type we declared
- var NewKlass = CopyConstructor;
- NewKlass.instancePool = [];
- NewKlass.getPooled = pooler || DEFAULT_POOLER;
- if (!NewKlass.poolSize) {
- NewKlass.poolSize = DEFAULT_POOL_SIZE;
+var structure = {
+ empty: {},
+ emptyList: [],
+ getIn: __WEBPACK_IMPORTED_MODULE_1__getIn__["a" /* default */],
+ setIn: __WEBPACK_IMPORTED_MODULE_2__setIn__["a" /* default */],
+ deepEqual: __WEBPACK_IMPORTED_MODULE_3__deepEqual__["a" /* default */],
+ deleteIn: __WEBPACK_IMPORTED_MODULE_4__deleteIn__["a" /* default */],
+ fromJS: function fromJS(value) {
+ return value;
+ },
+ keys: __WEBPACK_IMPORTED_MODULE_5__keys__["a" /* default */],
+ size: function size(array) {
+ return array ? array.length : 0;
+ },
+ splice: __WEBPACK_IMPORTED_MODULE_0__splice__["a" /* default */],
+ toJS: function toJS(value) {
+ return value;
}
- NewKlass.release = standardReleaser;
- return NewKlass;
-};
-
-var PooledClass = {
- addPoolingTo: addPoolingTo,
- oneArgumentPooler: oneArgumentPooler,
- twoArgumentPooler: twoArgumentPooler,
- threeArgumentPooler: threeArgumentPooler,
- fourArgumentPooler: fourArgumentPooler
};
-module.exports = PooledClass;
-
-/***/ }),
-/* 54 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
- return value != null && typeof value == 'object';
-}
-
-/* harmony default export */ __webpack_exports__["a"] = (isObjectLike);
-
+/* harmony default export */ __webpack_exports__["a"] = (structure);
/***/ }),
-/* 55 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 49 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__ = __webpack_require__(507);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getValue_js__ = __webpack_require__(510);
-
-
-
-/**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
-function getNative(object, key) {
- var value = Object(__WEBPACK_IMPORTED_MODULE_1__getValue_js__["a" /* default */])(object, key);
- return Object(__WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__["a" /* default */])(value) ? value : undefined;
-}
-/* harmony default export */ __webpack_exports__["a"] = (getNative);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+var CHANGE_MENU = exports.CHANGE_MENU = 'CHANGE_MENU';
+var NOTIFICATION_ADD = exports.NOTIFICATION_ADD = 'NOTIFICATION_ADD';
+var PROFILE_CREATE = exports.PROFILE_CREATE = 'PROFILE_CREATE';
+var PROFILE_UPDATE_SETTINGS = exports.PROFILE_UPDATE_SETTINGS = 'PROFILE_UPDATE_SETTINGS';
+var PROFILE_REMOVE = exports.PROFILE_REMOVE = 'PROFILE_REMOVE';
+var PROFILE_SET_ENABLED = exports.PROFILE_SET_ENABLED = 'PROFILE_SET_ENABLED';
+var ATC_PRODUCT_ADD = exports.ATC_PRODUCT_ADD = 'ATC_PRODUCT_ADD';
+var ATC_PRODUCT_REMOVE = exports.ATC_PRODUCT_REMOVE = 'ATC_PRODUCT_REMOVE';
+var ATC_SET_PRODUCT_ENABLED = exports.ATC_SET_PRODUCT_ENABLED = 'ATC_SET_PRODUCT_ENABLED';
/***/ }),
-/* 56 */
+/* 50 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -3199,7 +3219,7 @@ function lighten(color, coefficient) {
}
/***/ }),
-/* 57 */
+/* 51 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -3208,371 +3228,58 @@ function lighten(color, coefficient) {
Object.defineProperty(exports, "__esModule", {
value: true
});
-var red50 = exports.red50 = '#ffebee';
-var red100 = exports.red100 = '#ffcdd2';
-var red200 = exports.red200 = '#ef9a9a';
-var red300 = exports.red300 = '#e57373';
-var red400 = exports.red400 = '#ef5350';
-var red500 = exports.red500 = '#f44336';
-var red600 = exports.red600 = '#e53935';
-var red700 = exports.red700 = '#d32f2f';
-var red800 = exports.red800 = '#c62828';
-var red900 = exports.red900 = '#b71c1c';
-var redA100 = exports.redA100 = '#ff8a80';
-var redA200 = exports.redA200 = '#ff5252';
-var redA400 = exports.redA400 = '#ff1744';
-var redA700 = exports.redA700 = '#d50000';
-var pink50 = exports.pink50 = '#fce4ec';
-var pink100 = exports.pink100 = '#f8bbd0';
-var pink200 = exports.pink200 = '#f48fb1';
-var pink300 = exports.pink300 = '#f06292';
-var pink400 = exports.pink400 = '#ec407a';
-var pink500 = exports.pink500 = '#e91e63';
-var pink600 = exports.pink600 = '#d81b60';
-var pink700 = exports.pink700 = '#c2185b';
-var pink800 = exports.pink800 = '#ad1457';
-var pink900 = exports.pink900 = '#880e4f';
-var pinkA100 = exports.pinkA100 = '#ff80ab';
-var pinkA200 = exports.pinkA200 = '#ff4081';
-var pinkA400 = exports.pinkA400 = '#f50057';
-var pinkA700 = exports.pinkA700 = '#c51162';
+var _extends2 = __webpack_require__(7);
-var purple50 = exports.purple50 = '#f3e5f5';
-var purple100 = exports.purple100 = '#e1bee7';
-var purple200 = exports.purple200 = '#ce93d8';
-var purple300 = exports.purple300 = '#ba68c8';
-var purple400 = exports.purple400 = '#ab47bc';
-var purple500 = exports.purple500 = '#9c27b0';
-var purple600 = exports.purple600 = '#8e24aa';
-var purple700 = exports.purple700 = '#7b1fa2';
-var purple800 = exports.purple800 = '#6a1b9a';
-var purple900 = exports.purple900 = '#4a148c';
-var purpleA100 = exports.purpleA100 = '#ea80fc';
-var purpleA200 = exports.purpleA200 = '#e040fb';
-var purpleA400 = exports.purpleA400 = '#d500f9';
-var purpleA700 = exports.purpleA700 = '#aa00ff';
+var _extends3 = _interopRequireDefault(_extends2);
-var deepPurple50 = exports.deepPurple50 = '#ede7f6';
-var deepPurple100 = exports.deepPurple100 = '#d1c4e9';
-var deepPurple200 = exports.deepPurple200 = '#b39ddb';
-var deepPurple300 = exports.deepPurple300 = '#9575cd';
-var deepPurple400 = exports.deepPurple400 = '#7e57c2';
-var deepPurple500 = exports.deepPurple500 = '#673ab7';
-var deepPurple600 = exports.deepPurple600 = '#5e35b1';
-var deepPurple700 = exports.deepPurple700 = '#512da8';
-var deepPurple800 = exports.deepPurple800 = '#4527a0';
-var deepPurple900 = exports.deepPurple900 = '#311b92';
-var deepPurpleA100 = exports.deepPurpleA100 = '#b388ff';
-var deepPurpleA200 = exports.deepPurpleA200 = '#7c4dff';
-var deepPurpleA400 = exports.deepPurpleA400 = '#651fff';
-var deepPurpleA700 = exports.deepPurpleA700 = '#6200ea';
+var _objectWithoutProperties2 = __webpack_require__(8);
-var indigo50 = exports.indigo50 = '#e8eaf6';
-var indigo100 = exports.indigo100 = '#c5cae9';
-var indigo200 = exports.indigo200 = '#9fa8da';
-var indigo300 = exports.indigo300 = '#7986cb';
-var indigo400 = exports.indigo400 = '#5c6bc0';
-var indigo500 = exports.indigo500 = '#3f51b5';
-var indigo600 = exports.indigo600 = '#3949ab';
-var indigo700 = exports.indigo700 = '#303f9f';
-var indigo800 = exports.indigo800 = '#283593';
-var indigo900 = exports.indigo900 = '#1a237e';
-var indigoA100 = exports.indigoA100 = '#8c9eff';
-var indigoA200 = exports.indigoA200 = '#536dfe';
-var indigoA400 = exports.indigoA400 = '#3d5afe';
-var indigoA700 = exports.indigoA700 = '#304ffe';
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-var blue50 = exports.blue50 = '#e3f2fd';
-var blue100 = exports.blue100 = '#bbdefb';
-var blue200 = exports.blue200 = '#90caf9';
-var blue300 = exports.blue300 = '#64b5f6';
-var blue400 = exports.blue400 = '#42a5f5';
-var blue500 = exports.blue500 = '#2196f3';
-var blue600 = exports.blue600 = '#1e88e5';
-var blue700 = exports.blue700 = '#1976d2';
-var blue800 = exports.blue800 = '#1565c0';
-var blue900 = exports.blue900 = '#0d47a1';
-var blueA100 = exports.blueA100 = '#82b1ff';
-var blueA200 = exports.blueA200 = '#448aff';
-var blueA400 = exports.blueA400 = '#2979ff';
-var blueA700 = exports.blueA700 = '#2962ff';
+var _getPrototypeOf = __webpack_require__(3);
-var lightBlue50 = exports.lightBlue50 = '#e1f5fe';
-var lightBlue100 = exports.lightBlue100 = '#b3e5fc';
-var lightBlue200 = exports.lightBlue200 = '#81d4fa';
-var lightBlue300 = exports.lightBlue300 = '#4fc3f7';
-var lightBlue400 = exports.lightBlue400 = '#29b6f6';
-var lightBlue500 = exports.lightBlue500 = '#03a9f4';
-var lightBlue600 = exports.lightBlue600 = '#039be5';
-var lightBlue700 = exports.lightBlue700 = '#0288d1';
-var lightBlue800 = exports.lightBlue800 = '#0277bd';
-var lightBlue900 = exports.lightBlue900 = '#01579b';
-var lightBlueA100 = exports.lightBlueA100 = '#80d8ff';
-var lightBlueA200 = exports.lightBlueA200 = '#40c4ff';
-var lightBlueA400 = exports.lightBlueA400 = '#00b0ff';
-var lightBlueA700 = exports.lightBlueA700 = '#0091ea';
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-var cyan50 = exports.cyan50 = '#e0f7fa';
-var cyan100 = exports.cyan100 = '#b2ebf2';
-var cyan200 = exports.cyan200 = '#80deea';
-var cyan300 = exports.cyan300 = '#4dd0e1';
-var cyan400 = exports.cyan400 = '#26c6da';
-var cyan500 = exports.cyan500 = '#00bcd4';
-var cyan600 = exports.cyan600 = '#00acc1';
-var cyan700 = exports.cyan700 = '#0097a7';
-var cyan800 = exports.cyan800 = '#00838f';
-var cyan900 = exports.cyan900 = '#006064';
-var cyanA100 = exports.cyanA100 = '#84ffff';
-var cyanA200 = exports.cyanA200 = '#18ffff';
-var cyanA400 = exports.cyanA400 = '#00e5ff';
-var cyanA700 = exports.cyanA700 = '#00b8d4';
+var _classCallCheck2 = __webpack_require__(1);
-var teal50 = exports.teal50 = '#e0f2f1';
-var teal100 = exports.teal100 = '#b2dfdb';
-var teal200 = exports.teal200 = '#80cbc4';
-var teal300 = exports.teal300 = '#4db6ac';
-var teal400 = exports.teal400 = '#26a69a';
-var teal500 = exports.teal500 = '#009688';
-var teal600 = exports.teal600 = '#00897b';
-var teal700 = exports.teal700 = '#00796b';
-var teal800 = exports.teal800 = '#00695c';
-var teal900 = exports.teal900 = '#004d40';
-var tealA100 = exports.tealA100 = '#a7ffeb';
-var tealA200 = exports.tealA200 = '#64ffda';
-var tealA400 = exports.tealA400 = '#1de9b6';
-var tealA700 = exports.tealA700 = '#00bfa5';
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-var green50 = exports.green50 = '#e8f5e9';
-var green100 = exports.green100 = '#c8e6c9';
-var green200 = exports.green200 = '#a5d6a7';
-var green300 = exports.green300 = '#81c784';
-var green400 = exports.green400 = '#66bb6a';
-var green500 = exports.green500 = '#4caf50';
-var green600 = exports.green600 = '#43a047';
-var green700 = exports.green700 = '#388e3c';
-var green800 = exports.green800 = '#2e7d32';
-var green900 = exports.green900 = '#1b5e20';
-var greenA100 = exports.greenA100 = '#b9f6ca';
-var greenA200 = exports.greenA200 = '#69f0ae';
-var greenA400 = exports.greenA400 = '#00e676';
-var greenA700 = exports.greenA700 = '#00c853';
+var _createClass2 = __webpack_require__(2);
-var lightGreen50 = exports.lightGreen50 = '#f1f8e9';
-var lightGreen100 = exports.lightGreen100 = '#dcedc8';
-var lightGreen200 = exports.lightGreen200 = '#c5e1a5';
-var lightGreen300 = exports.lightGreen300 = '#aed581';
-var lightGreen400 = exports.lightGreen400 = '#9ccc65';
-var lightGreen500 = exports.lightGreen500 = '#8bc34a';
-var lightGreen600 = exports.lightGreen600 = '#7cb342';
-var lightGreen700 = exports.lightGreen700 = '#689f38';
-var lightGreen800 = exports.lightGreen800 = '#558b2f';
-var lightGreen900 = exports.lightGreen900 = '#33691e';
-var lightGreenA100 = exports.lightGreenA100 = '#ccff90';
-var lightGreenA200 = exports.lightGreenA200 = '#b2ff59';
-var lightGreenA400 = exports.lightGreenA400 = '#76ff03';
-var lightGreenA700 = exports.lightGreenA700 = '#64dd17';
+var _createClass3 = _interopRequireDefault(_createClass2);
-var lime50 = exports.lime50 = '#f9fbe7';
-var lime100 = exports.lime100 = '#f0f4c3';
-var lime200 = exports.lime200 = '#e6ee9c';
-var lime300 = exports.lime300 = '#dce775';
-var lime400 = exports.lime400 = '#d4e157';
-var lime500 = exports.lime500 = '#cddc39';
-var lime600 = exports.lime600 = '#c0ca33';
-var lime700 = exports.lime700 = '#afb42b';
-var lime800 = exports.lime800 = '#9e9d24';
-var lime900 = exports.lime900 = '#827717';
-var limeA100 = exports.limeA100 = '#f4ff81';
-var limeA200 = exports.limeA200 = '#eeff41';
-var limeA400 = exports.limeA400 = '#c6ff00';
-var limeA700 = exports.limeA700 = '#aeea00';
+var _possibleConstructorReturn2 = __webpack_require__(4);
-var yellow50 = exports.yellow50 = '#fffde7';
-var yellow100 = exports.yellow100 = '#fff9c4';
-var yellow200 = exports.yellow200 = '#fff59d';
-var yellow300 = exports.yellow300 = '#fff176';
-var yellow400 = exports.yellow400 = '#ffee58';
-var yellow500 = exports.yellow500 = '#ffeb3b';
-var yellow600 = exports.yellow600 = '#fdd835';
-var yellow700 = exports.yellow700 = '#fbc02d';
-var yellow800 = exports.yellow800 = '#f9a825';
-var yellow900 = exports.yellow900 = '#f57f17';
-var yellowA100 = exports.yellowA100 = '#ffff8d';
-var yellowA200 = exports.yellowA200 = '#ffff00';
-var yellowA400 = exports.yellowA400 = '#ffea00';
-var yellowA700 = exports.yellowA700 = '#ffd600';
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-var amber50 = exports.amber50 = '#fff8e1';
-var amber100 = exports.amber100 = '#ffecb3';
-var amber200 = exports.amber200 = '#ffe082';
-var amber300 = exports.amber300 = '#ffd54f';
-var amber400 = exports.amber400 = '#ffca28';
-var amber500 = exports.amber500 = '#ffc107';
-var amber600 = exports.amber600 = '#ffb300';
-var amber700 = exports.amber700 = '#ffa000';
-var amber800 = exports.amber800 = '#ff8f00';
-var amber900 = exports.amber900 = '#ff6f00';
-var amberA100 = exports.amberA100 = '#ffe57f';
-var amberA200 = exports.amberA200 = '#ffd740';
-var amberA400 = exports.amberA400 = '#ffc400';
-var amberA700 = exports.amberA700 = '#ffab00';
+var _inherits2 = __webpack_require__(5);
-var orange50 = exports.orange50 = '#fff3e0';
-var orange100 = exports.orange100 = '#ffe0b2';
-var orange200 = exports.orange200 = '#ffcc80';
-var orange300 = exports.orange300 = '#ffb74d';
-var orange400 = exports.orange400 = '#ffa726';
-var orange500 = exports.orange500 = '#ff9800';
-var orange600 = exports.orange600 = '#fb8c00';
-var orange700 = exports.orange700 = '#f57c00';
-var orange800 = exports.orange800 = '#ef6c00';
-var orange900 = exports.orange900 = '#e65100';
-var orangeA100 = exports.orangeA100 = '#ffd180';
-var orangeA200 = exports.orangeA200 = '#ffab40';
-var orangeA400 = exports.orangeA400 = '#ff9100';
-var orangeA700 = exports.orangeA700 = '#ff6d00';
+var _inherits3 = _interopRequireDefault(_inherits2);
-var deepOrange50 = exports.deepOrange50 = '#fbe9e7';
-var deepOrange100 = exports.deepOrange100 = '#ffccbc';
-var deepOrange200 = exports.deepOrange200 = '#ffab91';
-var deepOrange300 = exports.deepOrange300 = '#ff8a65';
-var deepOrange400 = exports.deepOrange400 = '#ff7043';
-var deepOrange500 = exports.deepOrange500 = '#ff5722';
-var deepOrange600 = exports.deepOrange600 = '#f4511e';
-var deepOrange700 = exports.deepOrange700 = '#e64a19';
-var deepOrange800 = exports.deepOrange800 = '#d84315';
-var deepOrange900 = exports.deepOrange900 = '#bf360c';
-var deepOrangeA100 = exports.deepOrangeA100 = '#ff9e80';
-var deepOrangeA200 = exports.deepOrangeA200 = '#ff6e40';
-var deepOrangeA400 = exports.deepOrangeA400 = '#ff3d00';
-var deepOrangeA700 = exports.deepOrangeA700 = '#dd2c00';
+var _simpleAssign = __webpack_require__(6);
-var brown50 = exports.brown50 = '#efebe9';
-var brown100 = exports.brown100 = '#d7ccc8';
-var brown200 = exports.brown200 = '#bcaaa4';
-var brown300 = exports.brown300 = '#a1887f';
-var brown400 = exports.brown400 = '#8d6e63';
-var brown500 = exports.brown500 = '#795548';
-var brown600 = exports.brown600 = '#6d4c41';
-var brown700 = exports.brown700 = '#5d4037';
-var brown800 = exports.brown800 = '#4e342e';
-var brown900 = exports.brown900 = '#3e2723';
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-var blueGrey50 = exports.blueGrey50 = '#eceff1';
-var blueGrey100 = exports.blueGrey100 = '#cfd8dc';
-var blueGrey200 = exports.blueGrey200 = '#b0bec5';
-var blueGrey300 = exports.blueGrey300 = '#90a4ae';
-var blueGrey400 = exports.blueGrey400 = '#78909c';
-var blueGrey500 = exports.blueGrey500 = '#607d8b';
-var blueGrey600 = exports.blueGrey600 = '#546e7a';
-var blueGrey700 = exports.blueGrey700 = '#455a64';
-var blueGrey800 = exports.blueGrey800 = '#37474f';
-var blueGrey900 = exports.blueGrey900 = '#263238';
-
-var grey50 = exports.grey50 = '#fafafa';
-var grey100 = exports.grey100 = '#f5f5f5';
-var grey200 = exports.grey200 = '#eeeeee';
-var grey300 = exports.grey300 = '#e0e0e0';
-var grey400 = exports.grey400 = '#bdbdbd';
-var grey500 = exports.grey500 = '#9e9e9e';
-var grey600 = exports.grey600 = '#757575';
-var grey700 = exports.grey700 = '#616161';
-var grey800 = exports.grey800 = '#424242';
-var grey900 = exports.grey900 = '#212121';
-
-var black = exports.black = '#000000';
-var white = exports.white = '#ffffff';
-
-var transparent = exports.transparent = 'rgba(0, 0, 0, 0)';
-var fullBlack = exports.fullBlack = 'rgba(0, 0, 0, 1)';
-var darkBlack = exports.darkBlack = 'rgba(0, 0, 0, 0.87)';
-var lightBlack = exports.lightBlack = 'rgba(0, 0, 0, 0.54)';
-var minBlack = exports.minBlack = 'rgba(0, 0, 0, 0.26)';
-var faintBlack = exports.faintBlack = 'rgba(0, 0, 0, 0.12)';
-var fullWhite = exports.fullWhite = 'rgba(255, 255, 255, 1)';
-var darkWhite = exports.darkWhite = 'rgba(255, 255, 255, 0.87)';
-var lightWhite = exports.lightWhite = 'rgba(255, 255, 255, 0.54)';
-
-/***/ }),
-/* 58 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-
-var _shallowEqual = __webpack_require__(87);
-
-var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-exports.default = _shallowEqual2.default;
-
-/***/ }),
-/* 59 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _extends2 = __webpack_require__(7);
-
-var _extends3 = _interopRequireDefault(_extends2);
-
-var _objectWithoutProperties2 = __webpack_require__(8);
-
-var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-
-var _getPrototypeOf = __webpack_require__(3);
-
-var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-
-var _classCallCheck2 = __webpack_require__(1);
-
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
-var _createClass2 = __webpack_require__(2);
-
-var _createClass3 = _interopRequireDefault(_createClass2);
-
-var _possibleConstructorReturn2 = __webpack_require__(4);
-
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-
-var _inherits2 = __webpack_require__(5);
-
-var _inherits3 = _interopRequireDefault(_inherits2);
-
-var _simpleAssign = __webpack_require__(6);
-
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-
-var _react = __webpack_require__(0);
+var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _childUtils = __webpack_require__(127);
+var _childUtils = __webpack_require__(131);
-var _events = __webpack_require__(196);
+var _events = __webpack_require__(203);
var _events2 = _interopRequireDefault(_events);
-var _keycode = __webpack_require__(30);
+var _keycode = __webpack_require__(26);
var _keycode2 = _interopRequireDefault(_keycode);
-var _FocusRipple = __webpack_require__(197);
+var _FocusRipple = __webpack_require__(204);
var _FocusRipple2 = _interopRequireDefault(_FocusRipple);
-var _TouchRipple = __webpack_require__(314);
+var _TouchRipple = __webpack_require__(318);
var _TouchRipple2 = _interopRequireDefault(_TouchRipple);
@@ -3914,7 +3621,7 @@ EnhancedButton.contextTypes = {
exports.default = EnhancedButton;
/***/ }),
-/* 60 */
+/* 52 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -3923,92 +3630,118 @@ exports.default = EnhancedButton;
Object.defineProperty(exports, "__esModule", {
value: true
});
+exports.getTheme = getTheme;
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-
-function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
-var mapError = function mapError(_ref) {
- var errorProp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'errorText';
- var _ref$meta = _ref.meta;
- _ref$meta = _ref$meta === undefined ? {} : _ref$meta;
+var _getMuiTheme = __webpack_require__(129);
- var touched = _ref$meta.touched,
- error = _ref$meta.error,
- warning = _ref$meta.warning,
- input = _ref.input,
- props = _objectWithoutProperties(_ref, ['meta', 'input']);
+var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme);
- return touched && (error || warning) ? _extends({}, props, input, _defineProperty({}, errorProp, error || warning)) : _extends({}, input, props);
-};
+var _colors = __webpack_require__(31);
-exports.default = mapError;
+var _styles = __webpack_require__(746);
-/***/ }),
-/* 61 */
-/***/ (function(module, exports, __webpack_require__) {
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-// optional / simple context binding
-var aFunction = __webpack_require__(99);
-module.exports = function (fn, that, length) {
- aFunction(fn);
- if (that === undefined) return fn;
- switch (length) {
- case 1: return function (a) {
- return fn.call(that, a);
- };
- case 2: return function (a, b) {
- return fn.call(that, a, b);
- };
- case 3: return function (a, b, c) {
- return fn.call(that, a, b, c);
- };
+var styles = {
+ paper: {
+ margin: _styles.spacing.desktopGutter,
+ padding: _styles.spacing.desktopGutter
+ },
+ container: {
+ display: 'flex',
+ flexFlow: 'column',
+ alignItems: 'center',
+ minHeight: '100%',
+ backgroundColor: _colors.grey50
+ },
+ content: {
+ maxWidth: 1200,
+ margin: '0 auto',
+ zIndex: 101
+ },
+ tabs: {
+ marginLeft: -24,
+ marginRight: -24
+ },
+ appBar: {
+ flex: 'none',
+ display: 'block',
+ flexWrap: 'wrap',
+ zIndex: 100,
+ height: 64
+ },
+ logo: {
+ fontSize: 16,
+ color: _styles.typography.textFullWhite,
+ lineHeight: _styles.spacing.desktopKeylineIncrement + 'px',
+ fontWeight: _styles.typography.fontWeightLight,
+ backgroundColor: 'rgb(72, 72, 72)',
+ marginBottom: 8,
+ height: 64,
+ textAlign: 'center'
+ },
+ fields: {
+ text: {
+ width: '100%'
+ }
+ },
+ colors: {
+ main: 'rgb(72, 72, 72)',
+ drawer: 'rgb(250, 250, 250)',
+ tabs: 'rgb(137, 189, 191)'
+ },
+ theme: {
+ palette: {
+ primary1Color: 'rgb(72, 72, 72)',
+ primary2Color: 'rgb(72, 72, 72)'
+ },
+ drawer: {
+ color: 'rgb(250, 250, 250)'
+ }
}
- return function (/* ...args */) {
- return fn.apply(that, arguments);
- };
};
+function getTheme() {
+ return (0, _getMuiTheme2.default)(styles.theme);
+}
+
+exports.default = styles;
/***/ }),
-/* 62 */
-/***/ (function(module, exports) {
+/* 53 */
+/***/ (function(module, exports, __webpack_require__) {
-module.exports = function (it) {
- return typeof it === 'object' ? it !== null : typeof it === 'function';
+var dP = __webpack_require__(34)
+ , createDesc = __webpack_require__(86);
+module.exports = __webpack_require__(43) ? function(object, key, value){
+ return dP.f(object, key, createDesc(1, value));
+} : function(object, key, value){
+ object[key] = value;
+ return object;
};
-
/***/ }),
-/* 63 */
+/* 54 */
/***/ (function(module, exports) {
-module.exports = function (exec) {
- try {
- return !!exec();
- } catch (e) {
- return true;
- }
+var hasOwnProperty = {}.hasOwnProperty;
+module.exports = function(it, key){
+ return hasOwnProperty.call(it, key);
};
-
/***/ }),
-/* 64 */
+/* 55 */
/***/ (function(module, exports, __webpack_require__) {
-// 19.1.2.14 / 15.2.3.14 Object.keys(O)
-var $keys = __webpack_require__(207);
-var enumBugKeys = __webpack_require__(138);
-
-module.exports = Object.keys || function keys(O) {
- return $keys(O, enumBugKeys);
+// to indexed object, toObject with fallback for non-array-like ES3 strings
+var IObject = __webpack_require__(215)
+ , defined = __webpack_require__(139);
+module.exports = function(it){
+ return IObject(defined(it));
};
-
/***/ }),
-/* 65 */
+/* 56 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -4024,17 +3757,17 @@ module.exports = Object.keys || function keys(O) {
-var _assign = __webpack_require__(15);
+var _assign = __webpack_require__(13);
-var ReactBaseClasses = __webpack_require__(209);
-var ReactChildren = __webpack_require__(342);
-var ReactDOMFactories = __webpack_require__(347);
-var ReactElement = __webpack_require__(66);
-var ReactPropTypes = __webpack_require__(348);
-var ReactVersion = __webpack_require__(351);
+var ReactBaseClasses = __webpack_require__(216);
+var ReactChildren = __webpack_require__(219);
+var ReactDOMFactories = __webpack_require__(355);
+var ReactElement = __webpack_require__(57);
+var ReactPropTypes = __webpack_require__(356);
+var ReactVersion = __webpack_require__(359);
-var createReactClass = __webpack_require__(352);
-var onlyChild = __webpack_require__(353);
+var createReactClass = __webpack_require__(360);
+var onlyChild = __webpack_require__(362);
var createElement = ReactElement.createElement;
var createFactory = ReactElement.createFactory;
@@ -4145,7 +3878,7 @@ if (false) {
module.exports = React;
/***/ }),
-/* 66 */
+/* 57 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -4161,15 +3894,15 @@ module.exports = React;
-var _assign = __webpack_require__(15);
+var _assign = __webpack_require__(13);
-var ReactCurrentOwner = __webpack_require__(37);
+var ReactCurrentOwner = __webpack_require__(36);
-var warning = __webpack_require__(12);
-var canDefineProperty = __webpack_require__(211);
+var warning = __webpack_require__(11);
+var canDefineProperty = __webpack_require__(218);
var hasOwnProperty = Object.prototype.hasOwnProperty;
-var REACT_ELEMENT_TYPE = __webpack_require__(212);
+var REACT_ELEMENT_TYPE = __webpack_require__(220);
var RESERVED_PROPS = {
key: true,
@@ -4491,7 +4224,7 @@ ReactElement.isValidElement = function (object) {
module.exports = ReactElement;
/***/ }),
-/* 67 */
+/* 58 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -4503,241 +4236,645 @@ module.exports = ReactElement;
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
+ *
*/
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
var invariant = __webpack_require__(9);
-function checkMask(value, bitmask) {
- return (value & bitmask) === bitmask;
-}
-
-var DOMPropertyInjection = {
- /**
- * Mapping from normalized, camelcased property names to a configuration that
- * specifies how the associated DOM property should be accessed or rendered.
- */
- MUST_USE_PROPERTY: 0x1,
- HAS_BOOLEAN_VALUE: 0x4,
- HAS_NUMERIC_VALUE: 0x8,
- HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
- HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
-
- /**
- * Inject some specialized knowledge about the DOM. This takes a config object
- * with the following properties:
- *
- * isCustomAttribute: function that given an attribute name will return true
- * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
- * attributes where it's impossible to enumerate all of the possible
- * attribute names,
- *
- * Properties: object mapping DOM property name to one of the
- * DOMPropertyInjection constants or null. If your attribute isn't in here,
- * it won't get written to the DOM.
- *
- * DOMAttributeNames: object mapping React attribute name to the DOM
- * attribute name. Attribute names not specified use the **lowercase**
- * normalized name.
- *
- * DOMAttributeNamespaces: object mapping React attribute name to the DOM
- * attribute namespace URL. (Attribute names not specified use no namespace.)
- *
- * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
- * Property names not specified use the normalized name.
- *
- * DOMMutationMethods: Properties that require special mutation methods. If
- * `value` is undefined, the mutation method should unset the property.
- *
- * @param {object} domPropertyConfig the config as described above.
- */
- injectDOMPropertyConfig: function (domPropertyConfig) {
- var Injection = DOMPropertyInjection;
- var Properties = domPropertyConfig.Properties || {};
- var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
- var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
- var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
- var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
-
- if (domPropertyConfig.isCustomAttribute) {
- DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
- }
-
- for (var propName in Properties) {
- !!DOMProperty.properties.hasOwnProperty(propName) ? false ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;
-
- var lowerCased = propName.toLowerCase();
- var propConfig = Properties[propName];
-
- var propertyInfo = {
- attributeName: lowerCased,
- attributeNamespace: null,
- propertyName: propName,
- mutationMethod: null,
-
- mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
- hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
- hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
- hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
- hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
- };
- !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? false ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;
-
- if (false) {
- DOMProperty.getPossibleStandardName[lowerCased] = propName;
- }
-
- if (DOMAttributeNames.hasOwnProperty(propName)) {
- var attributeName = DOMAttributeNames[propName];
- propertyInfo.attributeName = attributeName;
- if (false) {
- DOMProperty.getPossibleStandardName[attributeName] = propName;
- }
- }
+/**
+ * Static poolers. Several custom versions for each potential number of
+ * arguments. A completely generic pooler is easy to implement, but would
+ * require accessing the `arguments` object. In each of these, `this` refers to
+ * the Class itself, not an instance. If any others are needed, simply add them
+ * here, or in their own files.
+ */
+var oneArgumentPooler = function (copyFieldsFrom) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, copyFieldsFrom);
+ return instance;
+ } else {
+ return new Klass(copyFieldsFrom);
+ }
+};
- if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
- propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
- }
+var twoArgumentPooler = function (a1, a2) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, a1, a2);
+ return instance;
+ } else {
+ return new Klass(a1, a2);
+ }
+};
- if (DOMPropertyNames.hasOwnProperty(propName)) {
- propertyInfo.propertyName = DOMPropertyNames[propName];
- }
+var threeArgumentPooler = function (a1, a2, a3) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, a1, a2, a3);
+ return instance;
+ } else {
+ return new Klass(a1, a2, a3);
+ }
+};
- if (DOMMutationMethods.hasOwnProperty(propName)) {
- propertyInfo.mutationMethod = DOMMutationMethods[propName];
- }
+var fourArgumentPooler = function (a1, a2, a3, a4) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, a1, a2, a3, a4);
+ return instance;
+ } else {
+ return new Klass(a1, a2, a3, a4);
+ }
+};
- DOMProperty.properties[propName] = propertyInfo;
- }
+var standardReleaser = function (instance) {
+ var Klass = this;
+ !(instance instanceof Klass) ? false ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
+ instance.destructor();
+ if (Klass.instancePool.length < Klass.poolSize) {
+ Klass.instancePool.push(instance);
}
};
-/* eslint-disable max-len */
-var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
-/* eslint-enable max-len */
+var DEFAULT_POOL_SIZE = 10;
+var DEFAULT_POOLER = oneArgumentPooler;
/**
- * DOMProperty exports lookup objects that can be used like functions:
- *
- * > DOMProperty.isValid['id']
- * true
- * > DOMProperty.isValid['foobar']
- * undefined
- *
- * Although this may be confusing, it performs better in general.
+ * Augments `CopyConstructor` to be a poolable class, augmenting only the class
+ * itself (statically) not adding any prototypical fields. Any CopyConstructor
+ * you give this may have a `poolSize` property, and will look for a
+ * prototypical `destructor` on instances.
*
- * @see http://jsperf.com/key-exists
- * @see http://jsperf.com/key-missing
+ * @param {Function} CopyConstructor Constructor that can be used to reset.
+ * @param {Function} pooler Customizable pooler.
*/
-var DOMProperty = {
- ID_ATTRIBUTE_NAME: 'data-reactid',
- ROOT_ATTRIBUTE_NAME: 'data-reactroot',
-
- ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
- ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
-
- /**
- * Map from property "standard name" to an object with info about how to set
- * the property in the DOM. Each object contains:
- *
- * attributeName:
- * Used when rendering markup or with `*Attribute()`.
- * attributeNamespace
- * propertyName:
- * Used on DOM node instances. (This includes properties that mutate due to
- * external factors.)
- * mutationMethod:
- * If non-null, used instead of the property or `setAttribute()` after
- * initial render.
- * mustUseProperty:
- * Whether the property must be accessed and mutated as an object property.
- * hasBooleanValue:
- * Whether the property should be removed when set to a falsey value.
- * hasNumericValue:
- * Whether the property must be numeric or parse as a numeric and should be
- * removed when set to a falsey value.
- * hasPositiveNumericValue:
- * Whether the property must be positive numeric or parse as a positive
- * numeric and should be removed when set to a falsey value.
- * hasOverloadedBooleanValue:
- * Whether the property can be used as a flag as well as with a value.
- * Removed when strictly equal to false; present without a value when
- * strictly equal to true; present with a value otherwise.
- */
- properties: {},
-
- /**
- * Mapping from lowercase property names to the properly cased version, used
- * to warn in the case of missing properties. Available only in __DEV__.
- *
- * autofocus is predefined, because adding it to the property whitelist
- * causes unintended side effects.
- *
- * @type {Object}
- */
- getPossibleStandardName: false ? { autofocus: 'autoFocus' } : null,
-
- /**
- * All of the isCustomAttribute() functions that have been injected.
- */
- _isCustomAttributeFunctions: [],
-
- /**
- * Checks whether a property name is a custom attribute.
- * @method
- */
- isCustomAttribute: function (attributeName) {
- for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
- var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
- if (isCustomAttributeFn(attributeName)) {
- return true;
- }
- }
- return false;
- },
+var addPoolingTo = function (CopyConstructor, pooler) {
+ // Casting as any so that flow ignores the actual implementation and trusts
+ // it to match the type we declared
+ var NewKlass = CopyConstructor;
+ NewKlass.instancePool = [];
+ NewKlass.getPooled = pooler || DEFAULT_POOLER;
+ if (!NewKlass.poolSize) {
+ NewKlass.poolSize = DEFAULT_POOL_SIZE;
+ }
+ NewKlass.release = standardReleaser;
+ return NewKlass;
+};
- injection: DOMPropertyInjection
+var PooledClass = {
+ addPoolingTo: addPoolingTo,
+ oneArgumentPooler: oneArgumentPooler,
+ twoArgumentPooler: twoArgumentPooler,
+ threeArgumentPooler: threeArgumentPooler,
+ fourArgumentPooler: fourArgumentPooler
};
-module.exports = DOMProperty;
+module.exports = PooledClass;
/***/ }),
-/* 68 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 59 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
*
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
*
+ * _.isObjectLike(null);
+ * // => false
*/
+function isObjectLike(value) {
+ return value != null && typeof value == 'object';
+}
+/* harmony default export */ __webpack_exports__["a"] = (isObjectLike);
-var EventPluginHub = __webpack_require__(69);
-var EventPluginUtils = __webpack_require__(103);
+/***/ }),
+/* 60 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-var accumulateInto = __webpack_require__(217);
-var forEachAccumulated = __webpack_require__(218);
-var warning = __webpack_require__(12);
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__ = __webpack_require__(506);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getValue_js__ = __webpack_require__(509);
-var getListener = EventPluginHub.getListener;
-/**
- * Some event types have a notion of different registration names for different
- * "phases" of propagation. This finds listeners by a given phase.
- */
-function listenerAtPhase(inst, event, propagationPhase) {
- var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
- return getListener(inst, registrationName);
-}
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = __WEBPACK_IMPORTED_MODULE_1__getValue_js__["a" /* default */](object, key);
+ return __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__["a" /* default */](value) ? value : undefined;
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (getNative);
+
+
+/***/ }),
+/* 61 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _iterator = __webpack_require__(641);
+
+var _iterator2 = _interopRequireDefault(_iterator);
+
+var _symbol = __webpack_require__(649);
+
+var _symbol2 = _interopRequireDefault(_symbol);
+
+var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
+ return typeof obj === "undefined" ? "undefined" : _typeof(obj);
+} : function (obj) {
+ return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
+};
+
+/***/ }),
+/* 62 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(708), __esModule: true };
+
+/***/ }),
+/* 63 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _shallowEqual = __webpack_require__(90);
+
+var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _shallowEqual2.default;
+
+/***/ }),
+/* 64 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = undefined;
+
+var _IconButton = __webpack_require__(722);
+
+var _IconButton2 = _interopRequireDefault(_IconButton);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _IconButton2.default;
+
+/***/ }),
+/* 65 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = undefined;
+
+var _RaisedButton = __webpack_require__(756);
+
+var _RaisedButton2 = _interopRequireDefault(_RaisedButton);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _RaisedButton2.default;
+
+/***/ }),
+/* 66 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+var mapError = function mapError(_ref) {
+ var errorProp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'errorText';
+ var _ref$meta = _ref.meta;
+ _ref$meta = _ref$meta === undefined ? {} : _ref$meta;
+
+ var touched = _ref$meta.touched,
+ error = _ref$meta.error,
+ warning = _ref$meta.warning,
+ input = _ref.input,
+ props = _objectWithoutProperties(_ref, ['meta', 'input']);
+
+ return touched && (error || warning) ? _extends({}, props, input, _defineProperty({}, errorProp, error || warning)) : _extends({}, input, props);
+};
+
+exports.default = mapError;
+
+/***/ }),
+/* 67 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// optional / simple context binding
+var aFunction = __webpack_require__(136);
+module.exports = function(fn, that, length){
+ aFunction(fn);
+ if(that === undefined)return fn;
+ switch(length){
+ case 1: return function(a){
+ return fn.call(that, a);
+ };
+ case 2: return function(a, b){
+ return fn.call(that, a, b);
+ };
+ case 3: return function(a, b, c){
+ return fn.call(that, a, b, c);
+ };
+ }
+ return function(/* ...args */){
+ return fn.apply(that, arguments);
+ };
+};
+
+/***/ }),
+/* 68 */
+/***/ (function(module, exports) {
+
+module.exports = function(it){
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
+};
+
+/***/ }),
+/* 69 */
+/***/ (function(module, exports) {
+
+module.exports = function(exec){
+ try {
+ return !!exec();
+ } catch(e){
+ return true;
+ }
+};
+
+/***/ }),
+/* 70 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// 19.1.2.14 / 15.2.3.14 Object.keys(O)
+var $keys = __webpack_require__(214)
+ , enumBugKeys = __webpack_require__(144);
+
+module.exports = Object.keys || function keys(O){
+ return $keys(O, enumBugKeys);
+};
+
+/***/ }),
+/* 71 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
+
+
+/**
+ * WARNING: DO NOT manually require this module.
+ * This is a replacement for `invariant(...)` used by the error code system
+ * and will _only_ be required by the corresponding babel pass.
+ * It always throws.
+ */
+
+function reactProdInvariant(code) {
+ var argCount = arguments.length - 1;
+
+ var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
+
+ for (var argIdx = 0; argIdx < argCount; argIdx++) {
+ message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
+ }
+
+ message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
+
+ var error = new Error(message);
+ error.name = 'Invariant Violation';
+ error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
+
+ throw error;
+}
+
+module.exports = reactProdInvariant;
+
+/***/ }),
+/* 72 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(12);
+
+var invariant = __webpack_require__(9);
+
+function checkMask(value, bitmask) {
+ return (value & bitmask) === bitmask;
+}
+
+var DOMPropertyInjection = {
+ /**
+ * Mapping from normalized, camelcased property names to a configuration that
+ * specifies how the associated DOM property should be accessed or rendered.
+ */
+ MUST_USE_PROPERTY: 0x1,
+ HAS_BOOLEAN_VALUE: 0x4,
+ HAS_NUMERIC_VALUE: 0x8,
+ HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
+ HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
+
+ /**
+ * Inject some specialized knowledge about the DOM. This takes a config object
+ * with the following properties:
+ *
+ * isCustomAttribute: function that given an attribute name will return true
+ * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
+ * attributes where it's impossible to enumerate all of the possible
+ * attribute names,
+ *
+ * Properties: object mapping DOM property name to one of the
+ * DOMPropertyInjection constants or null. If your attribute isn't in here,
+ * it won't get written to the DOM.
+ *
+ * DOMAttributeNames: object mapping React attribute name to the DOM
+ * attribute name. Attribute names not specified use the **lowercase**
+ * normalized name.
+ *
+ * DOMAttributeNamespaces: object mapping React attribute name to the DOM
+ * attribute namespace URL. (Attribute names not specified use no namespace.)
+ *
+ * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
+ * Property names not specified use the normalized name.
+ *
+ * DOMMutationMethods: Properties that require special mutation methods. If
+ * `value` is undefined, the mutation method should unset the property.
+ *
+ * @param {object} domPropertyConfig the config as described above.
+ */
+ injectDOMPropertyConfig: function (domPropertyConfig) {
+ var Injection = DOMPropertyInjection;
+ var Properties = domPropertyConfig.Properties || {};
+ var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
+ var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
+ var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
+ var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
+
+ if (domPropertyConfig.isCustomAttribute) {
+ DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
+ }
+
+ for (var propName in Properties) {
+ !!DOMProperty.properties.hasOwnProperty(propName) ? false ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;
+
+ var lowerCased = propName.toLowerCase();
+ var propConfig = Properties[propName];
+
+ var propertyInfo = {
+ attributeName: lowerCased,
+ attributeNamespace: null,
+ propertyName: propName,
+ mutationMethod: null,
+
+ mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
+ hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
+ hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
+ hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
+ hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
+ };
+ !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? false ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;
+
+ if (false) {
+ DOMProperty.getPossibleStandardName[lowerCased] = propName;
+ }
+
+ if (DOMAttributeNames.hasOwnProperty(propName)) {
+ var attributeName = DOMAttributeNames[propName];
+ propertyInfo.attributeName = attributeName;
+ if (false) {
+ DOMProperty.getPossibleStandardName[attributeName] = propName;
+ }
+ }
+
+ if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
+ propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
+ }
+
+ if (DOMPropertyNames.hasOwnProperty(propName)) {
+ propertyInfo.propertyName = DOMPropertyNames[propName];
+ }
+
+ if (DOMMutationMethods.hasOwnProperty(propName)) {
+ propertyInfo.mutationMethod = DOMMutationMethods[propName];
+ }
+
+ DOMProperty.properties[propName] = propertyInfo;
+ }
+ }
+};
+
+/* eslint-disable max-len */
+var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
+/* eslint-enable max-len */
+
+/**
+ * DOMProperty exports lookup objects that can be used like functions:
+ *
+ * > DOMProperty.isValid['id']
+ * true
+ * > DOMProperty.isValid['foobar']
+ * undefined
+ *
+ * Although this may be confusing, it performs better in general.
+ *
+ * @see http://jsperf.com/key-exists
+ * @see http://jsperf.com/key-missing
+ */
+var DOMProperty = {
+
+ ID_ATTRIBUTE_NAME: 'data-reactid',
+ ROOT_ATTRIBUTE_NAME: 'data-reactroot',
+
+ ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
+ ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
+
+ /**
+ * Map from property "standard name" to an object with info about how to set
+ * the property in the DOM. Each object contains:
+ *
+ * attributeName:
+ * Used when rendering markup or with `*Attribute()`.
+ * attributeNamespace
+ * propertyName:
+ * Used on DOM node instances. (This includes properties that mutate due to
+ * external factors.)
+ * mutationMethod:
+ * If non-null, used instead of the property or `setAttribute()` after
+ * initial render.
+ * mustUseProperty:
+ * Whether the property must be accessed and mutated as an object property.
+ * hasBooleanValue:
+ * Whether the property should be removed when set to a falsey value.
+ * hasNumericValue:
+ * Whether the property must be numeric or parse as a numeric and should be
+ * removed when set to a falsey value.
+ * hasPositiveNumericValue:
+ * Whether the property must be positive numeric or parse as a positive
+ * numeric and should be removed when set to a falsey value.
+ * hasOverloadedBooleanValue:
+ * Whether the property can be used as a flag as well as with a value.
+ * Removed when strictly equal to false; present without a value when
+ * strictly equal to true; present with a value otherwise.
+ */
+ properties: {},
+
+ /**
+ * Mapping from lowercase property names to the properly cased version, used
+ * to warn in the case of missing properties. Available only in __DEV__.
+ *
+ * autofocus is predefined, because adding it to the property whitelist
+ * causes unintended side effects.
+ *
+ * @type {Object}
+ */
+ getPossibleStandardName: false ? { autofocus: 'autoFocus' } : null,
+
+ /**
+ * All of the isCustomAttribute() functions that have been injected.
+ */
+ _isCustomAttributeFunctions: [],
+
+ /**
+ * Checks whether a property name is a custom attribute.
+ * @method
+ */
+ isCustomAttribute: function (attributeName) {
+ for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
+ var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
+ if (isCustomAttributeFn(attributeName)) {
+ return true;
+ }
+ }
+ return false;
+ },
+
+ injection: DOMPropertyInjection
+};
+
+module.exports = DOMProperty;
+
+/***/ }),
+/* 73 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var EventPluginHub = __webpack_require__(74);
+var EventPluginUtils = __webpack_require__(106);
+
+var accumulateInto = __webpack_require__(226);
+var forEachAccumulated = __webpack_require__(227);
+var warning = __webpack_require__(11);
+
+var getListener = EventPluginHub.getListener;
+
+/**
+ * Some event types have a notion of different registration names for different
+ * "phases" of propagation. This finds listeners by a given phase.
+ */
+function listenerAtPhase(inst, event, propagationPhase) {
+ var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
+ return getListener(inst, registrationName);
+}
/**
* Tags a `SyntheticEvent` with dispatched listeners. Creating this function
@@ -4844,7 +4981,7 @@ var EventPropagators = {
module.exports = EventPropagators;
/***/ }),
-/* 69 */
+/* 74 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -4860,14 +4997,14 @@ module.exports = EventPropagators;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
-var EventPluginRegistry = __webpack_require__(140);
-var EventPluginUtils = __webpack_require__(103);
-var ReactErrorUtils = __webpack_require__(141);
+var EventPluginRegistry = __webpack_require__(146);
+var EventPluginUtils = __webpack_require__(106);
+var ReactErrorUtils = __webpack_require__(147);
-var accumulateInto = __webpack_require__(217);
-var forEachAccumulated = __webpack_require__(218);
+var accumulateInto = __webpack_require__(226);
+var forEachAccumulated = __webpack_require__(227);
var invariant = __webpack_require__(9);
/**
@@ -4955,10 +5092,12 @@ function shouldPreventMouseEvent(name, type, props) {
* @public
*/
var EventPluginHub = {
+
/**
* Methods for injecting dependencies.
*/
injection: {
+
/**
* @param {array} InjectedEventPluginOrder
* @public
@@ -4969,6 +5108,7 @@ var EventPluginHub = {
* @param {object} injectedNamesToPlugins Map from names to plugin modules.
*/
injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
+
},
/**
@@ -5118,12 +5258,13 @@ var EventPluginHub = {
__getListenerBank: function () {
return listenerBank;
}
+
};
module.exports = EventPluginHub;
/***/ }),
-/* 70 */
+/* 75 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -5139,10 +5280,10 @@ module.exports = EventPluginHub;
-var ReactRef = __webpack_require__(362);
-var ReactInstrumentation = __webpack_require__(29);
+var ReactRef = __webpack_require__(371);
+var ReactInstrumentation = __webpack_require__(27);
-var warning = __webpack_require__(12);
+var warning = __webpack_require__(11);
/**
* Helper to call ReactRef.attachRefs with this composite component, split out
@@ -5153,6 +5294,7 @@ function attachRefs() {
}
var ReactReconciler = {
+
/**
* Initializes the component, renders markup, and registers event listeners.
*
@@ -5164,8 +5306,8 @@ var ReactReconciler = {
* @final
* @internal
*/
- mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) // 0 in production and for roots
- {
+ mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots
+ ) {
if (false) {
if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
@@ -5289,12 +5431,13 @@ var ReactReconciler = {
}
}
}
+
};
module.exports = ReactReconciler;
/***/ }),
-/* 71 */
+/* 76 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -5310,9 +5453,9 @@ module.exports = ReactReconciler;
-var SyntheticEvent = __webpack_require__(38);
+var SyntheticEvent = __webpack_require__(37);
-var getEventTarget = __webpack_require__(142);
+var getEventTarget = __webpack_require__(148);
/**
* @interface UIEvent
@@ -5358,7 +5501,7 @@ SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
module.exports = SyntheticUIEvent;
/***/ }),
-/* 72 */
+/* 77 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -5374,11 +5517,11 @@ module.exports = SyntheticUIEvent;
-var DOMNamespaces = __webpack_require__(147);
-var setInnerHTML = __webpack_require__(106);
+var DOMNamespaces = __webpack_require__(153);
+var setInnerHTML = __webpack_require__(109);
-var createMicrosoftUnsafeLocalFunction = __webpack_require__(148);
-var setTextContent = __webpack_require__(224);
+var createMicrosoftUnsafeLocalFunction = __webpack_require__(154);
+var setTextContent = __webpack_require__(232);
var ELEMENT_NODE_TYPE = 1;
var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
@@ -5481,13 +5624,13 @@ DOMLazyTree.queueText = queueText;
module.exports = DOMLazyTree;
/***/ }),
-/* 73 */
+/* 78 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export default */
/* unused harmony export _resetWarned */
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(17);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
@@ -5517,7 +5660,7 @@ function _resetWarned() {
}
/***/ }),
-/* 74 */
+/* 79 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -5526,7 +5669,7 @@ function _resetWarned() {
/* harmony export (immutable) */ __webpack_exports__["b"] = getParamNames;
/* unused harmony export getParams */
/* harmony export (immutable) */ __webpack_exports__["a"] = formatPattern;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(20);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(17);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__);
@@ -5708,7 +5851,7 @@ function formatPattern(pattern, params) {
if (token === '*' || token === '**') {
paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat;
- !(paramValue != null || parenCount > 0) ? false ? invariant(false, 'Missing splat #%s for path "%s"', splatIndex, pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0;
+ !(paramValue != null || parenCount > 0) ? false ? invariant(false, 'Missing splat #%s for path "%s"', splatIndex, pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0;
if (paramValue != null) pathname += encodeURI(paramValue);
} else if (token === '(') {
@@ -5727,7 +5870,7 @@ function formatPattern(pattern, params) {
paramName = token.substring(1);
paramValue = params[paramName];
- !(paramValue != null || parenCount > 0) ? false ? invariant(false, 'Missing "%s" parameter for path "%s"', paramName, pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0;
+ !(paramValue != null || parenCount > 0) ? false ? invariant(false, 'Missing "%s" parameter for path "%s"', paramName, pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0;
if (paramValue == null) {
if (parenCount) {
@@ -5744,7 +5887,7 @@ function formatPattern(pattern, params) {
}
}
- !(nextParenIdx > 0) ? false ? invariant(false, 'Path "%s" is missing end paren at segment "%s"', pattern, tokensSubset.join('')) : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0;
+ !(nextParenIdx > 0) ? false ? invariant(false, 'Path "%s" is missing end paren at segment "%s"', pattern, tokensSubset.join('')) : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0;
// jump to ending paren
i = curTokenIdx + nextParenIdx - 1;
@@ -5755,13 +5898,13 @@ function formatPattern(pattern, params) {
}
}
- !(parenCount <= 0) ? false ? invariant(false, 'Path "%s" is missing end paren', pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0;
+ !(parenCount <= 0) ? false ? invariant(false, 'Path "%s" is missing end paren', pattern) : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0;
return pathname.replace(/\/+/g, '/');
}
/***/ }),
-/* 75 */
+/* 80 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -5770,21 +5913,21 @@ function formatPattern(pattern, params) {
exports.__esModule = true;
exports.locationsAreEqual = exports.statesAreEqual = exports.createLocation = exports.createQuery = undefined;
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-var _invariant = __webpack_require__(20);
+var _invariant = __webpack_require__(17);
var _invariant2 = _interopRequireDefault(_invariant);
-var _warning = __webpack_require__(17);
+var _warning = __webpack_require__(15);
var _warning2 = _interopRequireDefault(_warning);
-var _PathUtils = __webpack_require__(46);
+var _PathUtils = __webpack_require__(45);
-var _Actions = __webpack_require__(109);
+var _Actions = __webpack_require__(113);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -5793,9 +5936,9 @@ var createQuery = exports.createQuery = function createQuery(props) {
};
var createLocation = exports.createLocation = function createLocation() {
- var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/';
- var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Actions.POP;
- var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
+ var input = arguments.length <= 0 || arguments[0] === undefined ? '/' : arguments[0];
+ var action = arguments.length <= 1 || arguments[1] === undefined ? _Actions.POP : arguments[1];
+ var key = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];
var object = typeof input === 'string' ? (0, _PathUtils.parsePath)(input) : input;
@@ -5859,13 +6002,13 @@ var locationsAreEqual = exports.locationsAreEqual = function locationsAreEqual(a
};
/***/ }),
-/* 76 */
+/* 81 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(455);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(456);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(116);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(463);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(464);
@@ -5889,42 +6032,140 @@ function baseGetTag(value) {
return value === undefined ? undefinedTag : nullTag;
}
return (symToStringTag && symToStringTag in Object(value))
- ? Object(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__["a" /* default */])(value)
- : Object(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__["a" /* default */])(value);
+ ? __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__["a" /* default */](value)
+ : __WEBPACK_IMPORTED_MODULE_2__objectToString_js__["a" /* default */](value);
}
/* harmony default export */ __webpack_exports__["a"] = (baseGetTag);
/***/ }),
-/* 77 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 82 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actionTypes", function() { return actionTypes; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayInsert", function() { return arrayInsert; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayMove", function() { return arrayMove; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPop", function() { return arrayPop; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPush", function() { return arrayPush; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemove", function() { return arrayRemove; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemoveAll", function() { return arrayRemoveAll; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayShift", function() { return arrayShift; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySplice", function() { return arraySplice; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySwap", function() { return arraySwap; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayUnshift", function() { return arrayUnshift; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autofill", function() { return autofill; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Field", function() { return Field; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Fields", function() { return Fields; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FieldArray", function() { return FieldArray; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Form", function() { return Form; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormSection", function() { return FormSection; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formValueSelector", function() { return formValueSelector; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormValues", function() { return getFormValues; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormInitialValues", function() { return getFormInitialValues; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSyncErrors", function() { return getFormSyncErrors; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormAsyncErrors", function() { return getFormAsyncErrors; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSubmitErrors", function() { return getFormSubmitErrors; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDirty", function() { return isDirty; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInvalid", function() { return isInvalid; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPristine", function() { return isPristine; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValid", function() { return isValid; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSubmitting", function() { return isSubmitting; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitSucceeded", function() { return hasSubmitSucceeded; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitFailed", function() { return hasSubmitFailed; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "propTypes", function() { return propTypes; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return reducer; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduxForm", function() { return reduxForm; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerField", function() { return registerField; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitFailed", function() { return setSubmitFailed; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitSucceeded", function() { return setSubmitSucceeded; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startAsyncValidation", function() { return startAsyncValidation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startSubmit", function() { return startSubmit; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopAsyncValidation", function() { return stopAsyncValidation; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopSubmit", function() { return stopSubmit; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submit", function() { return submit; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubmissionError", function() { return SubmissionError; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return touch; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterField", function() { return unregisterField; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return values; });
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createAll__ = __webpack_require__(498);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(48);
+
+
+
+var _createAll = __WEBPACK_IMPORTED_MODULE_0__createAll__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]);
+
+var actionTypes = _createAll.actionTypes,
+ arrayInsert = _createAll.arrayInsert,
+ arrayMove = _createAll.arrayMove,
+ arrayPop = _createAll.arrayPop,
+ arrayPush = _createAll.arrayPush,
+ arrayRemove = _createAll.arrayRemove,
+ arrayRemoveAll = _createAll.arrayRemoveAll,
+ arrayShift = _createAll.arrayShift,
+ arraySplice = _createAll.arraySplice,
+ arraySwap = _createAll.arraySwap,
+ arrayUnshift = _createAll.arrayUnshift,
+ autofill = _createAll.autofill,
+ blur = _createAll.blur,
+ change = _createAll.change,
+ destroy = _createAll.destroy,
+ Field = _createAll.Field,
+ Fields = _createAll.Fields,
+ FieldArray = _createAll.FieldArray,
+ Form = _createAll.Form,
+ FormSection = _createAll.FormSection,
+ focus = _createAll.focus,
+ formValueSelector = _createAll.formValueSelector,
+ getFormValues = _createAll.getFormValues,
+ getFormInitialValues = _createAll.getFormInitialValues,
+ getFormSyncErrors = _createAll.getFormSyncErrors,
+ getFormAsyncErrors = _createAll.getFormAsyncErrors,
+ getFormSubmitErrors = _createAll.getFormSubmitErrors,
+ initialize = _createAll.initialize,
+ isDirty = _createAll.isDirty,
+ isInvalid = _createAll.isInvalid,
+ isPristine = _createAll.isPristine,
+ isValid = _createAll.isValid,
+ isSubmitting = _createAll.isSubmitting,
+ hasSubmitSucceeded = _createAll.hasSubmitSucceeded,
+ hasSubmitFailed = _createAll.hasSubmitFailed,
+ propTypes = _createAll.propTypes,
+ reducer = _createAll.reducer,
+ reduxForm = _createAll.reduxForm,
+ registerField = _createAll.registerField,
+ reset = _createAll.reset,
+ setSubmitFailed = _createAll.setSubmitFailed,
+ setSubmitSucceeded = _createAll.setSubmitSucceeded,
+ startAsyncValidation = _createAll.startAsyncValidation,
+ startSubmit = _createAll.startSubmit,
+ stopAsyncValidation = _createAll.stopAsyncValidation,
+ stopSubmit = _createAll.stopSubmit,
+ submit = _createAll.submit,
+ SubmissionError = _createAll.SubmissionError,
+ touch = _createAll.touch,
+ unregisterField = _createAll.unregisterField,
+ untouch = _createAll.untouch,
+ values = _createAll.values;
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-var CHANGE_MENU = exports.CHANGE_MENU = 'CHANGE_MENU';
-var UPDATE_SETTINGS = exports.UPDATE_SETTINGS = 'UPDATE_SETTINGS';
-var NOTIFICATION_ADD = exports.NOTIFICATION_ADD = 'NOTIFICATION_ADD';
-
/***/ }),
-/* 78 */
+/* 83 */
/***/ (function(module, exports) {
module.exports = {};
-
-/***/ }),
-/* 79 */
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = { "default": __webpack_require__(724), __esModule: true };
-
/***/ }),
-/* 80 */
+/* 84 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -5933,85 +6174,13 @@ module.exports = { "default": __webpack_require__(724), __esModule: true };
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.getTheme = getTheme;
-
-var _getMuiTheme = __webpack_require__(125);
-
-var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme);
-
-var _colors = __webpack_require__(57);
-
-var _styles = __webpack_require__(758);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var styles = {
- paper: {
- margin: _styles.spacing.desktopGutter,
- padding: _styles.spacing.desktopGutter
- },
- container: {
- display: 'flex',
- flexFlow: 'column',
- alignItems: 'center',
- minHeight: '100%',
- backgroundColor: _colors.grey50
- },
- content: {
- maxWidth: 1200,
- margin: '0 auto',
- zIndex: 101
- },
- tabs: {
- marginLeft: -24,
- marginRight: -24
- },
- appBar: {
- flex: 'none',
- display: 'block',
- flexWrap: 'wrap',
- zIndex: 100,
- height: 64
- },
- logo: {
- fontSize: 16,
- color: _styles.typography.textFullWhite,
- lineHeight: _styles.spacing.desktopKeylineIncrement + 'px',
- fontWeight: _styles.typography.fontWeightLight,
- backgroundColor: 'rgb(72, 72, 72)',
- marginBottom: 8,
- height: 64,
- textAlign: 'center'
- },
- fields: {
- text: {
- width: '100%'
- }
- },
- colors: {
- main: 'rgb(72, 72, 72)',
- drawer: 'rgb(250, 250, 250)',
- tabs: 'rgb(137, 189, 191)'
- },
- theme: {
- palette: {
- primary1Color: 'rgb(72, 72, 72)',
- primary2Color: 'rgb(72, 72, 72)'
- },
- drawer: {
- color: 'rgb(250, 250, 250)'
- }
- }
-};
-
-function getTheme() {
- return (0, _getMuiTheme2.default)(styles.theme);
-}
-
-exports.default = styles;
+var MENU_OPTIONS = exports.MENU_OPTIONS = 'Options';
+var MENU_BILLING = exports.MENU_BILLING = 'Billing';
+var MENU_SIZES = exports.MENU_SIZES = 'Sizes';
+var MENU_ATC = exports.MENU_ATC = 'AutoCop';
/***/ }),
-/* 81 */
+/* 85 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -6039,7 +6208,7 @@ exports.isBetweenDates = isBetweenDates;
exports.monthDiff = monthDiff;
exports.yearDiff = yearDiff;
-var _warning = __webpack_require__(17);
+var _warning = __webpack_require__(15);
var _warning2 = _interopRequireDefault(_warning);
@@ -6197,87 +6366,40 @@ function yearDiff(d1, d2) {
}
/***/ }),
-/* 82 */
+/* 86 */
/***/ (function(module, exports) {
-module.exports = function (bitmap, value) {
+module.exports = function(bitmap, value){
return {
- enumerable: !(bitmap & 1),
+ enumerable : !(bitmap & 1),
configurable: !(bitmap & 2),
- writable: !(bitmap & 4),
- value: value
+ writable : !(bitmap & 4),
+ value : value
};
};
-
/***/ }),
-/* 83 */
+/* 87 */
/***/ (function(module, exports) {
var toString = {}.toString;
-module.exports = function (it) {
+module.exports = function(it){
return toString.call(it).slice(8, -1);
};
-
/***/ }),
-/* 84 */
+/* 88 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
-var defined = __webpack_require__(133);
-module.exports = function (it) {
+var defined = __webpack_require__(139);
+module.exports = function(it){
return Object(defined(it));
};
-
/***/ }),
-/* 85 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- *
- */
-
-
-/**
- * WARNING: DO NOT manually require this module.
- * This is a replacement for `invariant(...)` used by the error code system
- * and will _only_ be required by the corresponding babel pass.
- * It always throws.
- */
-
-function reactProdInvariant(code) {
- var argCount = arguments.length - 1;
-
- var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
-
- for (var argIdx = 0; argIdx < argCount; argIdx++) {
- message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
- }
-
- message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
-
- var error = new Error(message);
- error.name = 'Invariant Violation';
- error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
-
- throw error;
-}
-
-module.exports = reactProdInvariant;
-
-/***/ }),
-/* 86 */
+/* 89 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -6303,6 +6425,7 @@ module.exports = reactProdInvariant;
// TODO: Replace this with ES6: var ReactInstanceMap = new Map();
var ReactInstanceMap = {
+
/**
* This API should be called `delete` but we'd have to make sure to always
* transform these to strings for IE support. When this transform is fully
@@ -6323,12 +6446,13 @@ var ReactInstanceMap = {
set: function (key, value) {
key._reactInternalInstance = value;
}
+
};
module.exports = ReactInstanceMap;
/***/ }),
-/* 87 */
+/* 90 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -6401,7 +6525,7 @@ function shallowEqual(objA, objB) {
module.exports = shallowEqual;
/***/ }),
-/* 88 */
+/* 91 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -6411,42 +6535,39 @@ module.exports = shallowEqual;
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return components; });
/* unused harmony export route */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return routes; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+
+
+var func = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func,
+ object = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object,
+ arrayOf = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].arrayOf,
+ oneOfType = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType,
+ element = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].element,
+ shape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape,
+ string = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string;
function falsy(props, propName, componentName) {
if (props[propName]) return new Error('<' + componentName + '> should not have a "' + propName + '" prop');
}
-var history = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["shape"])({
- listen: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired,
- push: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired,
- replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired,
- go: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired,
- goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired,
- goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired
+var history = shape({
+ listen: func.isRequired,
+ push: func.isRequired,
+ replace: func.isRequired,
+ go: func.isRequired,
+ goBack: func.isRequired,
+ goForward: func.isRequired
});
-var component = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["oneOfType"])([__WEBPACK_IMPORTED_MODULE_0_prop_types__["func"], __WEBPACK_IMPORTED_MODULE_0_prop_types__["string"]]);
-var components = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["oneOfType"])([component, __WEBPACK_IMPORTED_MODULE_0_prop_types__["object"]]);
-var route = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["oneOfType"])([__WEBPACK_IMPORTED_MODULE_0_prop_types__["object"], __WEBPACK_IMPORTED_MODULE_0_prop_types__["element"]]);
-var routes = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["oneOfType"])([route, Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["arrayOf"])(route)]);
+var component = oneOfType([func, string]);
+var components = oneOfType([component, object]);
+var route = oneOfType([object, element]);
+var routes = oneOfType([route, arrayOf(route)]);
/***/ }),
-/* 89 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony export (immutable) */ __webpack_exports__["a"] = formatName;
-function formatName(context, name) {
- var sectionPrefix = context._reduxForm.sectionPrefix;
-
- return !sectionPrefix ? name : sectionPrefix + "." + name;
-}
-
-/***/ }),
-/* 90 */
+/* 92 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -6490,11 +6611,11 @@ function eq(value, other) {
/***/ }),
-/* 91 */
+/* 93 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__ = __webpack_require__(115);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__ = __webpack_require__(118);
/** Used as references for various `Number` constants. */
@@ -6508,7 +6629,7 @@ var INFINITY = 1 / 0;
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
- if (typeof value == 'string' || Object(__WEBPACK_IMPORTED_MODULE_0__isSymbol_js__["a" /* default */])(value)) {
+ if (typeof value == 'string' || __WEBPACK_IMPORTED_MODULE_0__isSymbol_js__["a" /* default */](value)) {
return value;
}
var result = (value + '');
@@ -6519,58 +6640,57 @@ function toKey(value) {
/***/ }),
-/* 92 */
+/* 94 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+var $at = __webpack_require__(643)(true);
-exports.__esModule = true;
-
-var _iterator = __webpack_require__(664);
-
-var _iterator2 = _interopRequireDefault(_iterator);
-
-var _symbol = __webpack_require__(672);
+// 21.1.3.27 String.prototype[@@iterator]()
+__webpack_require__(297)(String, 'String', function(iterated){
+ this._t = String(iterated); // target
+ this._i = 0; // next index
+// 21.1.5.2.1 %StringIteratorPrototype%.next()
+}, function(){
+ var O = this._t
+ , index = this._i
+ , point;
+ if(index >= O.length)return {value: undefined, done: true};
+ point = $at(O, index);
+ this._i += point.length;
+ return {value: point, done: false};
+});
-var _symbol2 = _interopRequireDefault(_symbol);
+/***/ }),
+/* 95 */
+/***/ (function(module, exports, __webpack_require__) {
-var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
+"use strict";
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
- return typeof obj === "undefined" ? "undefined" : _typeof(obj);
-} : function (obj) {
- return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
-};
+exports.__esModule = true;
-/***/ }),
-/* 93 */
-/***/ (function(module, exports, __webpack_require__) {
+var _from = __webpack_require__(306);
-"use strict";
+var _from2 = _interopRequireDefault(_from);
-var $at = __webpack_require__(666)(true);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-// 21.1.3.27 String.prototype[@@iterator]()
-__webpack_require__(295)(String, 'String', function (iterated) {
- this._t = String(iterated); // target
- this._i = 0; // next index
-// 21.1.5.2.1 %StringIteratorPrototype%.next()
-}, function () {
- var O = this._t;
- var index = this._i;
- var point;
- if (index >= O.length) return { value: undefined, done: true };
- point = $at(O, index);
- this._i += point.length;
- return { value: point, done: false };
-});
+exports.default = function (arr) {
+ if (Array.isArray(arr)) {
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
+ arr2[i] = arr[i];
+ }
+ return arr2;
+ } else {
+ return (0, _from2.default)(arr);
+ }
+};
/***/ }),
-/* 94 */
+/* 96 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -6586,7 +6706,7 @@ exports.default = {
};
/***/ }),
-/* 95 */
+/* 97 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -6597,16 +6717,16 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = undefined;
-var _IconButton = __webpack_require__(737);
+var _MenuItem = __webpack_require__(326);
-var _IconButton2 = _interopRequireDefault(_IconButton);
+var _MenuItem2 = _interopRequireDefault(_MenuItem);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-exports.default = _IconButton2.default;
+exports.default = _MenuItem2.default;
/***/ }),
-/* 96 */
+/* 98 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -6615,12 +6735,58 @@ exports.default = _IconButton2.default;
Object.defineProperty(exports, "__esModule", {
value: true
});
-var MENU_OPTIONS = exports.MENU_OPTIONS = 'Options';
-var MENU_BILLING = exports.MENU_BILLING = 'Billing';
-var MENU_SIZES = exports.MENU_SIZES = 'Sizes';
+exports.Toggle = exports.TextField = exports.Slider = exports.SelectField = exports.RadioButtonGroup = exports.TimePicker = exports.DatePicker = exports.Checkbox = exports.AutoComplete = undefined;
+
+var _AutoComplete = __webpack_require__(757);
+
+var _AutoComplete2 = _interopRequireDefault(_AutoComplete);
+
+var _Checkbox = __webpack_require__(764);
+
+var _Checkbox2 = _interopRequireDefault(_Checkbox);
+
+var _DatePicker = __webpack_require__(768);
+
+var _DatePicker2 = _interopRequireDefault(_DatePicker);
+
+var _RadioButtonGroup = __webpack_require__(786);
+
+var _RadioButtonGroup2 = _interopRequireDefault(_RadioButtonGroup);
+
+var _SelectField = __webpack_require__(791);
+
+var _SelectField2 = _interopRequireDefault(_SelectField);
+
+var _Slider = __webpack_require__(799);
+
+var _Slider2 = _interopRequireDefault(_Slider);
+
+var _TextField = __webpack_require__(804);
+
+var _TextField2 = _interopRequireDefault(_TextField);
+
+var _TimePicker = __webpack_require__(805);
+
+var _TimePicker2 = _interopRequireDefault(_TimePicker);
+
+var _Toggle = __webpack_require__(818);
+
+var _Toggle2 = _interopRequireDefault(_Toggle);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.AutoComplete = _AutoComplete2.default;
+exports.Checkbox = _Checkbox2.default;
+exports.DatePicker = _DatePicker2.default;
+exports.TimePicker = _TimePicker2.default;
+exports.RadioButtonGroup = _RadioButtonGroup2.default;
+exports.SelectField = _SelectField2.default;
+exports.Slider = _Slider2.default;
+exports.TextField = _TextField2.default;
+exports.Toggle = _Toggle2.default;
/***/ }),
-/* 97 */
+/* 99 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -6631,7 +6797,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = undefined;
-var _TextField = __webpack_require__(780);
+var _TextField = __webpack_require__(759);
var _TextField2 = _interopRequireDefault(_TextField);
@@ -6640,7 +6806,27 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
exports.default = _TextField2.default;
/***/ }),
-/* 98 */
+/* 100 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = undefined;
+
+var _FlatButton = __webpack_require__(774);
+
+var _FlatButton2 = _interopRequireDefault(_FlatButton);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _FlatButton2.default;
+
+/***/ }),
+/* 101 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -6741,35 +6927,114 @@ function isInner(props) {
}
/***/ }),
-/* 99 */
-/***/ (function(module, exports) {
+/* 102 */
+/***/ (function(module, exports, __webpack_require__) {
-module.exports = function (it) {
- if (typeof it != 'function') throw TypeError(it + ' is not a function!');
- return it;
-};
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.email = email;
+exports.required = required;
+exports.notEmpty = notEmpty;
+exports.simpleText = simpleText;
+exports.number = number;
+exports.minValue = minValue;
+exports.maxValue = maxValue;
+exports.fullName = fullName;
+exports.unique = unique;
+exports.date = date;
+exports.time24 = time24;
+
+var _Helpers = __webpack_require__(338);
+
+var Helpers = _interopRequireWildcard(_Helpers);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function email(input) {
+ var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
+ return re.test(input) ? undefined : 'Please enter a valid email';
+}
+
+function required(value) {
+ var empty = typeof value !== 'number' && !value;
+ return empty ? 'Required field' : undefined;
+}
+
+function notEmpty(arr) {
+ if (!Array.isArray(arr) || !arr.length) {
+ return 'This field must not be empty';
+ }
+}
+
+function simpleText(value) {
+ return value && !value.match(/^[0-9a-zA-Z_]{1,64}$/) ? 'Only use characters (a-z, A-Z, 0-9, _)' : undefined;
+}
+
+function number(value) {
+ return value && (isNaN(Number(value)) || +value < 0) ? 'This field must be a positive number' : undefined;
+}
+
+function minValue(min) {
+ return function (value) {
+ return value && value < min ? 'The value must be greater than ' + min : undefined;
+ };
+}
+
+function maxValue(max) {
+ return function (value) {
+ return value && value > max ? 'The value must be less than ' + max : undefined;
+ };
+}
+
+function fullName(value) {
+ return !value || value.split(' ').filter(function (x) {
+ return x !== "";
+ }).length < 2 ? 'Please enter a valid full name (firstname + lastname)' : undefined;
+}
+
+function unique(candidates) {
+ return function (value) {
+ if (candidates.indexOf(value) !== -1) {
+ return 'This value already exists and must be unique';
+ }
+ return undefined;
+ };
+}
+function date(val) {
+ var d = new Date(val);
+ return isNaN(d.getTime()) ? 'Required date' : undefined;
+}
+
+function time24(val) {
+ var msg = 'Invalid time';
+ if (!Helpers.setTimeForToday(val)) {
+ return msg;
+ }
+}
/***/ }),
-/* 100 */
+/* 103 */
/***/ (function(module, exports) {
-var id = 0;
-var px = Math.random();
-module.exports = function (key) {
+var id = 0
+ , px = Math.random();
+module.exports = function(key){
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
};
-
/***/ }),
-/* 101 */
+/* 104 */
/***/ (function(module, exports) {
exports.f = {}.propertyIsEnumerable;
-
/***/ }),
-/* 102 */
+/* 105 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -6794,7 +7059,7 @@ if (false) {
module.exports = emptyObject;
/***/ }),
-/* 103 */
+/* 106 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -6810,12 +7075,12 @@ module.exports = emptyObject;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
-var ReactErrorUtils = __webpack_require__(141);
+var ReactErrorUtils = __webpack_require__(147);
var invariant = __webpack_require__(9);
-var warning = __webpack_require__(12);
+var warning = __webpack_require__(11);
/**
* Injected dependencies:
@@ -7025,7 +7290,7 @@ var EventPluginUtils = {
module.exports = EventPluginUtils;
/***/ }),
-/* 104 */
+/* 107 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -7042,7 +7307,7 @@ module.exports = EventPluginUtils;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
var invariant = __webpack_require__(9);
@@ -7139,8 +7404,6 @@ var TransactionImpl = {
return !!this._isInTransaction;
},
- /* eslint-disable space-before-function-paren */
-
/**
* Executes the function within a safety window. Use this for the top level
* methods that result in large amounts of computation/mutations that would
@@ -7159,7 +7422,6 @@ var TransactionImpl = {
* @return {*} Return value from `method`.
*/
perform: function (method, scope, a, b, c, d, e, f) {
- /* eslint-enable space-before-function-paren */
!!this.isInTransaction() ? false ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
var errorThrown;
var ret;
@@ -7258,7 +7520,7 @@ var TransactionImpl = {
module.exports = TransactionImpl;
/***/ }),
-/* 105 */
+/* 108 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -7274,10 +7536,10 @@ module.exports = TransactionImpl;
-var SyntheticUIEvent = __webpack_require__(71);
-var ViewportMetrics = __webpack_require__(144);
+var SyntheticUIEvent = __webpack_require__(76);
+var ViewportMetrics = __webpack_require__(150);
-var getEventModifierState = __webpack_require__(145);
+var getEventModifierState = __webpack_require__(151);
/**
* @interface MouseEvent
@@ -7335,7 +7597,7 @@ SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
module.exports = SyntheticMouseEvent;
/***/ }),
-/* 106 */
+/* 109 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -7351,13 +7613,13 @@ module.exports = SyntheticMouseEvent;
-var ExecutionEnvironment = __webpack_require__(21);
-var DOMNamespaces = __webpack_require__(147);
+var ExecutionEnvironment = __webpack_require__(23);
+var DOMNamespaces = __webpack_require__(153);
var WHITESPACE_TEST = /^[ \r\n\t\f]/;
var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
-var createMicrosoftUnsafeLocalFunction = __webpack_require__(148);
+var createMicrosoftUnsafeLocalFunction = __webpack_require__(154);
// SVG temp container for IE lacking innerHTML
var reusableSVGContainer;
@@ -7417,7 +7679,7 @@ if (ExecutionEnvironment.canUseDOM) {
// in hopes that this is preserved even if "\uFEFF" is transformed to
// the actual Unicode character (by Babel, for example).
// https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216
- node.innerHTML = String.fromCharCode(0xfeff) + html;
+ node.innerHTML = String.fromCharCode(0xFEFF) + html;
// deleteData leaves an empty `TextNode` which offsets the index of all
// children. Definitely want to avoid this.
@@ -7438,7 +7700,7 @@ if (ExecutionEnvironment.canUseDOM) {
module.exports = setInnerHTML;
/***/ }),
-/* 107 */
+/* 110 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -7546,6 +7808,7 @@ function escapeHtml(string) {
}
// end code copied and modified from escape-html
+
/**
* Escapes text to prevent scripting attacks.
*
@@ -7565,7 +7828,7 @@ function escapeTextContentForBrowser(text) {
module.exports = escapeTextContentForBrowser;
/***/ }),
-/* 108 */
+/* 111 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -7581,14 +7844,14 @@ module.exports = escapeTextContentForBrowser;
-var _assign = __webpack_require__(15);
+var _assign = __webpack_require__(13);
-var EventPluginRegistry = __webpack_require__(140);
-var ReactEventEmitterMixin = __webpack_require__(383);
-var ViewportMetrics = __webpack_require__(144);
+var EventPluginRegistry = __webpack_require__(146);
+var ReactEventEmitterMixin = __webpack_require__(392);
+var ViewportMetrics = __webpack_require__(150);
-var getVendorPrefixedEventName = __webpack_require__(384);
-var isEventSupported = __webpack_require__(143);
+var getVendorPrefixedEventName = __webpack_require__(393);
+var isEventSupported = __webpack_require__(149);
/**
* Summary of `ReactBrowserEventEmitter` event handling:
@@ -7746,6 +8009,7 @@ function getListeningForDocument(mountAt) {
* @internal
*/
var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
+
/**
* Injectable event backend
*/
@@ -7819,12 +8083,14 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
}
} else if (dependency === 'topScroll') {
+
if (isEventSupported('scroll', true)) {
ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
} else {
ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
}
} else if (dependency === 'topFocus' || dependency === 'topBlur') {
+
if (isEventSupported('focus', true)) {
ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
@@ -7889,12 +8155,199 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
isMonitoringScrollValue = true;
}
}
+
});
module.exports = ReactBrowserEventEmitter;
/***/ }),
-/* 109 */
+/* 112 */
+/***/ (function(module, exports) {
+
+// shim for using process in browser
+var process = module.exports = {};
+
+// cached from whatever global is present so that test runners that stub it
+// don't break things. But we need to wrap it in a try catch in case it is
+// wrapped in strict mode code which doesn't define any globals. It's inside a
+// function because try/catches deoptimize in certain engines.
+
+var cachedSetTimeout;
+var cachedClearTimeout;
+
+function defaultSetTimout() {
+ throw new Error('setTimeout has not been defined');
+}
+function defaultClearTimeout () {
+ throw new Error('clearTimeout has not been defined');
+}
+(function () {
+ try {
+ if (typeof setTimeout === 'function') {
+ cachedSetTimeout = setTimeout;
+ } else {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ } catch (e) {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ try {
+ if (typeof clearTimeout === 'function') {
+ cachedClearTimeout = clearTimeout;
+ } else {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+ } catch (e) {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+} ())
+function runTimeout(fun) {
+ if (cachedSetTimeout === setTimeout) {
+ //normal enviroments in sane situations
+ return setTimeout(fun, 0);
+ }
+ // if setTimeout wasn't available but was latter defined
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+ cachedSetTimeout = setTimeout;
+ return setTimeout(fun, 0);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedSetTimeout(fun, 0);
+ } catch(e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedSetTimeout.call(null, fun, 0);
+ } catch(e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+ return cachedSetTimeout.call(this, fun, 0);
+ }
+ }
+
+
+}
+function runClearTimeout(marker) {
+ if (cachedClearTimeout === clearTimeout) {
+ //normal enviroments in sane situations
+ return clearTimeout(marker);
+ }
+ // if clearTimeout wasn't available but was latter defined
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+ cachedClearTimeout = clearTimeout;
+ return clearTimeout(marker);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedClearTimeout(marker);
+ } catch (e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedClearTimeout.call(null, marker);
+ } catch (e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+ return cachedClearTimeout.call(this, marker);
+ }
+ }
+
+
+
+}
+var queue = [];
+var draining = false;
+var currentQueue;
+var queueIndex = -1;
+
+function cleanUpNextTick() {
+ if (!draining || !currentQueue) {
+ return;
+ }
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
+ }
+}
+
+function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = runTimeout(cleanUpNextTick);
+ draining = true;
+
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ if (currentQueue) {
+ currentQueue[queueIndex].run();
+ }
+ }
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ runClearTimeout(timeout);
+}
+
+process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ runTimeout(drainQueue);
+ }
+};
+
+// v8 likes predictible objects
+function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
+}
+Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+};
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+process.version = ''; // empty string to avoid regexp issues
+process.versions = {};
+
+function noop() {}
+
+process.on = noop;
+process.addListener = noop;
+process.once = noop;
+process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
+process.emit = noop;
+
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+};
+
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+process.umask = function() { return 0; };
+
+
+/***/ }),
+/* 113 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -7922,7 +8375,7 @@ var REPLACE = exports.REPLACE = 'REPLACE';
var POP = exports.POP = 'POP';
/***/ }),
-/* 110 */
+/* 114 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -7967,27 +8420,18 @@ var supportsPopstateOnHashchange = exports.supportsPopstateOnHashchange = functi
return window.navigator.userAgent.indexOf('Trident') === -1;
};
-/**
- * Returns true if a given popstate event is an extraneous WebKit event.
- * Accounts for the fact that Chrome on iOS fires real popstate events
- * containing undefined state when pressing the back button.
- */
-var isExtraneousPopstateEvent = exports.isExtraneousPopstateEvent = function isExtraneousPopstateEvent(event) {
- return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;
-};
-
/***/ }),
-/* 111 */
+/* 115 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(252);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(460);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(461);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(462);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(258);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(257);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(258);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(468);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(469);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(470);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(264);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(263);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__["b"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__["a"]; });
@@ -8013,11 +8457,11 @@ if (false) {
/***/ }),
-/* 112 */
+/* 116 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(32);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(29);
/** Built-in value references. */
@@ -8027,183 +8471,17 @@ var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol;
/***/ }),
-/* 113 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actionTypes", function() { return actionTypes; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actions", function() { return actions; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayInsert", function() { return arrayInsert; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayMove", function() { return arrayMove; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPop", function() { return arrayPop; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayPush", function() { return arrayPush; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemove", function() { return arrayRemove; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayRemoveAll", function() { return arrayRemoveAll; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayShift", function() { return arrayShift; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySplice", function() { return arraySplice; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arraySwap", function() { return arraySwap; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "arrayUnshift", function() { return arrayUnshift; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "autofill", function() { return autofill; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearSubmitErrors", function() { return clearSubmitErrors; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initialize", function() { return initialize; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "registerField", function() { return registerField; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitFailed", function() { return setSubmitFailed; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setSubmitSucceeded", function() { return setSubmitSucceeded; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startAsyncValidation", function() { return startAsyncValidation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startSubmit", function() { return startSubmit; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopAsyncValidation", function() { return stopAsyncValidation; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stopSubmit", function() { return stopSubmit; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submit", function() { return submit; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return touch; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregisterField", function() { return unregisterField; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actions__ = __webpack_require__(265);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__actionTypes__ = __webpack_require__(167);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__defaultShouldAsyncValidate__ = __webpack_require__(266);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultShouldAsyncValidate", function() { return __WEBPACK_IMPORTED_MODULE_2__defaultShouldAsyncValidate__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__defaultShouldValidate__ = __webpack_require__(267);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "defaultShouldValidate", function() { return __WEBPACK_IMPORTED_MODULE_3__defaultShouldValidate__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Form__ = __webpack_require__(490);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Form", function() { return __WEBPACK_IMPORTED_MODULE_4__Form__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__FormSection__ = __webpack_require__(491);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FormSection", function() { return __WEBPACK_IMPORTED_MODULE_5__FormSection__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__SubmissionError__ = __webpack_require__(268);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "SubmissionError", function() { return __WEBPACK_IMPORTED_MODULE_6__SubmissionError__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__propTypes__ = __webpack_require__(493);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "propTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["a"]; });
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fieldInputPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["b"]; });
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fieldMetaPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["c"]; });
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "fieldPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["d"]; });
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formPropTypes", function() { return __WEBPACK_IMPORTED_MODULE_7__propTypes__["e"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Field__ = __webpack_require__(494);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Field", function() { return __WEBPACK_IMPORTED_MODULE_8__Field__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Fields__ = __webpack_require__(564);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Fields", function() { return __WEBPACK_IMPORTED_MODULE_9__Fields__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__FieldArray__ = __webpack_require__(567);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "FieldArray", function() { return __WEBPACK_IMPORTED_MODULE_10__FieldArray__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__formValueSelector__ = __webpack_require__(585);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formValueSelector", function() { return __WEBPACK_IMPORTED_MODULE_11__formValueSelector__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__formValues__ = __webpack_require__(587);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formValues", function() { return __WEBPACK_IMPORTED_MODULE_12__formValues__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__getFormNames__ = __webpack_require__(589);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormNames", function() { return __WEBPACK_IMPORTED_MODULE_13__getFormNames__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__getFormValues__ = __webpack_require__(591);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormValues", function() { return __WEBPACK_IMPORTED_MODULE_14__getFormValues__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__getFormInitialValues__ = __webpack_require__(593);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormInitialValues", function() { return __WEBPACK_IMPORTED_MODULE_15__getFormInitialValues__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__getFormSyncErrors__ = __webpack_require__(595);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSyncErrors", function() { return __WEBPACK_IMPORTED_MODULE_16__getFormSyncErrors__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__getFormMeta__ = __webpack_require__(597);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormMeta", function() { return __WEBPACK_IMPORTED_MODULE_17__getFormMeta__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__getFormAsyncErrors__ = __webpack_require__(599);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormAsyncErrors", function() { return __WEBPACK_IMPORTED_MODULE_18__getFormAsyncErrors__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__getFormSyncWarnings__ = __webpack_require__(601);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSyncWarnings", function() { return __WEBPACK_IMPORTED_MODULE_19__getFormSyncWarnings__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__getFormSubmitErrors__ = __webpack_require__(603);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "getFormSubmitErrors", function() { return __WEBPACK_IMPORTED_MODULE_20__getFormSubmitErrors__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__isDirty__ = __webpack_require__(605);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isDirty", function() { return __WEBPACK_IMPORTED_MODULE_21__isDirty__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__isInvalid__ = __webpack_require__(607);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isInvalid", function() { return __WEBPACK_IMPORTED_MODULE_22__isInvalid__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__isPristine__ = __webpack_require__(610);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isPristine", function() { return __WEBPACK_IMPORTED_MODULE_23__isPristine__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__isValid__ = __webpack_require__(611);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isValid", function() { return __WEBPACK_IMPORTED_MODULE_24__isValid__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__isSubmitting__ = __webpack_require__(612);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "isSubmitting", function() { return __WEBPACK_IMPORTED_MODULE_25__isSubmitting__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__hasSubmitSucceeded__ = __webpack_require__(614);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitSucceeded", function() { return __WEBPACK_IMPORTED_MODULE_26__hasSubmitSucceeded__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__hasSubmitFailed__ = __webpack_require__(616);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hasSubmitFailed", function() { return __WEBPACK_IMPORTED_MODULE_27__hasSubmitFailed__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__reduxForm__ = __webpack_require__(618);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "reduxForm", function() { return __WEBPACK_IMPORTED_MODULE_28__reduxForm__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__reducer__ = __webpack_require__(648);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "reducer", function() { return __WEBPACK_IMPORTED_MODULE_29__reducer__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__values__ = __webpack_require__(651);
-/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "values", function() { return __WEBPACK_IMPORTED_MODULE_30__values__["a"]; });
-
-
-
-
-
-
-
-// alias for propTypes
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-var actionTypes = __WEBPACK_IMPORTED_MODULE_1__actionTypes__;
-var actions = __WEBPACK_IMPORTED_MODULE_0__actions__;
-var arrayInsert = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayInsert"],
- arrayMove = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayMove"],
- arrayPop = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayPop"],
- arrayPush = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayPush"],
- arrayRemove = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayRemove"],
- arrayRemoveAll = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayRemoveAll"],
- arrayShift = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayShift"],
- arraySplice = __WEBPACK_IMPORTED_MODULE_0__actions__["arraySplice"],
- arraySwap = __WEBPACK_IMPORTED_MODULE_0__actions__["arraySwap"],
- arrayUnshift = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayUnshift"],
- autofill = __WEBPACK_IMPORTED_MODULE_0__actions__["autofill"],
- blur = __WEBPACK_IMPORTED_MODULE_0__actions__["blur"],
- change = __WEBPACK_IMPORTED_MODULE_0__actions__["change"],
- clearSubmitErrors = __WEBPACK_IMPORTED_MODULE_0__actions__["clearSubmitErrors"],
- destroy = __WEBPACK_IMPORTED_MODULE_0__actions__["destroy"],
- focus = __WEBPACK_IMPORTED_MODULE_0__actions__["focus"],
- initialize = __WEBPACK_IMPORTED_MODULE_0__actions__["initialize"],
- registerField = __WEBPACK_IMPORTED_MODULE_0__actions__["registerField"],
- reset = __WEBPACK_IMPORTED_MODULE_0__actions__["reset"],
- setSubmitFailed = __WEBPACK_IMPORTED_MODULE_0__actions__["setSubmitFailed"],
- setSubmitSucceeded = __WEBPACK_IMPORTED_MODULE_0__actions__["setSubmitSucceeded"],
- startAsyncValidation = __WEBPACK_IMPORTED_MODULE_0__actions__["startAsyncValidation"],
- startSubmit = __WEBPACK_IMPORTED_MODULE_0__actions__["startSubmit"],
- stopAsyncValidation = __WEBPACK_IMPORTED_MODULE_0__actions__["stopAsyncValidation"],
- stopSubmit = __WEBPACK_IMPORTED_MODULE_0__actions__["stopSubmit"],
- submit = __WEBPACK_IMPORTED_MODULE_0__actions__["submit"],
- touch = __WEBPACK_IMPORTED_MODULE_0__actions__["touch"],
- unregisterField = __WEBPACK_IMPORTED_MODULE_0__actions__["unregisterField"],
- untouch = __WEBPACK_IMPORTED_MODULE_0__actions__["untouch"];
-
-
-/***/ }),
-/* 114 */
+/* 117 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(272);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__copyArray_js__ = __webpack_require__(273);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(33);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(115);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stringToPath_js__ = __webpack_require__(274);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(91);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toString_js__ = __webpack_require__(276);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__ = __webpack_require__(271);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__copyArray_js__ = __webpack_require__(272);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(30);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(118);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stringToPath_js__ = __webpack_require__(273);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(93);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toString_js__ = __webpack_require__(275);
@@ -8230,22 +8508,22 @@ var arrayInsert = __WEBPACK_IMPORTED_MODULE_0__actions__["arrayInsert"],
* // => ['a', '0', 'b', 'c']
*/
function toPath(value) {
- if (Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(value)) {
- return Object(__WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */])(value, __WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */]);
+ if (__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](value)) {
+ return __WEBPACK_IMPORTED_MODULE_0__arrayMap_js__["a" /* default */](value, __WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */]);
}
- return Object(__WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */])(value) ? [value] : Object(__WEBPACK_IMPORTED_MODULE_1__copyArray_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_4__stringToPath_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_6__toString_js__["a" /* default */])(value)));
+ return __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */](value) ? [value] : __WEBPACK_IMPORTED_MODULE_1__copyArray_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_4__stringToPath_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_6__toString_js__["a" /* default */](value)));
}
/* harmony default export */ __webpack_exports__["a"] = (toPath);
/***/ }),
-/* 115 */
+/* 118 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(76);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(54);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(81);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(59);
@@ -8271,36 +8549,36 @@ var symbolTag = '[object Symbol]';
*/
function isSymbol(value) {
return typeof value == 'symbol' ||
- (Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) == symbolTag);
+ (__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value) == symbolTag);
}
/* harmony default export */ __webpack_exports__["a"] = (isSymbol);
/***/ }),
-/* 116 */
+/* 119 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60);
/* Built-in method references that are verified to be native. */
-var nativeCreate = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(Object, 'create');
+var nativeCreate = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](Object, 'create');
/* harmony default export */ __webpack_exports__["a"] = (nativeCreate);
/***/ }),
-/* 117 */
+/* 120 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__ = __webpack_require__(515);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__ = __webpack_require__(516);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__ = __webpack_require__(517);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__ = __webpack_require__(518);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__ = __webpack_require__(519);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__listCacheClear_js__ = __webpack_require__(514);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__listCacheDelete_js__ = __webpack_require__(515);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__listCacheGet_js__ = __webpack_require__(516);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__listCacheHas_js__ = __webpack_require__(517);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__ = __webpack_require__(518);
@@ -8336,11 +8614,11 @@ ListCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__["a" /*
/***/ }),
-/* 118 */
+/* 121 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(90);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(92);
/**
@@ -8354,7 +8632,7 @@ ListCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__listCacheSet_js__["a" /*
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
- if (Object(__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */])(array[length][0], key)) {
+ if (__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */](array[length][0], key)) {
return length;
}
}
@@ -8365,11 +8643,11 @@ function assocIndexOf(array, key) {
/***/ }),
-/* 119 */
+/* 122 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__ = __webpack_require__(521);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__ = __webpack_require__(520);
/**
@@ -8382,7 +8660,7 @@ function assocIndexOf(array, key) {
*/
function getMapData(map, key) {
var data = map.__data__;
- return Object(__WEBPACK_IMPORTED_MODULE_0__isKeyable_js__["a" /* default */])(key)
+ return __WEBPACK_IMPORTED_MODULE_0__isKeyable_js__["a" /* default */](key)
? data[typeof key == 'string' ? 'string' : 'hash']
: data.map;
}
@@ -8391,12 +8669,45 @@ function getMapData(map, key) {
/***/ }),
-/* 120 */
+/* 123 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(169);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(179);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__ = __webpack_require__(277);
+
+
+/**
+ * The base implementation of `assignValue` and `assignMergeValue` without
+ * value checks.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function baseAssignValue(object, key, value) {
+ if (key == '__proto__' && __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */]) {
+ __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */](object, key, {
+ 'configurable': true,
+ 'enumerable': true,
+ 'value': value,
+ 'writable': true
+ });
+ } else {
+ object[key] = value;
+ }
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (baseAssignValue);
+
+
+/***/ }),
+/* 124 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(176);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(182);
@@ -8426,92 +8737,62 @@ function getMapData(map, key) {
* // => false
*/
function isArrayLike(value) {
- return value != null && Object(__WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */])(value.length) && !Object(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */])(value);
+ return value != null && __WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */](value.length) && !__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */](value);
}
/* harmony default export */ __webpack_exports__["a"] = (isArrayLike);
/***/ }),
-/* 121 */
+/* 125 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__ = __webpack_require__(283);
-
+/* harmony export (immutable) */ __webpack_exports__["a"] = formatName;
+function formatName(context, name) {
+ var sectionPrefix = context._reduxForm.sectionPrefix;
-/**
- * The base implementation of `assignValue` and `assignMergeValue` without
- * value checks.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
-function baseAssignValue(object, key, value) {
- if (key == '__proto__' && __WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */]) {
- Object(__WEBPACK_IMPORTED_MODULE_0__defineProperty_js__["a" /* default */])(object, key, {
- 'configurable': true,
- 'enumerable': true,
- 'value': value,
- 'writable': true
- });
- } else {
- object[key] = value;
- }
+ return !sectionPrefix ? name : sectionPrefix + "." + name;
}
-/* harmony default export */ __webpack_exports__["a"] = (baseAssignValue);
-
-
/***/ }),
-/* 122 */
+/* 126 */
/***/ (function(module, exports) {
module.exports = true;
-
/***/ }),
-/* 123 */
+/* 127 */
/***/ (function(module, exports, __webpack_require__) {
-var def = __webpack_require__(35).f;
-var has = __webpack_require__(51);
-var TAG = __webpack_require__(22)('toStringTag');
+var def = __webpack_require__(34).f
+ , has = __webpack_require__(54)
+ , TAG = __webpack_require__(24)('toStringTag');
-module.exports = function (it, tag, stat) {
- if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
+module.exports = function(it, tag, stat){
+ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
};
-
/***/ }),
-/* 124 */
+/* 128 */
/***/ (function(module, exports, __webpack_require__) {
-__webpack_require__(669);
-var global = __webpack_require__(23);
-var hide = __webpack_require__(50);
-var Iterators = __webpack_require__(78);
-var TO_STRING_TAG = __webpack_require__(22)('toStringTag');
+__webpack_require__(646);
+var global = __webpack_require__(25)
+ , hide = __webpack_require__(53)
+ , Iterators = __webpack_require__(83)
+ , TO_STRING_TAG = __webpack_require__(24)('toStringTag');
-var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
- 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
- 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
- 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
- 'TextTrackList,TouchList').split(',');
-
-for (var i = 0; i < DOMIterables.length; i++) {
- var NAME = DOMIterables[i];
- var Collection = global[NAME];
- var proto = Collection && Collection.prototype;
- if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
+for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
+ var NAME = collections[i]
+ , Collection = global[NAME]
+ , proto = Collection && Collection.prototype;
+ if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
Iterators[NAME] = Iterators.Array;
}
-
/***/ }),
-/* 125 */
+/* 129 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -8521,47 +8802,47 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _toConsumableArray2 = __webpack_require__(189);
+var _toConsumableArray2 = __webpack_require__(95);
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
exports.default = getMuiTheme;
-var _lodash = __webpack_require__(692);
+var _lodash = __webpack_require__(676);
var _lodash2 = _interopRequireDefault(_lodash);
-var _colorManipulator = __webpack_require__(56);
+var _colorManipulator = __webpack_require__(50);
-var _lightBaseTheme = __webpack_require__(306);
+var _lightBaseTheme = __webpack_require__(310);
var _lightBaseTheme2 = _interopRequireDefault(_lightBaseTheme);
-var _zIndex = __webpack_require__(307);
+var _zIndex = __webpack_require__(311);
var _zIndex2 = _interopRequireDefault(_zIndex);
-var _autoprefixer = __webpack_require__(693);
+var _autoprefixer = __webpack_require__(677);
var _autoprefixer2 = _interopRequireDefault(_autoprefixer);
-var _callOnce = __webpack_require__(722);
+var _callOnce = __webpack_require__(706);
var _callOnce2 = _interopRequireDefault(_callOnce);
-var _rtl = __webpack_require__(723);
+var _rtl = __webpack_require__(707);
var _rtl2 = _interopRequireDefault(_rtl);
-var _compose = __webpack_require__(726);
+var _compose = __webpack_require__(710);
var _compose2 = _interopRequireDefault(_compose);
-var _typography = __webpack_require__(311);
+var _typography = __webpack_require__(315);
var _typography2 = _interopRequireDefault(_typography);
-var _colors = __webpack_require__(57);
+var _colors = __webpack_require__(31);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -8896,7 +9177,7 @@ function getMuiTheme(muiTheme) {
}
/***/ }),
-/* 126 */
+/* 130 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -8922,7 +9203,7 @@ exports.default = function (property, value) {
module.exports = exports['default'];
/***/ }),
-/* 127 */
+/* 131 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -8938,7 +9219,7 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactAddonsCreateFragment = __webpack_require__(730);
+var _reactAddonsCreateFragment = __webpack_require__(714);
var _reactAddonsCreateFragment2 = _interopRequireDefault(_reactAddonsCreateFragment);
@@ -8980,46 +9261,13 @@ function extendChildren(children, extendedProps, extendedChildren) {
}
/***/ }),
-/* 128 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- */
-
-
-
-module.exports = __webpack_require__(732);
-
-
-/***/ }),
-/* 129 */
+/* 132 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = undefined;
-
-var _MenuItem = __webpack_require__(321);
-
-var _MenuItem2 = _interopRequireDefault(_MenuItem);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-exports.default = _MenuItem2.default;
+module.exports = __webpack_require__(717);
/***/ }),
-/* 130 */
+/* 133 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -9065,35 +9313,35 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactDom = __webpack_require__(19);
+var _reactDom = __webpack_require__(16);
var _reactDom2 = _interopRequireDefault(_reactDom);
-var _reactEventListener = __webpack_require__(42);
+var _reactEventListener = __webpack_require__(40);
var _reactEventListener2 = _interopRequireDefault(_reactEventListener);
-var _RenderToLayer = __webpack_require__(322);
+var _RenderToLayer = __webpack_require__(327);
var _RenderToLayer2 = _interopRequireDefault(_RenderToLayer);
-var _propTypes = __webpack_require__(41);
+var _propTypes = __webpack_require__(39);
var _propTypes2 = _interopRequireDefault(_propTypes);
-var _Paper = __webpack_require__(34);
+var _Paper = __webpack_require__(32);
var _Paper2 = _interopRequireDefault(_Paper);
-var _lodash = __webpack_require__(771);
+var _lodash = __webpack_require__(751);
var _lodash2 = _interopRequireDefault(_lodash);
-var _PopoverAnimationDefault = __webpack_require__(772);
+var _PopoverAnimationDefault = __webpack_require__(752);
var _PopoverAnimationDefault2 = _interopRequireDefault(_PopoverAnimationDefault);
-var _iOSHelpers = __webpack_require__(773);
+var _iOSHelpers = __webpack_require__(753);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -9533,96 +9781,138 @@ Popover.contextTypes = {
exports.default = Popover;
/***/ }),
-/* 131 */
+/* 134 */
/***/ (function(module, exports, __webpack_require__) {
-var isObject = __webpack_require__(62);
-var document = __webpack_require__(23).document;
-// typeof document.createElement is 'object' in old IE
-var is = isObject(document) && isObject(document.createElement);
-module.exports = function (it) {
- return is ? document.createElement(it) : {};
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = undefined;
+
+var _Dialog = __webpack_require__(785);
+
+var _Dialog2 = _interopRequireDefault(_Dialog);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _Dialog2.default;
+
+/***/ }),
+/* 135 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = undefined;
+
+var _Toggle = __webpack_require__(819);
+
+var _Toggle2 = _interopRequireDefault(_Toggle);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _Toggle2.default;
+
+/***/ }),
+/* 136 */
+/***/ (function(module, exports) {
+
+module.exports = function(it){
+ if(typeof it != 'function')throw TypeError(it + ' is not a function!');
+ return it;
};
+/***/ }),
+/* 137 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isObject = __webpack_require__(68)
+ , document = __webpack_require__(25).document
+ // in old IE typeof document.createElement is 'object'
+ , is = isObject(document) && isObject(document.createElement);
+module.exports = function(it){
+ return is ? document.createElement(it) : {};
+};
/***/ }),
-/* 132 */
+/* 138 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
-var isObject = __webpack_require__(62);
+var isObject = __webpack_require__(68);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
-module.exports = function (it, S) {
- if (!isObject(it)) return it;
+module.exports = function(it, S){
+ if(!isObject(it))return it;
var fn, val;
- if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
- if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
- if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
+ if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
+ if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
throw TypeError("Can't convert object to primitive value");
};
-
/***/ }),
-/* 133 */
+/* 139 */
/***/ (function(module, exports) {
// 7.2.1 RequireObjectCoercible(argument)
-module.exports = function (it) {
- if (it == undefined) throw TypeError("Can't call method on " + it);
+module.exports = function(it){
+ if(it == undefined)throw TypeError("Can't call method on " + it);
return it;
};
-
/***/ }),
-/* 134 */
+/* 140 */
/***/ (function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
-var toInteger = __webpack_require__(135);
-var min = Math.min;
-module.exports = function (it) {
+var toInteger = __webpack_require__(141)
+ , min = Math.min;
+module.exports = function(it){
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
-
/***/ }),
-/* 135 */
+/* 141 */
/***/ (function(module, exports) {
// 7.1.4 ToInteger
-var ceil = Math.ceil;
-var floor = Math.floor;
-module.exports = function (it) {
+var ceil = Math.ceil
+ , floor = Math.floor;
+module.exports = function(it){
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
};
-
/***/ }),
-/* 136 */
+/* 142 */
/***/ (function(module, exports, __webpack_require__) {
-var shared = __webpack_require__(137)('keys');
-var uid = __webpack_require__(100);
-module.exports = function (key) {
+var shared = __webpack_require__(143)('keys')
+ , uid = __webpack_require__(103);
+module.exports = function(key){
return shared[key] || (shared[key] = uid(key));
};
-
/***/ }),
-/* 137 */
+/* 143 */
/***/ (function(module, exports, __webpack_require__) {
-var global = __webpack_require__(23);
-var SHARED = '__core-js_shared__';
-var store = global[SHARED] || (global[SHARED] = {});
-module.exports = function (key) {
+var global = __webpack_require__(25)
+ , SHARED = '__core-js_shared__'
+ , store = global[SHARED] || (global[SHARED] = {});
+module.exports = function(key){
return store[key] || (store[key] = {});
};
-
/***/ }),
-/* 138 */
+/* 144 */
/***/ (function(module, exports) {
// IE 8- don't enum bug keys
@@ -9630,16 +9920,14 @@ module.exports = (
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
).split(',');
-
/***/ }),
-/* 139 */
+/* 145 */
/***/ (function(module, exports) {
exports.f = Object.getOwnPropertySymbols;
-
/***/ }),
-/* 140 */
+/* 146 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -9656,7 +9944,7 @@ exports.f = Object.getOwnPropertySymbols;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
var invariant = __webpack_require__(9);
@@ -9753,6 +10041,7 @@ function publishRegistrationName(registrationName, pluginModule, eventName) {
* @see {EventPluginHub}
*/
var EventPluginRegistry = {
+
/**
* Ordered list of injected plugins.
*/
@@ -9892,12 +10181,13 @@ var EventPluginRegistry = {
}
}
}
+
};
module.exports = EventPluginRegistry;
/***/ }),
-/* 141 */
+/* 147 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -9968,6 +10258,7 @@ if (false) {
var evtType = 'react-' + name;
fakeNode.addEventListener(evtType, boundFunc, false);
var evt = document.createEvent('Event');
+ // $FlowFixMe https://github.com/facebook/flow/issues/2336
evt.initEvent(evtType, false, false);
fakeNode.dispatchEvent(evt);
fakeNode.removeEventListener(evtType, boundFunc, false);
@@ -9978,7 +10269,7 @@ if (false) {
module.exports = ReactErrorUtils;
/***/ }),
-/* 142 */
+/* 148 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -10018,7 +10309,7 @@ function getEventTarget(nativeEvent) {
module.exports = getEventTarget;
/***/ }),
-/* 143 */
+/* 149 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -10034,7 +10325,7 @@ module.exports = getEventTarget;
-var ExecutionEnvironment = __webpack_require__(21);
+var ExecutionEnvironment = __webpack_require__(23);
var useHasFeature;
if (ExecutionEnvironment.canUseDOM) {
@@ -10083,7 +10374,7 @@ function isEventSupported(eventNameSuffix, capture) {
module.exports = isEventSupported;
/***/ }),
-/* 144 */
+/* 150 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -10100,6 +10391,7 @@ module.exports = isEventSupported;
var ViewportMetrics = {
+
currentScrollLeft: 0,
currentScrollTop: 0,
@@ -10108,12 +10400,13 @@ var ViewportMetrics = {
ViewportMetrics.currentScrollLeft = scrollPosition.x;
ViewportMetrics.currentScrollTop = scrollPosition.y;
}
+
};
module.exports = ViewportMetrics;
/***/ }),
-/* 145 */
+/* 151 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -10135,10 +10428,10 @@ module.exports = ViewportMetrics;
*/
var modifierKeyToProp = {
- Alt: 'altKey',
- Control: 'ctrlKey',
- Meta: 'metaKey',
- Shift: 'shiftKey'
+ 'Alt': 'altKey',
+ 'Control': 'ctrlKey',
+ 'Meta': 'metaKey',
+ 'Shift': 'shiftKey'
};
// IE8 does not implement getModifierState so we simply map it to the only
@@ -10161,7 +10454,7 @@ function getEventModifierState(nativeEvent) {
module.exports = getEventModifierState;
/***/ }),
-/* 146 */
+/* 152 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -10177,14 +10470,14 @@ module.exports = getEventModifierState;
-var DOMLazyTree = __webpack_require__(72);
-var Danger = __webpack_require__(368);
-var ReactDOMComponentTree = __webpack_require__(16);
-var ReactInstrumentation = __webpack_require__(29);
+var DOMLazyTree = __webpack_require__(77);
+var Danger = __webpack_require__(377);
+var ReactDOMComponentTree = __webpack_require__(14);
+var ReactInstrumentation = __webpack_require__(27);
-var createMicrosoftUnsafeLocalFunction = __webpack_require__(148);
-var setInnerHTML = __webpack_require__(106);
-var setTextContent = __webpack_require__(224);
+var createMicrosoftUnsafeLocalFunction = __webpack_require__(154);
+var setInnerHTML = __webpack_require__(109);
+var setTextContent = __webpack_require__(232);
function getNodeAfter(parentNode, node) {
// Special case for text components, which return [open, close] comments
@@ -10312,6 +10605,7 @@ if (false) {
* Operations for updating with DOM children.
*/
var DOMChildrenOperations = {
+
dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
replaceDelimitedText: replaceDelimitedText,
@@ -10337,10 +10631,7 @@ var DOMChildrenOperations = {
ReactInstrumentation.debugTool.onHostOperation({
instanceID: parentNodeDebugID,
type: 'insert child',
- payload: {
- toIndex: update.toIndex,
- content: update.content.toString()
- }
+ payload: { toIndex: update.toIndex, content: update.content.toString() }
});
}
break;
@@ -10387,12 +10678,13 @@ var DOMChildrenOperations = {
}
}
}
+
};
module.exports = DOMChildrenOperations;
/***/ }),
-/* 147 */
+/* 153 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -10417,7 +10709,7 @@ var DOMNamespaces = {
module.exports = DOMNamespaces;
/***/ }),
-/* 148 */
+/* 154 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -10454,7 +10746,7 @@ var createMicrosoftUnsafeLocalFunction = function (func) {
module.exports = createMicrosoftUnsafeLocalFunction;
/***/ }),
-/* 149 */
+/* 155 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -10470,25 +10762,22 @@ module.exports = createMicrosoftUnsafeLocalFunction;
-var _prodInvariant = __webpack_require__(13);
-
-var ReactPropTypesSecret = __webpack_require__(386);
-var propTypesFactory = __webpack_require__(213);
+var _prodInvariant = __webpack_require__(12);
-var React = __webpack_require__(65);
-var PropTypes = propTypesFactory(React.isValidElement);
+var React = __webpack_require__(56);
+var ReactPropTypesSecret = __webpack_require__(395);
var invariant = __webpack_require__(9);
-var warning = __webpack_require__(12);
+var warning = __webpack_require__(11);
var hasReadOnlyValue = {
- button: true,
- checkbox: true,
- image: true,
- hidden: true,
- radio: true,
- reset: true,
- submit: true
+ 'button': true,
+ 'checkbox': true,
+ 'image': true,
+ 'hidden': true,
+ 'radio': true,
+ 'reset': true,
+ 'submit': true
};
function _assertSingleLink(inputProps) {
@@ -10517,7 +10806,7 @@ var propTypes = {
}
return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
},
- onChange: PropTypes.func
+ onChange: React.PropTypes.func
};
var loggedTypeFailures = {};
@@ -10597,7 +10886,7 @@ var LinkedValueUtils = {
module.exports = LinkedValueUtils;
/***/ }),
-/* 150 */
+/* 156 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -10614,13 +10903,14 @@ module.exports = LinkedValueUtils;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
var invariant = __webpack_require__(9);
var injected = false;
var ReactComponentEnvironment = {
+
/**
* Optionally injectable hook for swapping out mount images in the middle of
* the tree.
@@ -10641,12 +10931,13 @@ var ReactComponentEnvironment = {
injected = true;
}
}
+
};
module.exports = ReactComponentEnvironment;
/***/ }),
-/* 151 */
+/* 157 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -10693,7 +10984,7 @@ function shouldUpdateReactComponent(prevElement, nextElement) {
module.exports = shouldUpdateReactComponent;
/***/ }),
-/* 152 */
+/* 158 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -10757,7 +11048,391 @@ var KeyEscapeUtils = {
module.exports = KeyEscapeUtils;
/***/ }),
-/* 153 */
+/* 159 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2016-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(71);
+
+var ReactCurrentOwner = __webpack_require__(36);
+
+var invariant = __webpack_require__(9);
+var warning = __webpack_require__(11);
+
+function isNative(fn) {
+ // Based on isNative() from Lodash
+ var funcToString = Function.prototype.toString;
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+ var reIsNative = RegExp('^' + funcToString
+ // Take an example native function source for comparison
+ .call(hasOwnProperty
+ // Strip regex characters so we can use it for regex
+ ).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&'
+ // Remove hasOwnProperty from the template to make it generic
+ ).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
+ try {
+ var source = funcToString.call(fn);
+ return reIsNative.test(source);
+ } catch (err) {
+ return false;
+ }
+}
+
+var canUseCollections =
+// Array.from
+typeof Array.from === 'function' &&
+// Map
+typeof Map === 'function' && isNative(Map) &&
+// Map.prototype.keys
+Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
+// Set
+typeof Set === 'function' && isNative(Set) &&
+// Set.prototype.keys
+Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
+
+var setItem;
+var getItem;
+var removeItem;
+var getItemIDs;
+var addRoot;
+var removeRoot;
+var getRootIDs;
+
+if (canUseCollections) {
+ var itemMap = new Map();
+ var rootIDSet = new Set();
+
+ setItem = function (id, item) {
+ itemMap.set(id, item);
+ };
+ getItem = function (id) {
+ return itemMap.get(id);
+ };
+ removeItem = function (id) {
+ itemMap['delete'](id);
+ };
+ getItemIDs = function () {
+ return Array.from(itemMap.keys());
+ };
+
+ addRoot = function (id) {
+ rootIDSet.add(id);
+ };
+ removeRoot = function (id) {
+ rootIDSet['delete'](id);
+ };
+ getRootIDs = function () {
+ return Array.from(rootIDSet.keys());
+ };
+} else {
+ var itemByKey = {};
+ var rootByKey = {};
+
+ // Use non-numeric keys to prevent V8 performance issues:
+ // https://github.com/facebook/react/pull/7232
+ var getKeyFromID = function (id) {
+ return '.' + id;
+ };
+ var getIDFromKey = function (key) {
+ return parseInt(key.substr(1), 10);
+ };
+
+ setItem = function (id, item) {
+ var key = getKeyFromID(id);
+ itemByKey[key] = item;
+ };
+ getItem = function (id) {
+ var key = getKeyFromID(id);
+ return itemByKey[key];
+ };
+ removeItem = function (id) {
+ var key = getKeyFromID(id);
+ delete itemByKey[key];
+ };
+ getItemIDs = function () {
+ return Object.keys(itemByKey).map(getIDFromKey);
+ };
+
+ addRoot = function (id) {
+ var key = getKeyFromID(id);
+ rootByKey[key] = true;
+ };
+ removeRoot = function (id) {
+ var key = getKeyFromID(id);
+ delete rootByKey[key];
+ };
+ getRootIDs = function () {
+ return Object.keys(rootByKey).map(getIDFromKey);
+ };
+}
+
+var unmountedIDs = [];
+
+function purgeDeep(id) {
+ var item = getItem(id);
+ if (item) {
+ var childIDs = item.childIDs;
+
+ removeItem(id);
+ childIDs.forEach(purgeDeep);
+ }
+}
+
+function describeComponentFrame(name, source, ownerName) {
+ return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
+}
+
+function getDisplayName(element) {
+ if (element == null) {
+ return '#empty';
+ } else if (typeof element === 'string' || typeof element === 'number') {
+ return '#text';
+ } else if (typeof element.type === 'string') {
+ return element.type;
+ } else {
+ return element.type.displayName || element.type.name || 'Unknown';
+ }
+}
+
+function describeID(id) {
+ var name = ReactComponentTreeHook.getDisplayName(id);
+ var element = ReactComponentTreeHook.getElement(id);
+ var ownerID = ReactComponentTreeHook.getOwnerID(id);
+ var ownerName;
+ if (ownerID) {
+ ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
+ }
+ false ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
+ return describeComponentFrame(name, element && element._source, ownerName);
+}
+
+var ReactComponentTreeHook = {
+ onSetChildren: function (id, nextChildIDs) {
+ var item = getItem(id);
+ !item ? false ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
+ item.childIDs = nextChildIDs;
+
+ for (var i = 0; i < nextChildIDs.length; i++) {
+ var nextChildID = nextChildIDs[i];
+ var nextChild = getItem(nextChildID);
+ !nextChild ? false ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
+ !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? false ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;
+ !nextChild.isMounted ? false ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
+ if (nextChild.parentID == null) {
+ nextChild.parentID = id;
+ // TODO: This shouldn't be necessary but mounting a new root during in
+ // componentWillMount currently causes not-yet-mounted components to
+ // be purged from our tree data so their parent id is missing.
+ }
+ !(nextChild.parentID === id) ? false ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;
+ }
+ },
+ onBeforeMountComponent: function (id, element, parentID) {
+ var item = {
+ element: element,
+ parentID: parentID,
+ text: null,
+ childIDs: [],
+ isMounted: false,
+ updateCount: 0
+ };
+ setItem(id, item);
+ },
+ onBeforeUpdateComponent: function (id, element) {
+ var item = getItem(id);
+ if (!item || !item.isMounted) {
+ // We may end up here as a result of setState() in componentWillUnmount().
+ // In this case, ignore the element.
+ return;
+ }
+ item.element = element;
+ },
+ onMountComponent: function (id) {
+ var item = getItem(id);
+ !item ? false ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
+ item.isMounted = true;
+ var isRoot = item.parentID === 0;
+ if (isRoot) {
+ addRoot(id);
+ }
+ },
+ onUpdateComponent: function (id) {
+ var item = getItem(id);
+ if (!item || !item.isMounted) {
+ // We may end up here as a result of setState() in componentWillUnmount().
+ // In this case, ignore the element.
+ return;
+ }
+ item.updateCount++;
+ },
+ onUnmountComponent: function (id) {
+ var item = getItem(id);
+ if (item) {
+ // We need to check if it exists.
+ // `item` might not exist if it is inside an error boundary, and a sibling
+ // error boundary child threw while mounting. Then this instance never
+ // got a chance to mount, but it still gets an unmounting event during
+ // the error boundary cleanup.
+ item.isMounted = false;
+ var isRoot = item.parentID === 0;
+ if (isRoot) {
+ removeRoot(id);
+ }
+ }
+ unmountedIDs.push(id);
+ },
+ purgeUnmountedComponents: function () {
+ if (ReactComponentTreeHook._preventPurging) {
+ // Should only be used for testing.
+ return;
+ }
+
+ for (var i = 0; i < unmountedIDs.length; i++) {
+ var id = unmountedIDs[i];
+ purgeDeep(id);
+ }
+ unmountedIDs.length = 0;
+ },
+ isMounted: function (id) {
+ var item = getItem(id);
+ return item ? item.isMounted : false;
+ },
+ getCurrentStackAddendum: function (topElement) {
+ var info = '';
+ if (topElement) {
+ var name = getDisplayName(topElement);
+ var owner = topElement._owner;
+ info += describeComponentFrame(name, topElement._source, owner && owner.getName());
+ }
+
+ var currentOwner = ReactCurrentOwner.current;
+ var id = currentOwner && currentOwner._debugID;
+
+ info += ReactComponentTreeHook.getStackAddendumByID(id);
+ return info;
+ },
+ getStackAddendumByID: function (id) {
+ var info = '';
+ while (id) {
+ info += describeID(id);
+ id = ReactComponentTreeHook.getParentID(id);
+ }
+ return info;
+ },
+ getChildIDs: function (id) {
+ var item = getItem(id);
+ return item ? item.childIDs : [];
+ },
+ getDisplayName: function (id) {
+ var element = ReactComponentTreeHook.getElement(id);
+ if (!element) {
+ return null;
+ }
+ return getDisplayName(element);
+ },
+ getElement: function (id) {
+ var item = getItem(id);
+ return item ? item.element : null;
+ },
+ getOwnerID: function (id) {
+ var element = ReactComponentTreeHook.getElement(id);
+ if (!element || !element._owner) {
+ return null;
+ }
+ return element._owner._debugID;
+ },
+ getParentID: function (id) {
+ var item = getItem(id);
+ return item ? item.parentID : null;
+ },
+ getSource: function (id) {
+ var item = getItem(id);
+ var element = item ? item.element : null;
+ var source = element != null ? element._source : null;
+ return source;
+ },
+ getText: function (id) {
+ var element = ReactComponentTreeHook.getElement(id);
+ if (typeof element === 'string') {
+ return element;
+ } else if (typeof element === 'number') {
+ return '' + element;
+ } else {
+ return null;
+ }
+ },
+ getUpdateCount: function (id) {
+ var item = getItem(id);
+ return item ? item.updateCount : 0;
+ },
+
+
+ getRootIDs: getRootIDs,
+ getRegisteredIDs: getItemIDs,
+
+ pushNonStandardWarningStack: function (isCreatingElement, currentSource) {
+ if (typeof console.reactStack !== 'function') {
+ return;
+ }
+
+ var stack = [];
+ var currentOwner = ReactCurrentOwner.current;
+ var id = currentOwner && currentOwner._debugID;
+
+ try {
+ if (isCreatingElement) {
+ stack.push({
+ name: id ? ReactComponentTreeHook.getDisplayName(id) : null,
+ fileName: currentSource ? currentSource.fileName : null,
+ lineNumber: currentSource ? currentSource.lineNumber : null
+ });
+ }
+
+ while (id) {
+ var element = ReactComponentTreeHook.getElement(id);
+ var parentID = ReactComponentTreeHook.getParentID(id);
+ var ownerID = ReactComponentTreeHook.getOwnerID(id);
+ var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null;
+ var source = element && element._source;
+ stack.push({
+ name: ownerName,
+ fileName: source ? source.fileName : null,
+ lineNumber: source ? source.lineNumber : null
+ });
+ id = parentID;
+ }
+ } catch (err) {
+ // Internal state is messed up.
+ // Stop building the stack (it's just a nice to have).
+ }
+
+ console.reactStack(stack);
+ },
+ popNonStandardWarningStack: function () {
+ if (typeof console.reactStackEnd !== 'function') {
+ return;
+ }
+ console.reactStackEnd();
+ }
+};
+
+module.exports = ReactComponentTreeHook;
+
+/***/ }),
+/* 160 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -10773,15 +11448,15 @@ module.exports = KeyEscapeUtils;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
-var ReactCurrentOwner = __webpack_require__(37);
-var ReactInstanceMap = __webpack_require__(86);
-var ReactInstrumentation = __webpack_require__(29);
-var ReactUpdates = __webpack_require__(31);
+var ReactCurrentOwner = __webpack_require__(36);
+var ReactInstanceMap = __webpack_require__(89);
+var ReactInstrumentation = __webpack_require__(27);
+var ReactUpdates = __webpack_require__(28);
var invariant = __webpack_require__(9);
-var warning = __webpack_require__(12);
+var warning = __webpack_require__(11);
function enqueueUpdate(internalInstance) {
ReactUpdates.enqueueUpdate(internalInstance);
@@ -10814,7 +11489,7 @@ function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
}
if (false) {
- process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + "within `render` or another component's constructor). Render methods " + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0;
+ process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + 'within `render` or another component\'s constructor). Render methods ' + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0;
}
return internalInstance;
@@ -10825,6 +11500,7 @@ function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
* reconciliation step.
*/
var ReactUpdateQueue = {
+
/**
* Checks whether or not this composite component is mounted.
* @param {ReactClass} publicInstance The instance we want to test.
@@ -10930,7 +11606,7 @@ var ReactUpdateQueue = {
* @param {object} completeState Next state.
* @internal
*/
- enqueueReplaceState: function (publicInstance, completeState, callback) {
+ enqueueReplaceState: function (publicInstance, completeState) {
var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState');
if (!internalInstance) {
@@ -10940,16 +11616,6 @@ var ReactUpdateQueue = {
internalInstance._pendingStateQueue = [completeState];
internalInstance._pendingReplaceState = true;
- // Future-proof 15.5
- if (callback !== undefined && callback !== null) {
- ReactUpdateQueue.validateCallback(callback, 'replaceState');
- if (internalInstance._pendingCallbacks) {
- internalInstance._pendingCallbacks.push(callback);
- } else {
- internalInstance._pendingCallbacks = [callback];
- }
- }
-
enqueueUpdate(internalInstance);
},
@@ -10991,12 +11657,13 @@ var ReactUpdateQueue = {
validateCallback: function (callback, callerName) {
!(!callback || typeof callback === 'function') ? false ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0;
}
+
};
module.exports = ReactUpdateQueue;
/***/ }),
-/* 154 */
+/* 161 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -11012,10 +11679,10 @@ module.exports = ReactUpdateQueue;
-var _assign = __webpack_require__(15);
+var _assign = __webpack_require__(13);
-var emptyFunction = __webpack_require__(24);
-var warning = __webpack_require__(12);
+var emptyFunction = __webpack_require__(22);
+var warning = __webpack_require__(11);
var validateDOMNesting = emptyFunction;
@@ -11123,6 +11790,7 @@ if (false) {
// but
case 'option':
return tag === '#text';
+
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
// No special behavior since these rules fall back to "in body" mode for
@@ -11131,20 +11799,25 @@ if (false) {
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
case 'tr':
return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
+
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
case 'tbody':
case 'thead':
case 'tfoot':
return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
+
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
case 'colgroup':
return tag === 'col' || tag === 'template';
+
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
case 'table':
return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
+
// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
case 'head':
return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
+
// https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
case 'html':
return tag === 'head' || tag === 'body';
@@ -11220,11 +11893,16 @@ if (false) {
case 'section':
case 'summary':
case 'ul':
+
case 'pre':
case 'listing':
+
case 'table':
+
case 'hr':
+
case 'xmp':
+
case 'h1':
case 'h2':
case 'h3':
@@ -11340,7 +12018,7 @@ if (false) {
tagDisplayName = 'Text nodes';
} else {
tagDisplayName = 'Whitespace text nodes';
- whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
+ whitespaceInfo = ' Make sure you don\'t have any extra whitespace between tags on ' + 'each line of your source code.';
}
} else {
tagDisplayName = '<' + childTag + '>';
@@ -11372,7 +12050,7 @@ if (false) {
module.exports = validateDOMNesting;
/***/ }),
-/* 155 */
+/* 162 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -11427,47 +12105,47 @@ function getEventCharCode(nativeEvent) {
module.exports = getEventCharCode;
/***/ }),
-/* 156 */
+/* 163 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(430);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Router__ = __webpack_require__(439);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return __WEBPACK_IMPORTED_MODULE_0__Router__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(244);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(250);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return __WEBPACK_IMPORTED_MODULE_1__Link__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(438);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__IndexLink__ = __webpack_require__(446);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexLink", function() { return __WEBPACK_IMPORTED_MODULE_2__IndexLink__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__withRouter__ = __webpack_require__(439);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__withRouter__ = __webpack_require__(447);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "withRouter", function() { return __WEBPACK_IMPORTED_MODULE_3__withRouter__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__ = __webpack_require__(440);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__ = __webpack_require__(448);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexRedirect", function() { return __WEBPACK_IMPORTED_MODULE_4__IndexRedirect__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(441);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__IndexRoute__ = __webpack_require__(449);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "IndexRoute", function() { return __WEBPACK_IMPORTED_MODULE_5__IndexRoute__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(245);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(251);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return __WEBPACK_IMPORTED_MODULE_6__Redirect__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(442);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(450);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouteUtils__ = __webpack_require__(45);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouteUtils__ = __webpack_require__(44);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createRoutes", function() { return __WEBPACK_IMPORTED_MODULE_8__RouteUtils__["b"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__RouterContext__ = __webpack_require__(158);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__RouterContext__ = __webpack_require__(165);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "RouterContext", function() { return __WEBPACK_IMPORTED_MODULE_9__RouterContext__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PropTypes__ = __webpack_require__(160);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__PropTypes__ = __webpack_require__(167);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "locationShape", function() { return __WEBPACK_IMPORTED_MODULE_10__PropTypes__["a"]; });
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "routerShape", function() { return __WEBPACK_IMPORTED_MODULE_10__PropTypes__["b"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(443);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__match__ = __webpack_require__(451);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "match", function() { return __WEBPACK_IMPORTED_MODULE_11__match__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(249);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__ = __webpack_require__(255);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "useRouterHistory", function() { return __WEBPACK_IMPORTED_MODULE_12__useRouterHistory__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(74);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__PatternUtils__ = __webpack_require__(79);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formatPattern", function() { return __WEBPACK_IMPORTED_MODULE_13__PatternUtils__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__ = __webpack_require__(448);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__ = __webpack_require__(456);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "applyRouterMiddleware", function() { return __WEBPACK_IMPORTED_MODULE_14__applyRouterMiddleware__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__browserHistory__ = __webpack_require__(449);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__browserHistory__ = __webpack_require__(457);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "browserHistory", function() { return __WEBPACK_IMPORTED_MODULE_15__browserHistory__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(452);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__hashHistory__ = __webpack_require__(460);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "hashHistory", function() { return __WEBPACK_IMPORTED_MODULE_16__hashHistory__["a"]; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(246);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__ = __webpack_require__(252);
/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createMemoryHistory", function() { return __WEBPACK_IMPORTED_MODULE_17__createMemoryHistory__["a"]; });
/* components */
@@ -11516,7 +12194,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/***/ }),
-/* 157 */
+/* 164 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -11607,21 +12285,17 @@ function mapAsync(array, work, callback) {
}
/***/ }),
-/* 158 */
+/* 165 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(20);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(17);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(39);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getRouteParams__ = __webpack_require__(437);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(159);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouteUtils__ = __webpack_require__(45);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__getRouteParams__ = __webpack_require__(445);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(166);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(44);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
@@ -11633,24 +12307,29 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
-
+var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_1_react___default.a.PropTypes,
+ array = _React$PropTypes.array,
+ func = _React$PropTypes.func,
+ object = _React$PropTypes.object;
/**
* A renders the component tree for a given router state
* and sets the history object and the current location in context.
*/
-var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({
+
+var RouterContext = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({
displayName: 'RouterContext',
- mixins: [Object(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__["a" /* ContextProvider */])('router')],
+
+ mixins: [__WEBPACK_IMPORTED_MODULE_3__ContextUtils__["a" /* ContextProvider */]('router')],
propTypes: {
- router: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"].isRequired,
- location: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"].isRequired,
- routes: __WEBPACK_IMPORTED_MODULE_3_prop_types__["array"].isRequired,
- params: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"].isRequired,
- components: __WEBPACK_IMPORTED_MODULE_3_prop_types__["array"].isRequired,
- createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__["func"].isRequired
+ router: object.isRequired,
+ location: object.isRequired,
+ routes: array.isRequired,
+ params: object.isRequired,
+ components: array.isRequired,
+ createElement: func.isRequired
},
getDefaultProps: function getDefaultProps() {
@@ -11661,7 +12340,7 @@ var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({
childContextTypes: {
- router: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"].isRequired
+ router: object.isRequired
},
getChildContext: function getChildContext() {
@@ -11689,7 +12368,7 @@ var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({
if (components == null) return element; // Don't create new children; use the grandchildren.
var route = routes[index];
- var routeParams = Object(__WEBPACK_IMPORTED_MODULE_4__getRouteParams__["a" /* default */])(route, params);
+ var routeParams = __WEBPACK_IMPORTED_MODULE_2__getRouteParams__["a" /* default */](route, params);
var props = {
location: location,
params: params,
@@ -11699,7 +12378,7 @@ var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({
routes: routes
};
- if (Object(__WEBPACK_IMPORTED_MODULE_6__RouteUtils__["c" /* isReactChildren */])(element)) {
+ if (__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["c" /* isReactChildren */](element)) {
props.children = element;
} else if (element) {
for (var prop in element) {
@@ -11727,7 +12406,7 @@ var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({
}, element);
}
- !(element === null || element === false || __WEBPACK_IMPORTED_MODULE_1_react___default.a.isValidElement(element)) ? false ? invariant(false, 'The root route must render a single element') : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0;
+ !(element === null || element === false || __WEBPACK_IMPORTED_MODULE_1_react___default.a.isValidElement(element)) ? false ? invariant(false, 'The root route must render a single element') : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0;
return element;
}
@@ -11736,14 +12415,14 @@ var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({
/* harmony default export */ __webpack_exports__["a"] = (RouterContext);
/***/ }),
-/* 159 */
+/* 166 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = ContextProvider;
/* harmony export (immutable) */ __webpack_exports__["b"] = ContextSubscriber;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
// Works around issues with context updates failing to propagate.
@@ -11751,9 +12430,9 @@ var RouterContext = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({
// https://github.com/facebook/react/issues/2517
// https://github.com/reactjs/react-router/issues/470
-var contextProviderShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({
- subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
- eventIndex: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.number.isRequired
+var contextProviderShape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape({
+ subscribe: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func.isRequired,
+ eventIndex: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].number.isRequired
});
function makeContextName(name) {
@@ -11861,36 +12540,42 @@ function ContextSubscriber(name) {
}
/***/ }),
-/* 160 */
+/* 167 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return routerShape; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return locationShape; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
-
-
-var routerShape = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["shape"])({
- push: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired,
- replace: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired,
- go: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired,
- goBack: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired,
- goForward: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired,
- setRouteLeaveHook: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired,
- isActive: __WEBPACK_IMPORTED_MODULE_0_prop_types__["func"].isRequired
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+
+
+var func = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func,
+ object = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object,
+ shape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape,
+ string = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string;
+
+
+var routerShape = shape({
+ push: func.isRequired,
+ replace: func.isRequired,
+ go: func.isRequired,
+ goBack: func.isRequired,
+ goForward: func.isRequired,
+ setRouteLeaveHook: func.isRequired,
+ isActive: func.isRequired
});
-var locationShape = Object(__WEBPACK_IMPORTED_MODULE_0_prop_types__["shape"])({
- pathname: __WEBPACK_IMPORTED_MODULE_0_prop_types__["string"].isRequired,
- search: __WEBPACK_IMPORTED_MODULE_0_prop_types__["string"].isRequired,
- state: __WEBPACK_IMPORTED_MODULE_0_prop_types__["object"],
- action: __WEBPACK_IMPORTED_MODULE_0_prop_types__["string"].isRequired,
- key: __WEBPACK_IMPORTED_MODULE_0_prop_types__["string"]
+var locationShape = shape({
+ pathname: string.isRequired,
+ search: string.isRequired,
+ state: object,
+ action: string.isRequired,
+ key: string
});
/***/ }),
-/* 161 */
+/* 168 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -11947,7 +12632,7 @@ module.exports = function hoistNonReactStatics(targetComponent, sourceComponent,
/***/ }),
-/* 162 */
+/* 169 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -11955,7 +12640,7 @@ module.exports = function hoistNonReactStatics(targetComponent, sourceComponent,
exports.__esModule = true;
-var _warning = __webpack_require__(17);
+var _warning = __webpack_require__(15);
var _warning2 = _interopRequireDefault(_warning);
@@ -11976,7 +12661,7 @@ var runTransitionHook = function runTransitionHook(hook, location, callback) {
exports.default = runTransitionHook;
/***/ }),
-/* 163 */
+/* 170 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -11984,28 +12669,28 @@ exports.default = runTransitionHook;
exports.__esModule = true;
-var _AsyncUtils = __webpack_require__(447);
+var _AsyncUtils = __webpack_require__(455);
-var _PathUtils = __webpack_require__(46);
+var _PathUtils = __webpack_require__(45);
-var _runTransitionHook = __webpack_require__(162);
+var _runTransitionHook = __webpack_require__(169);
var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);
-var _Actions = __webpack_require__(109);
+var _Actions = __webpack_require__(113);
-var _LocationUtils = __webpack_require__(75);
+var _LocationUtils = __webpack_require__(80);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var createHistory = function createHistory() {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- var getCurrentLocation = options.getCurrentLocation,
- getUserConfirmation = options.getUserConfirmation,
- pushLocation = options.pushLocation,
- replaceLocation = options.replaceLocation,
- go = options.go,
- keyLength = options.keyLength;
+ var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+ var getCurrentLocation = options.getCurrentLocation;
+ var getUserConfirmation = options.getUserConfirmation;
+ var pushLocation = options.pushLocation;
+ var replaceLocation = options.replaceLocation;
+ var go = options.go;
+ var keyLength = options.keyLength;
var currentLocation = void 0;
@@ -12134,7 +12819,7 @@ var createHistory = function createHistory() {
};
var createLocation = function createLocation(location, action) {
- var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : createKey();
+ var key = arguments.length <= 2 || arguments[2] === undefined ? createKey() : arguments[2];
return (0, _LocationUtils.createLocation)(location, action, key);
};
@@ -12158,7 +12843,7 @@ var createHistory = function createHistory() {
exports.default = createHistory;
/***/ }),
-/* 164 */
+/* 171 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -12168,7 +12853,7 @@ exports.__esModule = true;
var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
/***/ }),
-/* 165 */
+/* 172 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -12177,15 +12862,15 @@ var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.d
exports.__esModule = true;
exports.go = exports.replaceLocation = exports.pushLocation = exports.startListener = exports.getUserConfirmation = exports.getCurrentLocation = undefined;
-var _LocationUtils = __webpack_require__(75);
+var _LocationUtils = __webpack_require__(80);
-var _DOMUtils = __webpack_require__(110);
+var _DOMUtils = __webpack_require__(114);
-var _DOMStateStorage = __webpack_require__(250);
+var _DOMStateStorage = __webpack_require__(256);
-var _PathUtils = __webpack_require__(46);
+var _PathUtils = __webpack_require__(45);
-var _ExecutionEnvironment = __webpack_require__(164);
+var _ExecutionEnvironment = __webpack_require__(171);
var PopStateEvent = 'popstate';
var HashChangeEvent = 'hashchange';
@@ -12222,9 +12907,8 @@ var getUserConfirmation = exports.getUserConfirmation = function getUserConfirma
var startListener = exports.startListener = function startListener(listener) {
var handlePopState = function handlePopState(event) {
- if ((0, _DOMUtils.isExtraneousPopstateEvent)(event)) // Ignore extraneous popstate events in WebKit
- return;
- listener(_createLocation(event.state));
+ if (event.state !== undefined) // Ignore extraneous popstate events in WebKit
+ listener(_createLocation(event.state));
};
(0, _DOMUtils.addEventListener)(window, PopStateEvent, handlePopState);
@@ -12247,8 +12931,8 @@ var startListener = exports.startListener = function startListener(listener) {
};
var updateLocation = function updateLocation(location, updateState) {
- var state = location.state,
- key = location.key;
+ var state = location.state;
+ var key = location.key;
if (state !== undefined) (0, _DOMStateStorage.saveState)(key, state);
@@ -12273,13 +12957,13 @@ var go = exports.go = function go(n) {
};
/***/ }),
-/* 166 */
+/* 173 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(76);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(254);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(54);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(81);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(260);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(59);
@@ -12329,10 +13013,10 @@ var objectCtorString = funcToString.call(Object);
* // => true
*/
function isPlainObject(value) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) != objectTag) {
+ if (!__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */](value) || __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value) != objectTag) {
return false;
}
- var proto = Object(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */])(value);
+ var proto = __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */](value);
if (proto === null) {
return true;
}
@@ -12345,12 +13029,11 @@ function isPlainObject(value) {
/***/ }),
-/* 167 */
+/* 174 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prefix", function() { return prefix; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_INSERT", function() { return ARRAY_INSERT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_MOVE", function() { return ARRAY_MOVE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARRAY_POP", function() { return ARRAY_POP; });
@@ -12365,7 +13048,6 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BLUR", function() { return BLUR; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CHANGE", function() { return CHANGE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_SUBMIT", function() { return CLEAR_SUBMIT; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_SUBMIT_ERRORS", function() { return CLEAR_SUBMIT_ERRORS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CLEAR_ASYNC_ERROR", function() { return CLEAR_ASYNC_ERROR; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DESTROY", function() { return DESTROY; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FOCUS", function() { return FOCUS; });
@@ -12384,52 +13066,49 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNTOUCH", function() { return UNTOUCH; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_SYNC_ERRORS", function() { return UPDATE_SYNC_ERRORS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_SYNC_WARNINGS", function() { return UPDATE_SYNC_WARNINGS; });
-var prefix = '@@redux-form/';
-
-var ARRAY_INSERT = prefix + 'ARRAY_INSERT';
-var ARRAY_MOVE = prefix + 'ARRAY_MOVE';
-var ARRAY_POP = prefix + 'ARRAY_POP';
-var ARRAY_PUSH = prefix + 'ARRAY_PUSH';
-var ARRAY_REMOVE = prefix + 'ARRAY_REMOVE';
-var ARRAY_REMOVE_ALL = prefix + 'ARRAY_REMOVE_ALL';
-var ARRAY_SHIFT = prefix + 'ARRAY_SHIFT';
-var ARRAY_SPLICE = prefix + 'ARRAY_SPLICE';
-var ARRAY_UNSHIFT = prefix + 'ARRAY_UNSHIFT';
-var ARRAY_SWAP = prefix + 'ARRAY_SWAP';
-var AUTOFILL = prefix + 'AUTOFILL';
-var BLUR = prefix + 'BLUR';
-var CHANGE = prefix + 'CHANGE';
-var CLEAR_SUBMIT = prefix + 'CLEAR_SUBMIT';
-var CLEAR_SUBMIT_ERRORS = prefix + 'CLEAR_SUBMIT_ERRORS';
-var CLEAR_ASYNC_ERROR = prefix + 'CLEAR_ASYNC_ERROR';
-var DESTROY = prefix + 'DESTROY';
-var FOCUS = prefix + 'FOCUS';
-var INITIALIZE = prefix + 'INITIALIZE';
-var REGISTER_FIELD = prefix + 'REGISTER_FIELD';
-var RESET = prefix + 'RESET';
-var SET_SUBMIT_FAILED = prefix + 'SET_SUBMIT_FAILED';
-var SET_SUBMIT_SUCCEEDED = prefix + 'SET_SUBMIT_SUCCEEDED';
-var START_ASYNC_VALIDATION = prefix + 'START_ASYNC_VALIDATION';
-var START_SUBMIT = prefix + 'START_SUBMIT';
-var STOP_ASYNC_VALIDATION = prefix + 'STOP_ASYNC_VALIDATION';
-var STOP_SUBMIT = prefix + 'STOP_SUBMIT';
-var SUBMIT = prefix + 'SUBMIT';
-var TOUCH = prefix + 'TOUCH';
-var UNREGISTER_FIELD = prefix + 'UNREGISTER_FIELD';
-var UNTOUCH = prefix + 'UNTOUCH';
-var UPDATE_SYNC_ERRORS = prefix + 'UPDATE_SYNC_ERRORS';
-var UPDATE_SYNC_WARNINGS = prefix + 'UPDATE_SYNC_WARNINGS';
+var ARRAY_INSERT = '@@redux-form/ARRAY_INSERT';
+var ARRAY_MOVE = '@@redux-form/ARRAY_MOVE';
+var ARRAY_POP = '@@redux-form/ARRAY_POP';
+var ARRAY_PUSH = '@@redux-form/ARRAY_PUSH';
+var ARRAY_REMOVE = '@@redux-form/ARRAY_REMOVE';
+var ARRAY_REMOVE_ALL = '@@redux-form/ARRAY_REMOVE_ALL';
+var ARRAY_SHIFT = '@@redux-form/ARRAY_SHIFT';
+var ARRAY_SPLICE = '@@redux-form/ARRAY_SPLICE';
+var ARRAY_UNSHIFT = '@@redux-form/ARRAY_UNSHIFT';
+var ARRAY_SWAP = '@@redux-form/ARRAY_SWAP';
+var AUTOFILL = '@@redux-form/AUTOFILL';
+var BLUR = '@@redux-form/BLUR';
+var CHANGE = '@@redux-form/CHANGE';
+var CLEAR_SUBMIT = '@@redux-form/CLEAR_SUBMIT';
+var CLEAR_ASYNC_ERROR = '@redux-form/CLEAR_ASYNC_ERROR';
+var DESTROY = '@@redux-form/DESTROY';
+var FOCUS = '@@redux-form/FOCUS';
+var INITIALIZE = '@@redux-form/INITIALIZE';
+var REGISTER_FIELD = '@@redux-form/REGISTER_FIELD';
+var RESET = '@@redux-form/RESET';
+var SET_SUBMIT_FAILED = '@@redux-form/SET_SUBMIT_FAILED';
+var SET_SUBMIT_SUCCEEDED = '@@redux-form/SET_SUBMIT_SUCCEEDED';
+var START_ASYNC_VALIDATION = '@@redux-form/START_ASYNC_VALIDATION';
+var START_SUBMIT = '@@redux-form/START_SUBMIT';
+var STOP_ASYNC_VALIDATION = '@@redux-form/STOP_ASYNC_VALIDATION';
+var STOP_SUBMIT = '@@redux-form/STOP_SUBMIT';
+var SUBMIT = '@@redux-form/SUBMIT';
+var TOUCH = '@@redux-form/TOUCH';
+var UNREGISTER_FIELD = '@@redux-form/UNREGISTER_FIELD';
+var UNTOUCH = '@@redux-form/UNTOUCH';
+var UPDATE_SYNC_ERRORS = '@@redux-form/UPDATE_SYNC_ERRORS';
+var UPDATE_SYNC_WARNINGS = '@@redux-form/UPDATE_SYNC_WARNINGS';
/***/ }),
-/* 168 */
+/* 175 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mapCacheClear_js__ = __webpack_require__(504);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mapCacheDelete_js__ = __webpack_require__(520);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mapCacheGet_js__ = __webpack_require__(522);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mapCacheHas_js__ = __webpack_require__(523);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__ = __webpack_require__(524);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__mapCacheClear_js__ = __webpack_require__(503);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__mapCacheDelete_js__ = __webpack_require__(519);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__mapCacheGet_js__ = __webpack_require__(521);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__mapCacheHas_js__ = __webpack_require__(522);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__ = __webpack_require__(523);
@@ -12465,12 +13144,12 @@ MapCache.prototype.set = __WEBPACK_IMPORTED_MODULE_4__mapCacheSet_js__["a" /* de
/***/ }),
-/* 169 */
+/* 176 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(76);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObject_js__ = __webpack_require__(48);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(81);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObject_js__ = __webpack_require__(47);
@@ -12498,12 +13177,12 @@ var asyncTag = '[object AsyncFunction]',
* // => false
*/
function isFunction(value) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_1__isObject_js__["a" /* default */])(value)) {
+ if (!__WEBPACK_IMPORTED_MODULE_1__isObject_js__["a" /* default */](value)) {
return false;
}
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed arrays and other constructors.
- var tag = Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value);
+ var tag = __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
@@ -12511,69 +13190,32 @@ function isFunction(value) {
/***/ }),
-/* 170 */
+/* 177 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(32);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(29);
/* Built-in method references that are verified to be native. */
-var Map = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Map');
+var Map = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Map');
/* harmony default export */ __webpack_exports__["a"] = (Map);
/***/ }),
-/* 171 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__ = __webpack_require__(528);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(54);
-
-
-
-/**
- * The base implementation of `_.isEqual` which supports partial comparisons
- * and tracks traversed objects.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {boolean} bitmask The bitmask flags.
- * 1 - Unordered comparison
- * 2 - Partial comparison
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- */
-function baseIsEqual(value, other, bitmask, customizer, stack) {
- if (value === other) {
- return true;
- }
- if (value == null || other == null || (!Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && !Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(other))) {
- return value !== value && other !== other;
- }
- return Object(__WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__["a" /* default */])(value, other, bitmask, customizer, baseIsEqual, stack);
-}
-
-/* harmony default export */ __webpack_exports__["a"] = (baseIsEqual);
-
-
-/***/ }),
-/* 172 */
+/* 178 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(117);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stackClear_js__ = __webpack_require__(529);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stackDelete_js__ = __webpack_require__(530);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__stackGet_js__ = __webpack_require__(531);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stackHas_js__ = __webpack_require__(532);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__stackSet_js__ = __webpack_require__(533);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(120);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stackClear_js__ = __webpack_require__(528);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stackDelete_js__ = __webpack_require__(529);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__stackGet_js__ = __webpack_require__(530);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__stackHas_js__ = __webpack_require__(531);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__stackSet_js__ = __webpack_require__(532);
@@ -12604,59 +13246,67 @@ Stack.prototype.set = __WEBPACK_IMPORTED_MODULE_5__stackSet_js__["a" /* default
/***/ }),
-/* 173 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 179 */
+/***/ (function(module, exports) {
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(280);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeys_js__ = __webpack_require__(555);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(120);
+module.exports = function(originalModule) {
+ if(!originalModule.webpackPolyfill) {
+ var module = Object.create(originalModule);
+ // module.parent = undefined by default
+ if(!module.children) module.children = [];
+ Object.defineProperty(module, "loaded", {
+ enumerable: true,
+ get: function() {
+ return module.l;
+ }
+ });
+ Object.defineProperty(module, "id", {
+ enumerable: true,
+ get: function() {
+ return module.i;
+ }
+ });
+ Object.defineProperty(module, "exports", {
+ enumerable: true,
+ });
+ module.webpackPolyfill = 1;
+ }
+ return module;
+};
+/***/ }),
+/* 180 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+"use strict";
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
/**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
+ * Checks if `value` is likely a prototype object.
*
- * _.keys('hi');
- * // => ['0', '1']
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
*/
-function keys(object) {
- return Object(__WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */])(object) ? Object(__WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */])(object) : Object(__WEBPACK_IMPORTED_MODULE_1__baseKeys_js__["a" /* default */])(object);
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+
+ return value === proto;
}
-/* harmony default export */ __webpack_exports__["a"] = (keys);
+/* harmony default export */ __webpack_exports__["a"] = (isPrototype);
/***/ }),
-/* 174 */
+/* 181 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__ = __webpack_require__(550);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(54);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__ = __webpack_require__(540);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(59);
@@ -12687,8 +13337,8 @@ var propertyIsEnumerable = objectProto.propertyIsEnumerable;
* _.isArguments([1, 2, 3]);
* // => false
*/
-var isArguments = Object(__WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */])(function() { return arguments; }()) ? __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */] : function(value) {
- return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && hasOwnProperty.call(value, 'callee') &&
+var isArguments = __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */](function() { return arguments; }()) ? __WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /* default */] : function(value) {
+ return __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && hasOwnProperty.call(value, 'callee') &&
!propertyIsEnumerable.call(value, 'callee');
};
@@ -12696,12 +13346,54 @@ var isArguments = Object(__WEBPACK_IMPORTED_MODULE_0__baseIsArguments_js__["a" /
/***/ }),
-/* 175 */
+/* 182 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(32);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__ = __webpack_require__(551);
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (isLength);
+
+
+/***/ }),
+/* 183 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(29);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__ = __webpack_require__(542);
@@ -12741,40 +13433,47 @@ var isBuffer = nativeIsBuffer || __WEBPACK_IMPORTED_MODULE_1__stubFalse_js__["a"
/* harmony default export */ __webpack_exports__["a"] = (isBuffer);
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(176)(module)))
+/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(179)(module)))
/***/ }),
-/* 176 */
-/***/ (function(module, exports) {
+/* 184 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-module.exports = function(originalModule) {
- if(!originalModule.webpackPolyfill) {
- var module = Object.create(originalModule);
- // module.parent = undefined by default
- if(!module.children) module.children = [];
- Object.defineProperty(module, "loaded", {
- enumerable: true,
- get: function() {
- return module.l;
- }
- });
- Object.defineProperty(module, "id", {
- enumerable: true,
- get: function() {
- return module.i;
- }
- });
- Object.defineProperty(module, "exports", {
- enumerable: true,
- });
- module.webpackPolyfill = 1;
- }
- return module;
-};
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__ = __webpack_require__(543);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__ = __webpack_require__(544);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__ = __webpack_require__(545);
+
+
+
+
+/* Node.js helper references. */
+var nodeIsTypedArray = __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */].isTypedArray;
+
+/**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+var isTypedArray = nodeIsTypedArray ? __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__["a" /* default */](nodeIsTypedArray) : __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__["a" /* default */];
+
+/* harmony default export */ __webpack_exports__["a"] = (isTypedArray);
/***/ }),
-/* 177 */
+/* 185 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -12803,116 +13502,124 @@ function isIndex(value, length) {
/***/ }),
-/* 178 */
+/* 186 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__ = __webpack_require__(552);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseUnary_js__ = __webpack_require__(553);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__ = __webpack_require__(554);
-
-
-
-
-/* Node.js helper references. */
-var nodeIsTypedArray = __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */] && __WEBPACK_IMPORTED_MODULE_2__nodeUtil_js__["a" /* default */].isTypedArray;
-
/**
- * Checks if `value` is classified as a typed array.
+ * This method returns the first argument it receives.
*
* @static
+ * @since 0.1.0
* @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @category Util
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
* @example
*
- * _.isTypedArray(new Uint8Array);
- * // => true
+ * var object = { 'a': 1 };
*
- * _.isTypedArray([]);
- * // => false
+ * console.log(_.identity(object) === object);
+ * // => true
*/
-var isTypedArray = nodeIsTypedArray ? Object(__WEBPACK_IMPORTED_MODULE_1__baseUnary_js__["a" /* default */])(nodeIsTypedArray) : __WEBPACK_IMPORTED_MODULE_0__baseIsTypedArray_js__["a" /* default */];
+function identity(value) {
+ return value;
+}
-/* harmony default export */ __webpack_exports__["a"] = (isTypedArray);
+/* harmony default export */ __webpack_exports__["a"] = (identity);
/***/ }),
-/* 179 */
+/* 187 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/** Used as references for various `Number` constants. */
-var MAX_SAFE_INTEGER = 9007199254740991;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(281);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeys_js__ = __webpack_require__(562);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(124);
+
+
+
/**
- * Checks if `value` is a valid array-like length.
+ * Creates an array of the own enumerable property names of `object`.
*
- * **Note:** This method is loosely based on
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
*
* @static
+ * @since 0.1.0
* @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
* @example
*
- * _.isLength(3);
- * // => true
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
*
- * _.isLength(Number.MIN_VALUE);
- * // => false
+ * Foo.prototype.c = 3;
*
- * _.isLength(Infinity);
- * // => false
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
*
- * _.isLength('3');
- * // => false
+ * _.keys('hi');
+ * // => ['0', '1']
*/
-function isLength(value) {
- return typeof value == 'number' &&
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+function keys(object) {
+ return __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */](object) ? __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */](object) : __WEBPACK_IMPORTED_MODULE_1__baseKeys_js__["a" /* default */](object);
}
-/* harmony default export */ __webpack_exports__["a"] = (isLength);
+/* harmony default export */ __webpack_exports__["a"] = (keys);
/***/ }),
-/* 180 */
+/* 188 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__ = __webpack_require__(567);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(59);
+
+
/**
- * Checks if `value` is likely a prototype object.
+ * The base implementation of `_.isEqual` which supports partial comparisons
+ * and tracks traversed objects.
*
* @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {boolean} bitmask The bitmask flags.
+ * 1 - Unordered comparison
+ * 2 - Partial comparison
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
-function isPrototype(value) {
- var Ctor = value && value.constructor,
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
-
- return value === proto;
+function baseIsEqual(value, other, bitmask, customizer, stack) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && !__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](other))) {
+ return value !== value && other !== other;
+ }
+ return __WEBPACK_IMPORTED_MODULE_0__baseIsEqualDeep_js__["a" /* default */](value, other, bitmask, customizer, baseIsEqual, stack);
}
-/* harmony default export */ __webpack_exports__["a"] = (isPrototype);
+/* harmony default export */ __webpack_exports__["a"] = (baseIsEqual);
/***/ }),
-/* 181 */
+/* 189 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(33);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__ = __webpack_require__(115);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(30);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__ = __webpack_require__(118);
@@ -12929,12 +13636,12 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
*/
function isKey(value, object) {
- if (Object(__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */])(value)) {
+ if (__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */](value)) {
return false;
}
var type = typeof value;
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
- value == null || Object(__WEBPACK_IMPORTED_MODULE_1__isSymbol_js__["a" /* default */])(value)) {
+ value == null || __WEBPACK_IMPORTED_MODULE_1__isSymbol_js__["a" /* default */](value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
@@ -12945,46 +13652,29 @@ function isKey(value, object) {
/***/ }),
-/* 182 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 190 */
+/***/ (function(module, exports) {
-"use strict";
-/**
- * This method returns the first argument it receives.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Util
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'a': 1 };
- *
- * console.log(_.identity(object) === object);
- * // => true
- */
-function identity(value) {
- return value;
-}
+module.exports = isPromise;
-/* harmony default export */ __webpack_exports__["a"] = (identity);
+function isPromise(obj) {
+ return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
+}
/***/ }),
-/* 183 */
+/* 191 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hasError__ = __webpack_require__(609);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hasError__ = __webpack_require__(610);
var createIsValid = function createIsValid(structure) {
var getIn = structure.getIn,
keys = structure.keys;
- var hasError = Object(__WEBPACK_IMPORTED_MODULE_0__hasError__["a" /* default */])(structure);
+ var hasError = __WEBPACK_IMPORTED_MODULE_0__hasError__["a" /* default */](structure);
return function (form) {
var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
return getIn(state, 'form');
@@ -13026,44 +13716,54 @@ var createIsValid = function createIsValid(structure) {
/* harmony default export */ __webpack_exports__["a"] = (createIsValid);
/***/ }),
-/* 184 */
-/***/ (function(module, exports) {
+/* 192 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-module.exports = isPromise;
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(293);
-function isPromise(obj) {
- return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
-}
-/***/ }),
-/* 185 */
-/***/ (function(module, exports, __webpack_require__) {
+var customizer = function customizer(objectValue, otherValue, indexOrkey, object, other, stack) {
+ // https://lodash.com/docs/4.17.4#isEqualWith
+ if (stack) {
+ // Shallow compares
+ // For 1st level, stack === undefined.
+ // -> Do nothing (and implicitly return undefined so that it goes to compare 2nd level)
+ // For 2nd level and up, stack !== undefined.
+ // -> Compare by === operator
+ return objectValue === otherValue;
+ }
+};
-module.exports = { "default": __webpack_require__(662), __esModule: true };
+var shallowCompare = function shallowCompare(instance, nextProps, nextState) {
+ return !__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */](instance.props, nextProps, customizer) || !__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */](instance.state, nextState, customizer);
+};
+
+/* harmony default export */ __webpack_exports__["a"] = (shallowCompare);
/***/ }),
-/* 186 */
+/* 193 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
-var anObject = __webpack_require__(36);
-var dPs = __webpack_require__(668);
-var enumBugKeys = __webpack_require__(138);
-var IE_PROTO = __webpack_require__(136)('IE_PROTO');
-var Empty = function () { /* empty */ };
-var PROTOTYPE = 'prototype';
+var anObject = __webpack_require__(35)
+ , dPs = __webpack_require__(645)
+ , enumBugKeys = __webpack_require__(144)
+ , IE_PROTO = __webpack_require__(142)('IE_PROTO')
+ , Empty = function(){ /* empty */ }
+ , PROTOTYPE = 'prototype';
// Create object with fake `null` prototype: use iframe Object with cleared prototype
-var createDict = function () {
+var createDict = function(){
// Thrash, waste and sodomy: IE GC bug
- var iframe = __webpack_require__(131)('iframe');
- var i = enumBugKeys.length;
- var lt = '<';
- var gt = '>';
- var iframeDocument;
+ var iframe = __webpack_require__(137)('iframe')
+ , i = enumBugKeys.length
+ , lt = '<'
+ , gt = '>'
+ , iframeDocument;
iframe.style.display = 'none';
- __webpack_require__(297).appendChild(iframe);
+ __webpack_require__(299).appendChild(iframe);
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
// createDict = iframe.contentWindow.Object;
// html.removeChild(iframe);
@@ -13072,15 +13772,15 @@ var createDict = function () {
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
iframeDocument.close();
createDict = iframeDocument.F;
- while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
+ while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
return createDict();
};
-module.exports = Object.create || function create(O, Properties) {
+module.exports = Object.create || function create(O, Properties){
var result;
- if (O !== null) {
+ if(O !== null){
Empty[PROTOTYPE] = anObject(O);
- result = new Empty();
+ result = new Empty;
Empty[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
@@ -13090,86 +13790,62 @@ module.exports = Object.create || function create(O, Properties) {
/***/ }),
-/* 187 */
+/* 194 */
/***/ (function(module, exports, __webpack_require__) {
-exports.f = __webpack_require__(22);
-
+exports.f = __webpack_require__(24);
/***/ }),
-/* 188 */
+/* 195 */
/***/ (function(module, exports, __webpack_require__) {
-var global = __webpack_require__(23);
-var core = __webpack_require__(18);
-var LIBRARY = __webpack_require__(122);
-var wksExt = __webpack_require__(187);
-var defineProperty = __webpack_require__(35).f;
-module.exports = function (name) {
+var global = __webpack_require__(25)
+ , core = __webpack_require__(18)
+ , LIBRARY = __webpack_require__(126)
+ , wksExt = __webpack_require__(194)
+ , defineProperty = __webpack_require__(34).f;
+module.exports = function(name){
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
- if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
+ if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});
};
-
/***/ }),
-/* 189 */
+/* 196 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-
-
-exports.__esModule = true;
-
-var _from = __webpack_require__(302);
-
-var _from2 = _interopRequireDefault(_from);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-exports.default = function (arr) {
- if (Array.isArray(arr)) {
- for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
- arr2[i] = arr[i];
- }
-
- return arr2;
- } else {
- return (0, _from2.default)(arr);
- }
-};
+module.exports = { "default": __webpack_require__(664), __esModule: true };
/***/ }),
-/* 190 */
+/* 197 */
/***/ (function(module, exports, __webpack_require__) {
-var classof = __webpack_require__(191);
-var ITERATOR = __webpack_require__(22)('iterator');
-var Iterators = __webpack_require__(78);
-module.exports = __webpack_require__(18).getIteratorMethod = function (it) {
- if (it != undefined) return it[ITERATOR]
+var classof = __webpack_require__(198)
+ , ITERATOR = __webpack_require__(24)('iterator')
+ , Iterators = __webpack_require__(83);
+module.exports = __webpack_require__(18).getIteratorMethod = function(it){
+ if(it != undefined)return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
-
/***/ }),
-/* 191 */
+/* 198 */
/***/ (function(module, exports, __webpack_require__) {
// getting tag from 19.1.3.6 Object.prototype.toString()
-var cof = __webpack_require__(83);
-var TAG = __webpack_require__(22)('toStringTag');
-// ES3 wrong here
-var ARG = cof(function () { return arguments; }()) == 'Arguments';
+var cof = __webpack_require__(87)
+ , TAG = __webpack_require__(24)('toStringTag')
+ // ES3 wrong here
+ , ARG = cof(function(){ return arguments; }()) == 'Arguments';
// fallback for IE11 Script Access Denied error
-var tryGet = function (it, key) {
+var tryGet = function(it, key){
try {
return it[key];
- } catch (e) { /* empty */ }
+ } catch(e){ /* empty */ }
};
-module.exports = function (it) {
+module.exports = function(it){
var O, T, B;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
@@ -13180,9 +13856,8 @@ module.exports = function (it) {
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
};
-
/***/ }),
-/* 192 */
+/* 199 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -13207,7 +13882,7 @@ exports.default = {
};
/***/ }),
-/* 193 */
+/* 200 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -13225,7 +13900,7 @@ exports.default = function (str) {
module.exports = exports["default"];
/***/ }),
-/* 194 */
+/* 201 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -13244,7 +13919,7 @@ exports.default = function (value) {
module.exports = exports['default'];
/***/ }),
-/* 195 */
+/* 202 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -13290,7 +13965,7 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _Subheader = __webpack_require__(312);
+var _Subheader = __webpack_require__(316);
var _Subheader2 = _interopRequireDefault(_Subheader);
@@ -13354,7 +14029,7 @@ List.contextTypes = {
exports.default = List;
/***/ }),
-/* 196 */
+/* 203 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -13399,7 +14074,7 @@ exports.default = {
};
/***/ }),
-/* 197 */
+/* 204 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -13437,15 +14112,15 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactDom = __webpack_require__(19);
+var _reactDom = __webpack_require__(16);
var _reactDom2 = _interopRequireDefault(_reactDom);
-var _shallowEqual = __webpack_require__(58);
+var _shallowEqual = __webpack_require__(63);
var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
-var _autoPrefix = __webpack_require__(94);
+var _autoPrefix = __webpack_require__(96);
var _autoPrefix2 = _interopRequireDefault(_autoPrefix);
@@ -13453,7 +14128,7 @@ var _transitions = __webpack_require__(10);
var _transitions2 = _interopRequireDefault(_transitions);
-var _ScaleIn = __webpack_require__(731);
+var _ScaleIn = __webpack_require__(716);
var _ScaleIn2 = _interopRequireDefault(_ScaleIn);
@@ -13600,27 +14275,7 @@ FocusRipple.contextTypes = {
exports.default = FocusRipple;
/***/ }),
-/* 198 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = undefined;
-
-var _FlatButton = __webpack_require__(766);
-
-var _FlatButton2 = _interopRequireDefault(_FlatButton);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-exports.default = _FlatButton2.default;
-
-/***/ }),
-/* 199 */
+/* 205 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -13638,7 +14293,7 @@ var _objectWithoutProperties2 = __webpack_require__(8);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-var _toArray2 = __webpack_require__(315);
+var _toArray2 = __webpack_require__(319);
var _toArray3 = _interopRequireDefault(_toArray2);
@@ -13670,31 +14325,31 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactDom = __webpack_require__(19);
+var _reactDom = __webpack_require__(16);
var _reactDom2 = _interopRequireDefault(_reactDom);
-var _shallowEqual = __webpack_require__(58);
+var _shallowEqual = __webpack_require__(63);
var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
-var _ClickAwayListener = __webpack_require__(320);
+var _ClickAwayListener = __webpack_require__(206);
var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener);
-var _keycode = __webpack_require__(30);
+var _keycode = __webpack_require__(26);
var _keycode2 = _interopRequireDefault(_keycode);
-var _propTypes = __webpack_require__(41);
+var _propTypes = __webpack_require__(39);
var _propTypes2 = _interopRequireDefault(_propTypes);
-var _List = __webpack_require__(195);
+var _List = __webpack_require__(202);
var _List2 = _interopRequireDefault(_List);
-var _menuUtils = __webpack_require__(775);
+var _menuUtils = __webpack_require__(755);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -14306,7 +14961,7 @@ var _initialiseProps = function _initialiseProps() {
exports.default = Menu;
/***/ }),
-/* 200 */
+/* 206 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -14315,78 +14970,149 @@ exports.default = Menu;
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.default = undefined;
-var _RaisedButton = __webpack_require__(776);
+var _getPrototypeOf = __webpack_require__(3);
-var _RaisedButton2 = _interopRequireDefault(_RaisedButton);
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _classCallCheck2 = __webpack_require__(1);
-exports.default = _RaisedButton2.default;
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-/***/ }),
-/* 201 */
-/***/ (function(module, exports, __webpack_require__) {
+var _createClass2 = __webpack_require__(2);
-"use strict";
+var _createClass3 = _interopRequireDefault(_createClass2);
+var _possibleConstructorReturn2 = __webpack_require__(4);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.Toggle = exports.TextField = exports.Slider = exports.SelectField = exports.RadioButtonGroup = exports.TimePicker = exports.DatePicker = exports.Checkbox = exports.AutoComplete = undefined;
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-var _AutoComplete = __webpack_require__(777);
+var _inherits2 = __webpack_require__(5);
-var _AutoComplete2 = _interopRequireDefault(_AutoComplete);
+var _inherits3 = _interopRequireDefault(_inherits2);
-var _Checkbox = __webpack_require__(788);
+var _react = __webpack_require__(0);
-var _Checkbox2 = _interopRequireDefault(_Checkbox);
+var _reactDom = __webpack_require__(16);
-var _DatePicker = __webpack_require__(793);
+var _reactDom2 = _interopRequireDefault(_reactDom);
-var _DatePicker2 = _interopRequireDefault(_DatePicker);
+var _events = __webpack_require__(203);
-var _RadioButtonGroup = __webpack_require__(809);
+var _events2 = _interopRequireDefault(_events);
-var _RadioButtonGroup2 = _interopRequireDefault(_RadioButtonGroup);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _SelectField = __webpack_require__(814);
+var isDescendant = function isDescendant(el, target) {
+ if (target !== null) {
+ return el === target || isDescendant(el, target.parentNode);
+ }
+ return false;
+};
-var _SelectField2 = _interopRequireDefault(_SelectField);
+var clickAwayEvents = ['mouseup', 'touchend'];
+var bind = function bind(callback) {
+ return clickAwayEvents.forEach(function (event) {
+ return _events2.default.on(document, event, callback);
+ });
+};
+var unbind = function unbind(callback) {
+ return clickAwayEvents.forEach(function (event) {
+ return _events2.default.off(document, event, callback);
+ });
+};
-var _Slider = __webpack_require__(822);
+var ClickAwayListener = function (_Component) {
+ (0, _inherits3.default)(ClickAwayListener, _Component);
-var _Slider2 = _interopRequireDefault(_Slider);
+ function ClickAwayListener() {
+ var _ref;
-var _TextField = __webpack_require__(827);
+ var _temp, _this, _ret;
-var _TextField2 = _interopRequireDefault(_TextField);
+ (0, _classCallCheck3.default)(this, ClickAwayListener);
-var _TimePicker = __webpack_require__(828);
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
-var _TimePicker2 = _interopRequireDefault(_TimePicker);
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClickAwayListener.__proto__ || (0, _getPrototypeOf2.default)(ClickAwayListener)).call.apply(_ref, [this].concat(args))), _this), _this.handleClickAway = function (event) {
+ if (event.defaultPrevented) {
+ return;
+ }
-var _Toggle = __webpack_require__(842);
+ // IE11 support, which trigger the handleClickAway even after the unbind
+ if (_this.isCurrentlyMounted) {
+ var el = _reactDom2.default.findDOMNode(_this);
-var _Toggle2 = _interopRequireDefault(_Toggle);
+ if (document.documentElement.contains(event.target) && !isDescendant(el, event.target)) {
+ _this.props.onClickAway(event);
+ }
+ }
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
+
+ (0, _createClass3.default)(ClickAwayListener, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ this.isCurrentlyMounted = true;
+ if (this.props.onClickAway) {
+ bind(this.handleClickAway);
+ }
+ }
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate(prevProps) {
+ if (prevProps.onClickAway !== this.props.onClickAway) {
+ unbind(this.handleClickAway);
+ if (this.props.onClickAway) {
+ bind(this.handleClickAway);
+ }
+ }
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ this.isCurrentlyMounted = false;
+ unbind(this.handleClickAway);
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ return this.props.children;
+ }
+ }]);
+ return ClickAwayListener;
+}(_react.Component);
+
+ false ? ClickAwayListener.propTypes = {
+ children: _react.PropTypes.element,
+ onClickAway: _react.PropTypes.func
+} : void 0;
+exports.default = ClickAwayListener;
+
+/***/ }),
+/* 207 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = undefined;
+
+var _Checkbox = __webpack_require__(765);
+
+var _Checkbox2 = _interopRequireDefault(_Checkbox);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-exports.AutoComplete = _AutoComplete2.default;
-exports.Checkbox = _Checkbox2.default;
-exports.DatePicker = _DatePicker2.default;
-exports.TimePicker = _TimePicker2.default;
-exports.RadioButtonGroup = _RadioButtonGroup2.default;
-exports.SelectField = _SelectField2.default;
-exports.Slider = _Slider2.default;
-exports.TextField = _TextField2.default;
-exports.Toggle = _Toggle2.default;
+exports.default = _Checkbox2.default;
/***/ }),
-/* 202 */
+/* 208 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -14432,11 +15158,11 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactEventListener = __webpack_require__(42);
+var _reactEventListener = __webpack_require__(40);
var _reactEventListener2 = _interopRequireDefault(_reactEventListener);
-var _keycode = __webpack_require__(30);
+var _keycode = __webpack_require__(26);
var _keycode2 = _interopRequireDefault(_keycode);
@@ -14444,19 +15170,19 @@ var _transitions = __webpack_require__(10);
var _transitions2 = _interopRequireDefault(_transitions);
-var _FocusRipple = __webpack_require__(197);
+var _FocusRipple = __webpack_require__(204);
var _FocusRipple2 = _interopRequireDefault(_FocusRipple);
-var _TouchRipple = __webpack_require__(314);
+var _TouchRipple = __webpack_require__(318);
var _TouchRipple2 = _interopRequireDefault(_TouchRipple);
-var _Paper = __webpack_require__(34);
+var _Paper = __webpack_require__(32);
var _Paper2 = _interopRequireDefault(_Paper);
-var _warning = __webpack_require__(17);
+var _warning = __webpack_require__(15);
var _warning2 = _interopRequireDefault(_warning);
@@ -14843,7 +15569,7 @@ EnhancedSwitch.contextTypes = {
exports.default = EnhancedSwitch;
/***/ }),
-/* 203 */
+/* 209 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -14889,11 +15615,11 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactAddonsTransitionGroup = __webpack_require__(128);
+var _reactAddonsTransitionGroup = __webpack_require__(132);
var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup);
-var _SlideInChild = __webpack_require__(806);
+var _SlideInChild = __webpack_require__(783);
var _SlideInChild2 = _interopRequireDefault(_SlideInChild);
@@ -14983,7 +15709,7 @@ SlideIn.contextTypes = {
exports.default = SlideIn;
/***/ }),
-/* 204 */
+/* 210 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -14992,120 +15718,319 @@ exports.default = SlideIn;
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.email = email;
-exports.required = required;
-exports.simpleText = simpleText;
-exports.number = number;
-exports.minValue = minValue;
-exports.maxValue = maxValue;
-exports.fullName = fullName;
-function email(input) {
- var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
- return re.test(input) ? undefined : 'Please enter a valid email';
-}
+var countries = exports.countries = [{ "text": "USA", "value": "USA" }, { "text": "CANADA", "value": "CANADA" }, { "text": "JAPAN", "value": "JAPAN" }, { "text": "UK", "value": "GB" }, { "text": "UK (N. IRELAND)", "value": "NB" }, { "text": "AUSTRIA", "value": "AT" }, { "text": "BELARUS", "value": "BY" }, { "text": "BELGIUM", "value": "BE" }, { "text": "BULGARIA", "value": "BG" }, { "text": "CROATIA", "value": "HR" }, { "text": "CZECH REPUBLIC", "value": "CZ" }, { "text": "DENMARK", "value": "DK" }, { "text": "ESTONIA", "value": "EE" }, { "text": "FINLAND", "value": "FI" }, { "text": "FRANCE", "value": "FR" }, { "text": "GERMANY", "value": "DE" }, { "text": "GREECE", "value": "GR" }, { "text": "HUNGARY", "value": "HU" }, { "text": "ICELAND", "value": "IS" }, { "text": "IRELAND", "value": "IE" }, { "text": "ITALY", "value": "IT" }, { "text": "LATVIA", "value": "LV" }, { "text": "LITHUANIA", "value": "LT" }, { "text": "LUXEMBOURG", "value": "LU" }, { "text": "MONACO", "value": "MC" }, { "text": "NETHERLANDS", "value": "NL" }, { "text": "NORWAY", "value": "NO" }, { "text": "POLAND", "value": "PL" }, { "text": "PORTUGAL", "value": "PT" }, { "text": "ROMANIA", "value": "RO" }, { "text": "RUSSIA", "value": "RU" }, { "text": "SLOVAKIA", "value": "SK" }, { "text": "SLOVENIA", "value": "SI" }, { "text": "SPAIN", "value": "ES" }, { "text": "SWEDEN", "value": "SE" }, { "text": "SWITZERLAND", "value": "CH" }, { "text": "TURKEY", "value": "TR" }];
+var sizes = exports.sizes = ["Small", "Medium", "Large", "XLarge"];
+var sizesPants = exports.sizesPants = [28, 30, 32, 34, 36, 38, 40];
+var shoeSizes = exports.shoeSizes = [4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14, 14.5];
+var skateSizes = exports.skateSizes = [7.5, 7.7, 7.75, 7.8, 7.875, 8, 8.06, 8.125, 8.13, 8.18, 8.2, 8.25, 8.375, 8.38, 8.5, 8.6, 8.625, 8.75, 8.8, 9, 9.25, 9.5, 10, 10];
+var usaRegions = exports.usaRegions = [{ "text": "AL", "value": "AL" }, { "text": "AK", "value": "AK" }, { "text": "AS", "value": "AS" }, { "text": "AZ", "value": "AZ" }, { "text": "AR", "value": "AR" }, { "text": "CA", "value": "CA" }, { "text": "CO", "value": "CO" }, { "text": "CT", "value": "CT" }, { "text": "DE", "value": "DE" }, { "text": "DC", "value": "DC" }, { "text": "FM", "value": "FM" }, { "text": "FL", "value": "FL" }, { "text": "GA", "value": "GA" }, { "text": "GU", "value": "GU" }, { "text": "HI", "value": "HI" }, { "text": "ID", "value": "ID" }, { "text": "IL", "value": "IL" }, { "text": "IN", "value": "IN" }, { "text": "IA", "value": "IA" }, { "text": "KS", "value": "KS" }, { "text": "KY", "value": "KY" }, { "text": "LA", "value": "LA" }, { "text": "ME", "value": "ME" }, { "text": "MH", "value": "MH" }, { "text": "MD", "value": "MD" }, { "text": "MA", "value": "MA" }, { "text": "MI", "value": "MI" }, { "text": "MN", "value": "MN" }, { "text": "MS", "value": "MS" }, { "text": "MO", "value": "MO" }, { "text": "MT", "value": "MT" }, { "text": "NE", "value": "NE" }, { "text": "NV", "value": "NV" }, { "text": "NH", "value": "NH" }, { "text": "NJ", "value": "NJ" }, { "text": "NM", "value": "NM" }, { "text": "NY", "value": "NY" }, { "text": "NC", "value": "NC" }, { "text": "ND", "value": "ND" }, { "text": "MP", "value": "MP" }, { "text": "OH", "value": "OH" }, { "text": "OK", "value": "OK" }, { "text": "OR", "value": "OR" }, { "text": "PW", "value": "PW" }, { "text": "PA", "value": "PA" }, { "text": "PR", "value": "PR" }, { "text": "RI", "value": "RI" }, { "text": "SC", "value": "SC" }, { "text": "SD", "value": "SD" }, { "text": "TN", "value": "TN" }, { "text": "TX", "value": "TX" }, { "text": "UT", "value": "UT" }, { "text": "VT", "value": "VT" }, { "text": "VI", "value": "VI" }, { "text": "VA", "value": "VA" }, { "text": "WA", "value": "WA" }, { "text": "WV", "value": "WV" }, { "text": "WI", "value": "WI" }, { "text": "WY", "value": "WY" }];
+var canadaRegions = exports.canadaRegions = [{ "text": "AB", "value": "AB" }, { "text": "BC", "value": "BC" }, { "text": "MB", "value": "MB" }, { "text": "NB", "value": "NB" }, { "text": "NL", "value": "NL" }, { "text": "NT", "value": "NT" }, { "text": "NS", "value": "NS" }, { "text": "NU", "value": "NU" }, { "text": "ON", "value": "ON" }, { "text": "PE", "value": "PE" }, { "text": "QC", "value": "QC" }, { "text": "SK", "value": "SK" }, { "text": "YT", "value": "YT" }];
+var japanRegions = exports.japanRegions = [{ "text": " 北海道", "value": " 北海道" }, { "text": " 青森県", "value": " 青森県" }, { "text": " 岩手県", "value": " 岩手県" }, { "text": " 宮城県", "value": " 宮城県" }, { "text": " 秋田県", "value": " 秋田県" }, { "text": " 山形県", "value": " 山形県" }, { "text": " 福島県", "value": " 福島県" }, { "text": " 茨城県", "value": " 茨城県" }, { "text": " 栃木県", "value": " 栃木県" }, { "text": " 群馬県", "value": " 群馬県" }, { "text": " 埼玉県", "value": " 埼玉県" }, { "text": " 千葉県", "value": " 千葉県" }, { "text": " 東京都", "value": " 東京都" }, { "text": " 神奈川県", "value": " 神奈川県" }, { "text": " 新潟県", "value": " 新潟県" }, { "text": " 富山県", "value": " 富山県" }, { "text": " 石川県", "value": " 石川県" }, { "text": " 福井県", "value": " 福井県" }, { "text": " 山梨県", "value": " 山梨県" }, { "text": " 長野県", "value": " 長野県" }, { "text": " 岐阜県", "value": " 岐阜県" }, { "text": " 静岡県", "value": " 静岡県" }, { "text": " 愛知県", "value": " 愛知県" }, { "text": " 三重県", "value": " 三重県" }, { "text": " 滋賀県", "value": " 滋賀県" }, { "text": " 京都府", "value": " 京都府" }, { "text": " 大阪府", "value": " 大阪府" }, { "text": " 兵庫県", "value": " 兵庫県" }, { "text": " 奈良県", "value": " 奈良県" }, { "text": " 和歌山県", "value": " 和歌山県" }, { "text": " 鳥取県", "value": " 鳥取県" }, { "text": " 島根県", "value": " 島根県" }, { "text": " 岡山県", "value": " 岡山県" }, { "text": " 広島県", "value": " 広島県" }, { "text": " 山口県", "value": " 山口県" }, { "text": " 徳島県", "value": " 徳島県" }, { "text": " 香川県", "value": " 香川県" }, { "text": " 愛媛県", "value": " 愛媛県" }, { "text": " 高知県", "value": " 高知県" }, { "text": " 福岡県", "value": " 福岡県" }, { "text": " 佐賀県", "value": " 佐賀県" }, { "text": " 長崎県", "value": " 長崎県" }, { "text": " 熊本県", "value": " 熊本県" }, { "text": " 大分県", "value": " 大分県" }, { "text": " 宮崎県", "value": " 宮崎県" }, { "text": " 鹿児島県", "value": " 鹿児島県" }, { "text": " 沖縄県", "value": " 沖縄県" }];
+var categories = exports.categories = ['accessories', 't-shirts', 'pants', 'shorts', 'sweatshirts', 'tops-sweaters', 'shirts', 'jackets', 'shoes', 'skate'];
+var creditCards = exports.creditCards = [{ text: 'Visa', value: 'visa' }, { text: 'American Express', value: 'american_express' }, { text: 'Mastercard', value: 'master' }, { text: 'Solo', value: 'solo' }];
+var japanCreditCards = exports.japanCreditCards = creditCards.concat([{ text: 'JCB', value: 'jcb' }, { text: '代金引換', value: 'cod' }]).filter(function (x) {
+ return x.value !== 'solo';
+});
-function required(value) {
- var empty = typeof value !== 'number' && !value;
- return empty ? 'Required field' : undefined;
-}
+/***/ }),
+/* 211 */
+/***/ (function(module, exports, __webpack_require__) {
-function simpleText(value) {
- return value && !value.match(/^[0-9a-zA-Z_]{1,64}$/) ? 'Only use characters (a-z, A-Z, 0-9, _)' : undefined;
-}
+"use strict";
-function number(value) {
- return value && isNaN(Number(value)) ? 'This field must be a number' : undefined;
-}
-function minValue(min) {
- return function (value) {
- return value && value < min ? 'The value must be greater than ' + min : undefined;
- };
-}
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-function maxValue(max) {
- return function (value) {
- return value && value > max ? 'The value must be less than ' + max : undefined;
+var _extends2 = __webpack_require__(7);
+
+var _extends3 = _interopRequireDefault(_extends2);
+
+var _objectWithoutProperties2 = __webpack_require__(8);
+
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _simpleAssign = __webpack_require__(6);
+
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function getStyles(props, context) {
+ var tableRowColumn = context.muiTheme.tableRowColumn;
+
+
+ var styles = {
+ root: {
+ paddingLeft: tableRowColumn.spacing,
+ paddingRight: tableRowColumn.spacing,
+ height: tableRowColumn.height,
+ textAlign: 'left',
+ fontSize: 13,
+ overflow: 'hidden',
+ whiteSpace: 'nowrap',
+ textOverflow: 'ellipsis'
+ }
};
-}
-function fullName(value) {
- return !value || value.split(' ').filter(function (x) {
- return x !== "";
- }).length < 2 ? 'Please enter a valid full name (firstname + lastname)' : undefined;
+ if (_react2.default.Children.count(props.children) === 1 && !isNaN(props.children)) {
+ styles.textAlign = 'right';
+ }
+
+ return styles;
}
+var TableRowColumn = function (_Component) {
+ (0, _inherits3.default)(TableRowColumn, _Component);
+
+ function TableRowColumn() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, TableRowColumn);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableRowColumn.__proto__ || (0, _getPrototypeOf2.default)(TableRowColumn)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ hovered: false
+ }, _this.onClick = function (event) {
+ if (_this.props.onClick) {
+ _this.props.onClick(event, _this.props.columnNumber);
+ }
+ }, _this.onMouseEnter = function (event) {
+ if (_this.props.hoverable) {
+ _this.setState({ hovered: true });
+ if (_this.props.onHover) {
+ _this.props.onHover(event, _this.props.columnNumber);
+ }
+ }
+ }, _this.onMouseLeave = function (event) {
+ if (_this.props.hoverable) {
+ _this.setState({ hovered: false });
+ if (_this.props.onHoverExit) {
+ _this.props.onHoverExit(event, _this.props.columnNumber);
+ }
+ }
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
+
+ (0, _createClass3.default)(TableRowColumn, [{
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ children = _props.children,
+ className = _props.className,
+ columnNumber = _props.columnNumber,
+ hoverable = _props.hoverable,
+ onClick = _props.onClick,
+ onHover = _props.onHover,
+ onHoverExit = _props.onHoverExit,
+ style = _props.style,
+ other = (0, _objectWithoutProperties3.default)(_props, ['children', 'className', 'columnNumber', 'hoverable', 'onClick', 'onHover', 'onHoverExit', 'style']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
+
+ var styles = getStyles(this.props, this.context);
+
+ var handlers = {
+ onClick: this.onClick,
+ onMouseEnter: this.onMouseEnter,
+ onMouseLeave: this.onMouseLeave
+ };
+
+ return _react2.default.createElement(
+ 'td',
+ (0, _extends3.default)({
+ className: className,
+ style: prepareStyles((0, _simpleAssign2.default)(styles.root, style))
+ }, handlers, other),
+ children
+ );
+ }
+ }]);
+ return TableRowColumn;
+}(_react.Component);
+
+TableRowColumn.defaultProps = {
+ hoverable: false
+};
+TableRowColumn.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? TableRowColumn.propTypes = {
+ children: _react.PropTypes.node,
+ /**
+ * The css class name of the root element.
+ */
+ className: _react.PropTypes.string,
+ /**
+ * @ignore
+ * Number to identify the header row. This property
+ * is automatically populated when used with TableHeader.
+ */
+ columnNumber: _react.PropTypes.number,
+ /**
+ * @ignore
+ * If true, this column responds to hover events.
+ */
+ hoverable: _react.PropTypes.bool,
+ /** @ignore */
+ onClick: _react.PropTypes.func,
+ /** @ignore */
+ onHover: _react.PropTypes.func,
+ /**
+ * @ignore
+ * Callback function for hover exit event.
+ */
+ onHoverExit: _react.PropTypes.func,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
+} : void 0;
+exports.default = TableRowColumn;
+
/***/ }),
-/* 205 */
+/* 212 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-// 25.4.1.5 NewPromiseCapability(C)
-var aFunction = __webpack_require__(99);
-function PromiseCapability(C) {
- var resolve, reject;
- this.promise = new C(function ($$resolve, $$reject) {
- if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
- resolve = $$resolve;
- reject = $$reject;
- });
- this.resolve = aFunction(resolve);
- this.reject = aFunction(reject);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.createProfile = createProfile;
+exports.setProfileEnabled = setProfileEnabled;
+exports.removeProfile = removeProfile;
+exports.updateProfileSettings = updateProfileSettings;
+
+var _ActionTypes = __webpack_require__(49);
+
+var types = _interopRequireWildcard(_ActionTypes);
+
+var _notification = __webpack_require__(342);
+
+var _notification2 = _interopRequireDefault(_notification);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function createProfile(name, description) {
+ return function (dispatch) {
+ dispatch((0, _notification2.default)('Profile created'));
+ dispatch({
+ type: types.PROFILE_CREATE,
+ name: name,
+ description: description
+ });
+ };
}
-module.exports.f = function (C) {
- return new PromiseCapability(C);
-};
+function setProfileEnabled(name) {
+ return function (dispatch) {
+ dispatch((0, _notification2.default)('Profile set to ' + name));
+ dispatch({
+ type: types.PROFILE_SET_ENABLED,
+ name: name
+ });
+ };
+}
+
+function removeProfile(name) {
+ return function (dispatch) {
+ dispatch((0, _notification2.default)('Profile created'));
+ dispatch({
+ type: types.PROFILE_REMOVE,
+ name: name
+ });
+ };
+}
+function updateProfileSettings(profileName, shop, key, value) {
+ return function (dispatch) {
+ dispatch((0, _notification2.default)('Settings saved'));
+ var obj = {};
+ obj[key] = value;
+ dispatch({
+ type: types.PROFILE_UPDATE_SETTINGS,
+ name: profileName,
+ value: obj,
+ shop: shop
+ });
+ };
+}
/***/ }),
-/* 206 */
+/* 213 */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = !__webpack_require__(44) && !__webpack_require__(63)(function () {
- return Object.defineProperty(__webpack_require__(131)('div'), 'a', { get: function () { return 7; } }).a != 7;
+module.exports = !__webpack_require__(43) && !__webpack_require__(69)(function(){
+ return Object.defineProperty(__webpack_require__(137)('div'), 'a', {get: function(){ return 7; }}).a != 7;
});
-
/***/ }),
-/* 207 */
+/* 214 */
/***/ (function(module, exports, __webpack_require__) {
-var has = __webpack_require__(51);
-var toIObject = __webpack_require__(52);
-var arrayIndexOf = __webpack_require__(339)(false);
-var IE_PROTO = __webpack_require__(136)('IE_PROTO');
+var has = __webpack_require__(54)
+ , toIObject = __webpack_require__(55)
+ , arrayIndexOf = __webpack_require__(350)(false)
+ , IE_PROTO = __webpack_require__(142)('IE_PROTO');
-module.exports = function (object, names) {
- var O = toIObject(object);
- var i = 0;
- var result = [];
- var key;
- for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
+module.exports = function(object, names){
+ var O = toIObject(object)
+ , i = 0
+ , result = []
+ , key;
+ for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
// Don't enum bug & hidden keys
- while (names.length > i) if (has(O, key = names[i++])) {
+ while(names.length > i)if(has(O, key = names[i++])){
~arrayIndexOf(result, key) || result.push(key);
}
return result;
};
-
/***/ }),
-/* 208 */
+/* 215 */
/***/ (function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
-var cof = __webpack_require__(83);
-// eslint-disable-next-line no-prototype-builtins
-module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
+var cof = __webpack_require__(87);
+module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
return cof(it) == 'String' ? it.split('') : Object(it);
};
-
/***/ }),
-/* 209 */
+/* 216 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -15121,15 +16046,15 @@ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
-var _prodInvariant = __webpack_require__(85),
- _assign = __webpack_require__(15);
+var _prodInvariant = __webpack_require__(71),
+ _assign = __webpack_require__(13);
-var ReactNoopUpdateQueue = __webpack_require__(210);
+var ReactNoopUpdateQueue = __webpack_require__(217);
-var canDefineProperty = __webpack_require__(211);
-var emptyObject = __webpack_require__(102);
+var canDefineProperty = __webpack_require__(218);
+var emptyObject = __webpack_require__(105);
var invariant = __webpack_require__(9);
-var lowPriorityWarning = __webpack_require__(341);
+var lowPriorityWarning = __webpack_require__(352);
/**
* Base class helpers for the updating state of a component.
@@ -15253,7 +16178,7 @@ module.exports = {
};
/***/ }),
-/* 210 */
+/* 217 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -15269,7 +16194,7 @@ module.exports = {
-var warning = __webpack_require__(12);
+var warning = __webpack_require__(11);
function warnNoop(publicInstance, callerName) {
if (false) {
@@ -15353,7 +16278,7 @@ var ReactNoopUpdateQueue = {
module.exports = ReactNoopUpdateQueue;
/***/ }),
-/* 211 */
+/* 218 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -15384,81 +16309,228 @@ if (false) {
module.exports = canDefineProperty;
/***/ }),
-/* 212 */
+/* 219 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
- * Copyright 2014-present, Facebook, Inc.
+ * Copyright 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
- *
*/
-// The Symbol used to tag the ReactElement type. If there is no native Symbol
-// nor polyfill, then a plain number is used for performance.
+var PooledClass = __webpack_require__(353);
+var ReactElement = __webpack_require__(57);
-var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
+var emptyFunction = __webpack_require__(22);
+var traverseAllChildren = __webpack_require__(221);
-module.exports = REACT_ELEMENT_TYPE;
+var twoArgumentPooler = PooledClass.twoArgumentPooler;
+var fourArgumentPooler = PooledClass.fourArgumentPooler;
-/***/ }),
-/* 213 */
-/***/ (function(module, exports, __webpack_require__) {
+var userProvidedKeyEscapeRegex = /\/+/g;
+function escapeUserProvidedKey(text) {
+ return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
+}
-"use strict";
/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
+ * PooledClass representing the bookkeeping associated with performing a child
+ * traversal. Allows avoiding binding callbacks.
*
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
+ * @constructor ForEachBookKeeping
+ * @param {!function} forEachFunction Function to perform traversal with.
+ * @param {?*} forEachContext Context to perform context with.
*/
+function ForEachBookKeeping(forEachFunction, forEachContext) {
+ this.func = forEachFunction;
+ this.context = forEachContext;
+ this.count = 0;
+}
+ForEachBookKeeping.prototype.destructor = function () {
+ this.func = null;
+ this.context = null;
+ this.count = 0;
+};
+PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
+function forEachSingleChild(bookKeeping, child, name) {
+ var func = bookKeeping.func,
+ context = bookKeeping.context;
+ func.call(context, child, bookKeeping.count++);
+}
-// React 15.5 references this module, and assumes PropTypes are still callable in production.
-// Therefore we re-export development-only version with all the PropTypes checks here.
-// However if one is migrating to the `prop-types` npm library, they will go through the
-// `index.js` entry point, and it will branch depending on the environment.
-var factory = __webpack_require__(349);
-module.exports = function(isValidElement) {
- // It is still allowed in 15.5.
- var throwOnDirectAccess = false;
- return factory(isValidElement, throwOnDirectAccess);
+/**
+ * Iterates through children that are typically specified as `props.children`.
+ *
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach
+ *
+ * The provided forEachFunc(child, index) will be called for each
+ * leaf child.
+ *
+ * @param {?*} children Children tree container.
+ * @param {function(*, int)} forEachFunc
+ * @param {*} forEachContext Context for forEachContext.
+ */
+function forEachChildren(children, forEachFunc, forEachContext) {
+ if (children == null) {
+ return children;
+ }
+ var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
+ traverseAllChildren(children, forEachSingleChild, traverseContext);
+ ForEachBookKeeping.release(traverseContext);
+}
+
+/**
+ * PooledClass representing the bookkeeping associated with performing a child
+ * mapping. Allows avoiding binding callbacks.
+ *
+ * @constructor MapBookKeeping
+ * @param {!*} mapResult Object containing the ordered map of results.
+ * @param {!function} mapFunction Function to perform mapping with.
+ * @param {?*} mapContext Context to perform mapping with.
+ */
+function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
+ this.result = mapResult;
+ this.keyPrefix = keyPrefix;
+ this.func = mapFunction;
+ this.context = mapContext;
+ this.count = 0;
+}
+MapBookKeeping.prototype.destructor = function () {
+ this.result = null;
+ this.keyPrefix = null;
+ this.func = null;
+ this.context = null;
+ this.count = 0;
+};
+PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
+
+function mapSingleChildIntoContext(bookKeeping, child, childKey) {
+ var result = bookKeeping.result,
+ keyPrefix = bookKeeping.keyPrefix,
+ func = bookKeeping.func,
+ context = bookKeeping.context;
+
+
+ var mappedChild = func.call(context, child, bookKeeping.count++);
+ if (Array.isArray(mappedChild)) {
+ mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
+ } else if (mappedChild != null) {
+ if (ReactElement.isValidElement(mappedChild)) {
+ mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
+ // Keep both the (mapped) and old keys if they differ, just as
+ // traverseAllChildren used to do for objects as children
+ keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
+ }
+ result.push(mappedChild);
+ }
+}
+
+function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
+ var escapedPrefix = '';
+ if (prefix != null) {
+ escapedPrefix = escapeUserProvidedKey(prefix) + '/';
+ }
+ var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
+ traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
+ MapBookKeeping.release(traverseContext);
+}
+
+/**
+ * Maps children that are typically specified as `props.children`.
+ *
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map
+ *
+ * The provided mapFunction(child, key, index) will be called for each
+ * leaf child.
+ *
+ * @param {?*} children Children tree container.
+ * @param {function(*, int)} func The map function.
+ * @param {*} context Context for mapFunction.
+ * @return {object} Object containing the ordered map of results.
+ */
+function mapChildren(children, func, context) {
+ if (children == null) {
+ return children;
+ }
+ var result = [];
+ mapIntoWithKeyPrefixInternal(children, result, null, func, context);
+ return result;
+}
+
+function forEachSingleChildDummy(traverseContext, child, name) {
+ return null;
+}
+
+/**
+ * Count the number of children that are typically specified as
+ * `props.children`.
+ *
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count
+ *
+ * @param {?*} children Children tree container.
+ * @return {number} The number of children.
+ */
+function countChildren(children, context) {
+ return traverseAllChildren(children, forEachSingleChildDummy, null);
+}
+
+/**
+ * Flatten a children object (typically specified as `props.children`) and
+ * return an array with appropriately re-keyed children.
+ *
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray
+ */
+function toArray(children) {
+ var result = [];
+ mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
+ return result;
+}
+
+var ReactChildren = {
+ forEach: forEachChildren,
+ map: mapChildren,
+ mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
+ count: countChildren,
+ toArray: toArray
};
+module.exports = ReactChildren;
/***/ }),
-/* 214 */
+/* 220 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
- * Copyright 2013-present, Facebook, Inc.
+ * Copyright 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
*/
-var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
+// The Symbol used to tag the ReactElement type. If there is no native Symbol
+// nor polyfill, then a plain number is used for performance.
-module.exports = ReactPropTypesSecret;
+var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
+module.exports = REACT_ELEMENT_TYPE;
/***/ }),
-/* 215 */
+/* 221 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -15474,870 +16546,285 @@ module.exports = ReactPropTypesSecret;
-var _assign = __webpack_require__(15);
+var _prodInvariant = __webpack_require__(71);
-var emptyObject = __webpack_require__(102);
-var _invariant = __webpack_require__(9);
+var ReactCurrentOwner = __webpack_require__(36);
+var REACT_ELEMENT_TYPE = __webpack_require__(220);
-if (false) {
- var warning = require('fbjs/lib/warning');
-}
+var getIteratorFn = __webpack_require__(354);
+var invariant = __webpack_require__(9);
+var KeyEscapeUtils = __webpack_require__(222);
+var warning = __webpack_require__(11);
-var MIXINS_KEY = 'mixins';
+var SEPARATOR = '.';
+var SUBSEPARATOR = ':';
-// Helper function to allow the creation of anonymous functions which do not
-// have .name set to the name of the variable being assigned to.
-function identity(fn) {
- return fn;
-}
+/**
+ * This is inlined from ReactElement since this file is shared between
+ * isomorphic and renderers. We could extract this to a
+ *
+ */
-var ReactPropTypeLocationNames;
-if (false) {
- ReactPropTypeLocationNames = {
- prop: 'prop',
- context: 'context',
- childContext: 'child context'
- };
-} else {
- ReactPropTypeLocationNames = {};
+/**
+ * TODO: Test that a single child and an array with one item have the same key
+ * pattern.
+ */
+
+var didWarnAboutMaps = false;
+
+/**
+ * Generate a key string that identifies a component within a set.
+ *
+ * @param {*} component A component that could contain a manual key.
+ * @param {number} index Index that is used if a manual key is not provided.
+ * @return {string}
+ */
+function getComponentKey(component, index) {
+ // Do some typechecking here since we call this blindly. We want to ensure
+ // that we don't block potential future ES APIs.
+ if (component && typeof component === 'object' && component.key != null) {
+ // Explicit key
+ return KeyEscapeUtils.escape(component.key);
+ }
+ // Implicit key determined by the index in the set
+ return index.toString(36);
}
-function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
- /**
- * Policies that describe methods in `ReactClassInterface`.
- */
+/**
+ * @param {?*} children Children tree container.
+ * @param {!string} nameSoFar Name of the key path so far.
+ * @param {!function} callback Callback to invoke with each child found.
+ * @param {?*} traverseContext Used to pass information throughout the traversal
+ * process.
+ * @return {!number} The number of children in this subtree.
+ */
+function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
+ var type = typeof children;
- var injectedMixins = [];
+ if (type === 'undefined' || type === 'boolean') {
+ // All of the above are perceived as null.
+ children = null;
+ }
- /**
- * Composite components are higher-level components that compose other composite
- * or host components.
- *
- * To create a new type of `ReactClass`, pass a specification of
- * your new class to `React.createClass`. The only requirement of your class
- * specification is that you implement a `render` method.
- *
- * var MyComponent = React.createClass({
- * render: function() {
- * return
Hello World
;
- * }
- * });
- *
- * The class specification supports a specific protocol of methods that have
- * special meaning (e.g. `render`). See `ReactClassInterface` for
- * more the comprehensive protocol. Any other properties and methods in the
- * class specification will be available on the prototype.
- *
- * @interface ReactClassInterface
- * @internal
- */
- var ReactClassInterface = {
- /**
- * An array of Mixin objects to include when defining your component.
- *
- * @type {array}
- * @optional
- */
- mixins: 'DEFINE_MANY',
-
- /**
- * An object containing properties and methods that should be defined on
- * the component's constructor instead of its prototype (static methods).
- *
- * @type {object}
- * @optional
- */
- statics: 'DEFINE_MANY',
-
- /**
- * Definition of prop types for this component.
- *
- * @type {object}
- * @optional
- */
- propTypes: 'DEFINE_MANY',
-
- /**
- * Definition of context types for this component.
- *
- * @type {object}
- * @optional
- */
- contextTypes: 'DEFINE_MANY',
-
- /**
- * Definition of context types this component sets for its children.
- *
- * @type {object}
- * @optional
- */
- childContextTypes: 'DEFINE_MANY',
-
- // ==== Definition methods ====
-
- /**
- * Invoked when the component is mounted. Values in the mapping will be set on
- * `this.props` if that prop is not specified (i.e. using an `in` check).
- *
- * This method is invoked before `getInitialState` and therefore cannot rely
- * on `this.state` or use `this.setState`.
- *
- * @return {object}
- * @optional
- */
- getDefaultProps: 'DEFINE_MANY_MERGED',
-
- /**
- * Invoked once before the component is mounted. The return value will be used
- * as the initial value of `this.state`.
- *
- * getInitialState: function() {
- * return {
- * isOn: false,
- * fooBaz: new BazFoo()
- * }
- * }
- *
- * @return {object}
- * @optional
- */
- getInitialState: 'DEFINE_MANY_MERGED',
-
- /**
- * @return {object}
- * @optional
- */
- getChildContext: 'DEFINE_MANY_MERGED',
-
- /**
- * Uses props from `this.props` and state from `this.state` to render the
- * structure of the component.
- *
- * No guarantees are made about when or how often this method is invoked, so
- * it must not have side effects.
- *
- * render: function() {
- * var name = this.props.name;
- * return
Hello, {name}!
;
- * }
- *
- * @return {ReactComponent}
- * @required
- */
- render: 'DEFINE_ONCE',
-
- // ==== Delegate methods ====
-
- /**
- * Invoked when the component is initially created and about to be mounted.
- * This may have side effects, but any external subscriptions or data created
- * by this method must be cleaned up in `componentWillUnmount`.
- *
- * @optional
- */
- componentWillMount: 'DEFINE_MANY',
-
- /**
- * Invoked when the component has been mounted and has a DOM representation.
- * However, there is no guarantee that the DOM node is in the document.
- *
- * Use this as an opportunity to operate on the DOM when the component has
- * been mounted (initialized and rendered) for the first time.
- *
- * @param {DOMElement} rootNode DOM element representing the component.
- * @optional
- */
- componentDidMount: 'DEFINE_MANY',
-
- /**
- * Invoked before the component receives new props.
- *
- * Use this as an opportunity to react to a prop transition by updating the
- * state using `this.setState`. Current props are accessed via `this.props`.
- *
- * componentWillReceiveProps: function(nextProps, nextContext) {
- * this.setState({
- * likesIncreasing: nextProps.likeCount > this.props.likeCount
- * });
- * }
- *
- * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
- * transition may cause a state change, but the opposite is not true. If you
- * need it, you are probably looking for `componentWillUpdate`.
- *
- * @param {object} nextProps
- * @optional
- */
- componentWillReceiveProps: 'DEFINE_MANY',
-
- /**
- * Invoked while deciding if the component should be updated as a result of
- * receiving new props, state and/or context.
- *
- * Use this as an opportunity to `return false` when you're certain that the
- * transition to the new props/state/context will not require a component
- * update.
- *
- * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
- * return !equal(nextProps, this.props) ||
- * !equal(nextState, this.state) ||
- * !equal(nextContext, this.context);
- * }
- *
- * @param {object} nextProps
- * @param {?object} nextState
- * @param {?object} nextContext
- * @return {boolean} True if the component should update.
- * @optional
- */
- shouldComponentUpdate: 'DEFINE_ONCE',
-
- /**
- * Invoked when the component is about to update due to a transition from
- * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
- * and `nextContext`.
- *
- * Use this as an opportunity to perform preparation before an update occurs.
- *
- * NOTE: You **cannot** use `this.setState()` in this method.
- *
- * @param {object} nextProps
- * @param {?object} nextState
- * @param {?object} nextContext
- * @param {ReactReconcileTransaction} transaction
- * @optional
- */
- componentWillUpdate: 'DEFINE_MANY',
-
- /**
- * Invoked when the component's DOM representation has been updated.
- *
- * Use this as an opportunity to operate on the DOM when the component has
- * been updated.
- *
- * @param {object} prevProps
- * @param {?object} prevState
- * @param {?object} prevContext
- * @param {DOMElement} rootNode DOM element representing the component.
- * @optional
- */
- componentDidUpdate: 'DEFINE_MANY',
-
- /**
- * Invoked when the component is about to be removed from its parent and have
- * its DOM representation destroyed.
- *
- * Use this as an opportunity to deallocate any external resources.
- *
- * NOTE: There is no `componentDidUnmount` since your component will have been
- * destroyed by that point.
- *
- * @optional
- */
- componentWillUnmount: 'DEFINE_MANY',
-
- // ==== Advanced methods ====
+ if (children === null || type === 'string' || type === 'number' ||
+ // The following is inlined from ReactElement. This means we can optimize
+ // some checks. React Fiber also inlines this logic for similar purposes.
+ type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
+ callback(traverseContext, children,
+ // If it's the only child, treat the name as if it was wrapped in an array
+ // so that it's consistent if the number of children grows.
+ nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
+ return 1;
+ }
- /**
- * Updates the component's currently mounted DOM representation.
- *
- * By default, this implements React's rendering and reconciliation algorithm.
- * Sophisticated clients may wish to override this.
- *
- * @param {ReactReconcileTransaction} transaction
- * @internal
- * @overridable
- */
- updateComponent: 'OVERRIDE_BASE'
- };
+ var child;
+ var nextName;
+ var subtreeCount = 0; // Count of children found in the current subtree.
+ var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
- /**
- * Mapping from class specification keys to special processing functions.
- *
- * Although these are declared like instance properties in the specification
- * when defining classes using `React.createClass`, they are actually static
- * and are accessible on the constructor instead of the prototype. Despite
- * being static, they must be defined outside of the "statics" key under
- * which all other static methods are defined.
- */
- var RESERVED_SPEC_KEYS = {
- displayName: function(Constructor, displayName) {
- Constructor.displayName = displayName;
- },
- mixins: function(Constructor, mixins) {
- if (mixins) {
- for (var i = 0; i < mixins.length; i++) {
- mixSpecIntoComponent(Constructor, mixins[i]);
+ if (Array.isArray(children)) {
+ for (var i = 0; i < children.length; i++) {
+ child = children[i];
+ nextName = nextNamePrefix + getComponentKey(child, i);
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
+ }
+ } else {
+ var iteratorFn = getIteratorFn(children);
+ if (iteratorFn) {
+ var iterator = iteratorFn.call(children);
+ var step;
+ if (iteratorFn !== children.entries) {
+ var ii = 0;
+ while (!(step = iterator.next()).done) {
+ child = step.value;
+ nextName = nextNamePrefix + getComponentKey(child, ii++);
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
}
- }
- },
- childContextTypes: function(Constructor, childContextTypes) {
- if (false) {
- validateTypeDef(Constructor, childContextTypes, 'childContext');
- }
- Constructor.childContextTypes = _assign(
- {},
- Constructor.childContextTypes,
- childContextTypes
- );
- },
- contextTypes: function(Constructor, contextTypes) {
- if (false) {
- validateTypeDef(Constructor, contextTypes, 'context');
- }
- Constructor.contextTypes = _assign(
- {},
- Constructor.contextTypes,
- contextTypes
- );
- },
- /**
- * Special case getDefaultProps which should move into statics but requires
- * automatic merging.
- */
- getDefaultProps: function(Constructor, getDefaultProps) {
- if (Constructor.getDefaultProps) {
- Constructor.getDefaultProps = createMergedResultFunction(
- Constructor.getDefaultProps,
- getDefaultProps
- );
} else {
- Constructor.getDefaultProps = getDefaultProps;
- }
- },
- propTypes: function(Constructor, propTypes) {
- if (false) {
- validateTypeDef(Constructor, propTypes, 'prop');
- }
- Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
- },
- statics: function(Constructor, statics) {
- mixStaticSpecIntoComponent(Constructor, statics);
- },
- autobind: function() {}
- };
-
- function validateTypeDef(Constructor, typeDef, location) {
- for (var propName in typeDef) {
- if (typeDef.hasOwnProperty(propName)) {
- // use a warning instead of an _invariant so components
- // don't show up in prod but only in __DEV__
if (false) {
- warning(
- typeof typeDef[propName] === 'function',
- '%s: %s type `%s` is invalid; it must be a function, usually from ' +
- 'React.PropTypes.',
- Constructor.displayName || 'ReactClass',
- ReactPropTypeLocationNames[location],
- propName
- );
+ var mapsAsChildrenAddendum = '';
+ if (ReactCurrentOwner.current) {
+ var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
+ if (mapsAsChildrenOwnerName) {
+ mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
+ }
+ }
+ process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
+ didWarnAboutMaps = true;
+ }
+ // Iterator will provide entry [k,v] tuples rather than values.
+ while (!(step = iterator.next()).done) {
+ var entry = step.value;
+ if (entry) {
+ child = entry[1];
+ nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
+ }
}
}
- }
- }
-
- function validateMethodOverride(isAlreadyDefined, name) {
- var specPolicy = ReactClassInterface.hasOwnProperty(name)
- ? ReactClassInterface[name]
- : null;
-
- // Disallow overriding of base class methods unless explicitly allowed.
- if (ReactClassMixin.hasOwnProperty(name)) {
- _invariant(
- specPolicy === 'OVERRIDE_BASE',
- 'ReactClassInterface: You are attempting to override ' +
- '`%s` from your class specification. Ensure that your method names ' +
- 'do not overlap with React methods.',
- name
- );
- }
-
- // Disallow defining methods more than once unless explicitly allowed.
- if (isAlreadyDefined) {
- _invariant(
- specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
- 'ReactClassInterface: You are attempting to define ' +
- '`%s` on your component more than once. This conflict may be due ' +
- 'to a mixin.',
- name
- );
- }
- }
-
- /**
- * Mixin helper which handles policy validation and reserved
- * specification keys when building React classes.
- */
- function mixSpecIntoComponent(Constructor, spec) {
- if (!spec) {
+ } else if (type === 'object') {
+ var addendum = '';
if (false) {
- var typeofSpec = typeof spec;
- var isMixinValid = typeofSpec === 'object' && spec !== null;
-
- if (process.env.NODE_ENV !== 'production') {
- warning(
- isMixinValid,
- "%s: You're attempting to include a mixin that is either null " +
- 'or not an object. Check the mixins included by the component, ' +
- 'as well as any mixins they include themselves. ' +
- 'Expected object but got %s.',
- Constructor.displayName || 'ReactClass',
- spec === null ? null : typeofSpec
- );
+ addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
+ if (children._isReactElement) {
+ addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.';
}
- }
-
- return;
- }
-
- _invariant(
- typeof spec !== 'function',
- "ReactClass: You're attempting to " +
- 'use a component class or function as a mixin. Instead, just use a ' +
- 'regular object.'
- );
- _invariant(
- !isValidElement(spec),
- "ReactClass: You're attempting to " +
- 'use a component as a mixin. Instead, just use a regular object.'
- );
-
- var proto = Constructor.prototype;
- var autoBindPairs = proto.__reactAutoBindPairs;
-
- // By handling mixins before any other properties, we ensure the same
- // chaining order is applied to methods with DEFINE_MANY policy, whether
- // mixins are listed before or after these methods in the spec.
- if (spec.hasOwnProperty(MIXINS_KEY)) {
- RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
- }
-
- for (var name in spec) {
- if (!spec.hasOwnProperty(name)) {
- continue;
- }
-
- if (name === MIXINS_KEY) {
- // We have already handled mixins in a special case above.
- continue;
- }
-
- var property = spec[name];
- var isAlreadyDefined = proto.hasOwnProperty(name);
- validateMethodOverride(isAlreadyDefined, name);
-
- if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
- RESERVED_SPEC_KEYS[name](Constructor, property);
- } else {
- // Setup methods on prototype:
- // The following member methods should not be automatically bound:
- // 1. Expected ReactClass methods (in the "interface").
- // 2. Overridden methods (that were mixed in).
- var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
- var isFunction = typeof property === 'function';
- var shouldAutoBind =
- isFunction &&
- !isReactClassMethod &&
- !isAlreadyDefined &&
- spec.autobind !== false;
-
- if (shouldAutoBind) {
- autoBindPairs.push(name, property);
- proto[name] = property;
- } else {
- if (isAlreadyDefined) {
- var specPolicy = ReactClassInterface[name];
-
- // These cases should already be caught by validateMethodOverride.
- _invariant(
- isReactClassMethod &&
- (specPolicy === 'DEFINE_MANY_MERGED' ||
- specPolicy === 'DEFINE_MANY'),
- 'ReactClass: Unexpected spec policy %s for key %s ' +
- 'when mixing in component specs.',
- specPolicy,
- name
- );
-
- // For methods which are defined more than once, call the existing
- // methods before calling the new property, merging if appropriate.
- if (specPolicy === 'DEFINE_MANY_MERGED') {
- proto[name] = createMergedResultFunction(proto[name], property);
- } else if (specPolicy === 'DEFINE_MANY') {
- proto[name] = createChainedFunction(proto[name], property);
- }
- } else {
- proto[name] = property;
- if (false) {
- // Add verbose displayName to the function, which helps when looking
- // at profiling tools.
- if (typeof property === 'function' && spec.displayName) {
- proto[name].displayName = spec.displayName + '_' + name;
- }
- }
+ if (ReactCurrentOwner.current) {
+ var name = ReactCurrentOwner.current.getName();
+ if (name) {
+ addendum += ' Check the render method of `' + name + '`.';
}
}
}
+ var childrenString = String(children);
+ true ? false ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
}
}
- function mixStaticSpecIntoComponent(Constructor, statics) {
- if (!statics) {
- return;
- }
- for (var name in statics) {
- var property = statics[name];
- if (!statics.hasOwnProperty(name)) {
- continue;
- }
-
- var isReserved = name in RESERVED_SPEC_KEYS;
- _invariant(
- !isReserved,
- 'ReactClass: You are attempting to define a reserved ' +
- 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
- 'as an instance property instead; it will still be accessible on the ' +
- 'constructor.',
- name
- );
+ return subtreeCount;
+}
- var isInherited = name in Constructor;
- _invariant(
- !isInherited,
- 'ReactClass: You are attempting to define ' +
- '`%s` on your component more than once. This conflict may be ' +
- 'due to a mixin.',
- name
- );
- Constructor[name] = property;
- }
+/**
+ * Traverses children that are typically specified as `props.children`, but
+ * might also be specified through attributes:
+ *
+ * - `traverseAllChildren(this.props.children, ...)`
+ * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
+ *
+ * The `traverseContext` is an optional argument that is passed through the
+ * entire traversal. It can be used to store accumulations or anything else that
+ * the callback might find relevant.
+ *
+ * @param {?*} children Children tree object.
+ * @param {!function} callback To invoke upon traversing each child.
+ * @param {?*} traverseContext Context for traversal.
+ * @return {!number} The number of children in this subtree.
+ */
+function traverseAllChildren(children, callback, traverseContext) {
+ if (children == null) {
+ return 0;
}
- /**
- * Merge two objects, but throw if both contain the same key.
- *
- * @param {object} one The first object, which is mutated.
- * @param {object} two The second object
- * @return {object} one after it has been mutated to contain everything in two.
- */
- function mergeIntoWithNoDuplicateKeys(one, two) {
- _invariant(
- one && two && typeof one === 'object' && typeof two === 'object',
- 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
- );
-
- for (var key in two) {
- if (two.hasOwnProperty(key)) {
- _invariant(
- one[key] === undefined,
- 'mergeIntoWithNoDuplicateKeys(): ' +
- 'Tried to merge two objects with the same key: `%s`. This conflict ' +
- 'may be due to a mixin; in particular, this may be caused by two ' +
- 'getInitialState() or getDefaultProps() methods returning objects ' +
- 'with clashing keys.',
- key
- );
- one[key] = two[key];
- }
- }
- return one;
- }
+ return traverseAllChildrenImpl(children, '', callback, traverseContext);
+}
- /**
- * Creates a function that invokes two functions and merges their return values.
- *
- * @param {function} one Function to invoke first.
- * @param {function} two Function to invoke second.
- * @return {function} Function that invokes the two argument functions.
- * @private
- */
- function createMergedResultFunction(one, two) {
- return function mergedResult() {
- var a = one.apply(this, arguments);
- var b = two.apply(this, arguments);
- if (a == null) {
- return b;
- } else if (b == null) {
- return a;
- }
- var c = {};
- mergeIntoWithNoDuplicateKeys(c, a);
- mergeIntoWithNoDuplicateKeys(c, b);
- return c;
- };
- }
+module.exports = traverseAllChildren;
- /**
- * Creates a function that invokes two functions and ignores their return vales.
- *
- * @param {function} one Function to invoke first.
- * @param {function} two Function to invoke second.
- * @return {function} Function that invokes the two argument functions.
- * @private
- */
- function createChainedFunction(one, two) {
- return function chainedFunction() {
- one.apply(this, arguments);
- two.apply(this, arguments);
- };
- }
+/***/ }),
+/* 222 */
+/***/ (function(module, exports, __webpack_require__) {
- /**
- * Binds a method to the component.
- *
- * @param {object} component Component whose method is going to be bound.
- * @param {function} method Method to be bound.
- * @return {function} The bound method.
- */
- function bindAutoBindMethod(component, method) {
- var boundMethod = method.bind(component);
- if (false) {
- boundMethod.__reactBoundContext = component;
- boundMethod.__reactBoundMethod = method;
- boundMethod.__reactBoundArguments = null;
- var componentName = component.constructor.displayName;
- var _bind = boundMethod.bind;
- boundMethod.bind = function(newThis) {
- for (
- var _len = arguments.length,
- args = Array(_len > 1 ? _len - 1 : 0),
- _key = 1;
- _key < _len;
- _key++
- ) {
- args[_key - 1] = arguments[_key];
- }
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
- // User is trying to bind() an autobound method; we effectively will
- // ignore the value of "this" that the user is trying to use, so
- // let's warn.
- if (newThis !== component && newThis !== null) {
- if (process.env.NODE_ENV !== 'production') {
- warning(
- false,
- 'bind(): React component methods may only be bound to the ' +
- 'component instance. See %s',
- componentName
- );
- }
- } else if (!args.length) {
- if (process.env.NODE_ENV !== 'production') {
- warning(
- false,
- 'bind(): You are binding a component method to the component. ' +
- 'React does this for you automatically in a high-performance ' +
- 'way, so you can safely remove this call. See %s',
- componentName
- );
- }
- return boundMethod;
- }
- var reboundMethod = _bind.apply(boundMethod, arguments);
- reboundMethod.__reactBoundContext = component;
- reboundMethod.__reactBoundMethod = method;
- reboundMethod.__reactBoundArguments = args;
- return reboundMethod;
- };
- }
- return boundMethod;
- }
- /**
- * Binds all auto-bound methods in a component.
- *
- * @param {object} component Component whose method is going to be bound.
- */
- function bindAutoBindMethods(component) {
- var pairs = component.__reactAutoBindPairs;
- for (var i = 0; i < pairs.length; i += 2) {
- var autoBindKey = pairs[i];
- var method = pairs[i + 1];
- component[autoBindKey] = bindAutoBindMethod(component, method);
- }
- }
- var IsMountedPreMixin = {
- componentDidMount: function() {
- this.__isMounted = true;
- }
- };
+/**
+ * Escape and wrap key so it is safe to use as a reactid
+ *
+ * @param {string} key to be escaped.
+ * @return {string} the escaped key.
+ */
- var IsMountedPostMixin = {
- componentWillUnmount: function() {
- this.__isMounted = false;
- }
+function escape(key) {
+ var escapeRegex = /[=:]/g;
+ var escaperLookup = {
+ '=': '=0',
+ ':': '=2'
};
+ var escapedString = ('' + key).replace(escapeRegex, function (match) {
+ return escaperLookup[match];
+ });
- /**
- * Add more to the ReactClass base class. These are all legacy features and
- * therefore not already part of the modern ReactComponent.
- */
- var ReactClassMixin = {
- /**
- * TODO: This will be deprecated because state should always keep a consistent
- * type signature and the only use case for this, is to avoid that.
- */
- replaceState: function(newState, callback) {
- this.updater.enqueueReplaceState(this, newState, callback);
- },
+ return '$' + escapedString;
+}
- /**
- * Checks whether or not this composite component is mounted.
- * @return {boolean} True if mounted, false otherwise.
- * @protected
- * @final
- */
- isMounted: function() {
- if (false) {
- warning(
- this.__didWarnIsMounted,
- '%s: isMounted is deprecated. Instead, make sure to clean up ' +
- 'subscriptions and pending requests in componentWillUnmount to ' +
- 'prevent memory leaks.',
- (this.constructor && this.constructor.displayName) ||
- this.name ||
- 'Component'
- );
- this.__didWarnIsMounted = true;
- }
- return !!this.__isMounted;
- }
+/**
+ * Unescape and unwrap key for human-readable display
+ *
+ * @param {string} key to unescape.
+ * @return {string} the unescaped key.
+ */
+function unescape(key) {
+ var unescapeRegex = /(=0|=2)/g;
+ var unescaperLookup = {
+ '=0': '=',
+ '=2': ':'
};
+ var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
- var ReactClassComponent = function() {};
- _assign(
- ReactClassComponent.prototype,
- ReactComponent.prototype,
- ReactClassMixin
- );
-
- /**
- * Creates a composite component class given a class specification.
- * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
- *
- * @param {object} spec Class specification (which must define `render`).
- * @return {function} Component constructor function.
- * @public
- */
- function createClass(spec) {
- // To keep our warnings more understandable, we'll use a little hack here to
- // ensure that Constructor.name !== 'Constructor'. This makes sure we don't
- // unnecessarily identify a class without displayName as 'Constructor'.
- var Constructor = identity(function(props, context, updater) {
- // This constructor gets overridden by mocks. The argument is used
- // by mocks to assert on what gets mounted.
-
- if (false) {
- warning(
- this instanceof Constructor,
- 'Something is calling a React component directly. Use a factory or ' +
- 'JSX instead. See: https://fb.me/react-legacyfactory'
- );
- }
-
- // Wire up auto-binding
- if (this.__reactAutoBindPairs.length) {
- bindAutoBindMethods(this);
- }
-
- this.props = props;
- this.context = context;
- this.refs = emptyObject;
- this.updater = updater || ReactNoopUpdateQueue;
+ return ('' + keySubstring).replace(unescapeRegex, function (match) {
+ return unescaperLookup[match];
+ });
+}
- this.state = null;
+var KeyEscapeUtils = {
+ escape: escape,
+ unescape: unescape
+};
- // ReactClasses doesn't have constructors. Instead, they use the
- // getInitialState and componentWillMount methods for initialization.
+module.exports = KeyEscapeUtils;
- var initialState = this.getInitialState ? this.getInitialState() : null;
- if (false) {
- // We allow auto-mocks to proceed as if they're returning null.
- if (
- initialState === undefined &&
- this.getInitialState._isMockFunction
- ) {
- // This is probably bad practice. Consider warning here and
- // deprecating this convenience.
- initialState = null;
- }
- }
- _invariant(
- typeof initialState === 'object' && !Array.isArray(initialState),
- '%s.getInitialState(): must return an object or null',
- Constructor.displayName || 'ReactCompositeComponent'
- );
+/***/ }),
+/* 223 */
+/***/ (function(module, exports, __webpack_require__) {
- this.state = initialState;
- });
- Constructor.prototype = new ReactClassComponent();
- Constructor.prototype.constructor = Constructor;
- Constructor.prototype.__reactAutoBindPairs = [];
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
- injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
- mixSpecIntoComponent(Constructor, IsMountedPreMixin);
- mixSpecIntoComponent(Constructor, spec);
- mixSpecIntoComponent(Constructor, IsMountedPostMixin);
- // Initialize the defaultProps property after all mixins have been merged.
- if (Constructor.getDefaultProps) {
- Constructor.defaultProps = Constructor.getDefaultProps();
- }
+// React 15.5 references this module, and assumes PropTypes are still callable in production.
+// Therefore we re-export development-only version with all the PropTypes checks here.
+// However if one is migrating to the `prop-types` npm library, they will go through the
+// `index.js` entry point, and it will branch depending on the environment.
+var factory = __webpack_require__(357);
+module.exports = function(isValidElement) {
+ // It is still allowed in 15.5.
+ var throwOnDirectAccess = false;
+ return factory(isValidElement, throwOnDirectAccess);
+};
- if (false) {
- // This is a tag to indicate that the use of these method names is ok,
- // since it's used with createClass. If it's not, then it's likely a
- // mistake so we'll warn you to use the static property, property
- // initializer or constructor respectively.
- if (Constructor.getDefaultProps) {
- Constructor.getDefaultProps.isReactClassApproved = {};
- }
- if (Constructor.prototype.getInitialState) {
- Constructor.prototype.getInitialState.isReactClassApproved = {};
- }
- }
- _invariant(
- Constructor.prototype.render,
- 'createClass(...): Class specification must implement a `render` method.'
- );
+/***/ }),
+/* 224 */
+/***/ (function(module, exports, __webpack_require__) {
- if (false) {
- warning(
- !Constructor.prototype.componentShouldUpdate,
- '%s has a method called ' +
- 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
- 'The name is phrased as a question because the function is ' +
- 'expected to return a value.',
- spec.displayName || 'A component'
- );
- warning(
- !Constructor.prototype.componentWillRecieveProps,
- '%s has a method called ' +
- 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
- spec.displayName || 'A component'
- );
- }
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
- // Reduce time spent doing lookups by setting these on the prototype.
- for (var methodName in ReactClassInterface) {
- if (!Constructor.prototype[methodName]) {
- Constructor.prototype[methodName] = null;
- }
- }
- return Constructor;
- }
- return createClass;
-}
+var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
-module.exports = factory;
+module.exports = ReactPropTypesSecret;
/***/ }),
-/* 216 */
+/* 225 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -16360,7 +16847,7 @@ var ReactDOMComponentFlags = {
module.exports = ReactDOMComponentFlags;
/***/ }),
-/* 217 */
+/* 226 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -16377,7 +16864,7 @@ module.exports = ReactDOMComponentFlags;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
var invariant = __webpack_require__(9);
@@ -16423,7 +16910,7 @@ function accumulateInto(current, next) {
module.exports = accumulateInto;
/***/ }),
-/* 218 */
+/* 227 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -16459,7 +16946,7 @@ function forEachAccumulated(arr, cb, scope) {
module.exports = forEachAccumulated;
/***/ }),
-/* 219 */
+/* 228 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -16475,7 +16962,7 @@ module.exports = forEachAccumulated;
-var ExecutionEnvironment = __webpack_require__(21);
+var ExecutionEnvironment = __webpack_require__(23);
var contentKey = null;
@@ -16497,7 +16984,7 @@ function getTextContentAccessor() {
module.exports = getTextContentAccessor;
/***/ }),
-/* 220 */
+/* 229 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -16514,11 +17001,11 @@ module.exports = getTextContentAccessor;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-var PooledClass = __webpack_require__(53);
+var PooledClass = __webpack_require__(58);
var invariant = __webpack_require__(9);
@@ -16621,7 +17108,7 @@ var CallbackQueue = function () {
module.exports = PooledClass.addPoolingTo(CallbackQueue);
/***/ }),
-/* 221 */
+/* 230 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -16648,135 +17135,7 @@ var ReactFeatureFlags = {
module.exports = ReactFeatureFlags;
/***/ }),
-/* 222 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- */
-
-
-
-var ReactDOMComponentTree = __webpack_require__(16);
-
-function isCheckable(elem) {
- var type = elem.type;
- var nodeName = elem.nodeName;
- return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
-}
-
-function getTracker(inst) {
- return inst._wrapperState.valueTracker;
-}
-
-function attachTracker(inst, tracker) {
- inst._wrapperState.valueTracker = tracker;
-}
-
-function detachTracker(inst) {
- delete inst._wrapperState.valueTracker;
-}
-
-function getValueFromNode(node) {
- var value;
- if (node) {
- value = isCheckable(node) ? '' + node.checked : node.value;
- }
- return value;
-}
-
-var inputValueTracking = {
- // exposed for testing
- _getTrackerFromNode: function (node) {
- return getTracker(ReactDOMComponentTree.getInstanceFromNode(node));
- },
-
-
- track: function (inst) {
- if (getTracker(inst)) {
- return;
- }
-
- var node = ReactDOMComponentTree.getNodeFromInstance(inst);
- var valueField = isCheckable(node) ? 'checked' : 'value';
- var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
-
- var currentValue = '' + node[valueField];
-
- // if someone has already defined a value or Safari, then bail
- // and don't track value will cause over reporting of changes,
- // but it's better then a hard failure
- // (needed for certain tests that spyOn input values and Safari)
- if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
- return;
- }
-
- Object.defineProperty(node, valueField, {
- enumerable: descriptor.enumerable,
- configurable: true,
- get: function () {
- return descriptor.get.call(this);
- },
- set: function (value) {
- currentValue = '' + value;
- descriptor.set.call(this, value);
- }
- });
-
- attachTracker(inst, {
- getValue: function () {
- return currentValue;
- },
- setValue: function (value) {
- currentValue = '' + value;
- },
- stopTracking: function () {
- detachTracker(inst);
- delete node[valueField];
- }
- });
- },
-
- updateValueIfChanged: function (inst) {
- if (!inst) {
- return false;
- }
- var tracker = getTracker(inst);
-
- if (!tracker) {
- inputValueTracking.track(inst);
- return true;
- }
-
- var lastValue = tracker.getValue();
- var nextValue = getValueFromNode(ReactDOMComponentTree.getNodeFromInstance(inst));
-
- if (nextValue !== lastValue) {
- tracker.setValue(nextValue);
- return true;
- }
-
- return false;
- },
- stopTracking: function (inst) {
- var tracker = getTracker(inst);
- if (tracker) {
- tracker.stopTracking();
- }
- }
-};
-
-module.exports = inputValueTracking;
-
-/***/ }),
-/* 223 */
+/* 231 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -16798,21 +17157,21 @@ module.exports = inputValueTracking;
*/
var supportedInputTypes = {
- color: true,
- date: true,
- datetime: true,
+ 'color': true,
+ 'date': true,
+ 'datetime': true,
'datetime-local': true,
- email: true,
- month: true,
- number: true,
- password: true,
- range: true,
- search: true,
- tel: true,
- text: true,
- time: true,
- url: true,
- week: true
+ 'email': true,
+ 'month': true,
+ 'number': true,
+ 'password': true,
+ 'range': true,
+ 'search': true,
+ 'tel': true,
+ 'text': true,
+ 'time': true,
+ 'url': true,
+ 'week': true
};
function isTextInputElement(elem) {
@@ -16832,7 +17191,7 @@ function isTextInputElement(elem) {
module.exports = isTextInputElement;
/***/ }),
-/* 224 */
+/* 232 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -16848,9 +17207,9 @@ module.exports = isTextInputElement;
-var ExecutionEnvironment = __webpack_require__(21);
-var escapeTextContentForBrowser = __webpack_require__(107);
-var setInnerHTML = __webpack_require__(106);
+var ExecutionEnvironment = __webpack_require__(23);
+var escapeTextContentForBrowser = __webpack_require__(110);
+var setInnerHTML = __webpack_require__(109);
/**
* Set the textContent property of a node, ensuring that whitespace is preserved
@@ -16889,7 +17248,7 @@ if (ExecutionEnvironment.canUseDOM) {
module.exports = setTextContent;
/***/ }),
-/* 225 */
+/* 233 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -16921,7 +17280,7 @@ function focusNode(node) {
module.exports = focusNode;
/***/ }),
-/* 226 */
+/* 234 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -16957,13 +17316,7 @@ var isUnitlessNumber = {
flexNegative: true,
flexOrder: true,
gridRow: true,
- gridRowEnd: true,
- gridRowSpan: true,
- gridRowStart: true,
gridColumn: true,
- gridColumnEnd: true,
- gridColumnSpan: true,
- gridColumnStart: true,
fontWeight: true,
lineClamp: true,
lineHeight: true,
@@ -17080,7 +17433,7 @@ var CSSProperty = {
module.exports = CSSProperty;
/***/ }),
-/* 227 */
+/* 235 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -17096,12 +17449,12 @@ module.exports = CSSProperty;
-var DOMProperty = __webpack_require__(67);
-var ReactDOMComponentTree = __webpack_require__(16);
-var ReactInstrumentation = __webpack_require__(29);
+var DOMProperty = __webpack_require__(72);
+var ReactDOMComponentTree = __webpack_require__(14);
+var ReactInstrumentation = __webpack_require__(27);
-var quoteAttributeValueForBrowser = __webpack_require__(382);
-var warning = __webpack_require__(12);
+var quoteAttributeValueForBrowser = __webpack_require__(391);
+var warning = __webpack_require__(11);
var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
var illegalAttributeNameCache = {};
@@ -17131,6 +17484,7 @@ function shouldIgnoreValue(propertyInfo, value) {
* Operations for dealing with DOM properties.
*/
var DOMPropertyOperations = {
+
/**
* Creates markup for the ID property.
*
@@ -17315,12 +17669,13 @@ var DOMPropertyOperations = {
});
}
}
+
};
module.exports = DOMPropertyOperations;
/***/ }),
-/* 228 */
+/* 236 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -17336,13 +17691,13 @@ module.exports = DOMPropertyOperations;
-var _assign = __webpack_require__(15);
+var _assign = __webpack_require__(13);
-var LinkedValueUtils = __webpack_require__(149);
-var ReactDOMComponentTree = __webpack_require__(16);
-var ReactUpdates = __webpack_require__(31);
+var LinkedValueUtils = __webpack_require__(155);
+var ReactDOMComponentTree = __webpack_require__(14);
+var ReactUpdates = __webpack_require__(28);
-var warning = __webpack_require__(12);
+var warning = __webpack_require__(11);
var didWarnValueLink = false;
var didWarnValueDefaultValue = false;
@@ -17525,197 +17880,7 @@ function _handleChange(event) {
module.exports = ReactDOMSelect;
/***/ }),
-/* 229 */
-/***/ (function(module, exports) {
-
-// shim for using process in browser
-var process = module.exports = {};
-
-// cached from whatever global is present so that test runners that stub it
-// don't break things. But we need to wrap it in a try catch in case it is
-// wrapped in strict mode code which doesn't define any globals. It's inside a
-// function because try/catches deoptimize in certain engines.
-
-var cachedSetTimeout;
-var cachedClearTimeout;
-
-function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
-}
-function defaultClearTimeout () {
- throw new Error('clearTimeout has not been defined');
-}
-(function () {
- try {
- if (typeof setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
- } else {
- cachedSetTimeout = defaultSetTimout;
- }
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
- }
- try {
- if (typeof clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
- } else {
- cachedClearTimeout = defaultClearTimeout;
- }
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
- }
-} ())
-function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
- }
- // if setTimeout wasn't available but was latter defined
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch(e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
- } catch(e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
- }
- }
-
-
-}
-function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
- }
- // if clearTimeout wasn't available but was latter defined
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
- } catch (e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
- }
- }
-
-
-
-}
-var queue = [];
-var draining = false;
-var currentQueue;
-var queueIndex = -1;
-
-function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
- if (queue.length) {
- drainQueue();
- }
-}
-
-function drainQueue() {
- if (draining) {
- return;
- }
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
-
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
- }
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
-}
-
-process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
- }
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
- }
-};
-
-// v8 likes predictible objects
-function Item(fun, array) {
- this.fun = fun;
- this.array = array;
-}
-Item.prototype.run = function () {
- this.fun.apply(null, this.array);
-};
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-process.version = ''; // empty string to avoid regexp issues
-process.versions = {};
-
-function noop() {}
-
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
-process.prependListener = noop;
-process.prependOnceListener = noop;
-
-process.listeners = function (name) { return [] }
-
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-};
-
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-process.umask = function() { return 0; };
-
-
-/***/ }),
-/* 230 */
+/* 237 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -17731,21 +17896,24 @@ process.umask = function() { return 0; };
-var _prodInvariant = __webpack_require__(13),
- _assign = __webpack_require__(15);
+var _prodInvariant = __webpack_require__(12),
+ _assign = __webpack_require__(13);
-var ReactCompositeComponent = __webpack_require__(391);
-var ReactEmptyComponent = __webpack_require__(232);
-var ReactHostComponent = __webpack_require__(233);
+var ReactCompositeComponent = __webpack_require__(400);
+var ReactEmptyComponent = __webpack_require__(239);
+var ReactHostComponent = __webpack_require__(240);
-var getNextDebugID = __webpack_require__(392);
+var getNextDebugID = __webpack_require__(401);
var invariant = __webpack_require__(9);
-var warning = __webpack_require__(12);
+var warning = __webpack_require__(11);
// To avoid a cyclic dependency, we create the final class in this module
var ReactCompositeComponentWrapper = function (element) {
this.construct(element);
};
+_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {
+ _instantiateReactComponent: instantiateReactComponent
+});
function getDeclarationErrorAddendum(owner) {
if (owner) {
@@ -17788,7 +17956,7 @@ function instantiateReactComponent(node, shouldHaveDebugID) {
var info = '';
if (false) {
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
- info += ' You likely forgot to export your component from the file ' + "it's defined in.";
+ info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
}
}
info += getDeclarationErrorAddendum(element._owner);
@@ -17842,14 +18010,10 @@ function instantiateReactComponent(node, shouldHaveDebugID) {
return instance;
}
-_assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {
- _instantiateReactComponent: instantiateReactComponent
-});
-
module.exports = instantiateReactComponent;
/***/ }),
-/* 231 */
+/* 238 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -17866,9 +18030,9 @@ module.exports = instantiateReactComponent;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
-var React = __webpack_require__(65);
+var React = __webpack_require__(56);
var invariant = __webpack_require__(9);
@@ -17894,7 +18058,7 @@ var ReactNodeTypes = {
module.exports = ReactNodeTypes;
/***/ }),
-/* 232 */
+/* 239 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -17929,7 +18093,7 @@ ReactEmptyComponent.injection = ReactEmptyComponentInjection;
module.exports = ReactEmptyComponent;
/***/ }),
-/* 233 */
+/* 240 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -17945,7 +18109,7 @@ module.exports = ReactEmptyComponent;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
var invariant = __webpack_require__(9);
@@ -18002,7 +18166,7 @@ var ReactHostComponent = {
module.exports = ReactHostComponent;
/***/ }),
-/* 234 */
+/* 241 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -18018,15 +18182,15 @@ module.exports = ReactHostComponent;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
-var ReactCurrentOwner = __webpack_require__(37);
-var REACT_ELEMENT_TYPE = __webpack_require__(393);
+var ReactCurrentOwner = __webpack_require__(36);
+var REACT_ELEMENT_TYPE = __webpack_require__(402);
-var getIteratorFn = __webpack_require__(394);
+var getIteratorFn = __webpack_require__(403);
var invariant = __webpack_require__(9);
-var KeyEscapeUtils = __webpack_require__(152);
-var warning = __webpack_require__(12);
+var KeyEscapeUtils = __webpack_require__(158);
+var warning = __webpack_require__(11);
var SEPARATOR = '.';
var SUBSEPARATOR = ':';
@@ -18139,7 +18303,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
if (false) {
addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
if (children._isReactElement) {
- addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.';
+ addendum = ' It looks like you\'re using an element created by a different ' + 'version of React. Make sure to use only one copy of React.';
}
if (ReactCurrentOwner.current) {
var name = ReactCurrentOwner.current.getName();
@@ -18183,391 +18347,7 @@ function traverseAllChildren(children, callback, traverseContext) {
module.exports = traverseAllChildren;
/***/ }),
-/* 235 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/**
- * Copyright 2016-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- *
- */
-
-
-
-var _prodInvariant = __webpack_require__(85);
-
-var ReactCurrentOwner = __webpack_require__(37);
-
-var invariant = __webpack_require__(9);
-var warning = __webpack_require__(12);
-
-function isNative(fn) {
- // Based on isNative() from Lodash
- var funcToString = Function.prototype.toString;
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- var reIsNative = RegExp('^' + funcToString
- // Take an example native function source for comparison
- .call(hasOwnProperty
- // Strip regex characters so we can use it for regex
- ).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&'
- // Remove hasOwnProperty from the template to make it generic
- ).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
- try {
- var source = funcToString.call(fn);
- return reIsNative.test(source);
- } catch (err) {
- return false;
- }
-}
-
-var canUseCollections =
-// Array.from
-typeof Array.from === 'function' &&
-// Map
-typeof Map === 'function' && isNative(Map) &&
-// Map.prototype.keys
-Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
-// Set
-typeof Set === 'function' && isNative(Set) &&
-// Set.prototype.keys
-Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
-
-var setItem;
-var getItem;
-var removeItem;
-var getItemIDs;
-var addRoot;
-var removeRoot;
-var getRootIDs;
-
-if (canUseCollections) {
- var itemMap = new Map();
- var rootIDSet = new Set();
-
- setItem = function (id, item) {
- itemMap.set(id, item);
- };
- getItem = function (id) {
- return itemMap.get(id);
- };
- removeItem = function (id) {
- itemMap['delete'](id);
- };
- getItemIDs = function () {
- return Array.from(itemMap.keys());
- };
-
- addRoot = function (id) {
- rootIDSet.add(id);
- };
- removeRoot = function (id) {
- rootIDSet['delete'](id);
- };
- getRootIDs = function () {
- return Array.from(rootIDSet.keys());
- };
-} else {
- var itemByKey = {};
- var rootByKey = {};
-
- // Use non-numeric keys to prevent V8 performance issues:
- // https://github.com/facebook/react/pull/7232
- var getKeyFromID = function (id) {
- return '.' + id;
- };
- var getIDFromKey = function (key) {
- return parseInt(key.substr(1), 10);
- };
-
- setItem = function (id, item) {
- var key = getKeyFromID(id);
- itemByKey[key] = item;
- };
- getItem = function (id) {
- var key = getKeyFromID(id);
- return itemByKey[key];
- };
- removeItem = function (id) {
- var key = getKeyFromID(id);
- delete itemByKey[key];
- };
- getItemIDs = function () {
- return Object.keys(itemByKey).map(getIDFromKey);
- };
-
- addRoot = function (id) {
- var key = getKeyFromID(id);
- rootByKey[key] = true;
- };
- removeRoot = function (id) {
- var key = getKeyFromID(id);
- delete rootByKey[key];
- };
- getRootIDs = function () {
- return Object.keys(rootByKey).map(getIDFromKey);
- };
-}
-
-var unmountedIDs = [];
-
-function purgeDeep(id) {
- var item = getItem(id);
- if (item) {
- var childIDs = item.childIDs;
-
- removeItem(id);
- childIDs.forEach(purgeDeep);
- }
-}
-
-function describeComponentFrame(name, source, ownerName) {
- return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
-}
-
-function getDisplayName(element) {
- if (element == null) {
- return '#empty';
- } else if (typeof element === 'string' || typeof element === 'number') {
- return '#text';
- } else if (typeof element.type === 'string') {
- return element.type;
- } else {
- return element.type.displayName || element.type.name || 'Unknown';
- }
-}
-
-function describeID(id) {
- var name = ReactComponentTreeHook.getDisplayName(id);
- var element = ReactComponentTreeHook.getElement(id);
- var ownerID = ReactComponentTreeHook.getOwnerID(id);
- var ownerName;
- if (ownerID) {
- ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
- }
- false ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
- return describeComponentFrame(name, element && element._source, ownerName);
-}
-
-var ReactComponentTreeHook = {
- onSetChildren: function (id, nextChildIDs) {
- var item = getItem(id);
- !item ? false ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
- item.childIDs = nextChildIDs;
-
- for (var i = 0; i < nextChildIDs.length; i++) {
- var nextChildID = nextChildIDs[i];
- var nextChild = getItem(nextChildID);
- !nextChild ? false ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
- !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? false ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;
- !nextChild.isMounted ? false ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
- if (nextChild.parentID == null) {
- nextChild.parentID = id;
- // TODO: This shouldn't be necessary but mounting a new root during in
- // componentWillMount currently causes not-yet-mounted components to
- // be purged from our tree data so their parent id is missing.
- }
- !(nextChild.parentID === id) ? false ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;
- }
- },
- onBeforeMountComponent: function (id, element, parentID) {
- var item = {
- element: element,
- parentID: parentID,
- text: null,
- childIDs: [],
- isMounted: false,
- updateCount: 0
- };
- setItem(id, item);
- },
- onBeforeUpdateComponent: function (id, element) {
- var item = getItem(id);
- if (!item || !item.isMounted) {
- // We may end up here as a result of setState() in componentWillUnmount().
- // In this case, ignore the element.
- return;
- }
- item.element = element;
- },
- onMountComponent: function (id) {
- var item = getItem(id);
- !item ? false ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
- item.isMounted = true;
- var isRoot = item.parentID === 0;
- if (isRoot) {
- addRoot(id);
- }
- },
- onUpdateComponent: function (id) {
- var item = getItem(id);
- if (!item || !item.isMounted) {
- // We may end up here as a result of setState() in componentWillUnmount().
- // In this case, ignore the element.
- return;
- }
- item.updateCount++;
- },
- onUnmountComponent: function (id) {
- var item = getItem(id);
- if (item) {
- // We need to check if it exists.
- // `item` might not exist if it is inside an error boundary, and a sibling
- // error boundary child threw while mounting. Then this instance never
- // got a chance to mount, but it still gets an unmounting event during
- // the error boundary cleanup.
- item.isMounted = false;
- var isRoot = item.parentID === 0;
- if (isRoot) {
- removeRoot(id);
- }
- }
- unmountedIDs.push(id);
- },
- purgeUnmountedComponents: function () {
- if (ReactComponentTreeHook._preventPurging) {
- // Should only be used for testing.
- return;
- }
-
- for (var i = 0; i < unmountedIDs.length; i++) {
- var id = unmountedIDs[i];
- purgeDeep(id);
- }
- unmountedIDs.length = 0;
- },
- isMounted: function (id) {
- var item = getItem(id);
- return item ? item.isMounted : false;
- },
- getCurrentStackAddendum: function (topElement) {
- var info = '';
- if (topElement) {
- var name = getDisplayName(topElement);
- var owner = topElement._owner;
- info += describeComponentFrame(name, topElement._source, owner && owner.getName());
- }
-
- var currentOwner = ReactCurrentOwner.current;
- var id = currentOwner && currentOwner._debugID;
-
- info += ReactComponentTreeHook.getStackAddendumByID(id);
- return info;
- },
- getStackAddendumByID: function (id) {
- var info = '';
- while (id) {
- info += describeID(id);
- id = ReactComponentTreeHook.getParentID(id);
- }
- return info;
- },
- getChildIDs: function (id) {
- var item = getItem(id);
- return item ? item.childIDs : [];
- },
- getDisplayName: function (id) {
- var element = ReactComponentTreeHook.getElement(id);
- if (!element) {
- return null;
- }
- return getDisplayName(element);
- },
- getElement: function (id) {
- var item = getItem(id);
- return item ? item.element : null;
- },
- getOwnerID: function (id) {
- var element = ReactComponentTreeHook.getElement(id);
- if (!element || !element._owner) {
- return null;
- }
- return element._owner._debugID;
- },
- getParentID: function (id) {
- var item = getItem(id);
- return item ? item.parentID : null;
- },
- getSource: function (id) {
- var item = getItem(id);
- var element = item ? item.element : null;
- var source = element != null ? element._source : null;
- return source;
- },
- getText: function (id) {
- var element = ReactComponentTreeHook.getElement(id);
- if (typeof element === 'string') {
- return element;
- } else if (typeof element === 'number') {
- return '' + element;
- } else {
- return null;
- }
- },
- getUpdateCount: function (id) {
- var item = getItem(id);
- return item ? item.updateCount : 0;
- },
-
-
- getRootIDs: getRootIDs,
- getRegisteredIDs: getItemIDs,
-
- pushNonStandardWarningStack: function (isCreatingElement, currentSource) {
- if (typeof console.reactStack !== 'function') {
- return;
- }
-
- var stack = [];
- var currentOwner = ReactCurrentOwner.current;
- var id = currentOwner && currentOwner._debugID;
-
- try {
- if (isCreatingElement) {
- stack.push({
- name: id ? ReactComponentTreeHook.getDisplayName(id) : null,
- fileName: currentSource ? currentSource.fileName : null,
- lineNumber: currentSource ? currentSource.lineNumber : null
- });
- }
-
- while (id) {
- var element = ReactComponentTreeHook.getElement(id);
- var parentID = ReactComponentTreeHook.getParentID(id);
- var ownerID = ReactComponentTreeHook.getOwnerID(id);
- var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null;
- var source = element && element._source;
- stack.push({
- name: ownerName,
- fileName: source ? source.fileName : null,
- lineNumber: source ? source.lineNumber : null
- });
- id = parentID;
- }
- } catch (err) {
- // Internal state is messed up.
- // Stop building the stack (it's just a nice to have).
- }
-
- console.reactStack(stack);
- },
- popNonStandardWarningStack: function () {
- if (typeof console.reactStackEnd !== 'function') {
- return;
- }
- console.reactStackEnd();
- }
-};
-
-module.exports = ReactComponentTreeHook;
-
-/***/ }),
-/* 236 */
+/* 242 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -18575,16 +18355,23 @@ module.exports = ReactComponentTreeHook;
/**
* Copyright (c) 2013-present, Facebook, Inc.
- * All rights reserved.
*
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
* @typechecks
*/
-var emptyFunction = __webpack_require__(24);
+var emptyFunction = __webpack_require__(22);
/**
* Upstream version of event listener. Does not take into account specific
@@ -18649,7 +18436,7 @@ var EventListener = {
module.exports = EventListener;
/***/ }),
-/* 237 */
+/* 243 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -18665,11 +18452,11 @@ module.exports = EventListener;
-var ReactDOMSelection = __webpack_require__(406);
+var ReactDOMSelection = __webpack_require__(415);
-var containsNode = __webpack_require__(408);
-var focusNode = __webpack_require__(225);
-var getActiveElement = __webpack_require__(238);
+var containsNode = __webpack_require__(417);
+var focusNode = __webpack_require__(233);
+var getActiveElement = __webpack_require__(244);
function isInDocument(node) {
return containsNode(document.documentElement, node);
@@ -18682,6 +18469,7 @@ function isInDocument(node) {
* Input selection module for React.
*/
var ReactInputSelection = {
+
hasSelectionCapabilities: function (elem) {
var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');
@@ -18777,7 +18565,7 @@ var ReactInputSelection = {
module.exports = ReactInputSelection;
/***/ }),
-/* 238 */
+/* 244 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -18821,7 +18609,7 @@ function getActiveElement(doc) /*?DOMElement*/{
module.exports = getActiveElement;
/***/ }),
-/* 239 */
+/* 245 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -18837,30 +18625,30 @@ module.exports = getActiveElement;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
-var DOMLazyTree = __webpack_require__(72);
-var DOMProperty = __webpack_require__(67);
-var React = __webpack_require__(65);
-var ReactBrowserEventEmitter = __webpack_require__(108);
-var ReactCurrentOwner = __webpack_require__(37);
-var ReactDOMComponentTree = __webpack_require__(16);
-var ReactDOMContainerInfo = __webpack_require__(423);
-var ReactDOMFeatureFlags = __webpack_require__(424);
-var ReactFeatureFlags = __webpack_require__(221);
-var ReactInstanceMap = __webpack_require__(86);
-var ReactInstrumentation = __webpack_require__(29);
-var ReactMarkupChecksum = __webpack_require__(425);
-var ReactReconciler = __webpack_require__(70);
-var ReactUpdateQueue = __webpack_require__(153);
-var ReactUpdates = __webpack_require__(31);
+var DOMLazyTree = __webpack_require__(77);
+var DOMProperty = __webpack_require__(72);
+var React = __webpack_require__(56);
+var ReactBrowserEventEmitter = __webpack_require__(111);
+var ReactCurrentOwner = __webpack_require__(36);
+var ReactDOMComponentTree = __webpack_require__(14);
+var ReactDOMContainerInfo = __webpack_require__(432);
+var ReactDOMFeatureFlags = __webpack_require__(433);
+var ReactFeatureFlags = __webpack_require__(230);
+var ReactInstanceMap = __webpack_require__(89);
+var ReactInstrumentation = __webpack_require__(27);
+var ReactMarkupChecksum = __webpack_require__(434);
+var ReactReconciler = __webpack_require__(75);
+var ReactUpdateQueue = __webpack_require__(160);
+var ReactUpdates = __webpack_require__(28);
-var emptyObject = __webpack_require__(102);
-var instantiateReactComponent = __webpack_require__(230);
+var emptyObject = __webpack_require__(105);
+var instantiateReactComponent = __webpack_require__(237);
var invariant = __webpack_require__(9);
-var setInnerHTML = __webpack_require__(106);
-var shouldUpdateReactComponent = __webpack_require__(151);
-var warning = __webpack_require__(12);
+var setInnerHTML = __webpack_require__(109);
+var shouldUpdateReactComponent = __webpack_require__(157);
+var warning = __webpack_require__(11);
var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
var ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME;
@@ -19083,6 +18871,7 @@ TopLevelWrapper.isReactTopLevelWrapper = true;
* Inside of `container`, the first element rendered is the "reactRoot".
*/
var ReactMount = {
+
TopLevelWrapper: TopLevelWrapper,
/**
@@ -19171,14 +18960,13 @@ var ReactMount = {
_renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render');
- !React.isValidElement(nextElement) ? false ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? " Instead of passing a string like 'div', pass " + "React.createElement('div') or ." : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or .' : // Check if it quacks like an element
- nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? " Instead of passing a string like 'div', pass " + "React.createElement('div') or ." : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or .' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0;
+ !React.isValidElement(nextElement) ? false ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or .' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or .' :
+ // Check if it quacks like an element
+ nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : _prodInvariant('39', typeof nextElement === 'string' ? ' Instead of passing a string like \'div\', pass ' + 'React.createElement(\'div\') or .' : typeof nextElement === 'function' ? ' Instead of passing a class like Foo, pass ' + 'React.createElement(Foo) or .' : nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : void 0;
false ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;
- var nextWrappedElement = React.createElement(TopLevelWrapper, {
- child: nextElement
- });
+ var nextWrappedElement = React.createElement(TopLevelWrapper, { child: nextElement });
var nextContext;
if (parentComponent) {
@@ -19267,7 +19055,7 @@ var ReactMount = {
!isValidContainer(container) ? false ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0;
if (false) {
- process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.') : void 0;
+ process.env.NODE_ENV !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by another copy of React.') : void 0;
}
var prevComponent = getTopLevelWrapperInContainer(container);
@@ -19280,7 +19068,7 @@ var ReactMount = {
var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME);
if (false) {
- process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;
+ process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;
}
return false;
@@ -19364,7 +19152,7 @@ var ReactMount = {
module.exports = ReactMount;
/***/ }),
-/* 240 */
+/* 246 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -19380,7 +19168,7 @@ module.exports = ReactMount;
-var ReactNodeTypes = __webpack_require__(231);
+var ReactNodeTypes = __webpack_require__(238);
function getHostComponentFromComposite(inst) {
var type;
@@ -19399,17 +19187,17 @@ function getHostComponentFromComposite(inst) {
module.exports = getHostComponentFromComposite;
/***/ }),
-/* 241 */
+/* 247 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = createTransitionManager;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__routerWarning__ = __webpack_require__(73);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__ = __webpack_require__(432);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__ = __webpack_require__(433);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isActive__ = __webpack_require__(434);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getComponents__ = __webpack_require__(435);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchRoutes__ = __webpack_require__(436);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__routerWarning__ = __webpack_require__(78);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__ = __webpack_require__(440);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__ = __webpack_require__(441);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isActive__ = __webpack_require__(442);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getComponents__ = __webpack_require__(443);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchRoutes__ = __webpack_require__(444);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
@@ -19428,19 +19216,12 @@ function hasAnyProperties(object) {
function createTransitionManager(history, routes) {
var state = {};
- var _getTransitionUtils = Object(__WEBPACK_IMPORTED_MODULE_2__TransitionUtils__["a" /* default */])(),
- runEnterHooks = _getTransitionUtils.runEnterHooks,
- runChangeHooks = _getTransitionUtils.runChangeHooks,
- runLeaveHooks = _getTransitionUtils.runLeaveHooks;
-
// Signature should be (location, indexOnly), but needs to support (path,
// query, indexOnly)
-
-
function isActive(location, indexOnly) {
location = history.createLocation(location);
- return Object(__WEBPACK_IMPORTED_MODULE_3__isActive__["a" /* default */])(location, indexOnly, state.location, state.routes, state.params);
+ return __WEBPACK_IMPORTED_MODULE_3__isActive__["a" /* default */](location, indexOnly, state.location, state.routes, state.params);
}
var partialNextState = void 0;
@@ -19450,7 +19231,7 @@ function createTransitionManager(history, routes) {
// Continue from where we left off.
finishMatch(partialNextState, callback);
} else {
- Object(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__["a" /* default */])(routes, location, function (error, nextState) {
+ __WEBPACK_IMPORTED_MODULE_5__matchRoutes__["a" /* default */](routes, location, function (error, nextState) {
if (error) {
callback(error);
} else if (nextState) {
@@ -19463,12 +19244,12 @@ function createTransitionManager(history, routes) {
}
function finishMatch(nextState, callback) {
- var _computeChangedRoutes = Object(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__["a" /* default */])(state, nextState),
+ var _computeChangedRoutes = __WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__["a" /* default */](state, nextState),
leaveRoutes = _computeChangedRoutes.leaveRoutes,
changeRoutes = _computeChangedRoutes.changeRoutes,
enterRoutes = _computeChangedRoutes.enterRoutes;
- runLeaveHooks(leaveRoutes, state);
+ __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__["c" /* runLeaveHooks */](leaveRoutes, state);
// Tear down confirmation hooks for left routes
leaveRoutes.filter(function (route) {
@@ -19476,17 +19257,17 @@ function createTransitionManager(history, routes) {
}).forEach(removeListenBeforeHooksForRoute);
// change and enter hooks are run in series
- runChangeHooks(changeRoutes, state, nextState, function (error, redirectInfo) {
+ __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__["a" /* runChangeHooks */](changeRoutes, state, nextState, function (error, redirectInfo) {
if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo);
- runEnterHooks(enterRoutes, nextState, finishEnterHooks);
+ __WEBPACK_IMPORTED_MODULE_2__TransitionUtils__["b" /* runEnterHooks */](enterRoutes, nextState, finishEnterHooks);
});
function finishEnterHooks(error, redirectInfo) {
if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo);
// TODO: Fetch components after state is updated.
- Object(__WEBPACK_IMPORTED_MODULE_4__getComponents__["a" /* default */])(nextState, function (error, components) {
+ __WEBPACK_IMPORTED_MODULE_4__getComponents__["a" /* default */](nextState, function (error, components) {
if (error) {
callback(error);
} else {
@@ -19521,7 +19302,7 @@ function createTransitionManager(history, routes) {
}
function transitionHook(location, callback) {
- Object(__WEBPACK_IMPORTED_MODULE_5__matchRoutes__["a" /* default */])(routes, location, function (error, nextState) {
+ __WEBPACK_IMPORTED_MODULE_5__matchRoutes__["a" /* default */](routes, location, function (error, nextState) {
if (nextState == null) {
// TODO: We didn't actually match anything, but hang
// onto error/nextState so we don't have to matchRoutes
@@ -19534,7 +19315,7 @@ function createTransitionManager(history, routes) {
// matchRoutes() again in the listen callback.
partialNextState = _extends({}, nextState, { location: location });
- var hooks = getRouteHooksForRoutes(Object(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__["a" /* default */])(state, partialNextState).leaveRoutes);
+ var hooks = getRouteHooksForRoutes(__WEBPACK_IMPORTED_MODULE_1__computeChangedRoutes__["a" /* default */](state, partialNextState).leaveRoutes);
var result = void 0;
for (var i = 0, len = hooks.length; result == null && i < len; ++i) {
@@ -19670,7 +19451,7 @@ function createTransitionManager(history, routes) {
}
/***/ }),
-/* 242 */
+/* 248 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -19680,7 +19461,7 @@ function isPromise(obj) {
}
/***/ }),
-/* 243 */
+/* 249 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -19710,20 +19491,16 @@ function assignRouterState(router, _ref) {
}
/***/ }),
-/* 244 */
+/* 250 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(39);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PropTypes__ = __webpack_require__(160);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ContextUtils__ = __webpack_require__(159);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PropTypes__ = __webpack_require__(167);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(166);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
@@ -19733,6 +19510,12 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
+var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes,
+ bool = _React$PropTypes.bool,
+ object = _React$PropTypes.object,
+ string = _React$PropTypes.string,
+ func = _React$PropTypes.func,
+ oneOfType = _React$PropTypes.oneOfType;
function isLeftClickEvent(event) {
@@ -19766,23 +19549,32 @@ function resolveToLocation(to, router) {
* You could use the following component to link to that route:
*
*
+ *
+ * Links may pass along location state and/or query string parameters
+ * in the state/query props, respectively.
+ *
+ *
*/
-var Link = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({
+var Link = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({
displayName: 'Link',
- mixins: [Object(__WEBPACK_IMPORTED_MODULE_5__ContextUtils__["b" /* ContextSubscriber */])('router')],
+
+ mixins: [__WEBPACK_IMPORTED_MODULE_3__ContextUtils__["b" /* ContextSubscriber */]('router')],
contextTypes: {
- router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__["b" /* routerShape */]
+ router: __WEBPACK_IMPORTED_MODULE_2__PropTypes__["b" /* routerShape */]
},
propTypes: {
- to: Object(__WEBPACK_IMPORTED_MODULE_2_prop_types__["oneOfType"])([__WEBPACK_IMPORTED_MODULE_2_prop_types__["string"], __WEBPACK_IMPORTED_MODULE_2_prop_types__["object"], __WEBPACK_IMPORTED_MODULE_2_prop_types__["func"]]),
- activeStyle: __WEBPACK_IMPORTED_MODULE_2_prop_types__["object"],
- activeClassName: __WEBPACK_IMPORTED_MODULE_2_prop_types__["string"],
- onlyActiveOnIndex: __WEBPACK_IMPORTED_MODULE_2_prop_types__["bool"].isRequired,
- onClick: __WEBPACK_IMPORTED_MODULE_2_prop_types__["func"],
- target: __WEBPACK_IMPORTED_MODULE_2_prop_types__["string"]
+ to: oneOfType([string, object, func]),
+ query: object,
+ hash: string,
+ state: object,
+ activeStyle: object,
+ activeClassName: string,
+ onlyActiveOnIndex: bool.isRequired,
+ onClick: func,
+ target: string
},
getDefaultProps: function getDefaultProps() {
@@ -19798,7 +19590,7 @@ var Link = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({
var router = this.context.router;
- !router ? false ? invariant(false, 's rendered outside of a router context cannot navigate.') : __WEBPACK_IMPORTED_MODULE_3_invariant___default()(false) : void 0;
+ !router ? false ? invariant(false, 's rendered outside of a router context cannot navigate.') : __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(false) : void 0;
if (isModifiedEvent(event) || !isLeftClickEvent(event)) return;
@@ -19855,25 +19647,26 @@ var Link = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({
/* harmony default export */ __webpack_exports__["a"] = (Link);
/***/ }),
-/* 245 */
+/* 251 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(39);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(45);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PatternUtils__ = __webpack_require__(74);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(88);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RouteUtils__ = __webpack_require__(44);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__PatternUtils__ = __webpack_require__(79);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(91);
+var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes,
+ string = _React$PropTypes.string,
+ object = _React$PropTypes.object;
/**
* A is used to declare another URL path a client should
@@ -19883,12 +19676,14 @@ var Link = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({
* and are traversed in the same manner.
*/
/* eslint-disable react/require-render-return */
-var Redirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({
+
+var Redirect = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({
displayName: 'Redirect',
+
statics: {
createRouteFromReactElement: function createRouteFromReactElement(element) {
- var route = Object(__WEBPACK_IMPORTED_MODULE_3__RouteUtils__["a" /* createRouteFromReactElement */])(element);
+ var route = __WEBPACK_IMPORTED_MODULE_2__RouteUtils__["a" /* createRouteFromReactElement */](element);
if (route.from) route.path = route.from;
@@ -19899,14 +19694,14 @@ var Redirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({
var pathname = void 0;
if (route.to.charAt(0) === '/') {
- pathname = Object(__WEBPACK_IMPORTED_MODULE_4__PatternUtils__["a" /* formatPattern */])(route.to, params);
+ pathname = __WEBPACK_IMPORTED_MODULE_3__PatternUtils__["a" /* formatPattern */](route.to, params);
} else if (!route.to) {
pathname = location.pathname;
} else {
var routeIndex = nextState.routes.indexOf(route);
var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1);
var pattern = parentPattern.replace(/\/*$/, '/') + route.to;
- pathname = Object(__WEBPACK_IMPORTED_MODULE_4__PatternUtils__["a" /* formatPattern */])(pattern, params);
+ pathname = __WEBPACK_IMPORTED_MODULE_3__PatternUtils__["a" /* formatPattern */](pattern, params);
}
replace({
@@ -19935,34 +19730,34 @@ var Redirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({
},
propTypes: {
- path: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"],
- from: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"], // Alias for path
- to: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"].isRequired,
- query: __WEBPACK_IMPORTED_MODULE_1_prop_types__["object"],
- state: __WEBPACK_IMPORTED_MODULE_1_prop_types__["object"],
- onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["c" /* falsy */],
- children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["c" /* falsy */]
+ path: string,
+ from: string, // Alias for path
+ to: string.isRequired,
+ query: object,
+ state: object,
+ onEnter: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */],
+ children: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */]
},
/* istanbul ignore next: sanity check */
render: function render() {
- true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_2_invariant___default()(false) : void 0;
+ true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(false) : void 0;
}
});
/* harmony default export */ __webpack_exports__["a"] = (Redirect);
/***/ }),
-/* 246 */
+/* 252 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = createMemoryHistory;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = __webpack_require__(247);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = __webpack_require__(253);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(248);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(254);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = __webpack_require__(446);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__ = __webpack_require__(454);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory__);
@@ -19972,16 +19767,16 @@ function createMemoryHistory(options) {
// signatures and type checking differ between `useQueries` and
// `createMemoryHistory`, have to create `memoryHistory` first because
// `useQueries` doesn't understand the signature
- var memoryHistory = __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default()(options);
+ var memoryHistory = __WEBPACK_IMPORTED_MODULE_2_history_lib_createMemoryHistory___default.a(options);
var createHistory = function createHistory() {
return memoryHistory;
};
- var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory))(options);
+ var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default.a(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default.a(createHistory))(options);
return history;
}
/***/ }),
-/* 247 */
+/* 253 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -19991,15 +19786,15 @@ exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-var _queryString = __webpack_require__(444);
+var _queryString = __webpack_require__(452);
-var _runTransitionHook = __webpack_require__(162);
+var _runTransitionHook = __webpack_require__(169);
var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);
-var _LocationUtils = __webpack_require__(75);
+var _LocationUtils = __webpack_require__(80);
-var _PathUtils = __webpack_require__(46);
+var _PathUtils = __webpack_require__(45);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -20015,11 +19810,11 @@ var defaultParseQueryString = _queryString.parse;
*/
var useQueries = function useQueries(createHistory) {
return function () {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+ var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var history = createHistory(options);
- var stringifyQuery = options.stringifyQuery,
- parseQueryString = options.parseQueryString;
+ var stringifyQuery = options.stringifyQuery;
+ var parseQueryString = options.parseQueryString;
if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;
@@ -20108,7 +19903,7 @@ var useQueries = function useQueries(createHistory) {
exports.default = useQueries;
/***/ }),
-/* 248 */
+/* 254 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -20118,17 +19913,17 @@ exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-var _runTransitionHook = __webpack_require__(162);
+var _runTransitionHook = __webpack_require__(169);
var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);
-var _PathUtils = __webpack_require__(46);
+var _PathUtils = __webpack_require__(45);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var useBasename = function useBasename(createHistory) {
return function () {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+ var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var history = createHistory(options);
var basename = options.basename;
@@ -20138,7 +19933,7 @@ var useBasename = function useBasename(createHistory) {
if (!location) return location;
if (basename && location.basename == null) {
- if (location.pathname.toLowerCase().indexOf(basename.toLowerCase()) === 0) {
+ if (location.pathname.indexOf(basename) === 0) {
location.pathname = location.pathname.substring(basename.length);
location.basename = basename;
@@ -20223,27 +20018,27 @@ var useBasename = function useBasename(createHistory) {
exports.default = useBasename;
/***/ }),
-/* 249 */
+/* 255 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = useRouterHistory;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = __webpack_require__(247);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__ = __webpack_require__(253);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(248);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__ = __webpack_require__(254);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename__);
function useRouterHistory(createHistory) {
return function (options) {
- var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default()(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default()(createHistory))(options);
+ var history = __WEBPACK_IMPORTED_MODULE_0_history_lib_useQueries___default.a(__WEBPACK_IMPORTED_MODULE_1_history_lib_useBasename___default.a(createHistory))(options);
return history;
};
}
/***/ }),
-/* 250 */
+/* 256 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -20252,7 +20047,7 @@ function useRouterHistory(createHistory) {
exports.__esModule = true;
exports.readState = exports.saveState = undefined;
-var _warning = __webpack_require__(17);
+var _warning = __webpack_require__(15);
var _warning2 = _interopRequireDefault(_warning);
@@ -20334,31 +20129,30 @@ var readState = exports.readState = function readState(key) {
};
/***/ }),
-/* 251 */
+/* 257 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony export (immutable) */ __webpack_exports__["a"] = createRouterHistory;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__ = __webpack_require__(249);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__ = __webpack_require__(255);
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
-function createRouterHistory(createHistory) {
+/* harmony default export */ __webpack_exports__["a"] = (function (createHistory) {
var history = void 0;
- if (canUseDOM) history = Object(__WEBPACK_IMPORTED_MODULE_0__useRouterHistory__["a" /* default */])(createHistory)();
+ if (canUseDOM) history = __WEBPACK_IMPORTED_MODULE_0__useRouterHistory__["a" /* default */](createHistory)();
return history;
-}
+});
/***/ }),
-/* 252 */
+/* 258 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ActionTypes; });
/* harmony export (immutable) */ __webpack_exports__["b"] = createStore;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(166);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(457);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(173);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(465);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_symbol_observable__);
@@ -20371,33 +20165,34 @@ function createRouterHistory(createHistory) {
*/
var ActionTypes = {
INIT: '@@redux/INIT'
+};
- /**
- * Creates a Redux store that holds the state tree.
- * The only way to change the data in the store is to call `dispatch()` on it.
- *
- * There should only be a single store in your app. To specify how different
- * parts of the state tree respond to actions, you may combine several reducers
- * into a single reducer function by using `combineReducers`.
- *
- * @param {Function} reducer A function that returns the next state tree, given
- * the current state tree and the action to handle.
- *
- * @param {any} [preloadedState] The initial state. You may optionally specify it
- * to hydrate the state from the server in universal apps, or to restore a
- * previously serialized user session.
- * If you use `combineReducers` to produce the root reducer function, this must be
- * an object with the same shape as `combineReducers` keys.
- *
- * @param {Function} [enhancer] The store enhancer. You may optionally specify it
- * to enhance the store with third-party capabilities such as middleware,
- * time travel, persistence, etc. The only store enhancer that ships with Redux
- * is `applyMiddleware()`.
- *
- * @returns {Store} A Redux store that lets you read the state, dispatch actions
- * and subscribe to changes.
- */
-};function createStore(reducer, preloadedState, enhancer) {
+/**
+ * Creates a Redux store that holds the state tree.
+ * The only way to change the data in the store is to call `dispatch()` on it.
+ *
+ * There should only be a single store in your app. To specify how different
+ * parts of the state tree respond to actions, you may combine several reducers
+ * into a single reducer function by using `combineReducers`.
+ *
+ * @param {Function} reducer A function that returns the next state tree, given
+ * the current state tree and the action to handle.
+ *
+ * @param {any} [preloadedState] The initial state. You may optionally specify it
+ * to hydrate the state from the server in universal apps, or to restore a
+ * previously serialized user session.
+ * If you use `combineReducers` to produce the root reducer function, this must be
+ * an object with the same shape as `combineReducers` keys.
+ *
+ * @param {Function} enhancer The store enhancer. You may optionally specify it
+ * to enhance the store with third-party capabilities such as middleware,
+ * time travel, persistence, etc. The only store enhancer that ships with Redux
+ * is `applyMiddleware()`.
+ *
+ * @returns {Store} A Redux store that lets you read the state, dispatch actions
+ * and subscribe to changes.
+ */
+function createStore(reducer, preloadedState, enhancer) {
var _ref2;
if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
@@ -20510,7 +20305,7 @@ var ActionTypes = {
* return something else (for example, a Promise you can await).
*/
function dispatch(action) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */])(action)) {
+ if (!__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */](action)) {
throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
}
@@ -20531,8 +20326,7 @@ var ActionTypes = {
var listeners = currentListeners = nextListeners;
for (var i = 0; i < listeners.length; i++) {
- var listener = listeners[i];
- listener();
+ listeners[i]();
}
return action;
@@ -20553,383 +20347,992 @@ var ActionTypes = {
throw new Error('Expected the nextReducer to be a function.');
}
- currentReducer = nextReducer;
- dispatch({ type: ActionTypes.INIT });
+ currentReducer = nextReducer;
+ dispatch({ type: ActionTypes.INIT });
+ }
+
+ /**
+ * Interoperability point for observable/reactive libraries.
+ * @returns {observable} A minimal observable of state changes.
+ * For more information, see the observable proposal:
+ * https://github.com/zenparsing/es-observable
+ */
+ function observable() {
+ var _ref;
+
+ var outerSubscribe = subscribe;
+ return _ref = {
+ /**
+ * The minimal observable subscription method.
+ * @param {Object} observer Any object that can be used as an observer.
+ * The observer object should have a `next` method.
+ * @returns {subscription} An object with an `unsubscribe` method that can
+ * be used to unsubscribe the observable from the store, and prevent further
+ * emission of values from the observable.
+ */
+ subscribe: function subscribe(observer) {
+ if (typeof observer !== 'object') {
+ throw new TypeError('Expected the observer to be an object.');
+ }
+
+ function observeState() {
+ if (observer.next) {
+ observer.next(getState());
+ }
+ }
+
+ observeState();
+ var unsubscribe = outerSubscribe(observeState);
+ return { unsubscribe: unsubscribe };
+ }
+ }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () {
+ return this;
+ }, _ref;
+ }
+
+ // When a store is created, an "INIT" action is dispatched so that every
+ // reducer returns their initial state. This effectively populates
+ // the initial state tree.
+ dispatch({ type: ActionTypes.INIT });
+
+ return _ref2 = {
+ dispatch: dispatch,
+ subscribe: subscribe,
+ getState: getState,
+ replaceReducer: replaceReducer
+ }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable, _ref2;
+}
+
+/***/ }),
+/* 259 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+/* harmony default export */ __webpack_exports__["a"] = (freeGlobal);
+
+/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(46)))
+
+/***/ }),
+/* 260 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(261);
+
+
+/** Built-in value references. */
+var getPrototype = __WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */](Object.getPrototypeOf, Object);
+
+/* harmony default export */ __webpack_exports__["a"] = (getPrototype);
+
+
+/***/ }),
+/* 261 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (overArg);
+
+
+/***/ }),
+/* 262 */
+/***/ (function(module, exports) {
+
+module.exports = function(module) {
+ if(!module.webpackPolyfill) {
+ module.deprecate = function() {};
+ module.paths = [];
+ // module.parent = undefined by default
+ if(!module.children) module.children = [];
+ Object.defineProperty(module, "loaded", {
+ enumerable: true,
+ get: function() {
+ return module.l;
+ }
+ });
+ Object.defineProperty(module, "id", {
+ enumerable: true,
+ get: function() {
+ return module.i;
+ }
+ });
+ module.webpackPolyfill = 1;
+ }
+ return module;
+};
+
+
+/***/ }),
+/* 263 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* unused harmony export default */
+/**
+ * Prints a warning in the console if it exists.
+ *
+ * @param {String} message The warning message.
+ * @returns {void}
+ */
+function warning(message) {
+ /* eslint-disable no-console */
+ if (typeof console !== 'undefined' && typeof console.error === 'function') {
+ console.error(message);
+ }
+ /* eslint-enable no-console */
+ try {
+ // This error was thrown as a convenience so that if you enable
+ // "break on all exceptions" in your console,
+ // it would pause the execution at this line.
+ throw new Error(message);
+ /* eslint-disable no-empty */
+ } catch (e) {}
+ /* eslint-enable no-empty */
+}
+
+/***/ }),
+/* 264 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony export (immutable) */ __webpack_exports__["a"] = compose;
+/**
+ * Composes single-argument functions from right to left. The rightmost
+ * function can take multiple arguments as it provides the signature for
+ * the resulting composite function.
+ *
+ * @param {...Function} funcs The functions to compose.
+ * @returns {Function} A function obtained by composing the argument functions
+ * from right to left. For example, compose(f, g, h) is identical to doing
+ * (...args) => f(g(h(...args))).
+ */
+
+function compose() {
+ for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
+ funcs[_key] = arguments[_key];
+ }
+
+ if (funcs.length === 0) {
+ return function (arg) {
+ return arg;
+ };
+ }
+
+ if (funcs.length === 1) {
+ return funcs[0];
+ }
+
+ var last = funcs[funcs.length - 1];
+ var rest = funcs.slice(0, -1);
+ return function () {
+ return rest.reduceRight(function (composed, f) {
+ return f(composed);
+ }, last.apply(undefined, arguments));
+ };
+}
+
+/***/ }),
+/* 265 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _react = __webpack_require__(0);
+
+exports["default"] = _react.PropTypes.shape({
+ subscribe: _react.PropTypes.func.isRequired,
+ dispatch: _react.PropTypes.func.isRequired,
+ getState: _react.PropTypes.func.isRequired
+});
+
+/***/ }),
+/* 266 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+exports["default"] = warning;
+/**
+ * Prints a warning in the console if it exists.
+ *
+ * @param {String} message The warning message.
+ * @returns {void}
+ */
+function warning(message) {
+ /* eslint-disable no-console */
+ if (typeof console !== 'undefined' && typeof console.error === 'function') {
+ console.error(message);
+ }
+ /* eslint-enable no-console */
+ try {
+ // This error was thrown as a convenience so that if you enable
+ // "break on all exceptions" in your console,
+ // it would pause the execution at this line.
+ throw new Error(message);
+ /* eslint-disable no-empty */
+ } catch (e) {}
+ /* eslint-enable no-empty */
+}
+
+/***/ }),
+/* 267 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var root = __webpack_require__(477);
+
+/** Built-in value references. */
+var Symbol = root.Symbol;
+
+module.exports = Symbol;
+
+
+/***/ }),
+/* 268 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+var repeat = exports.repeat = function repeat(str, times) {
+ return new Array(times + 1).join(str);
+};
+
+var pad = exports.pad = function pad(num, maxLength) {
+ return repeat("0", maxLength - num.toString().length) + num;
+};
+
+var formatTime = exports.formatTime = function formatTime(time) {
+ return pad(time.getHours(), 2) + ":" + pad(time.getMinutes(), 2) + ":" + pad(time.getSeconds(), 2) + "." + pad(time.getMilliseconds(), 3);
+};
+
+// Use performance API if it's available in order to get better precision
+var timer = exports.timer = typeof performance !== "undefined" && performance !== null && typeof performance.now === "function" ? performance : Date;
+
+/***/ }),
+/* 269 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+exports.routerReducer = routerReducer;
+/**
+ * This action type will be dispatched when your history
+ * receives a location change.
+ */
+var LOCATION_CHANGE = exports.LOCATION_CHANGE = '@@router/LOCATION_CHANGE';
+
+var initialState = {
+ locationBeforeTransitions: null
+};
+
+/**
+ * This reducer will update the state with the most recent location history
+ * has transitioned to. This may not be in sync with the router, particularly
+ * if you have asynchronously-loaded routes, so reading from and relying on
+ * this state is discouraged.
+ */
+function routerReducer() {
+ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
+
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
+ type = _ref.type,
+ payload = _ref.payload;
+
+ if (type === LOCATION_CHANGE) {
+ return _extends({}, state, { locationBeforeTransitions: payload });
+ }
+
+ return state;
+}
+
+/***/ }),
+/* 270 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+/**
+ * This action type will be dispatched by the history actions below.
+ * If you're writing a middleware to watch for navigation events, be sure to
+ * look for actions of this type.
+ */
+var CALL_HISTORY_METHOD = exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD';
+
+function updateLocation(method) {
+ return function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return {
+ type: CALL_HISTORY_METHOD,
+ payload: { method: method, args: args }
+ };
+ };
+}
+
+/**
+ * These actions correspond to the history API.
+ * The associated routerMiddleware will capture these events before they get to
+ * your reducer and reissue them as the matching function on your history.
+ */
+var push = exports.push = updateLocation('push');
+var replace = exports.replace = updateLocation('replace');
+var go = exports.go = updateLocation('go');
+var goBack = exports.goBack = updateLocation('goBack');
+var goForward = exports.goForward = updateLocation('goForward');
+
+var routerActions = exports.routerActions = { push: push, replace: replace, go: go, goBack: goBack, goForward: goForward };
+
+/***/ }),
+/* 271 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/**
+ * A specialized version of `_.map` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (arrayMap);
+
+
+/***/ }),
+/* 272 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (copyArray);
+
+
+/***/ }),
+/* 273 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__ = __webpack_require__(501);
+
+
+/** Used to match property names within property paths. */
+var reLeadingDot = /^\./,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+
+/** Used to match backslashes in property paths. */
+var reEscapeChar = /\\(\\)?/g;
+
+/**
+ * Converts `string` to a property path array.
+ *
+ * @private
+ * @param {string} string The string to convert.
+ * @returns {Array} Returns the property path array.
+ */
+var stringToPath = __WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__["a" /* default */](function(string) {
+ var result = [];
+ if (reLeadingDot.test(string)) {
+ result.push('');
+ }
+ string.replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+});
+
+/* harmony default export */ __webpack_exports__["a"] = (stringToPath);
+
+
+/***/ }),
+/* 274 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/** Used for built-in method references. */
+var funcProto = Function.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
+
+/**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to convert.
+ * @returns {string} Returns the source code.
+ */
+function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
}
+ return '';
+}
- /**
- * Interoperability point for observable/reactive libraries.
- * @returns {observable} A minimal observable of state changes.
- * For more information, see the observable proposal:
- * https://github.com/tc39/proposal-observable
- */
- function observable() {
- var _ref;
+/* harmony default export */ __webpack_exports__["a"] = (toSource);
- var outerSubscribe = subscribe;
- return _ref = {
- /**
- * The minimal observable subscription method.
- * @param {Object} observer Any object that can be used as an observer.
- * The observer object should have a `next` method.
- * @returns {subscription} An object with an `unsubscribe` method that can
- * be used to unsubscribe the observable from the store, and prevent further
- * emission of values from the observable.
- */
- subscribe: function subscribe(observer) {
- if (typeof observer !== 'object') {
- throw new TypeError('Expected the observer to be an object.');
- }
- function observeState() {
- if (observer.next) {
- observer.next(getState());
- }
- }
+/***/ }),
+/* 275 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- observeState();
- var unsubscribe = outerSubscribe(observeState);
- return { unsubscribe: unsubscribe };
- }
- }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () {
- return this;
- }, _ref;
- }
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseToString_js__ = __webpack_require__(524);
- // When a store is created, an "INIT" action is dispatched so that every
- // reducer returns their initial state. This effectively populates
- // the initial state tree.
- dispatch({ type: ActionTypes.INIT });
- return _ref2 = {
- dispatch: dispatch,
- subscribe: subscribe,
- getState: getState,
- replaceReducer: replaceReducer
- }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable, _ref2;
+/**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+function toString(value) {
+ return value == null ? '' : __WEBPACK_IMPORTED_MODULE_0__baseToString_js__["a" /* default */](value);
}
+/* harmony default export */ __webpack_exports__["a"] = (toString);
+
+
/***/ }),
-/* 253 */
+/* 276 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
-var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(123);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(92);
-/* harmony default export */ __webpack_exports__["a"] = (freeGlobal);
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(47)))
+
+/**
+ * This function is like `assignValue` except that it doesn't assign
+ * `undefined` values.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function assignMergeValue(object, key, value) {
+ if ((value !== undefined && !__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */](object[key], value)) ||
+ (value === undefined && !(key in object))) {
+ __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */](object, key, value);
+ }
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (assignMergeValue);
+
/***/ }),
-/* 254 */
+/* 277 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(255);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60);
-/** Built-in value references. */
-var getPrototype = Object(__WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */])(Object.getPrototypeOf, Object);
+var defineProperty = (function() {
+ try {
+ var func = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](Object, 'defineProperty');
+ func({}, '', {});
+ return func;
+ } catch (e) {}
+}());
-/* harmony default export */ __webpack_exports__["a"] = (getPrototype);
+/* harmony default export */ __webpack_exports__["a"] = (defineProperty);
/***/ }),
-/* 255 */
+/* 278 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__ = __webpack_require__(533);
+
+
/**
- * Creates a unary function that invokes `func` with its argument transformed.
+ * The base implementation of `baseForOwn` which iterates over `object`
+ * properties returned by `keysFunc` and invokes `iteratee` for each property.
+ * Iteratee functions may exit iteration early by explicitly returning `false`.
*
* @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
*/
-function overArg(func, transform) {
- return function(arg) {
- return func(transform(arg));
- };
-}
+var baseFor = __WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__["a" /* default */]();
-/* harmony default export */ __webpack_exports__["a"] = (overArg);
+/* harmony default export */ __webpack_exports__["a"] = (baseFor);
/***/ }),
-/* 256 */
-/***/ (function(module, exports) {
+/* 279 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-module.exports = function(module) {
- if(!module.webpackPolyfill) {
- module.deprecate = function() {};
- module.paths = [];
- // module.parent = undefined by default
- if(!module.children) module.children = [];
- Object.defineProperty(module, "loaded", {
- enumerable: true,
- get: function() {
- return module.l;
- }
- });
- Object.defineProperty(module, "id", {
- enumerable: true,
- get: function() {
- return module.i;
- }
- });
- module.webpackPolyfill = 1;
- }
- return module;
-};
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(29);
+
+
+/** Built-in value references. */
+var Uint8Array = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Uint8Array;
+
+/* harmony default export */ __webpack_exports__["a"] = (Uint8Array);
/***/ }),
-/* 257 */
+/* 280 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* unused harmony export default */
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(281);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__ = __webpack_require__(550);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(124);
+
+
+
+
/**
- * Prints a warning in the console if it exists.
+ * Creates an array of the own and inherited enumerable property names of `object`.
*
- * @param {String} message The warning message.
- * @returns {void}
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
*/
-function warning(message) {
- /* eslint-disable no-console */
- if (typeof console !== 'undefined' && typeof console.error === 'function') {
- console.error(message);
- }
- /* eslint-enable no-console */
- try {
- // This error was thrown as a convenience so that if you enable
- // "break on all exceptions" in your console,
- // it would pause the execution at this line.
- throw new Error(message);
- /* eslint-disable no-empty */
- } catch (e) {}
- /* eslint-enable no-empty */
+function keysIn(object) {
+ return __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */](object) ? __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */](object, true) : __WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__["a" /* default */](object);
}
+/* harmony default export */ __webpack_exports__["a"] = (keysIn);
+
+
/***/ }),
-/* 258 */
+/* 281 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony export (immutable) */ __webpack_exports__["a"] = compose;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseTimes_js__ = __webpack_require__(549);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(181);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(30);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isBuffer_js__ = __webpack_require__(183);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isIndex_js__ = __webpack_require__(185);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__ = __webpack_require__(184);
+
+
+
+
+
+
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
/**
- * Composes single-argument functions from right to left. The rightmost
- * function can take multiple arguments as it provides the signature for
- * the resulting composite function.
+ * Creates an array of the enumerable property names of the array-like `value`.
*
- * @param {...Function} funcs The functions to compose.
- * @returns {Function} A function obtained by composing the argument functions
- * from right to left. For example, compose(f, g, h) is identical to doing
- * (...args) => f(g(h(...args))).
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
*/
+function arrayLikeKeys(value, inherited) {
+ var isArr = __WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](value),
+ isArg = !isArr && __WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */](value),
+ isBuff = !isArr && !isArg && __WEBPACK_IMPORTED_MODULE_3__isBuffer_js__["a" /* default */](value),
+ isType = !isArr && !isArg && !isBuff && __WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__["a" /* default */](value),
+ skipIndexes = isArr || isArg || isBuff || isType,
+ result = skipIndexes ? __WEBPACK_IMPORTED_MODULE_0__baseTimes_js__["a" /* default */](value.length, String) : [],
+ length = result.length;
-function compose() {
- for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
- funcs[_key] = arguments[_key];
- }
-
- if (funcs.length === 0) {
- return function (arg) {
- return arg;
- };
+ for (var key in value) {
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (
+ // Safari 9 has enumerable `arguments.length` in strict mode.
+ key == 'length' ||
+ // Node.js 0.10 has enumerable non-index properties on buffers.
+ (isBuff && (key == 'offset' || key == 'parent')) ||
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
+ // Skip index properties.
+ __WEBPACK_IMPORTED_MODULE_4__isIndex_js__["a" /* default */](key, length)
+ ))) {
+ result.push(key);
+ }
}
+ return result;
+}
- if (funcs.length === 1) {
- return funcs[0];
- }
+/* harmony default export */ __webpack_exports__["a"] = (arrayLikeKeys);
- return funcs.reduce(function (a, b) {
- return function () {
- return a(b.apply(undefined, arguments));
- };
- });
-}
/***/ }),
-/* 259 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 282 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(123);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__ = __webpack_require__(561);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(564);
-exports.__esModule = true;
-var _propTypes = __webpack_require__(14);
-var _propTypes2 = _interopRequireDefault(_propTypes);
+/**
+ * Creates an object with the same keys as `object` and values generated
+ * by running each own enumerable string keyed property of `object` thru
+ * `iteratee`. The iteratee is invoked with three arguments:
+ * (value, key, object).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Object
+ * @param {Object} object The object to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @returns {Object} Returns the new mapped object.
+ * @see _.mapKeys
+ * @example
+ *
+ * var users = {
+ * 'fred': { 'user': 'fred', 'age': 40 },
+ * 'pebbles': { 'user': 'pebbles', 'age': 1 }
+ * };
+ *
+ * _.mapValues(users, function(o) { return o.age; });
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ *
+ * // The `_.property` iteratee shorthand.
+ * _.mapValues(users, 'age');
+ * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
+ */
+function mapValues(object, iteratee) {
+ var result = {};
+ iteratee = __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */](iteratee, 3);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+ __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__["a" /* default */](object, function(value, key, object) {
+ __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */](result, key, iteratee(value, key, object));
+ });
+ return result;
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (mapValues);
-exports["default"] = _propTypes2["default"].shape({
- subscribe: _propTypes2["default"].func.isRequired,
- dispatch: _propTypes2["default"].func.isRequired,
- getState: _propTypes2["default"].func.isRequired
-});
/***/ }),
-/* 260 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 283 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SetCache_js__ = __webpack_require__(568);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arraySome_js__ = __webpack_require__(571);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cacheHas_js__ = __webpack_require__(572);
-exports.__esModule = true;
-exports["default"] = warning;
+
+
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
/**
- * Prints a warning in the console if it exists.
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
*
- * @param {String} message The warning message.
- * @returns {void}
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
*/
-function warning(message) {
- /* eslint-disable no-console */
- if (typeof console !== 'undefined' && typeof console.error === 'function') {
- console.error(message);
+function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
+ return false;
}
- /* eslint-enable no-console */
- try {
- // This error was thrown as a convenience so that if you enable
- // "break on all exceptions" in your console,
- // it would pause the execution at this line.
- throw new Error(message);
- /* eslint-disable no-empty */
- } catch (e) {}
- /* eslint-enable no-empty */
-}
+ // Assume cyclic values are equal.
+ var stacked = stack.get(array);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var index = -1,
+ result = true,
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new __WEBPACK_IMPORTED_MODULE_0__SetCache_js__["a" /* default */] : undefined;
-/***/ }),
-/* 261 */
-/***/ (function(module, exports, __webpack_require__) {
+ stack.set(array, other);
+ stack.set(other, array);
-var root = __webpack_require__(469);
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
-/** Built-in value references. */
-var Symbol = root.Symbol;
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, arrValue, index, other, array, stack)
+ : customizer(arrValue, othValue, index, array, other, stack);
+ }
+ if (compared !== undefined) {
+ if (compared) {
+ continue;
+ }
+ result = false;
+ break;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (seen) {
+ if (!__WEBPACK_IMPORTED_MODULE_1__arraySome_js__["a" /* default */](other, function(othValue, othIndex) {
+ if (!__WEBPACK_IMPORTED_MODULE_2__cacheHas_js__["a" /* default */](seen, othIndex) &&
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
+ return seen.push(othIndex);
+ }
+ })) {
+ result = false;
+ break;
+ }
+ } else if (!(
+ arrValue === othValue ||
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
+ )) {
+ result = false;
+ break;
+ }
+ }
+ stack['delete'](array);
+ stack['delete'](other);
+ return result;
+}
-module.exports = Symbol;
+/* harmony default export */ __webpack_exports__["a"] = (equalArrays);
/***/ }),
-/* 262 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 284 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(47);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-var repeat = exports.repeat = function repeat(str, times) {
- return new Array(times + 1).join(str);
-};
-
-var pad = exports.pad = function pad(num, maxLength) {
- return repeat("0", maxLength - num.toString().length) + num;
-};
+/**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+function isStrictComparable(value) {
+ return value === value && !__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */](value);
+}
-var formatTime = exports.formatTime = function formatTime(time) {
- return pad(time.getHours(), 2) + ":" + pad(time.getMinutes(), 2) + ":" + pad(time.getSeconds(), 2) + "." + pad(time.getMilliseconds(), 3);
-};
+/* harmony default export */ __webpack_exports__["a"] = (isStrictComparable);
-// Use performance API if it's available in order to get better precision
-var timer = exports.timer = typeof performance !== "undefined" && performance !== null && typeof performance.now === "function" ? performance : Date;
/***/ }),
-/* 263 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 285 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+/**
+ * A specialized version of `matchesProperty` for source values suitable
+ * for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function matchesStrictComparable(key, srcValue) {
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === srcValue &&
+ (srcValue !== undefined || (key in Object(object)));
+ };
+}
+/* harmony default export */ __webpack_exports__["a"] = (matchesStrictComparable);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-exports.routerReducer = routerReducer;
-/**
- * This action type will be dispatched when your history
- * receives a location change.
- */
-var LOCATION_CHANGE = exports.LOCATION_CHANGE = '@@router/LOCATION_CHANGE';
+/***/ }),
+/* 286 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(287);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toKey_js__ = __webpack_require__(93);
+
-var initialState = {
- locationBeforeTransitions: null
-};
/**
- * This reducer will update the state with the most recent location history
- * has transitioned to. This may not be in sync with the router, particularly
- * if you have asynchronously-loaded routes, so reading from and relying on
- * this state is discouraged.
+ * The base implementation of `_.get` without support for default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {*} Returns the resolved value.
*/
-function routerReducer() {
- var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
+function baseGet(object, path) {
+ path = __WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */](path, object);
- var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
- type = _ref.type,
- payload = _ref.payload;
+ var index = 0,
+ length = path.length;
- if (type === LOCATION_CHANGE) {
- return _extends({}, state, { locationBeforeTransitions: payload });
+ while (object != null && index < length) {
+ object = object[__WEBPACK_IMPORTED_MODULE_1__toKey_js__["a" /* default */](path[index++])];
}
-
- return state;
+ return (index && index == length) ? object : undefined;
}
+/* harmony default export */ __webpack_exports__["a"] = (baseGet);
+
+
/***/ }),
-/* 264 */
-/***/ (function(module, exports, __webpack_require__) {
+/* 287 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(30);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isKey_js__ = __webpack_require__(189);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stringToPath_js__ = __webpack_require__(273);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(275);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-/**
- * This action type will be dispatched by the history actions below.
- * If you're writing a middleware to watch for navigation events, be sure to
- * look for actions of this type.
- */
-var CALL_HISTORY_METHOD = exports.CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD';
-function updateLocation(method) {
- return function () {
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- return {
- type: CALL_HISTORY_METHOD,
- payload: { method: method, args: args }
- };
- };
-}
/**
- * These actions correspond to the history API.
- * The associated routerMiddleware will capture these events before they get to
- * your reducer and reissue them as the matching function on your history.
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {Array} Returns the cast property path array.
*/
-var push = exports.push = updateLocation('push');
-var replace = exports.replace = updateLocation('replace');
-var go = exports.go = updateLocation('go');
-var goBack = exports.goBack = updateLocation('goBack');
-var goForward = exports.goForward = updateLocation('goForward');
+function castPath(value, object) {
+ if (__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */](value)) {
+ return value;
+ }
+ return __WEBPACK_IMPORTED_MODULE_1__isKey_js__["a" /* default */](value, object) ? [value] : __WEBPACK_IMPORTED_MODULE_2__stringToPath_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */](value));
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (castPath);
-var routerActions = exports.routerActions = { push: push, replace: replace, go: go, goBack: goBack, goForward: goForward };
/***/ }),
-/* 265 */
+/* 288 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -20948,7 +21351,6 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearSubmit", function() { return clearSubmit; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearSubmitErrors", function() { return clearSubmitErrors; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearAsyncError", function() { return clearAsyncError; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "destroy", function() { return destroy; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; });
@@ -20967,60 +21369,37 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "untouch", function() { return untouch; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSyncErrors", function() { return updateSyncErrors; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateSyncWarnings", function() { return updateSyncWarnings; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(167);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(174);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var arrayInsert = function arrayInsert(form, field, index, value) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"],
- meta: { form: form, field: field, index: index },
- payload: value
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], meta: { form: form, field: field, index: index }, payload: value };
};
var arrayMove = function arrayMove(form, field, from, to) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"],
- meta: { form: form, field: field, from: from, to: to }
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], meta: { form: form, field: field, from: from, to: to } };
};
var arrayPop = function arrayPop(form, field) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"],
- meta: { form: form, field: field }
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], meta: { form: form, field: field } };
};
var arrayPush = function arrayPush(form, field, value) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"],
- meta: { form: form, field: field },
- payload: value
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], meta: { form: form, field: field }, payload: value };
};
var arrayRemove = function arrayRemove(form, field, index) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"],
- meta: { form: form, field: field, index: index }
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], meta: { form: form, field: field, index: index } };
};
var arrayRemoveAll = function arrayRemoveAll(form, field) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"],
- meta: { form: form, field: field }
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], meta: { form: form, field: field } };
};
var arrayShift = function arrayShift(form, field) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"],
- meta: { form: form, field: field }
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], meta: { form: form, field: field } };
};
var arraySplice = function arraySplice(form, field, index, removeNum, value) {
@@ -21045,53 +21424,27 @@ var arraySwap = function arraySwap(form, field, indexA, indexB) {
};
var arrayUnshift = function arrayUnshift(form, field, value) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"],
- meta: { form: form, field: field },
- payload: value
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], meta: { form: form, field: field }, payload: value };
};
var autofill = function autofill(form, field, value) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"],
- meta: { form: form, field: field },
- payload: value
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], meta: { form: form, field: field }, payload: value };
};
var blur = function blur(form, field, value, touch) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"],
- meta: { form: form, field: field, touch: touch },
- payload: value
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], meta: { form: form, field: field, touch: touch }, payload: value };
};
var change = function change(form, field, value, touch, persistentSubmitErrors) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"],
- meta: { form: form, field: field, touch: touch, persistentSubmitErrors: persistentSubmitErrors },
- payload: value
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], meta: { form: form, field: field, touch: touch, persistentSubmitErrors: persistentSubmitErrors }, payload: value };
};
var clearSubmit = function clearSubmit(form) {
return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], meta: { form: form } };
};
-var clearSubmitErrors = function clearSubmitErrors(form) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT_ERRORS"],
- meta: { form: form }
- };
-};
-
var clearAsyncError = function clearAsyncError(form, field) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"],
- meta: { form: form, field: field }
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], meta: { form: form, field: field } };
};
var destroy = function destroy() {
@@ -21113,19 +21466,11 @@ var initialize = function initialize(form, values, keepDirty) {
otherMeta = keepDirty;
keepDirty = false;
}
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"],
- meta: _extends({ form: form, keepDirty: keepDirty }, otherMeta),
- payload: values
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], meta: _extends({ form: form, keepDirty: keepDirty }, otherMeta), payload: values };
};
var registerField = function registerField(form, name, type) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"],
- meta: { form: form },
- payload: { name: name, type: type }
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], meta: { form: form }, payload: { name: name, type: type } };
};
var reset = function reset(form) {
@@ -21133,10 +21478,7 @@ var reset = function reset(form) {
};
var startAsyncValidation = function startAsyncValidation(form, field) {
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"],
- meta: { form: form, field: field }
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], meta: { form: form, field: field } };
};
var startSubmit = function startSubmit(form) {
@@ -21176,11 +21518,7 @@ var setSubmitFailed = function setSubmitFailed(form) {
fields[_key2 - 1] = arguments[_key2];
}
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"],
- meta: { form: form, fields: fields },
- error: true
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], meta: { form: form, fields: fields }, error: true };
};
var setSubmitSucceeded = function setSubmitSucceeded(form) {
@@ -21188,11 +21526,7 @@ var setSubmitSucceeded = function setSubmitSucceeded(form) {
fields[_key3 - 1] = arguments[_key3];
}
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"],
- meta: { form: form, fields: fields },
- error: false
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], meta: { form: form, fields: fields }, error: false };
};
var touch = function touch(form) {
@@ -21200,19 +21534,12 @@ var touch = function touch(form) {
fields[_key4 - 1] = arguments[_key4];
}
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"],
- meta: { form: form, fields: fields }
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], meta: { form: form, fields: fields } };
};
var unregisterField = function unregisterField(form, name) {
var destroyOnUnmount = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"],
- meta: { form: form },
- payload: { name: name, destroyOnUnmount: destroyOnUnmount }
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], meta: { form: form }, payload: { name: name, destroyOnUnmount: destroyOnUnmount } };
};
var untouch = function untouch(form) {
@@ -21220,116 +21547,163 @@ var untouch = function untouch(form) {
fields[_key5 - 1] = arguments[_key5];
}
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"],
- meta: { form: form, fields: fields }
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], meta: { form: form, fields: fields } };
};
var updateSyncErrors = function updateSyncErrors(form) {
var syncErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var error = arguments[2];
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"],
- meta: { form: form },
- payload: { syncErrors: syncErrors, error: error }
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], meta: { form: form }, payload: { syncErrors: syncErrors, error: error } };
};
var updateSyncWarnings = function updateSyncWarnings(form) {
var syncWarnings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var warning = arguments[2];
- return {
- type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"],
- meta: { form: form },
- payload: { syncWarnings: syncWarnings, warning: warning }
- };
+ return { type: __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], meta: { form: form }, payload: { syncWarnings: syncWarnings, warning: warning } };
};
/***/ }),
-/* 266 */
+/* 289 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-var defaultShouldAsyncValidate = function defaultShouldAsyncValidate(_ref) {
- var initialized = _ref.initialized,
- trigger = _ref.trigger,
- pristine = _ref.pristine,
- syncValidationPasses = _ref.syncValidationPasses;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error__ = __webpack_require__(599);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_es6_error__);
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- if (!syncValidationPasses) {
- return false;
- }
- switch (trigger) {
- case 'blur':
- // blurring
- return true;
- case 'submit':
- // submitting, so only async validate if form is dirty or was never initialized
- // conversely, DON'T async validate if the form is pristine just as it was initialized
- return !pristine || !initialized;
- default:
- return false;
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+
+
+var SubmissionError = function (_ExtendableError) {
+ _inherits(SubmissionError, _ExtendableError);
+
+ function SubmissionError(errors) {
+ _classCallCheck(this, SubmissionError);
+
+ var _this = _possibleConstructorReturn(this, (SubmissionError.__proto__ || Object.getPrototypeOf(SubmissionError)).call(this, 'Submit Validation Failed'));
+
+ _this.errors = errors;
+ return _this;
}
-};
-/* harmony default export */ __webpack_exports__["a"] = (defaultShouldAsyncValidate);
+ return SubmissionError;
+}(__WEBPACK_IMPORTED_MODULE_0_es6_error___default.a);
+
+/* harmony default export */ __webpack_exports__["a"] = (SubmissionError);
/***/ }),
-/* 267 */
+/* 290 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-var defaultShouldValidate = function defaultShouldValidate(_ref) {
- var values = _ref.values,
- nextProps = _ref.nextProps,
- initialRender = _ref.initialRender,
- lastFieldValidatorKeys = _ref.lastFieldValidatorKeys,
- fieldValidatorKeys = _ref.fieldValidatorKeys,
- structure = _ref.structure;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(291);
- if (initialRender) {
- return true;
+
+var silenceEvent = function silenceEvent(event) {
+ var is = __WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */](event);
+ if (is) {
+ event.preventDefault();
}
- return !structure.deepEqual(values, nextProps.values) || !structure.deepEqual(lastFieldValidatorKeys, fieldValidatorKeys);
+ return is;
};
-/* harmony default export */ __webpack_exports__["a"] = (defaultShouldValidate);
+/* harmony default export */ __webpack_exports__["a"] = (silenceEvent);
/***/ }),
-/* 268 */
+/* 291 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error__ = __webpack_require__(492);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_es6_error___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_es6_error__);
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+var isEvent = function isEvent(candidate) {
+ return !!(candidate && candidate.stopPropagation && candidate.preventDefault);
+};
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+/* harmony default export */ __webpack_exports__["a"] = (isEvent);
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+/***/ }),
+/* 292 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(117);
-var SubmissionError = function (_ExtendableError) {
- _inherits(SubmissionError, _ExtendableError);
- function SubmissionError(errors) {
- _classCallCheck(this, SubmissionError);
+var getIn = function getIn(state, field) {
+ if (!state) {
+ return state;
+ }
- var _this = _possibleConstructorReturn(this, (SubmissionError.__proto__ || Object.getPrototypeOf(SubmissionError)).call(this, 'Submit Validation Failed'));
+ var path = __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](field);
+ var length = path.length;
+ if (!length) {
+ return undefined;
+ }
- _this.errors = errors;
- return _this;
+ var result = state;
+ for (var i = 0; i < length && !!result; ++i) {
+ result = result[path[i]];
}
- return SubmissionError;
-}(__WEBPACK_IMPORTED_MODULE_0_es6_error___default.a);
+ return result;
+};
-/* harmony default export */ __webpack_exports__["a"] = (SubmissionError);
+/* harmony default export */ __webpack_exports__["a"] = (getIn);
/***/ }),
-/* 269 */
+/* 293 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(188);
+
+
+/**
+ * This method is like `_.isEqual` except that it accepts `customizer` which
+ * is invoked to compare values. If `customizer` returns `undefined`, comparisons
+ * are handled by the method instead. The `customizer` is invoked with up to
+ * six arguments: (objValue, othValue [, index|key, object, other, stack]).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * function isGreeting(value) {
+ * return /^h(?:i|ello)$/.test(value);
+ * }
+ *
+ * function customizer(objValue, othValue) {
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
+ * return true;
+ * }
+ * }
+ *
+ * var array = ['hello', 'goodbye'];
+ * var other = ['hi', 'goodbye'];
+ *
+ * _.isEqualWith(array, other, customizer);
+ * // => true
+ */
+function isEqualWith(value, other, customizer) {
+ customizer = typeof customizer == 'function' ? customizer : undefined;
+ var result = customizer ? customizer(value, other) : undefined;
+ return result === undefined ? __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */](value, other, undefined, customizer) : !!result;
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (isEqualWith);
+
+
+/***/ }),
+/* 294 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -21379,7 +21753,6 @@ var createFieldProps = function createFieldProps(_ref2, name, _ref) {
onFocus = _ref.onFocus,
form = _ref.form,
format = _ref.format,
- initial = _ref.initial,
parse = _ref.parse,
pristine = _ref.pristine,
props = _ref.props,
@@ -21393,7 +21766,7 @@ var createFieldProps = function createFieldProps(_ref2, name, _ref) {
value = _ref.value,
_value = _ref._value,
warn = _ref.warn,
- custom = _objectWithoutProperties(_ref, ['asyncError', 'asyncValidating', 'onBlur', 'onChange', 'onDrop', 'onDragStart', 'dirty', 'dispatch', 'onFocus', 'form', 'format', 'initial', 'parse', 'pristine', 'props', 'state', 'submitError', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'validate', 'value', '_value', 'warn']);
+ custom = _objectWithoutProperties(_ref, ['asyncError', 'asyncValidating', 'onBlur', 'onChange', 'onDrop', 'onDragStart', 'dirty', 'dispatch', 'onFocus', 'form', 'format', 'parse', 'pristine', 'props', 'state', 'submitError', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'validate', 'value', '_value', 'warn']);
var error = syncError || asyncError || submitError;
var warning = syncWarning;
@@ -21426,7 +21799,6 @@ var createFieldProps = function createFieldProps(_ref2, name, _ref) {
dispatch: dispatch,
error: error,
form: form,
- initial: initial,
warning: warning,
invalid: !!error,
pristine: pristine,
@@ -21443,12 +21815,12 @@ var createFieldProps = function createFieldProps(_ref2, name, _ref) {
/* harmony default export */ __webpack_exports__["a"] = (createFieldProps);
/***/ }),
-/* 270 */
+/* 295 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getValue__ = __webpack_require__(497);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isReactNative__ = __webpack_require__(498);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getValue__ = __webpack_require__(613);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isReactNative__ = __webpack_require__(614);
@@ -21458,10 +21830,10 @@ var onChangeValue = function onChangeValue(event, _ref) {
normalize = _ref.normalize;
// read value from input
- var value = Object(__WEBPACK_IMPORTED_MODULE_0__getValue__["a" /* default */])(event, __WEBPACK_IMPORTED_MODULE_1__isReactNative__["a" /* default */]
+ var value = __WEBPACK_IMPORTED_MODULE_0__getValue__["a" /* default */](event, __WEBPACK_IMPORTED_MODULE_1__isReactNative__["a" /* default */]);
// parse value if we have a parser
- );if (parse) {
+ if (parse) {
value = parse(value, name);
}
@@ -21476,915 +21848,1245 @@ var onChangeValue = function onChangeValue(event, _ref) {
/* harmony default export */ __webpack_exports__["a"] = (onChangeValue);
/***/ }),
-/* 271 */
+/* 296 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-var isEvent = function isEvent(candidate) {
- return !!(candidate && candidate.stopPropagation && candidate.preventDefault);
+var createIsPristine = function createIsPristine(_ref) {
+ var deepEqual = _ref.deepEqual,
+ empty = _ref.empty,
+ getIn = _ref.getIn;
+ return function (form) {
+ var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
+ return getIn(state, 'form');
+ };
+ return function (state) {
+ var formState = getFormState(state);
+ var initial = getIn(formState, form + '.initial') || empty;
+ var values = getIn(formState, form + '.values') || initial;
+ return deepEqual(initial, values);
+ };
+ };
};
-/* harmony default export */ __webpack_exports__["a"] = (isEvent);
+/* harmony default export */ __webpack_exports__["a"] = (createIsPristine);
/***/ }),
-/* 272 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 297 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/**
- * A specialized version of `_.map` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
-function arrayMap(array, iteratee) {
- var index = -1,
- length = array == null ? 0 : array.length,
- result = Array(length);
- while (++index < length) {
- result[index] = iteratee(array[index], index, array);
+var LIBRARY = __webpack_require__(126)
+ , $export = __webpack_require__(33)
+ , redefine = __webpack_require__(298)
+ , hide = __webpack_require__(53)
+ , has = __webpack_require__(54)
+ , Iterators = __webpack_require__(83)
+ , $iterCreate = __webpack_require__(644)
+ , setToStringTag = __webpack_require__(127)
+ , getPrototypeOf = __webpack_require__(300)
+ , ITERATOR = __webpack_require__(24)('iterator')
+ , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
+ , FF_ITERATOR = '@@iterator'
+ , KEYS = 'keys'
+ , VALUES = 'values';
+
+var returnThis = function(){ return this; };
+
+module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
+ $iterCreate(Constructor, NAME, next);
+ var getMethod = function(kind){
+ if(!BUGGY && kind in proto)return proto[kind];
+ switch(kind){
+ case KEYS: return function keys(){ return new Constructor(this, kind); };
+ case VALUES: return function values(){ return new Constructor(this, kind); };
+ } return function entries(){ return new Constructor(this, kind); };
+ };
+ var TAG = NAME + ' Iterator'
+ , DEF_VALUES = DEFAULT == VALUES
+ , VALUES_BUG = false
+ , proto = Base.prototype
+ , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
+ , $default = $native || getMethod(DEFAULT)
+ , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
+ , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
+ , methods, key, IteratorPrototype;
+ // Fix native
+ if($anyNative){
+ IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
+ if(IteratorPrototype !== Object.prototype){
+ // Set @@toStringTag to native iterators
+ setToStringTag(IteratorPrototype, TAG, true);
+ // fix for some old engines
+ if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
+ }
}
- return result;
-}
+ // fix Array#{values, @@iterator}.name in V8 / FF
+ if(DEF_VALUES && $native && $native.name !== VALUES){
+ VALUES_BUG = true;
+ $default = function values(){ return $native.call(this); };
+ }
+ // Define iterator
+ if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
+ hide(proto, ITERATOR, $default);
+ }
+ // Plug for library
+ Iterators[NAME] = $default;
+ Iterators[TAG] = returnThis;
+ if(DEFAULT){
+ methods = {
+ values: DEF_VALUES ? $default : getMethod(VALUES),
+ keys: IS_SET ? $default : getMethod(KEYS),
+ entries: $entries
+ };
+ if(FORCED)for(key in methods){
+ if(!(key in proto))redefine(proto, key, methods[key]);
+ } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
+ }
+ return methods;
+};
-/* harmony default export */ __webpack_exports__["a"] = (arrayMap);
+/***/ }),
+/* 298 */
+/***/ (function(module, exports, __webpack_require__) {
+module.exports = __webpack_require__(53);
/***/ }),
-/* 273 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 299 */
+/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-/**
- * Copies the values of `source` to `array`.
- *
- * @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
- */
-function copyArray(source, array) {
- var index = -1,
- length = source.length;
+module.exports = __webpack_require__(25).document && document.documentElement;
- array || (array = Array(length));
- while (++index < length) {
- array[index] = source[index];
- }
- return array;
-}
+/***/ }),
+/* 300 */
+/***/ (function(module, exports, __webpack_require__) {
-/* harmony default export */ __webpack_exports__["a"] = (copyArray);
+// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
+var has = __webpack_require__(54)
+ , toObject = __webpack_require__(88)
+ , IE_PROTO = __webpack_require__(142)('IE_PROTO')
+ , ObjectProto = Object.prototype;
+module.exports = Object.getPrototypeOf || function(O){
+ O = toObject(O);
+ if(has(O, IE_PROTO))return O[IE_PROTO];
+ if(typeof O.constructor == 'function' && O instanceof O.constructor){
+ return O.constructor.prototype;
+ } return O instanceof Object ? ObjectProto : null;
+};
/***/ }),
-/* 274 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 301 */
+/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__ = __webpack_require__(502);
+// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
+var $keys = __webpack_require__(214)
+ , hiddenKeys = __webpack_require__(144).concat('length', 'prototype');
+exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){
+ return $keys(O, hiddenKeys);
+};
-/** Used to match property names within property paths. */
-var reLeadingDot = /^\./,
- rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
+/***/ }),
+/* 302 */
+/***/ (function(module, exports, __webpack_require__) {
-/** Used to match backslashes in property paths. */
-var reEscapeChar = /\\(\\)?/g;
+var pIE = __webpack_require__(104)
+ , createDesc = __webpack_require__(86)
+ , toIObject = __webpack_require__(55)
+ , toPrimitive = __webpack_require__(138)
+ , has = __webpack_require__(54)
+ , IE8_DOM_DEFINE = __webpack_require__(213)
+ , gOPD = Object.getOwnPropertyDescriptor;
-/**
- * Converts `string` to a property path array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the property path array.
- */
-var stringToPath = Object(__WEBPACK_IMPORTED_MODULE_0__memoizeCapped_js__["a" /* default */])(function(string) {
- var result = [];
- if (reLeadingDot.test(string)) {
- result.push('');
- }
- string.replace(rePropName, function(match, number, quote, string) {
- result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
- });
- return result;
-});
+exports.f = __webpack_require__(43) ? gOPD : function getOwnPropertyDescriptor(O, P){
+ O = toIObject(O);
+ P = toPrimitive(P, true);
+ if(IE8_DOM_DEFINE)try {
+ return gOPD(O, P);
+ } catch(e){ /* empty */ }
+ if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
+};
+
+/***/ }),
+/* 303 */
+/***/ (function(module, exports) {
-/* harmony default export */ __webpack_exports__["a"] = (stringToPath);
/***/ }),
-/* 275 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 304 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// most Object methods by ES6 should accept primitives
+var $export = __webpack_require__(33)
+ , core = __webpack_require__(18)
+ , fails = __webpack_require__(69);
+module.exports = function(KEY, exec){
+ var fn = (core.Object || {})[KEY] || Object[KEY]
+ , exp = {};
+ exp[KEY] = exec(fn);
+ $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
+};
+
+/***/ }),
+/* 305 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/** Used for built-in method references. */
-var funcProto = Function.prototype;
-/** Used to resolve the decompiled source of functions. */
-var funcToString = funcProto.toString;
-/**
- * Converts `func` to its source code.
- *
- * @private
- * @param {Function} func The function to convert.
- * @returns {string} Returns the source code.
- */
-function toSource(func) {
- if (func != null) {
- try {
- return funcToString.call(func);
- } catch (e) {}
- try {
- return (func + '');
- } catch (e) {}
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _react = __webpack_require__(0);
+
+var _getMuiTheme = __webpack_require__(129);
+
+var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var MuiThemeProvider = function (_Component) {
+ (0, _inherits3.default)(MuiThemeProvider, _Component);
+
+ function MuiThemeProvider() {
+ (0, _classCallCheck3.default)(this, MuiThemeProvider);
+ return (0, _possibleConstructorReturn3.default)(this, (MuiThemeProvider.__proto__ || (0, _getPrototypeOf2.default)(MuiThemeProvider)).apply(this, arguments));
}
- return '';
-}
-/* harmony default export */ __webpack_exports__["a"] = (toSource);
+ (0, _createClass3.default)(MuiThemeProvider, [{
+ key: 'getChildContext',
+ value: function getChildContext() {
+ return {
+ muiTheme: this.props.muiTheme || (0, _getMuiTheme2.default)()
+ };
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ return this.props.children;
+ }
+ }]);
+ return MuiThemeProvider;
+}(_react.Component);
+
+MuiThemeProvider.childContextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? MuiThemeProvider.propTypes = {
+ children: _react.PropTypes.element,
+ muiTheme: _react.PropTypes.object
+} : void 0;
+exports.default = MuiThemeProvider;
+
+/***/ }),
+/* 306 */
+/***/ (function(module, exports, __webpack_require__) {
+module.exports = { "default": __webpack_require__(673), __esModule: true };
/***/ }),
-/* 276 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseToString_js__ = __webpack_require__(525);
+/* 307 */
+/***/ (function(module, exports, __webpack_require__) {
+// call something on iterator step with safe closing on error
+var anObject = __webpack_require__(35);
+module.exports = function(iterator, fn, value, entries){
+ try {
+ return entries ? fn(anObject(value)[0], value[1]) : fn(value);
+ // 7.4.6 IteratorClose(iterator, completion)
+ } catch(e){
+ var ret = iterator['return'];
+ if(ret !== undefined)anObject(ret.call(iterator));
+ throw e;
+ }
+};
-/**
- * Converts `value` to a string. An empty string is returned for `null`
- * and `undefined` values. The sign of `-0` is preserved.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {string} Returns the converted string.
- * @example
- *
- * _.toString(null);
- * // => ''
- *
- * _.toString(-0);
- * // => '-0'
- *
- * _.toString([1, 2, 3]);
- * // => '1,2,3'
- */
-function toString(value) {
- return value == null ? '' : Object(__WEBPACK_IMPORTED_MODULE_0__baseToString_js__["a" /* default */])(value);
-}
+/***/ }),
+/* 308 */
+/***/ (function(module, exports, __webpack_require__) {
-/* harmony default export */ __webpack_exports__["a"] = (toString);
+// check on default Array iterator
+var Iterators = __webpack_require__(83)
+ , ITERATOR = __webpack_require__(24)('iterator')
+ , ArrayProto = Array.prototype;
+module.exports = function(it){
+ return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
+};
/***/ }),
-/* 277 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(171);
-
+/* 309 */
+/***/ (function(module, exports, __webpack_require__) {
-/**
- * This method is like `_.isEqual` except that it accepts `customizer` which
- * is invoked to compare values. If `customizer` returns `undefined`, comparisons
- * are handled by the method instead. The `customizer` is invoked with up to
- * six arguments: (objValue, othValue [, index|key, object, other, stack]).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize comparisons.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * function isGreeting(value) {
- * return /^h(?:i|ello)$/.test(value);
- * }
- *
- * function customizer(objValue, othValue) {
- * if (isGreeting(objValue) && isGreeting(othValue)) {
- * return true;
- * }
- * }
- *
- * var array = ['hello', 'goodbye'];
- * var other = ['hi', 'goodbye'];
- *
- * _.isEqualWith(array, other, customizer);
- * // => true
- */
-function isEqualWith(value, other, customizer) {
- customizer = typeof customizer == 'function' ? customizer : undefined;
- var result = customizer ? customizer(value, other) : undefined;
- return result === undefined ? Object(__WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */])(value, other, undefined, customizer) : !!result;
-}
+var ITERATOR = __webpack_require__(24)('iterator')
+ , SAFE_CLOSING = false;
-/* harmony default export */ __webpack_exports__["a"] = (isEqualWith);
+try {
+ var riter = [7][ITERATOR]();
+ riter['return'] = function(){ SAFE_CLOSING = true; };
+ Array.from(riter, function(){ throw 2; });
+} catch(e){ /* empty */ }
+module.exports = function(exec, skipClosing){
+ if(!skipClosing && !SAFE_CLOSING)return false;
+ var safe = false;
+ try {
+ var arr = [7]
+ , iter = arr[ITERATOR]();
+ iter.next = function(){ return {done: safe = true}; };
+ arr[ITERATOR] = function(){ return iter; };
+ exec(arr);
+ } catch(e){ /* empty */ }
+ return safe;
+};
/***/ }),
-/* 278 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 310 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__SetCache_js__ = __webpack_require__(534);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arraySome_js__ = __webpack_require__(537);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cacheHas_js__ = __webpack_require__(538);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _colors = __webpack_require__(31);
+
+var _colorManipulator = __webpack_require__(50);
+var _spacing = __webpack_require__(199);
-/** Used to compose bitmasks for value comparisons. */
-var COMPARE_PARTIAL_FLAG = 1,
- COMPARE_UNORDERED_FLAG = 2;
+var _spacing2 = _interopRequireDefault(_spacing);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
- * A specialized version of `baseIsEqualDeep` for arrays with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Array} array The array to compare.
- * @param {Array} other The other array to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `array` and `other` objects.
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ * Light Theme is the default theme used in material-ui. It is guaranteed to
+ * have all theme variables needed for every component. Variables not defined
+ * in a custom theme will default to these values.
*/
-function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- arrLength = array.length,
- othLength = other.length;
-
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
- return false;
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(array);
- if (stacked && stack.get(other)) {
- return stacked == other;
+exports.default = {
+ spacing: _spacing2.default,
+ fontFamily: 'Roboto, sans-serif',
+ palette: {
+ primary1Color: _colors.cyan500,
+ primary2Color: _colors.cyan700,
+ primary3Color: _colors.grey400,
+ accent1Color: _colors.pinkA200,
+ accent2Color: _colors.grey100,
+ accent3Color: _colors.grey500,
+ textColor: _colors.darkBlack,
+ secondaryTextColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.54),
+ alternateTextColor: _colors.white,
+ canvasColor: _colors.white,
+ borderColor: _colors.grey300,
+ disabledColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.3),
+ pickerHeaderColor: _colors.cyan500,
+ clockCircleColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.07),
+ shadowColor: _colors.fullBlack
}
- var index = -1,
- result = true,
- seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new __WEBPACK_IMPORTED_MODULE_0__SetCache_js__["a" /* default */] : undefined;
-
- stack.set(array, other);
- stack.set(other, array);
+}; /**
+ * NB: If you update this file, please also update `docs/src/app/customization/Themes.js`
+ */
- // Ignore non-index properties.
- while (++index < arrLength) {
- var arrValue = array[index],
- othValue = other[index];
+/***/ }),
+/* 311 */
+/***/ (function(module, exports, __webpack_require__) {
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, arrValue, index, other, array, stack)
- : customizer(arrValue, othValue, index, array, other, stack);
- }
- if (compared !== undefined) {
- if (compared) {
- continue;
- }
- result = false;
- break;
- }
- // Recursively compare arrays (susceptible to call stack limits).
- if (seen) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_1__arraySome_js__["a" /* default */])(other, function(othValue, othIndex) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_2__cacheHas_js__["a" /* default */])(seen, othIndex) &&
- (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
- return seen.push(othIndex);
- }
- })) {
- result = false;
- break;
- }
- } else if (!(
- arrValue === othValue ||
- equalFunc(arrValue, othValue, bitmask, customizer, stack)
- )) {
- result = false;
- break;
- }
- }
- stack['delete'](array);
- stack['delete'](other);
- return result;
-}
+"use strict";
-/* harmony default export */ __webpack_exports__["a"] = (equalArrays);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = {
+ menu: 1000,
+ appBar: 1100,
+ drawerOverlay: 1200,
+ drawer: 1300,
+ dialogOverlay: 1400,
+ dialog: 1500,
+ layer: 2000,
+ popover: 2100,
+ snackbar: 2900,
+ tooltip: 3000
+};
/***/ }),
-/* 279 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 312 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(32);
-
-/** Built-in value references. */
-var Uint8Array = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Uint8Array;
-
-/* harmony default export */ __webpack_exports__["a"] = (Uint8Array);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = { "Webkit": { "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "backfaceVisibility": true, "perspective": true, "perspectiveOrigin": true, "transformStyle": true, "transformOriginZ": true, "animation": true, "animationDelay": true, "animationDirection": true, "animationFillMode": true, "animationDuration": true, "animationIterationCount": true, "animationName": true, "animationPlayState": true, "animationTimingFunction": true, "appearance": true, "userSelect": true, "fontKerning": true, "textEmphasisPosition": true, "textEmphasis": true, "textEmphasisStyle": true, "textEmphasisColor": true, "boxDecorationBreak": true, "clipPath": true, "maskImage": true, "maskMode": true, "maskRepeat": true, "maskPosition": true, "maskClip": true, "maskOrigin": true, "maskSize": true, "maskComposite": true, "mask": true, "maskBorderSource": true, "maskBorderMode": true, "maskBorderSlice": true, "maskBorderWidth": true, "maskBorderOutset": true, "maskBorderRepeat": true, "maskBorder": true, "maskType": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "filter": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true, "flex": true, "flexBasis": true, "flexDirection": true, "flexGrow": true, "flexFlow": true, "flexShrink": true, "flexWrap": true, "alignContent": true, "alignItems": true, "alignSelf": true, "justifyContent": true, "order": true, "transition": true, "transitionDelay": true, "transitionDuration": true, "transitionProperty": true, "transitionTimingFunction": true, "backdropFilter": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "shapeImageThreshold": true, "shapeImageMargin": true, "shapeImageOutside": true, "hyphens": true, "flowInto": true, "flowFrom": true, "regionFragment": true, "textSizeAdjust": true }, "Moz": { "appearance": true, "userSelect": true, "boxSizing": true, "textAlignLast": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "tabSize": true, "hyphens": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true }, "ms": { "flex": true, "flexBasis": false, "flexDirection": true, "flexGrow": false, "flexFlow": true, "flexShrink": false, "flexWrap": true, "alignContent": false, "alignItems": false, "alignSelf": false, "justifyContent": false, "order": false, "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "userSelect": true, "wrapFlow": true, "wrapThrough": true, "wrapMargin": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "touchAction": true, "hyphens": true, "flowInto": true, "flowFrom": true, "breakBefore": true, "breakAfter": true, "breakInside": true, "regionFragment": true, "gridTemplateColumns": true, "gridTemplateRows": true, "gridTemplateAreas": true, "gridTemplate": true, "gridAutoColumns": true, "gridAutoRows": true, "gridAutoFlow": true, "grid": true, "gridRowStart": true, "gridColumnStart": true, "gridRowEnd": true, "gridRow": true, "gridColumn": true, "gridColumnEnd": true, "gridColumnGap": true, "gridRowGap": true, "gridArea": true, "gridGap": true, "textSizeAdjust": true } };
+module.exports = exports["default"];
/***/ }),
-/* 280 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 313 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseTimes_js__ = __webpack_require__(549);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(174);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(33);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isBuffer_js__ = __webpack_require__(175);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isIndex_js__ = __webpack_require__(177);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__ = __webpack_require__(178);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = sortPrefixedStyle;
+
+var _isPrefixedProperty = __webpack_require__(680);
+var _isPrefixedProperty2 = _interopRequireDefault(_isPrefixedProperty);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+function sortPrefixedStyle(style) {
+ return Object.keys(style).sort(function (left, right) {
+ if ((0, _isPrefixedProperty2.default)(left) && !(0, _isPrefixedProperty2.default)(right)) {
+ return -1;
+ } else if (!(0, _isPrefixedProperty2.default)(left) && (0, _isPrefixedProperty2.default)(right)) {
+ return 1;
+ }
+ return 0;
+ }).reduce(function (sortedStyle, prop) {
+ sortedStyle[prop] = style[prop];
+ return sortedStyle;
+ }, {});
+}
+module.exports = exports['default'];
+/***/ }),
+/* 314 */
+/***/ (function(module, exports, __webpack_require__) {
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
+"use strict";
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-/**
- * Creates an array of the enumerable property names of the array-like `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @param {boolean} inherited Specify returning inherited property names.
- * @returns {Array} Returns the array of property names.
- */
-function arrayLikeKeys(value, inherited) {
- var isArr = Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(value),
- isArg = !isArr && Object(__WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */])(value),
- isBuff = !isArr && !isArg && Object(__WEBPACK_IMPORTED_MODULE_3__isBuffer_js__["a" /* default */])(value),
- isType = !isArr && !isArg && !isBuff && Object(__WEBPACK_IMPORTED_MODULE_5__isTypedArray_js__["a" /* default */])(value),
- skipIndexes = isArr || isArg || isBuff || isType,
- result = skipIndexes ? Object(__WEBPACK_IMPORTED_MODULE_0__baseTimes_js__["a" /* default */])(value.length, String) : [],
- length = result.length;
+var uppercasePattern = /[A-Z]/g;
+var msPattern = /^ms-/;
+var cache = {};
- for (var key in value) {
- if ((inherited || hasOwnProperty.call(value, key)) &&
- !(skipIndexes && (
- // Safari 9 has enumerable `arguments.length` in strict mode.
- key == 'length' ||
- // Node.js 0.10 has enumerable non-index properties on buffers.
- (isBuff && (key == 'offset' || key == 'parent')) ||
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
- (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
- // Skip index properties.
- Object(__WEBPACK_IMPORTED_MODULE_4__isIndex_js__["a" /* default */])(key, length)
- ))) {
- result.push(key);
- }
- }
- return result;
+function hyphenateStyleName(string) {
+ return string in cache
+ ? cache[string]
+ : cache[string] = string
+ .replace(uppercasePattern, '-$&')
+ .toLowerCase()
+ .replace(msPattern, '-ms-');
}
-/* harmony default export */ __webpack_exports__["a"] = (arrayLikeKeys);
+module.exports = hyphenateStyleName;
/***/ }),
-/* 281 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 315 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(277);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-var customizer = function customizer(objectValue, otherValue, indexOrkey, object, other, stack) {
- // https://lodash.com/docs/4.17.4#isEqualWith
- if (stack) {
- // Shallow compares
- // For 1st level, stack === undefined.
- // -> Do nothing (and implicitly return undefined so that it goes to compare 2nd level)
- // For 2nd level and up, stack !== undefined.
- // -> Compare by === operator
- return objectValue === otherValue;
- }
-};
+var _classCallCheck2 = __webpack_require__(1);
-var shallowCompare = function shallowCompare(instance, nextProps, nextState) {
- return !Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */])(instance.props, nextProps, customizer) || !Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */])(instance.state, nextState, customizer);
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _colors = __webpack_require__(31);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var Typography = function Typography() {
+ (0, _classCallCheck3.default)(this, Typography);
+
+ // text colors
+ this.textFullBlack = _colors.fullBlack;
+ this.textDarkBlack = _colors.darkBlack;
+ this.textLightBlack = _colors.lightBlack;
+ this.textMinBlack = _colors.minBlack;
+ this.textFullWhite = _colors.fullWhite;
+ this.textDarkWhite = _colors.darkWhite;
+ this.textLightWhite = _colors.lightWhite;
+
+ // font weight
+ this.fontWeightLight = 300;
+ this.fontWeightNormal = 400;
+ this.fontWeightMedium = 500;
+
+ this.fontStyleButtonFontSize = 14;
};
-/* harmony default export */ __webpack_exports__["a"] = (shallowCompare);
+exports.default = new Typography();
/***/ }),
-/* 282 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 316 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(121);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__ = __webpack_require__(570);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__ = __webpack_require__(572);
-
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = undefined;
-/**
- * Creates an object with the same keys as `object` and values generated
- * by running each own enumerable string keyed property of `object` thru
- * `iteratee`. The iteratee is invoked with three arguments:
- * (value, key, object).
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns the new mapped object.
- * @see _.mapKeys
- * @example
- *
- * var users = {
- * 'fred': { 'user': 'fred', 'age': 40 },
- * 'pebbles': { 'user': 'pebbles', 'age': 1 }
- * };
- *
- * _.mapValues(users, function(o) { return o.age; });
- * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
- *
- * // The `_.property` iteratee shorthand.
- * _.mapValues(users, 'age');
- * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
- */
-function mapValues(object, iteratee) {
- var result = {};
- iteratee = Object(__WEBPACK_IMPORTED_MODULE_2__baseIteratee_js__["a" /* default */])(iteratee, 3);
+var _Subheader = __webpack_require__(713);
- Object(__WEBPACK_IMPORTED_MODULE_1__baseForOwn_js__["a" /* default */])(object, function(value, key, object) {
- Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(result, key, iteratee(value, key, object));
- });
- return result;
-}
+var _Subheader2 = _interopRequireDefault(_Subheader);
-/* harmony default export */ __webpack_exports__["a"] = (mapValues);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+exports.default = _Subheader2.default;
/***/ }),
-/* 283 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 317 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55);
-var defineProperty = (function() {
- try {
- var func = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(Object, 'defineProperty');
- func({}, '', {});
- return func;
- } catch (e) {}
-}());
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-/* harmony default export */ __webpack_exports__["a"] = (defineProperty);
+var _objectWithoutProperties2 = __webpack_require__(8);
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-/***/ }),
-/* 284 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var _extends2 = __webpack_require__(7);
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__ = __webpack_require__(571);
+var _extends3 = _interopRequireDefault(_extends2);
+var _getPrototypeOf = __webpack_require__(3);
-/**
- * The base implementation of `baseForOwn` which iterates over `object`
- * properties returned by `keysFunc` and invokes `iteratee` for each property.
- * Iteratee functions may exit iteration early by explicitly returning `false`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
-var baseFor = Object(__WEBPACK_IMPORTED_MODULE_0__createBaseFor_js__["a" /* default */])();
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-/* harmony default export */ __webpack_exports__["a"] = (baseFor);
+var _classCallCheck2 = __webpack_require__(1);
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-/***/ }),
-/* 285 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var _createClass2 = __webpack_require__(2);
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(48);
+var _createClass3 = _interopRequireDefault(_createClass2);
+var _possibleConstructorReturn2 = __webpack_require__(4);
-/**
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` if suitable for strict
- * equality comparisons, else `false`.
- */
-function isStrictComparable(value) {
- return value === value && !Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(value);
-}
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-/* harmony default export */ __webpack_exports__["a"] = (isStrictComparable);
+var _inherits2 = __webpack_require__(5);
+var _inherits3 = _interopRequireDefault(_inherits2);
-/***/ }),
-/* 286 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var _simpleAssign = __webpack_require__(6);
-"use strict";
-/**
- * A specialized version of `matchesProperty` for source values suitable
- * for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new spec function.
- */
-function matchesStrictComparable(key, srcValue) {
- return function(object) {
- if (object == null) {
- return false;
- }
- return object[key] === srcValue &&
- (srcValue !== undefined || (key in Object(object)));
- };
-}
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-/* harmony default export */ __webpack_exports__["a"] = (matchesStrictComparable);
+var _react = __webpack_require__(0);
+var _react2 = _interopRequireDefault(_react);
-/***/ }),
-/* 287 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var _reactDom = __webpack_require__(16);
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(288);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__toKey_js__ = __webpack_require__(91);
+var _reactDom2 = _interopRequireDefault(_reactDom);
+var _shallowEqual = __webpack_require__(63);
+var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
-/**
- * The base implementation of `_.get` without support for default values.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @returns {*} Returns the resolved value.
- */
-function baseGet(object, path) {
- path = Object(__WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */])(path, object);
+var _colorManipulator = __webpack_require__(50);
+
+var _transitions = __webpack_require__(10);
+
+var _transitions2 = _interopRequireDefault(_transitions);
- var index = 0,
- length = path.length;
+var _EnhancedButton = __webpack_require__(51);
- while (object != null && index < length) {
- object = object[Object(__WEBPACK_IMPORTED_MODULE_1__toKey_js__["a" /* default */])(path[index++])];
- }
- return (index && index == length) ? object : undefined;
-}
+var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton);
-/* harmony default export */ __webpack_exports__["a"] = (baseGet);
+var _IconButton = __webpack_require__(64);
+var _IconButton2 = _interopRequireDefault(_IconButton);
-/***/ }),
-/* 288 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var _expandLess = __webpack_require__(724);
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArray_js__ = __webpack_require__(33);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isKey_js__ = __webpack_require__(181);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__stringToPath_js__ = __webpack_require__(274);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toString_js__ = __webpack_require__(276);
+var _expandLess2 = _interopRequireDefault(_expandLess);
+var _expandMore = __webpack_require__(731);
+var _expandMore2 = _interopRequireDefault(_expandMore);
+var _NestedList = __webpack_require__(732);
+var _NestedList2 = _interopRequireDefault(_NestedList);
-/**
- * Casts `value` to a path array if it's not one.
- *
- * @private
- * @param {*} value The value to inspect.
- * @param {Object} [object] The object to query keys on.
- * @returns {Array} Returns the cast property path array.
- */
-function castPath(value, object) {
- if (Object(__WEBPACK_IMPORTED_MODULE_0__isArray_js__["a" /* default */])(value)) {
- return value;
- }
- return Object(__WEBPACK_IMPORTED_MODULE_1__isKey_js__["a" /* default */])(value, object) ? [value] : Object(__WEBPACK_IMPORTED_MODULE_2__stringToPath_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__toString_js__["a" /* default */])(value));
-}
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-/* harmony default export */ __webpack_exports__["a"] = (castPath);
+function getStyles(props, context, state) {
+ var insetChildren = props.insetChildren,
+ leftAvatar = props.leftAvatar,
+ leftCheckbox = props.leftCheckbox,
+ leftIcon = props.leftIcon,
+ nestedLevel = props.nestedLevel,
+ rightAvatar = props.rightAvatar,
+ rightIcon = props.rightIcon,
+ rightIconButton = props.rightIconButton,
+ rightToggle = props.rightToggle,
+ secondaryText = props.secondaryText,
+ secondaryTextLines = props.secondaryTextLines;
+ var muiTheme = context.muiTheme;
+ var listItem = muiTheme.listItem;
-/***/ }),
-/* 289 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var textColor = muiTheme.baseTheme.palette.textColor;
+ var hoverColor = props.hoverColor || (0, _colorManipulator.fade)(textColor, 0.1);
+ var singleAvatar = !secondaryText && (leftAvatar || rightAvatar);
+ var singleNoAvatar = !secondaryText && !(leftAvatar || rightAvatar);
+ var twoLine = secondaryText && secondaryTextLines === 1;
+ var threeLine = secondaryText && secondaryTextLines > 1;
-"use strict";
-var createIsPristine = function createIsPristine(_ref) {
- var deepEqual = _ref.deepEqual,
- empty = _ref.empty,
- getIn = _ref.getIn;
- return function (form) {
- var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
- return getIn(state, 'form');
- };
- return function (state) {
- var formState = getFormState(state);
- var initial = getIn(formState, form + '.initial') || empty;
- var values = getIn(formState, form + '.values') || initial;
- return deepEqual(initial, values);
- };
- };
-};
+ var styles = {
+ root: {
+ backgroundColor: (state.isKeyboardFocused || state.hovered) && !state.rightIconButtonHovered && !state.rightIconButtonKeyboardFocused ? hoverColor : null,
+ color: textColor,
+ display: 'block',
+ fontSize: 16,
+ lineHeight: '16px',
+ position: 'relative',
+ transition: _transitions2.default.easeOut()
+ },
-/* harmony default export */ __webpack_exports__["a"] = (createIsPristine);
+ // This inner div is needed so that ripples will span the entire container
+ innerDiv: {
+ marginLeft: nestedLevel * listItem.nestedLevelDepth,
+ paddingLeft: leftIcon || leftAvatar || leftCheckbox || insetChildren ? 72 : 16,
+ paddingRight: rightIcon || rightAvatar || rightIconButton ? 56 : rightToggle ? 72 : 16,
+ paddingBottom: singleAvatar ? 20 : 16,
+ paddingTop: singleNoAvatar || threeLine ? 16 : 20,
+ position: 'relative'
+ },
-/***/ }),
-/* 290 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ icons: {
+ height: 24,
+ width: 24,
+ display: 'block',
+ position: 'absolute',
+ top: twoLine ? 12 : singleAvatar ? 4 : 0,
+ margin: 12
+ },
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(121);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(90);
+ leftIcon: {
+ left: 4
+ },
+ rightIcon: {
+ right: 4
+ },
+ avatars: {
+ position: 'absolute',
+ top: singleAvatar ? 8 : 16
+ },
-/**
- * This function is like `assignValue` except that it doesn't assign
- * `undefined` values.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
-function assignMergeValue(object, key, value) {
- if ((value !== undefined && !Object(__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */])(object[key], value)) ||
- (value === undefined && !(key in object))) {
- Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(object, key, value);
- }
-}
+ label: {
+ cursor: 'pointer'
+ },
-/* harmony default export */ __webpack_exports__["a"] = (assignMergeValue);
+ leftAvatar: {
+ left: 16
+ },
+ rightAvatar: {
+ right: 16
+ },
-/***/ }),
-/* 291 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ leftCheckbox: {
+ position: 'absolute',
+ display: 'block',
+ width: 24,
+ top: twoLine ? 24 : singleAvatar ? 16 : 12,
+ left: 16
+ },
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__ = __webpack_require__(280);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__ = __webpack_require__(632);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__ = __webpack_require__(120);
+ primaryText: {},
+ rightIconButton: {
+ position: 'absolute',
+ display: 'block',
+ top: twoLine ? 12 : singleAvatar ? 4 : 0,
+ right: 4
+ },
+ rightToggle: {
+ position: 'absolute',
+ display: 'block',
+ width: 54,
+ top: twoLine ? 25 : singleAvatar ? 17 : 13,
+ right: 8
+ },
+ secondaryText: {
+ fontSize: 14,
+ lineHeight: threeLine ? '18px' : '16px',
+ height: threeLine ? 36 : 16,
+ margin: 0,
+ marginTop: 4,
+ color: listItem.secondaryTextColor,
-/**
- * Creates an array of the own and inherited enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keysIn(new Foo);
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
- */
-function keysIn(object) {
- return Object(__WEBPACK_IMPORTED_MODULE_2__isArrayLike_js__["a" /* default */])(object) ? Object(__WEBPACK_IMPORTED_MODULE_0__arrayLikeKeys_js__["a" /* default */])(object, true) : Object(__WEBPACK_IMPORTED_MODULE_1__baseKeysIn_js__["a" /* default */])(object);
+ // needed for 2 and 3 line ellipsis
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ whiteSpace: threeLine ? null : 'nowrap',
+ display: threeLine ? '-webkit-box' : null,
+ WebkitLineClamp: threeLine ? 2 : null,
+ WebkitBoxOrient: threeLine ? 'vertical' : null
+ }
+ };
+
+ return styles;
}
-/* harmony default export */ __webpack_exports__["a"] = (keysIn);
+var ListItem = function (_Component) {
+ (0, _inherits3.default)(ListItem, _Component);
+ function ListItem() {
+ var _ref;
-/***/ }),
-/* 292 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var _temp, _this, _ret;
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(271);
+ (0, _classCallCheck3.default)(this, ListItem);
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
-var silenceEvent = function silenceEvent(event) {
- var is = Object(__WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */])(event);
- if (is) {
- event.preventDefault();
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ListItem.__proto__ || (0, _getPrototypeOf2.default)(ListItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ hovered: false,
+ isKeyboardFocused: false,
+ open: false,
+ rightIconButtonHovered: false,
+ rightIconButtonKeyboardFocused: false,
+ touch: false
+ }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) {
+ _this.setState({ isKeyboardFocused: isKeyboardFocused });
+ _this.props.onKeyboardFocus(event, isKeyboardFocused);
+ }, _this.handleMouseEnter = function (event) {
+ if (!_this.state.touch) _this.setState({ hovered: true });
+ _this.props.onMouseEnter(event);
+ }, _this.handleMouseLeave = function (event) {
+ _this.setState({ hovered: false });
+ _this.props.onMouseLeave(event);
+ }, _this.handleNestedListToggle = function (event) {
+ event.stopPropagation();
+
+ if (_this.props.open === null) {
+ _this.setState({ open: !_this.state.open }, function () {
+ _this.props.onNestedListToggle(_this);
+ });
+ } else {
+ // Exposing `this` in the callback is quite a bad API.
+ // I'm doing a one level deep clone to expose a fake state.open.
+ _this.props.onNestedListToggle((0, _extends3.default)({}, _this, {
+ state: {
+ open: !_this.state.open
+ }
+ }));
+ }
+ }, _this.handleRightIconButtonKeyboardFocus = function (event, isKeyboardFocused) {
+ if (isKeyboardFocused) {
+ _this.setState({
+ isKeyboardFocused: false,
+ rightIconButtonKeyboardFocused: isKeyboardFocused
+ });
+ }
+
+ var iconButton = _this.props.rightIconButton;
+
+ if (iconButton && iconButton.props.onKeyboardFocus) iconButton.props.onKeyboardFocus(event, isKeyboardFocused);
+ }, _this.handleRightIconButtonMouseLeave = function (event) {
+ var iconButton = _this.props.rightIconButton;
+ _this.setState({ rightIconButtonHovered: false });
+ if (iconButton && iconButton.props.onMouseLeave) iconButton.props.onMouseLeave(event);
+ }, _this.handleRightIconButtonMouseEnter = function (event) {
+ var iconButton = _this.props.rightIconButton;
+ _this.setState({ rightIconButtonHovered: true });
+ if (iconButton && iconButton.props.onMouseEnter) iconButton.props.onMouseEnter(event);
+ }, _this.handleRightIconButtonMouseUp = function (event) {
+ var iconButton = _this.props.rightIconButton;
+ event.stopPropagation();
+ if (iconButton && iconButton.props.onMouseUp) iconButton.props.onMouseUp(event);
+ }, _this.handleRightIconButtonTouchTap = function (event) {
+ var iconButton = _this.props.rightIconButton;
+
+ // Stop the event from bubbling up to the list-item
+ event.stopPropagation();
+ if (iconButton && iconButton.props.onTouchTap) iconButton.props.onTouchTap(event);
+ }, _this.handleTouchStart = function (event) {
+ _this.setState({ touch: true });
+ _this.props.onTouchStart(event);
+ }, _this.handleTouchEnd = function (event) {
+ _this.setState({ touch: true });
+ _this.props.onTouchEnd(event);
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- return is;
-};
-/* harmony default export */ __webpack_exports__["a"] = (silenceEvent);
+ (0, _createClass3.default)(ListItem, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ this.setState({
+ open: this.props.open === null ? this.props.initiallyOpen === true : this.props.open
+ });
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ // update the state when the component is controlled.
+ if (nextProps.open !== null) this.setState({ open: nextProps.open });
+ if (nextProps.disabled && this.state.hovered) this.setState({ hovered: false });
+ }
+ }, {
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps, nextState, nextContext) {
+ return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext);
+ }
-/***/ }),
-/* 293 */
-/***/ (function(module, exports, __webpack_require__) {
+ // This method is needed by the `MenuItem` component.
-// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
-var has = __webpack_require__(51);
-var toObject = __webpack_require__(84);
-var IE_PROTO = __webpack_require__(136)('IE_PROTO');
-var ObjectProto = Object.prototype;
+ }, {
+ key: 'applyFocusState',
+ value: function applyFocusState(focusState) {
+ var button = this.refs.enhancedButton;
-module.exports = Object.getPrototypeOf || function (O) {
- O = toObject(O);
- if (has(O, IE_PROTO)) return O[IE_PROTO];
- if (typeof O.constructor == 'function' && O instanceof O.constructor) {
- return O.constructor.prototype;
- } return O instanceof Object ? ObjectProto : null;
-};
+ if (button) {
+ var buttonEl = _reactDom2.default.findDOMNode(button);
+ switch (focusState) {
+ case 'none':
+ buttonEl.blur();
+ break;
+ case 'focused':
+ buttonEl.focus();
+ break;
+ case 'keyboard-focused':
+ button.setKeyboardFocus();
+ buttonEl.focus();
+ break;
+ }
+ }
+ }
+ }, {
+ key: 'createDisabledElement',
+ value: function createDisabledElement(styles, contentChildren, additionalProps) {
+ var _props = this.props,
+ innerDivStyle = _props.innerDivStyle,
+ style = _props.style;
-/***/ }),
-/* 294 */
-/***/ (function(module, exports, __webpack_require__) {
-// most Object methods by ES6 should accept primitives
-var $export = __webpack_require__(28);
-var core = __webpack_require__(18);
-var fails = __webpack_require__(63);
-module.exports = function (KEY, exec) {
- var fn = (core.Object || {})[KEY] || Object[KEY];
- var exp = {};
- exp[KEY] = exec(fn);
- $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
-};
+ var mergedDivStyles = (0, _simpleAssign2.default)({}, styles.root, styles.innerDiv, innerDivStyle, style);
+ return _react2.default.createElement(
+ 'div',
+ (0, _extends3.default)({}, additionalProps, {
+ style: this.context.muiTheme.prepareStyles(mergedDivStyles)
+ }),
+ contentChildren
+ );
+ }
+ }, {
+ key: 'createLabelElement',
+ value: function createLabelElement(styles, contentChildren, additionalProps) {
+ var _props2 = this.props,
+ innerDivStyle = _props2.innerDivStyle,
+ style = _props2.style;
-/***/ }),
-/* 295 */
-/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+ var mergedLabelStyles = (0, _simpleAssign2.default)({}, styles.root, styles.innerDiv, innerDivStyle, styles.label, style);
-var LIBRARY = __webpack_require__(122);
-var $export = __webpack_require__(28);
-var redefine = __webpack_require__(296);
-var hide = __webpack_require__(50);
-var has = __webpack_require__(51);
-var Iterators = __webpack_require__(78);
-var $iterCreate = __webpack_require__(667);
-var setToStringTag = __webpack_require__(123);
-var getPrototypeOf = __webpack_require__(293);
-var ITERATOR = __webpack_require__(22)('iterator');
-var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
-var FF_ITERATOR = '@@iterator';
-var KEYS = 'keys';
-var VALUES = 'values';
+ return _react2.default.createElement(
+ 'label',
+ (0, _extends3.default)({}, additionalProps, {
+ style: this.context.muiTheme.prepareStyles(mergedLabelStyles)
+ }),
+ contentChildren
+ );
+ }
+ }, {
+ key: 'createTextElement',
+ value: function createTextElement(styles, data, key) {
+ var prepareStyles = this.context.muiTheme.prepareStyles;
-var returnThis = function () { return this; };
+ if (_react2.default.isValidElement(data)) {
+ var style = (0, _simpleAssign2.default)({}, styles, data.props.style);
+ if (typeof data.type === 'string') {
+ // if element is a native dom node
+ style = prepareStyles(style);
+ }
+ return _react2.default.cloneElement(data, {
+ key: key,
+ style: style
+ });
+ }
-module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
- $iterCreate(Constructor, NAME, next);
- var getMethod = function (kind) {
- if (!BUGGY && kind in proto) return proto[kind];
- switch (kind) {
- case KEYS: return function keys() { return new Constructor(this, kind); };
- case VALUES: return function values() { return new Constructor(this, kind); };
- } return function entries() { return new Constructor(this, kind); };
- };
- var TAG = NAME + ' Iterator';
- var DEF_VALUES = DEFAULT == VALUES;
- var VALUES_BUG = false;
- var proto = Base.prototype;
- var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
- var $default = $native || getMethod(DEFAULT);
- var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
- var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
- var methods, key, IteratorPrototype;
- // Fix native
- if ($anyNative) {
- IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
- if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
- // Set @@toStringTag to native iterators
- setToStringTag(IteratorPrototype, TAG, true);
- // fix for some old engines
- if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
+ return _react2.default.createElement(
+ 'div',
+ { key: key, style: prepareStyles(styles) },
+ data
+ );
}
- }
- // fix Array#{values, @@iterator}.name in V8 / FF
- if (DEF_VALUES && $native && $native.name !== VALUES) {
- VALUES_BUG = true;
- $default = function values() { return $native.call(this); };
- }
- // Define iterator
- if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
- hide(proto, ITERATOR, $default);
- }
- // Plug for library
- Iterators[NAME] = $default;
- Iterators[TAG] = returnThis;
- if (DEFAULT) {
- methods = {
- values: DEF_VALUES ? $default : getMethod(VALUES),
- keys: IS_SET ? $default : getMethod(KEYS),
- entries: $entries
- };
- if (FORCED) for (key in methods) {
- if (!(key in proto)) redefine(proto, key, methods[key]);
- } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
- }
- return methods;
-};
+ }, {
+ key: 'pushElement',
+ value: function pushElement(children, element, baseStyles, additionalProps) {
+ if (element) {
+ var styles = (0, _simpleAssign2.default)({}, baseStyles, element.props.style);
+ children.push(_react2.default.cloneElement(element, (0, _extends3.default)({
+ key: children.length,
+ style: styles
+ }, additionalProps)));
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props3 = this.props,
+ autoGenerateNestedIndicator = _props3.autoGenerateNestedIndicator,
+ children = _props3.children,
+ disabled = _props3.disabled,
+ disableKeyboardFocus = _props3.disableKeyboardFocus,
+ hoverColor = _props3.hoverColor,
+ initiallyOpen = _props3.initiallyOpen,
+ innerDivStyle = _props3.innerDivStyle,
+ insetChildren = _props3.insetChildren,
+ leftAvatar = _props3.leftAvatar,
+ leftCheckbox = _props3.leftCheckbox,
+ leftIcon = _props3.leftIcon,
+ nestedItems = _props3.nestedItems,
+ nestedLevel = _props3.nestedLevel,
+ nestedListStyle = _props3.nestedListStyle,
+ onKeyboardFocus = _props3.onKeyboardFocus,
+ onMouseEnter = _props3.onMouseEnter,
+ onMouseLeave = _props3.onMouseLeave,
+ onNestedListToggle = _props3.onNestedListToggle,
+ onTouchStart = _props3.onTouchStart,
+ onTouchTap = _props3.onTouchTap,
+ rightAvatar = _props3.rightAvatar,
+ rightIcon = _props3.rightIcon,
+ rightIconButton = _props3.rightIconButton,
+ rightToggle = _props3.rightToggle,
+ primaryText = _props3.primaryText,
+ primaryTogglesNestedList = _props3.primaryTogglesNestedList,
+ secondaryText = _props3.secondaryText,
+ secondaryTextLines = _props3.secondaryTextLines,
+ style = _props3.style,
+ other = (0, _objectWithoutProperties3.default)(_props3, ['autoGenerateNestedIndicator', 'children', 'disabled', 'disableKeyboardFocus', 'hoverColor', 'initiallyOpen', 'innerDivStyle', 'insetChildren', 'leftAvatar', 'leftCheckbox', 'leftIcon', 'nestedItems', 'nestedLevel', 'nestedListStyle', 'onKeyboardFocus', 'onMouseEnter', 'onMouseLeave', 'onNestedListToggle', 'onTouchStart', 'onTouchTap', 'rightAvatar', 'rightIcon', 'rightIconButton', 'rightToggle', 'primaryText', 'primaryTogglesNestedList', 'secondaryText', 'secondaryTextLines', 'style']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
+ var styles = getStyles(this.props, this.context, this.state);
+ var contentChildren = [children];
-/***/ }),
-/* 296 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (leftIcon) {
+ var additionalProps = {
+ color: leftIcon.props.color || this.context.muiTheme.listItem.leftIconColor
+ };
+ this.pushElement(contentChildren, leftIcon, (0, _simpleAssign2.default)({}, styles.icons, styles.leftIcon), additionalProps);
+ }
+
+ if (rightIcon) {
+ var _additionalProps = {
+ color: rightIcon.props.color || this.context.muiTheme.listItem.rightIconColor
+ };
+ this.pushElement(contentChildren, rightIcon, (0, _simpleAssign2.default)({}, styles.icons, styles.rightIcon), _additionalProps);
+ }
-module.exports = __webpack_require__(50);
+ if (leftAvatar) {
+ this.pushElement(contentChildren, leftAvatar, (0, _simpleAssign2.default)({}, styles.avatars, styles.leftAvatar));
+ }
+ if (rightAvatar) {
+ this.pushElement(contentChildren, rightAvatar, (0, _simpleAssign2.default)({}, styles.avatars, styles.rightAvatar));
+ }
-/***/ }),
-/* 297 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (leftCheckbox) {
+ this.pushElement(contentChildren, leftCheckbox, (0, _simpleAssign2.default)({}, styles.leftCheckbox));
+ }
+
+ // RightIconButtonElement
+ var hasNestListItems = nestedItems.length;
+ var hasRightElement = rightAvatar || rightIcon || rightIconButton || rightToggle;
+ var needsNestedIndicator = hasNestListItems && autoGenerateNestedIndicator && !hasRightElement;
+
+ if (rightIconButton || needsNestedIndicator) {
+ var rightIconButtonElement = rightIconButton;
+ var rightIconButtonHandlers = {
+ onKeyboardFocus: this.handleRightIconButtonKeyboardFocus,
+ onMouseEnter: this.handleRightIconButtonMouseEnter,
+ onMouseLeave: this.handleRightIconButtonMouseLeave,
+ onTouchTap: this.handleRightIconButtonTouchTap,
+ onMouseDown: this.handleRightIconButtonMouseUp,
+ onMouseUp: this.handleRightIconButtonMouseUp
+ };
-var document = __webpack_require__(23).document;
-module.exports = document && document.documentElement;
+ // Create a nested list indicator icon if we don't have an icon on the right
+ if (needsNestedIndicator) {
+ rightIconButtonElement = this.state.open ? _react2.default.createElement(
+ _IconButton2.default,
+ null,
+ _react2.default.createElement(_expandLess2.default, null)
+ ) : _react2.default.createElement(
+ _IconButton2.default,
+ null,
+ _react2.default.createElement(_expandMore2.default, null)
+ );
+ rightIconButtonHandlers.onTouchTap = this.handleNestedListToggle;
+ }
+ this.pushElement(contentChildren, rightIconButtonElement, (0, _simpleAssign2.default)({}, styles.rightIconButton), rightIconButtonHandlers);
+ }
-/***/ }),
-/* 298 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (rightToggle) {
+ this.pushElement(contentChildren, rightToggle, (0, _simpleAssign2.default)({}, styles.rightToggle));
+ }
-// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
-var $keys = __webpack_require__(207);
-var hiddenKeys = __webpack_require__(138).concat('length', 'prototype');
+ if (primaryText) {
+ var primaryTextElement = this.createTextElement(styles.primaryText, primaryText, 'primaryText');
+ contentChildren.push(primaryTextElement);
+ }
-exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
- return $keys(O, hiddenKeys);
-};
+ if (secondaryText) {
+ var secondaryTextElement = this.createTextElement(styles.secondaryText, secondaryText, 'secondaryText');
+ contentChildren.push(secondaryTextElement);
+ }
+ var nestedList = nestedItems.length ? _react2.default.createElement(
+ _NestedList2.default,
+ { nestedLevel: nestedLevel, open: this.state.open, style: nestedListStyle },
+ nestedItems
+ ) : undefined;
-/***/ }),
-/* 299 */
-/***/ (function(module, exports, __webpack_require__) {
+ var simpleLabel = !primaryTogglesNestedList && (leftCheckbox || rightToggle);
-var pIE = __webpack_require__(101);
-var createDesc = __webpack_require__(82);
-var toIObject = __webpack_require__(52);
-var toPrimitive = __webpack_require__(132);
-var has = __webpack_require__(51);
-var IE8_DOM_DEFINE = __webpack_require__(206);
-var gOPD = Object.getOwnPropertyDescriptor;
+ return _react2.default.createElement(
+ 'div',
+ null,
+ simpleLabel ? this.createLabelElement(styles, contentChildren, other) : disabled ? this.createDisabledElement(styles, contentChildren, other) : _react2.default.createElement(
+ _EnhancedButton2.default,
+ (0, _extends3.default)({
+ containerElement: 'span'
+ }, other, {
+ disableKeyboardFocus: disableKeyboardFocus || this.state.rightIconButtonKeyboardFocused,
+ onKeyboardFocus: this.handleKeyboardFocus,
+ onMouseLeave: this.handleMouseLeave,
+ onMouseEnter: this.handleMouseEnter,
+ onTouchStart: this.handleTouchStart,
+ onTouchEnd: this.handleTouchEnd,
+ onTouchTap: primaryTogglesNestedList ? this.handleNestedListToggle : onTouchTap,
+ ref: 'enhancedButton',
+ style: (0, _simpleAssign2.default)({}, styles.root, style)
+ }),
+ _react2.default.createElement(
+ 'div',
+ { style: prepareStyles((0, _simpleAssign2.default)(styles.innerDiv, innerDivStyle)) },
+ contentChildren
+ )
+ ),
+ nestedList
+ );
+ }
+ }]);
+ return ListItem;
+}(_react.Component);
-exports.f = __webpack_require__(44) ? gOPD : function getOwnPropertyDescriptor(O, P) {
- O = toIObject(O);
- P = toPrimitive(P, true);
- if (IE8_DOM_DEFINE) try {
- return gOPD(O, P);
- } catch (e) { /* empty */ }
- if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
+ListItem.muiName = 'ListItem';
+ListItem.defaultProps = {
+ autoGenerateNestedIndicator: true,
+ disableKeyboardFocus: false,
+ disabled: false,
+ initiallyOpen: false,
+ insetChildren: false,
+ nestedItems: [],
+ nestedLevel: 0,
+ onKeyboardFocus: function onKeyboardFocus() {},
+ onMouseEnter: function onMouseEnter() {},
+ onMouseLeave: function onMouseLeave() {},
+ onNestedListToggle: function onNestedListToggle() {},
+ onTouchEnd: function onTouchEnd() {},
+ onTouchStart: function onTouchStart() {},
+ open: null,
+ primaryTogglesNestedList: false,
+ secondaryTextLines: 1
};
-
-
-/***/ }),
-/* 300 */
-/***/ (function(module, exports) {
-
-
+ListItem.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? ListItem.propTypes = {
+ /**
+ * If true, generate a nested-list-indicator icon when nested list
+ * items are detected. Note that an indicator will not be created
+ * if a `rightIcon` or `rightIconButton` has been provided to
+ * the element.
+ */
+ autoGenerateNestedIndicator: _react.PropTypes.bool,
+ /**
+ * Children passed into the `ListItem`.
+ */
+ children: _react.PropTypes.node,
+ /**
+ * If true, the element will not be able to be focused by the keyboard.
+ */
+ disableKeyboardFocus: _react.PropTypes.bool,
+ /**
+ * If true, the element will not be clickable
+ * and will not display hover effects.
+ * This is automatically disabled if either `leftCheckbox`
+ * or `rightToggle` is set.
+ */
+ disabled: _react.PropTypes.bool,
+ /**
+ * Override the hover background color.
+ */
+ hoverColor: _react.PropTypes.string,
+ /**
+ * If true, the nested `ListItem`s are initially displayed.
+ */
+ initiallyOpen: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the inner div element.
+ */
+ innerDivStyle: _react.PropTypes.object,
+ /**
+ * If true, the children will be indented by 72px.
+ * This is useful if there is no left avatar or left icon.
+ */
+ insetChildren: _react.PropTypes.bool,
+ /**
+ * This is the `Avatar` element to be displayed on the left side.
+ */
+ leftAvatar: _react.PropTypes.element,
+ /**
+ * This is the `Checkbox` element to be displayed on the left side.
+ */
+ leftCheckbox: _react.PropTypes.element,
+ /**
+ * This is the `SvgIcon` or `FontIcon` to be displayed on the left side.
+ */
+ leftIcon: _react.PropTypes.element,
+ /**
+ * An array of `ListItem`s to nest underneath the current `ListItem`.
+ */
+ nestedItems: _react.PropTypes.arrayOf(_react.PropTypes.element),
+ /**
+ * Controls how deep a `ListItem` appears.
+ * This property is automatically managed, so modify at your own risk.
+ */
+ nestedLevel: _react.PropTypes.number,
+ /**
+ * Override the inline-styles of the nested items' `NestedList`.
+ */
+ nestedListStyle: _react.PropTypes.object,
+ /**
+ * Callback function fired when the `ListItem` is focused or blurred by the keyboard.
+ *
+ * @param {object} event `focus` or `blur` event targeting the `ListItem`.
+ * @param {boolean} isKeyboardFocused If true, the `ListItem` is focused.
+ */
+ onKeyboardFocus: _react.PropTypes.func,
+ /** @ignore */
+ onMouseEnter: _react.PropTypes.func,
+ /** @ignore */
+ onMouseLeave: _react.PropTypes.func,
+ /**
+ * Callbak function fired when the `ListItem` toggles its nested list.
+ *
+ * @param {object} listItem The `ListItem`.
+ */
+ onNestedListToggle: _react.PropTypes.func,
+ /** @ignore */
+ onTouchEnd: _react.PropTypes.func,
+ /** @ignore */
+ onTouchStart: _react.PropTypes.func,
+ /** @ignore */
+ onTouchTap: _react.PropTypes.func,
+ /**
+ * Control toggle state of nested list.
+ */
+ open: _react.PropTypes.bool,
+ /**
+ * This is the block element that contains the primary text.
+ * If a string is passed in, a div tag will be rendered.
+ */
+ primaryText: _react.PropTypes.node,
+ /**
+ * If true, clicking or tapping the primary text of the `ListItem`
+ * toggles the nested list.
+ */
+ primaryTogglesNestedList: _react.PropTypes.bool,
+ /**
+ * This is the `Avatar` element to be displayed on the right side.
+ */
+ rightAvatar: _react.PropTypes.element,
+ /**
+ * This is the `SvgIcon` or `FontIcon` to be displayed on the right side.
+ */
+ rightIcon: _react.PropTypes.element,
+ /**
+ * This is the `IconButton` to be displayed on the right side.
+ * Hovering over this button will remove the `ListItem` hover.
+ * Also, clicking on this button will not trigger a
+ * ripple on the `ListItem`; the event will be stopped and prevented
+ * from bubbling up to cause a `ListItem` click.
+ */
+ rightIconButton: _react.PropTypes.element,
+ /**
+ * This is the `Toggle` element to display on the right side.
+ */
+ rightToggle: _react.PropTypes.element,
+ /**
+ * This is the block element that contains the secondary text.
+ * If a string is passed in, a div tag will be rendered.
+ */
+ secondaryText: _react.PropTypes.node,
+ /**
+ * Can be 1 or 2. This is the number of secondary
+ * text lines before ellipsis will show.
+ */
+ secondaryTextLines: _react.PropTypes.oneOf([1, 2]),
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
+} : void 0;
+exports.default = ListItem;
/***/ }),
-/* 301 */
+/* 318 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -22394,6 +23096,10 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
+var _toConsumableArray2 = __webpack_require__(95);
+
+var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
+
var _getPrototypeOf = __webpack_require__(3);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -22414,257 +23120,304 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
-var _react = __webpack_require__(0);
+var _toArray2 = __webpack_require__(319);
-var _getMuiTheme = __webpack_require__(125);
+var _toArray3 = _interopRequireDefault(_toArray2);
-var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme);
+var _simpleAssign = __webpack_require__(6);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-var MuiThemeProvider = function (_Component) {
- (0, _inherits3.default)(MuiThemeProvider, _Component);
+var _react = __webpack_require__(0);
- function MuiThemeProvider() {
- (0, _classCallCheck3.default)(this, MuiThemeProvider);
- return (0, _possibleConstructorReturn3.default)(this, (MuiThemeProvider.__proto__ || (0, _getPrototypeOf2.default)(MuiThemeProvider)).apply(this, arguments));
- }
+var _react2 = _interopRequireDefault(_react);
- (0, _createClass3.default)(MuiThemeProvider, [{
- key: 'getChildContext',
- value: function getChildContext() {
- return {
- muiTheme: this.props.muiTheme || (0, _getMuiTheme2.default)()
- };
- }
- }, {
- key: 'render',
- value: function render() {
- return this.props.children;
- }
- }]);
- return MuiThemeProvider;
-}(_react.Component);
+var _reactDom = __webpack_require__(16);
-MuiThemeProvider.childContextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? MuiThemeProvider.propTypes = {
- children: _react.PropTypes.element,
- muiTheme: _react.PropTypes.object
-} : void 0;
-exports.default = MuiThemeProvider;
+var _reactDom2 = _interopRequireDefault(_reactDom);
-/***/ }),
-/* 302 */
-/***/ (function(module, exports, __webpack_require__) {
+var _reactAddonsTransitionGroup = __webpack_require__(132);
+
+var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup);
-module.exports = { "default": __webpack_require__(689), __esModule: true };
+var _dom = __webpack_require__(320);
-/***/ }),
-/* 303 */
-/***/ (function(module, exports, __webpack_require__) {
+var _dom2 = _interopRequireDefault(_dom);
-// call something on iterator step with safe closing on error
-var anObject = __webpack_require__(36);
-module.exports = function (iterator, fn, value, entries) {
- try {
- return entries ? fn(anObject(value)[0], value[1]) : fn(value);
- // 7.4.6 IteratorClose(iterator, completion)
- } catch (e) {
- var ret = iterator['return'];
- if (ret !== undefined) anObject(ret.call(iterator));
- throw e;
- }
-};
+var _CircleRipple = __webpack_require__(721);
+var _CircleRipple2 = _interopRequireDefault(_CircleRipple);
-/***/ }),
-/* 304 */
-/***/ (function(module, exports, __webpack_require__) {
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-// check on default Array iterator
-var Iterators = __webpack_require__(78);
-var ITERATOR = __webpack_require__(22)('iterator');
-var ArrayProto = Array.prototype;
+// Remove the first element of the array
+var shift = function shift(_ref) {
+ var _ref2 = (0, _toArray3.default)(_ref),
+ newArray = _ref2.slice(1);
-module.exports = function (it) {
- return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
+ return newArray;
};
+var TouchRipple = function (_Component) {
+ (0, _inherits3.default)(TouchRipple, _Component);
-/***/ }),
-/* 305 */
-/***/ (function(module, exports, __webpack_require__) {
+ function TouchRipple(props, context) {
+ (0, _classCallCheck3.default)(this, TouchRipple);
-var ITERATOR = __webpack_require__(22)('iterator');
-var SAFE_CLOSING = false;
+ // Touch start produces a mouse down event for compat reasons. To avoid
+ // showing ripples twice we skip showing a ripple for the first mouse down
+ // after a touch start. Note we don't store ignoreNextMouseDown in this.state
+ // to avoid re-rendering when we change it.
+ var _this = (0, _possibleConstructorReturn3.default)(this, (TouchRipple.__proto__ || (0, _getPrototypeOf2.default)(TouchRipple)).call(this, props, context));
-try {
- var riter = [7][ITERATOR]();
- riter['return'] = function () { SAFE_CLOSING = true; };
- // eslint-disable-next-line no-throw-literal
- Array.from(riter, function () { throw 2; });
-} catch (e) { /* empty */ }
+ _this.handleMouseDown = function (event) {
+ // only listen to left clicks
+ if (event.button === 0) {
+ _this.start(event, false);
+ }
+ };
-module.exports = function (exec, skipClosing) {
- if (!skipClosing && !SAFE_CLOSING) return false;
- var safe = false;
- try {
- var arr = [7];
- var iter = arr[ITERATOR]();
- iter.next = function () { return { done: safe = true }; };
- arr[ITERATOR] = function () { return iter; };
- exec(arr);
- } catch (e) { /* empty */ }
- return safe;
-};
+ _this.handleMouseUp = function () {
+ _this.end();
+ };
+ _this.handleMouseLeave = function () {
+ _this.end();
+ };
-/***/ }),
-/* 306 */
-/***/ (function(module, exports, __webpack_require__) {
+ _this.handleTouchStart = function (event) {
+ event.stopPropagation();
+ // If the user is swiping (not just tapping), save the position so we can
+ // abort ripples if the user appears to be scrolling.
+ if (_this.props.abortOnScroll && event.touches) {
+ _this.startListeningForScrollAbort(event);
+ _this.startTime = Date.now();
+ }
+ _this.start(event, true);
+ };
-"use strict";
+ _this.handleTouchEnd = function () {
+ _this.end();
+ };
+ _this.handleTouchMove = function (event) {
+ // Stop trying to abort if we're already 300ms into the animation
+ var timeSinceStart = Math.abs(Date.now() - _this.startTime);
+ if (timeSinceStart > 300) {
+ _this.stopListeningForScrollAbort();
+ return;
+ }
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
+ // If the user is scrolling...
+ var deltaY = Math.abs(event.touches[0].clientY - _this.firstTouchY);
+ var deltaX = Math.abs(event.touches[0].clientX - _this.firstTouchX);
+ // Call it a scroll after an arbitrary 6px (feels reasonable in testing)
+ if (deltaY > 6 || deltaX > 6) {
+ var currentRipples = _this.state.ripples;
+ var ripple = currentRipples[0];
+ // This clone will replace the ripple in ReactTransitionGroup with a
+ // version that will disappear immediately when removed from the DOM
+ var abortedRipple = _react2.default.cloneElement(ripple, { aborted: true });
+ // Remove the old ripple and replace it with the new updated one
+ currentRipples = shift(currentRipples);
+ currentRipples = [].concat((0, _toConsumableArray3.default)(currentRipples), [abortedRipple]);
+ _this.setState({ ripples: currentRipples }, function () {
+ // Call end after we've set the ripple to abort otherwise the setState
+ // in end() merges with this and the ripple abort fails
+ _this.end();
+ });
+ }
+ };
-var _colors = __webpack_require__(57);
+ _this.ignoreNextMouseDown = false;
-var _colorManipulator = __webpack_require__(56);
+ _this.state = {
+ // This prop allows us to only render the ReactTransitionGroup
+ // on the first click of the component, making the inital render faster.
+ hasRipples: false,
+ nextKey: 0,
+ ripples: []
+ };
+ return _this;
+ }
-var _spacing = __webpack_require__(192);
+ (0, _createClass3.default)(TouchRipple, [{
+ key: 'start',
+ value: function start(event, isRippleTouchGenerated) {
+ var theme = this.context.muiTheme.ripple;
-var _spacing2 = _interopRequireDefault(_spacing);
+ if (this.ignoreNextMouseDown && !isRippleTouchGenerated) {
+ this.ignoreNextMouseDown = false;
+ return;
+ }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ var ripples = this.state.ripples;
-/**
- * Light Theme is the default theme used in material-ui. It is guaranteed to
- * have all theme variables needed for every component. Variables not defined
- * in a custom theme will default to these values.
- */
-exports.default = {
- spacing: _spacing2.default,
- fontFamily: 'Roboto, sans-serif',
- palette: {
- primary1Color: _colors.cyan500,
- primary2Color: _colors.cyan700,
- primary3Color: _colors.grey400,
- accent1Color: _colors.pinkA200,
- accent2Color: _colors.grey100,
- accent3Color: _colors.grey500,
- textColor: _colors.darkBlack,
- secondaryTextColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.54),
- alternateTextColor: _colors.white,
- canvasColor: _colors.white,
- borderColor: _colors.grey300,
- disabledColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.3),
- pickerHeaderColor: _colors.cyan500,
- clockCircleColor: (0, _colorManipulator.fade)(_colors.darkBlack, 0.07),
- shadowColor: _colors.fullBlack
- }
-}; /**
- * NB: If you update this file, please also update `docs/src/app/customization/Themes.js`
- */
+ // Add a ripple to the ripples array
+ ripples = [].concat((0, _toConsumableArray3.default)(ripples), [_react2.default.createElement(_CircleRipple2.default, {
+ key: this.state.nextKey,
+ style: !this.props.centerRipple ? this.getRippleStyle(event) : {},
+ color: this.props.color || theme.color,
+ opacity: this.props.opacity,
+ touchGenerated: isRippleTouchGenerated
+ })]);
-/***/ }),
-/* 307 */
-/***/ (function(module, exports, __webpack_require__) {
+ this.ignoreNextMouseDown = isRippleTouchGenerated;
+ this.setState({
+ hasRipples: true,
+ nextKey: this.state.nextKey + 1,
+ ripples: ripples
+ });
+ }
+ }, {
+ key: 'end',
+ value: function end() {
+ var currentRipples = this.state.ripples;
+ this.setState({
+ ripples: shift(currentRipples)
+ });
+ if (this.props.abortOnScroll) {
+ this.stopListeningForScrollAbort();
+ }
+ }
-"use strict";
+ // Check if the user seems to be scrolling and abort the animation if so
+
+ }, {
+ key: 'startListeningForScrollAbort',
+ value: function startListeningForScrollAbort(event) {
+ this.firstTouchY = event.touches[0].clientY;
+ this.firstTouchX = event.touches[0].clientX;
+ // Note that when scolling Chrome throttles this event to every 200ms
+ // Also note we don't listen for scroll events directly as there's no general
+ // way to cover cases like scrolling within containers on the page
+ document.body.addEventListener('touchmove', this.handleTouchMove);
+ }
+ }, {
+ key: 'stopListeningForScrollAbort',
+ value: function stopListeningForScrollAbort() {
+ document.body.removeEventListener('touchmove', this.handleTouchMove);
+ }
+ }, {
+ key: 'getRippleStyle',
+ value: function getRippleStyle(event) {
+ var el = _reactDom2.default.findDOMNode(this);
+ var elHeight = el.offsetHeight;
+ var elWidth = el.offsetWidth;
+ var offset = _dom2.default.offset(el);
+ var isTouchEvent = event.touches && event.touches.length;
+ var pageX = isTouchEvent ? event.touches[0].pageX : event.pageX;
+ var pageY = isTouchEvent ? event.touches[0].pageY : event.pageY;
+ var pointerX = pageX - offset.left;
+ var pointerY = pageY - offset.top;
+ var topLeftDiag = this.calcDiag(pointerX, pointerY);
+ var topRightDiag = this.calcDiag(elWidth - pointerX, pointerY);
+ var botRightDiag = this.calcDiag(elWidth - pointerX, elHeight - pointerY);
+ var botLeftDiag = this.calcDiag(pointerX, elHeight - pointerY);
+ var rippleRadius = Math.max(topLeftDiag, topRightDiag, botRightDiag, botLeftDiag);
+ var rippleSize = rippleRadius * 2;
+ var left = pointerX - rippleRadius;
+ var top = pointerY - rippleRadius;
+
+ return {
+ directionInvariant: true,
+ height: rippleSize,
+ width: rippleSize,
+ top: top,
+ left: left
+ };
+ }
+ }, {
+ key: 'calcDiag',
+ value: function calcDiag(a, b) {
+ return Math.sqrt(a * a + b * b);
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ children = _props.children,
+ style = _props.style;
+ var _state = this.state,
+ hasRipples = _state.hasRipples,
+ ripples = _state.ripples;
+ var prepareStyles = this.context.muiTheme.prepareStyles;
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = {
- menu: 1000,
- appBar: 1100,
- drawerOverlay: 1200,
- drawer: 1300,
- dialogOverlay: 1400,
- dialog: 1500,
- layer: 2000,
- popover: 2100,
- snackbar: 2900,
- tooltip: 3000
-};
+ var rippleGroup = void 0;
-/***/ }),
-/* 308 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (hasRipples) {
+ var mergedStyles = (0, _simpleAssign2.default)({
+ height: '100%',
+ width: '100%',
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ overflow: 'hidden',
+ pointerEvents: 'none'
+ }, style);
-"use strict";
+ rippleGroup = _react2.default.createElement(
+ _reactAddonsTransitionGroup2.default,
+ { style: prepareStyles(mergedStyles) },
+ ripples
+ );
+ }
+ return _react2.default.createElement(
+ 'div',
+ {
+ onMouseUp: this.handleMouseUp,
+ onMouseDown: this.handleMouseDown,
+ onMouseLeave: this.handleMouseLeave,
+ onTouchStart: this.handleTouchStart,
+ onTouchEnd: this.handleTouchEnd
+ },
+ rippleGroup,
+ children
+ );
+ }
+ }]);
+ return TouchRipple;
+}(_react.Component);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = { "Webkit": { "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "backfaceVisibility": true, "perspective": true, "perspectiveOrigin": true, "transformStyle": true, "transformOriginZ": true, "animation": true, "animationDelay": true, "animationDirection": true, "animationFillMode": true, "animationDuration": true, "animationIterationCount": true, "animationName": true, "animationPlayState": true, "animationTimingFunction": true, "appearance": true, "userSelect": true, "fontKerning": true, "textEmphasisPosition": true, "textEmphasis": true, "textEmphasisStyle": true, "textEmphasisColor": true, "boxDecorationBreak": true, "clipPath": true, "maskImage": true, "maskMode": true, "maskRepeat": true, "maskPosition": true, "maskClip": true, "maskOrigin": true, "maskSize": true, "maskComposite": true, "mask": true, "maskBorderSource": true, "maskBorderMode": true, "maskBorderSlice": true, "maskBorderWidth": true, "maskBorderOutset": true, "maskBorderRepeat": true, "maskBorder": true, "maskType": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "filter": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true, "flex": true, "flexBasis": true, "flexDirection": true, "flexGrow": true, "flexFlow": true, "flexShrink": true, "flexWrap": true, "alignContent": true, "alignItems": true, "alignSelf": true, "justifyContent": true, "order": true, "transition": true, "transitionDelay": true, "transitionDuration": true, "transitionProperty": true, "transitionTimingFunction": true, "backdropFilter": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "shapeImageThreshold": true, "shapeImageMargin": true, "shapeImageOutside": true, "hyphens": true, "flowInto": true, "flowFrom": true, "regionFragment": true, "textSizeAdjust": true }, "Moz": { "appearance": true, "userSelect": true, "boxSizing": true, "textAlignLast": true, "textDecorationStyle": true, "textDecorationSkip": true, "textDecorationLine": true, "textDecorationColor": true, "tabSize": true, "hyphens": true, "fontFeatureSettings": true, "breakAfter": true, "breakBefore": true, "breakInside": true, "columnCount": true, "columnFill": true, "columnGap": true, "columnRule": true, "columnRuleColor": true, "columnRuleStyle": true, "columnRuleWidth": true, "columns": true, "columnSpan": true, "columnWidth": true }, "ms": { "flex": true, "flexBasis": false, "flexDirection": true, "flexGrow": false, "flexFlow": true, "flexShrink": false, "flexWrap": true, "alignContent": false, "alignItems": false, "alignSelf": false, "justifyContent": false, "order": false, "transform": true, "transformOrigin": true, "transformOriginX": true, "transformOriginY": true, "userSelect": true, "wrapFlow": true, "wrapThrough": true, "wrapMargin": true, "scrollSnapType": true, "scrollSnapPointsX": true, "scrollSnapPointsY": true, "scrollSnapDestination": true, "scrollSnapCoordinate": true, "touchAction": true, "hyphens": true, "flowInto": true, "flowFrom": true, "breakBefore": true, "breakAfter": true, "breakInside": true, "regionFragment": true, "gridTemplateColumns": true, "gridTemplateRows": true, "gridTemplateAreas": true, "gridTemplate": true, "gridAutoColumns": true, "gridAutoRows": true, "gridAutoFlow": true, "grid": true, "gridRowStart": true, "gridColumnStart": true, "gridRowEnd": true, "gridRow": true, "gridColumn": true, "gridColumnEnd": true, "gridColumnGap": true, "gridRowGap": true, "gridArea": true, "gridGap": true, "textSizeAdjust": true } };
-module.exports = exports["default"];
+TouchRipple.defaultProps = {
+ abortOnScroll: true
+};
+TouchRipple.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? TouchRipple.propTypes = {
+ abortOnScroll: _react.PropTypes.bool,
+ centerRipple: _react.PropTypes.bool,
+ children: _react.PropTypes.node,
+ color: _react.PropTypes.string,
+ opacity: _react.PropTypes.number,
+ style: _react.PropTypes.object
+} : void 0;
+exports.default = TouchRipple;
/***/ }),
-/* 309 */
+/* 319 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = sortPrefixedStyle;
+exports.__esModule = true;
-var _isPrefixedProperty = __webpack_require__(696);
+var _from = __webpack_require__(306);
-var _isPrefixedProperty2 = _interopRequireDefault(_isPrefixedProperty);
+var _from2 = _interopRequireDefault(_from);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function sortPrefixedStyle(style) {
- return Object.keys(style).sort(function (left, right) {
- if ((0, _isPrefixedProperty2.default)(left) && !(0, _isPrefixedProperty2.default)(right)) {
- return -1;
- } else if (!(0, _isPrefixedProperty2.default)(left) && (0, _isPrefixedProperty2.default)(right)) {
- return 1;
- }
- return 0;
- }).reduce(function (sortedStyle, prop) {
- sortedStyle[prop] = style[prop];
- return sortedStyle;
- }, {});
-}
-module.exports = exports['default'];
-
-/***/ }),
-/* 310 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var uppercasePattern = /[A-Z]/g;
-var msPattern = /^ms-/;
-var cache = {};
-
-function hyphenateStyleName(string) {
- return string in cache
- ? cache[string]
- : cache[string] = string
- .replace(uppercasePattern, '-$&')
- .toLowerCase()
- .replace(msPattern, '-ms-');
-}
-
-module.exports = hyphenateStyleName;
-
+exports.default = function (arr) {
+ return Array.isArray(arr) ? arr : (0, _from2.default)(arr);
+};
/***/ }),
-/* 311 */
+/* 320 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -22673,39 +23426,28 @@ module.exports = hyphenateStyleName;
Object.defineProperty(exports, "__esModule", {
value: true
});
+exports.default = {
+ isDescendant: function isDescendant(parent, child) {
+ var node = child.parentNode;
-var _classCallCheck2 = __webpack_require__(1);
-
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
-var _colors = __webpack_require__(57);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var Typography = function Typography() {
- (0, _classCallCheck3.default)(this, Typography);
-
- // text colors
- this.textFullBlack = _colors.fullBlack;
- this.textDarkBlack = _colors.darkBlack;
- this.textLightBlack = _colors.lightBlack;
- this.textMinBlack = _colors.minBlack;
- this.textFullWhite = _colors.fullWhite;
- this.textDarkWhite = _colors.darkWhite;
- this.textLightWhite = _colors.lightWhite;
-
- // font weight
- this.fontWeightLight = 300;
- this.fontWeightNormal = 400;
- this.fontWeightMedium = 500;
+ while (node !== null) {
+ if (node === parent) return true;
+ node = node.parentNode;
+ }
- this.fontStyleButtonFontSize = 14;
+ return false;
+ },
+ offset: function offset(el) {
+ var rect = el.getBoundingClientRect();
+ return {
+ top: rect.top + document.body.scrollTop,
+ left: rect.left + document.body.scrollLeft
+ };
+ }
};
-exports.default = new Typography();
-
/***/ }),
-/* 312 */
+/* 321 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -22716,16 +23458,16 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = undefined;
-var _Subheader = __webpack_require__(729);
+var _FontIcon = __webpack_require__(723);
-var _Subheader2 = _interopRequireDefault(_Subheader);
+var _FontIcon2 = _interopRequireDefault(_FontIcon);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-exports.default = _Subheader2.default;
+exports.default = _FontIcon2.default;
/***/ }),
-/* 313 */
+/* 322 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -22735,14 +23477,14 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _objectWithoutProperties2 = __webpack_require__(8);
-
-var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
+var _objectWithoutProperties2 = __webpack_require__(8);
+
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
var _getPrototypeOf = __webpack_require__(3);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -22771,678 +23513,387 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactDom = __webpack_require__(19);
-
-var _reactDom2 = _interopRequireDefault(_reactDom);
-
-var _shallowEqual = __webpack_require__(58);
-
-var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
-
-var _colorManipulator = __webpack_require__(56);
-
var _transitions = __webpack_require__(10);
var _transitions2 = _interopRequireDefault(_transitions);
-var _EnhancedButton = __webpack_require__(59);
-
-var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton);
-
-var _IconButton = __webpack_require__(95);
-
-var _IconButton2 = _interopRequireDefault(_IconButton);
-
-var _expandLess = __webpack_require__(740);
-
-var _expandLess2 = _interopRequireDefault(_expandLess);
-
-var _expandMore = __webpack_require__(747);
-
-var _expandMore2 = _interopRequireDefault(_expandMore);
-
-var _NestedList = __webpack_require__(748);
-
-var _NestedList2 = _interopRequireDefault(_NestedList);
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function getStyles(props, context, state) {
- var insetChildren = props.insetChildren,
- leftAvatar = props.leftAvatar,
- leftCheckbox = props.leftCheckbox,
- leftIcon = props.leftIcon,
- nestedLevel = props.nestedLevel,
- rightAvatar = props.rightAvatar,
- rightIcon = props.rightIcon,
- rightIconButton = props.rightIconButton,
- rightToggle = props.rightToggle,
- secondaryText = props.secondaryText,
- secondaryTextLines = props.secondaryTextLines;
- var muiTheme = context.muiTheme;
- var listItem = muiTheme.listItem;
+ var verticalPosition = props.verticalPosition;
+ var horizontalPosition = props.horizontalPosition;
+ var touchMarginOffset = props.touch ? 10 : 0;
+ var touchOffsetTop = props.touch ? -20 : -10;
+ var offset = verticalPosition === 'bottom' ? 14 + touchMarginOffset : -14 - touchMarginOffset;
+ var _context$muiTheme = context.muiTheme,
+ baseTheme = _context$muiTheme.baseTheme,
+ zIndex = _context$muiTheme.zIndex,
+ tooltip = _context$muiTheme.tooltip;
- var textColor = muiTheme.baseTheme.palette.textColor;
- var hoverColor = props.hoverColor || (0, _colorManipulator.fade)(textColor, 0.1);
- var singleAvatar = !secondaryText && (leftAvatar || rightAvatar);
- var singleNoAvatar = !secondaryText && !(leftAvatar || rightAvatar);
- var twoLine = secondaryText && secondaryTextLines === 1;
- var threeLine = secondaryText && secondaryTextLines > 1;
var styles = {
root: {
- backgroundColor: (state.isKeyboardFocused || state.hovered) && !state.rightIconButtonHovered && !state.rightIconButtonKeyboardFocused ? hoverColor : null,
- color: textColor,
- display: 'block',
- fontSize: 16,
- lineHeight: '16px',
- position: 'relative',
- transition: _transitions2.default.easeOut()
- },
-
- // This inner div is needed so that ripples will span the entire container
- innerDiv: {
- marginLeft: nestedLevel * listItem.nestedLevelDepth,
- paddingLeft: leftIcon || leftAvatar || leftCheckbox || insetChildren ? 72 : 16,
- paddingRight: rightIcon || rightAvatar || rightIconButton ? 56 : rightToggle ? 72 : 16,
- paddingBottom: singleAvatar ? 20 : 16,
- paddingTop: singleNoAvatar || threeLine ? 16 : 20,
- position: 'relative'
- },
-
- icons: {
- height: 24,
- width: 24,
- display: 'block',
- position: 'absolute',
- top: twoLine ? 12 : singleAvatar ? 4 : 0,
- margin: 12
- },
-
- leftIcon: {
- left: 4
- },
-
- rightIcon: {
- right: 4
- },
-
- avatars: {
position: 'absolute',
- top: singleAvatar ? 8 : 16
+ fontFamily: baseTheme.fontFamily,
+ fontSize: '10px',
+ lineHeight: '22px',
+ padding: '0 8px',
+ zIndex: zIndex.tooltip,
+ color: tooltip.color,
+ overflow: 'hidden',
+ top: -10000,
+ borderRadius: 2,
+ userSelect: 'none',
+ opacity: 0,
+ right: horizontalPosition === 'left' ? 12 : null,
+ left: horizontalPosition === 'center' ? (state.offsetWidth - 48) / 2 * -1 : null,
+ transition: _transitions2.default.easeOut('0ms', 'top', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms')
},
-
label: {
- cursor: 'pointer'
- },
-
- leftAvatar: {
- left: 16
- },
-
- rightAvatar: {
- right: 16
+ position: 'relative',
+ whiteSpace: 'nowrap'
},
-
- leftCheckbox: {
+ ripple: {
position: 'absolute',
- display: 'block',
- width: 24,
- top: twoLine ? 24 : singleAvatar ? 16 : 12,
- left: 16
+ left: horizontalPosition === 'center' ? '50%' : horizontalPosition === 'left' ? '100%' : '0%',
+ top: verticalPosition === 'bottom' ? 0 : '100%',
+ transform: 'translate(-50%, -50%)',
+ borderRadius: '50%',
+ backgroundColor: 'transparent',
+ transition: _transitions2.default.easeOut('0ms', 'width', '450ms') + ', ' + _transitions2.default.easeOut('0ms', 'height', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms')
},
-
- primaryText: {},
-
- rightIconButton: {
- position: 'absolute',
- display: 'block',
- top: twoLine ? 12 : singleAvatar ? 4 : 0,
- right: 4
+ rootWhenShown: {
+ top: verticalPosition === 'top' ? touchOffsetTop : 36,
+ opacity: 0.9,
+ transform: 'translate(0px, ' + offset + 'px)',
+ transition: _transitions2.default.easeOut('0ms', 'top', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms')
},
-
- rightToggle: {
- position: 'absolute',
- display: 'block',
- width: 54,
- top: twoLine ? 25 : singleAvatar ? 17 : 13,
- right: 8
+ rootWhenTouched: {
+ fontSize: '14px',
+ lineHeight: '32px',
+ padding: '0 16px'
},
-
- secondaryText: {
- fontSize: 14,
- lineHeight: threeLine ? '18px' : '16px',
- height: threeLine ? 36 : 16,
- margin: 0,
- marginTop: 4,
- color: listItem.secondaryTextColor,
-
- // needed for 2 and 3 line ellipsis
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- whiteSpace: threeLine ? null : 'nowrap',
- display: threeLine ? '-webkit-box' : null,
- WebkitLineClamp: threeLine ? 2 : null,
- WebkitBoxOrient: threeLine ? 'vertical' : null
+ rippleWhenShown: {
+ backgroundColor: tooltip.rippleBackgroundColor,
+ transition: _transitions2.default.easeOut('450ms', 'width', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'height', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms')
}
};
return styles;
}
-var ListItem = function (_Component) {
- (0, _inherits3.default)(ListItem, _Component);
+var Tooltip = function (_Component) {
+ (0, _inherits3.default)(Tooltip, _Component);
- function ListItem() {
+ function Tooltip() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, ListItem);
+ (0, _classCallCheck3.default)(this, Tooltip);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ListItem.__proto__ || (0, _getPrototypeOf2.default)(ListItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- hovered: false,
- isKeyboardFocused: false,
- open: false,
- rightIconButtonHovered: false,
- rightIconButtonKeyboardFocused: false,
- touch: false
- }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) {
- _this.setState({ isKeyboardFocused: isKeyboardFocused });
- _this.props.onKeyboardFocus(event, isKeyboardFocused);
- }, _this.handleMouseEnter = function (event) {
- if (!_this.state.touch) _this.setState({ hovered: true });
- _this.props.onMouseEnter(event);
- }, _this.handleMouseLeave = function (event) {
- _this.setState({ hovered: false });
- _this.props.onMouseLeave(event);
- }, _this.handleNestedListToggle = function (event) {
- event.stopPropagation();
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tooltip.__proto__ || (0, _getPrototypeOf2.default)(Tooltip)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ offsetWidth: null
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
- if (_this.props.open === null) {
- _this.setState({ open: !_this.state.open }, function () {
- _this.props.onNestedListToggle(_this);
- });
+ (0, _createClass3.default)(Tooltip, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ this.setRippleSize();
+ this.setTooltipPosition();
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps() {
+ this.setTooltipPosition();
+ }
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate() {
+ this.setRippleSize();
+ }
+ }, {
+ key: 'setRippleSize',
+ value: function setRippleSize() {
+ var ripple = this.refs.ripple;
+ var tooltip = this.refs.tooltip;
+ var tooltipWidth = parseInt(tooltip.offsetWidth, 10) / (this.props.horizontalPosition === 'center' ? 2 : 1);
+ var tooltipHeight = parseInt(tooltip.offsetHeight, 10);
+
+ var rippleDiameter = Math.ceil(Math.sqrt(Math.pow(tooltipHeight, 2) + Math.pow(tooltipWidth, 2)) * 2);
+ if (this.props.show) {
+ ripple.style.height = rippleDiameter + 'px';
+ ripple.style.width = rippleDiameter + 'px';
} else {
- // Exposing `this` in the callback is quite a bad API.
- // I'm doing a one level deep clone to expose a fake state.open.
- _this.props.onNestedListToggle((0, _extends3.default)({}, _this, {
- state: {
- open: !_this.state.open
+ ripple.style.width = '0px';
+ ripple.style.height = '0px';
+ }
+ }
+ }, {
+ key: 'setTooltipPosition',
+ value: function setTooltipPosition() {
+ this.setState({ offsetWidth: this.refs.tooltip.offsetWidth });
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ horizontalPosition = _props.horizontalPosition,
+ label = _props.label,
+ show = _props.show,
+ touch = _props.touch,
+ verticalPosition = _props.verticalPosition,
+ other = (0, _objectWithoutProperties3.default)(_props, ['horizontalPosition', 'label', 'show', 'touch', 'verticalPosition']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
+
+ var styles = getStyles(this.props, this.context, this.state);
+
+ return _react2.default.createElement(
+ 'div',
+ (0, _extends3.default)({}, other, {
+ ref: 'tooltip',
+ style: prepareStyles((0, _simpleAssign2.default)(styles.root, this.props.show && styles.rootWhenShown, this.props.touch && styles.rootWhenTouched, this.props.style))
+ }),
+ _react2.default.createElement('div', {
+ ref: 'ripple',
+ style: prepareStyles((0, _simpleAssign2.default)(styles.ripple, this.props.show && styles.rippleWhenShown))
+ }),
+ _react2.default.createElement(
+ 'span',
+ { style: prepareStyles(styles.label) },
+ label
+ )
+ );
+ }
+ }]);
+ return Tooltip;
+}(_react.Component);
+
+Tooltip.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? Tooltip.propTypes = {
+ /**
+ * The css class name of the root element.
+ */
+ className: _react.PropTypes.string,
+ horizontalPosition: _react.PropTypes.oneOf(['left', 'right', 'center']),
+ label: _react.PropTypes.node.isRequired,
+ show: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object,
+ touch: _react.PropTypes.bool,
+ verticalPosition: _react.PropTypes.oneOf(['top', 'bottom'])
+} : void 0;
+exports.default = Tooltip;
+
+/***/ }),
+/* 323 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+var createHelper = function createHelper(func, helperName) {
+ var setDisplayName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
+ var noArgs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
+
+ if (false) {
+ var _ret = function () {
+ /* eslint-disable global-require */
+ var wrapDisplayName = require('./wrapDisplayName').default;
+ /* eslint-enable global-require */
+
+ if (noArgs) {
+ return {
+ v: function v(BaseComponent) {
+ var Component = func(BaseComponent);
+ Component.displayName = wrapDisplayName(BaseComponent, helperName);
+ return Component;
}
- }));
- }
- }, _this.handleRightIconButtonKeyboardFocus = function (event, isKeyboardFocused) {
- if (isKeyboardFocused) {
- _this.setState({
- isKeyboardFocused: false,
- rightIconButtonKeyboardFocused: isKeyboardFocused
- });
+ };
}
- var iconButton = _this.props.rightIconButton;
+ return {
+ v: function v() {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
- if (iconButton && iconButton.props.onKeyboardFocus) iconButton.props.onKeyboardFocus(event, isKeyboardFocused);
- }, _this.handleRightIconButtonMouseLeave = function (event) {
- var iconButton = _this.props.rightIconButton;
- _this.setState({ rightIconButtonHovered: false });
- if (iconButton && iconButton.props.onMouseLeave) iconButton.props.onMouseLeave(event);
- }, _this.handleRightIconButtonMouseEnter = function (event) {
- var iconButton = _this.props.rightIconButton;
- _this.setState({ rightIconButtonHovered: true });
- if (iconButton && iconButton.props.onMouseEnter) iconButton.props.onMouseEnter(event);
- }, _this.handleRightIconButtonMouseUp = function (event) {
- var iconButton = _this.props.rightIconButton;
- event.stopPropagation();
- if (iconButton && iconButton.props.onMouseUp) iconButton.props.onMouseUp(event);
- }, _this.handleRightIconButtonTouchTap = function (event) {
- var iconButton = _this.props.rightIconButton;
+ return function (BaseComponent) {
+ var Component = func.apply(undefined, args)(BaseComponent);
+ Component.displayName = wrapDisplayName(BaseComponent, helperName);
+ return Component;
+ };
+ }
+ };
+ }();
- // Stop the event from bubbling up to the list-item
- event.stopPropagation();
- if (iconButton && iconButton.props.onTouchTap) iconButton.props.onTouchTap(event);
- }, _this.handleTouchStart = function (event) {
- _this.setState({ touch: true });
- _this.props.onTouchStart(event);
- }, _this.handleTouchEnd = function (event) {
- _this.setState({ touch: true });
- _this.props.onTouchEnd(event);
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ if (typeof _ret === "object") return _ret.v;
}
- (0, _createClass3.default)(ListItem, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
- this.setState({
- open: this.props.open === null ? this.props.initiallyOpen === true : this.props.open
- });
- }
- }, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- // update the state when the component is controlled.
- if (nextProps.open !== null) this.setState({ open: nextProps.open });
- if (nextProps.disabled && this.state.hovered) this.setState({ hovered: false });
- }
- }, {
- key: 'shouldComponentUpdate',
- value: function shouldComponentUpdate(nextProps, nextState, nextContext) {
- return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext);
- }
+ return func;
+};
- // This method is needed by the `MenuItem` component.
+exports.default = createHelper;
- }, {
- key: 'applyFocusState',
- value: function applyFocusState(focusState) {
- var button = this.refs.enhancedButton;
+/***/ }),
+/* 324 */
+/***/ (function(module, exports, __webpack_require__) {
- if (button) {
- var buttonEl = _reactDom2.default.findDOMNode(button);
+"use strict";
- switch (focusState) {
- case 'none':
- buttonEl.blur();
- break;
- case 'focused':
- buttonEl.focus();
- break;
- case 'keyboard-focused':
- button.setKeyboardFocus();
- buttonEl.focus();
- break;
- }
- }
- }
- }, {
- key: 'createDisabledElement',
- value: function createDisabledElement(styles, contentChildren, additionalProps) {
- var _props = this.props,
- innerDivStyle = _props.innerDivStyle,
- style = _props.style;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
- var mergedDivStyles = (0, _simpleAssign2.default)({}, styles.root, styles.innerDiv, innerDivStyle, style);
+var _extends2 = __webpack_require__(7);
- return _react2.default.createElement(
- 'div',
- (0, _extends3.default)({}, additionalProps, {
- style: this.context.muiTheme.prepareStyles(mergedDivStyles)
- }),
- contentChildren
- );
- }
- }, {
- key: 'createLabelElement',
- value: function createLabelElement(styles, contentChildren, additionalProps) {
- var _props2 = this.props,
- innerDivStyle = _props2.innerDivStyle,
- style = _props2.style;
+var _extends3 = _interopRequireDefault(_extends2);
+var _objectWithoutProperties2 = __webpack_require__(8);
- var mergedLabelStyles = (0, _simpleAssign2.default)({}, styles.root, styles.innerDiv, innerDivStyle, styles.label, style);
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
- return _react2.default.createElement(
- 'label',
- (0, _extends3.default)({}, additionalProps, {
- style: this.context.muiTheme.prepareStyles(mergedLabelStyles)
- }),
- contentChildren
- );
- }
- }, {
- key: 'createTextElement',
- value: function createTextElement(styles, data, key) {
- var prepareStyles = this.context.muiTheme.prepareStyles;
+var _getPrototypeOf = __webpack_require__(3);
- if (_react2.default.isValidElement(data)) {
- var style = (0, _simpleAssign2.default)({}, styles, data.props.style);
- if (typeof data.type === 'string') {
- // if element is a native dom node
- style = prepareStyles(style);
- }
- return _react2.default.cloneElement(data, {
- key: key,
- style: style
- });
- }
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
- return _react2.default.createElement(
- 'div',
- { key: key, style: prepareStyles(styles) },
- data
- );
- }
- }, {
- key: 'pushElement',
- value: function pushElement(children, element, baseStyles, additionalProps) {
- if (element) {
- var styles = (0, _simpleAssign2.default)({}, baseStyles, element.props.style);
- children.push(_react2.default.cloneElement(element, (0, _extends3.default)({
- key: children.length,
- style: styles
- }, additionalProps)));
- }
- }
- }, {
- key: 'render',
- value: function render() {
- var _props3 = this.props,
- autoGenerateNestedIndicator = _props3.autoGenerateNestedIndicator,
- children = _props3.children,
- disabled = _props3.disabled,
- disableKeyboardFocus = _props3.disableKeyboardFocus,
- hoverColor = _props3.hoverColor,
- initiallyOpen = _props3.initiallyOpen,
- innerDivStyle = _props3.innerDivStyle,
- insetChildren = _props3.insetChildren,
- leftAvatar = _props3.leftAvatar,
- leftCheckbox = _props3.leftCheckbox,
- leftIcon = _props3.leftIcon,
- nestedItems = _props3.nestedItems,
- nestedLevel = _props3.nestedLevel,
- nestedListStyle = _props3.nestedListStyle,
- onKeyboardFocus = _props3.onKeyboardFocus,
- onMouseEnter = _props3.onMouseEnter,
- onMouseLeave = _props3.onMouseLeave,
- onNestedListToggle = _props3.onNestedListToggle,
- onTouchStart = _props3.onTouchStart,
- onTouchTap = _props3.onTouchTap,
- rightAvatar = _props3.rightAvatar,
- rightIcon = _props3.rightIcon,
- rightIconButton = _props3.rightIconButton,
- rightToggle = _props3.rightToggle,
- primaryText = _props3.primaryText,
- primaryTogglesNestedList = _props3.primaryTogglesNestedList,
- secondaryText = _props3.secondaryText,
- secondaryTextLines = _props3.secondaryTextLines,
- style = _props3.style,
- other = (0, _objectWithoutProperties3.default)(_props3, ['autoGenerateNestedIndicator', 'children', 'disabled', 'disableKeyboardFocus', 'hoverColor', 'initiallyOpen', 'innerDivStyle', 'insetChildren', 'leftAvatar', 'leftCheckbox', 'leftIcon', 'nestedItems', 'nestedLevel', 'nestedListStyle', 'onKeyboardFocus', 'onMouseEnter', 'onMouseLeave', 'onNestedListToggle', 'onTouchStart', 'onTouchTap', 'rightAvatar', 'rightIcon', 'rightIconButton', 'rightToggle', 'primaryText', 'primaryTogglesNestedList', 'secondaryText', 'secondaryTextLines', 'style']);
- var prepareStyles = this.context.muiTheme.prepareStyles;
+var _classCallCheck2 = __webpack_require__(1);
- var styles = getStyles(this.props, this.context, this.state);
- var contentChildren = [children];
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- if (leftIcon) {
- var additionalProps = {
- color: leftIcon.props.color || this.context.muiTheme.listItem.leftIconColor
- };
- this.pushElement(contentChildren, leftIcon, (0, _simpleAssign2.default)({}, styles.icons, styles.leftIcon), additionalProps);
- }
+var _createClass2 = __webpack_require__(2);
- if (rightIcon) {
- var _additionalProps = {
- color: rightIcon.props.color || this.context.muiTheme.listItem.rightIconColor
- };
- this.pushElement(contentChildren, rightIcon, (0, _simpleAssign2.default)({}, styles.icons, styles.rightIcon), _additionalProps);
- }
+var _createClass3 = _interopRequireDefault(_createClass2);
- if (leftAvatar) {
- this.pushElement(contentChildren, leftAvatar, (0, _simpleAssign2.default)({}, styles.avatars, styles.leftAvatar));
- }
+var _possibleConstructorReturn2 = __webpack_require__(4);
- if (rightAvatar) {
- this.pushElement(contentChildren, rightAvatar, (0, _simpleAssign2.default)({}, styles.avatars, styles.rightAvatar));
- }
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- if (leftCheckbox) {
- this.pushElement(contentChildren, leftCheckbox, (0, _simpleAssign2.default)({}, styles.leftCheckbox));
- }
+var _inherits2 = __webpack_require__(5);
- // RightIconButtonElement
- var hasNestListItems = nestedItems.length;
- var hasRightElement = rightAvatar || rightIcon || rightIconButton || rightToggle;
- var needsNestedIndicator = hasNestListItems && autoGenerateNestedIndicator && !hasRightElement;
+var _inherits3 = _interopRequireDefault(_inherits2);
- if (rightIconButton || needsNestedIndicator) {
- var rightIconButtonElement = rightIconButton;
- var rightIconButtonHandlers = {
- onKeyboardFocus: this.handleRightIconButtonKeyboardFocus,
- onMouseEnter: this.handleRightIconButtonMouseEnter,
- onMouseLeave: this.handleRightIconButtonMouseLeave,
- onTouchTap: this.handleRightIconButtonTouchTap,
- onMouseDown: this.handleRightIconButtonMouseUp,
- onMouseUp: this.handleRightIconButtonMouseUp
- };
+var _simpleAssign = __webpack_require__(6);
- // Create a nested list indicator icon if we don't have an icon on the right
- if (needsNestedIndicator) {
- rightIconButtonElement = this.state.open ? _react2.default.createElement(
- _IconButton2.default,
- null,
- _react2.default.createElement(_expandLess2.default, null)
- ) : _react2.default.createElement(
- _IconButton2.default,
- null,
- _react2.default.createElement(_expandMore2.default, null)
- );
- rightIconButtonHandlers.onTouchTap = this.handleNestedListToggle;
- }
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
- this.pushElement(contentChildren, rightIconButtonElement, (0, _simpleAssign2.default)({}, styles.rightIconButton), rightIconButtonHandlers);
- }
+var _react = __webpack_require__(0);
- if (rightToggle) {
- this.pushElement(contentChildren, rightToggle, (0, _simpleAssign2.default)({}, styles.rightToggle));
- }
+var _react2 = _interopRequireDefault(_react);
- if (primaryText) {
- var primaryTextElement = this.createTextElement(styles.primaryText, primaryText, 'primaryText');
- contentChildren.push(primaryTextElement);
- }
+var _transitions = __webpack_require__(10);
- if (secondaryText) {
- var secondaryTextElement = this.createTextElement(styles.secondaryText, secondaryText, 'secondaryText');
- contentChildren.push(secondaryTextElement);
- }
+var _transitions2 = _interopRequireDefault(_transitions);
- var nestedList = nestedItems.length ? _react2.default.createElement(
- _NestedList2.default,
- { nestedLevel: nestedLevel, open: this.state.open, style: nestedListStyle },
- nestedItems
- ) : undefined;
+var _AutoLockScrolling = __webpack_require__(740);
- var simpleLabel = !primaryTogglesNestedList && (leftCheckbox || rightToggle);
+var _AutoLockScrolling2 = _interopRequireDefault(_AutoLockScrolling);
- return _react2.default.createElement(
- 'div',
- null,
- simpleLabel ? this.createLabelElement(styles, contentChildren, other) : disabled ? this.createDisabledElement(styles, contentChildren, other) : _react2.default.createElement(
- _EnhancedButton2.default,
- (0, _extends3.default)({
- containerElement: 'span'
- }, other, {
- disableKeyboardFocus: disableKeyboardFocus || this.state.rightIconButtonKeyboardFocused,
- onKeyboardFocus: this.handleKeyboardFocus,
- onMouseLeave: this.handleMouseLeave,
- onMouseEnter: this.handleMouseEnter,
- onTouchStart: this.handleTouchStart,
- onTouchEnd: this.handleTouchEnd,
- onTouchTap: primaryTogglesNestedList ? this.handleNestedListToggle : onTouchTap,
- ref: 'enhancedButton',
- style: (0, _simpleAssign2.default)({}, styles.root, style)
- }),
- _react2.default.createElement(
- 'div',
- { style: prepareStyles((0, _simpleAssign2.default)(styles.innerDiv, innerDivStyle)) },
- contentChildren
- )
- ),
- nestedList
- );
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function getStyles(props, context) {
+ var overlay = context.muiTheme.overlay;
+
+
+ var style = {
+ root: {
+ position: 'fixed',
+ height: '100%',
+ width: '100%',
+ top: 0,
+ left: '-100%',
+ opacity: 0,
+ backgroundColor: overlay.backgroundColor,
+ WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)', // Remove mobile color flashing (deprecated)
+
+ // Two ways to promote overlay to its own render layer
+ willChange: 'opacity',
+ transform: 'translateZ(0)',
+
+ transition: props.transitionEnabled && _transitions2.default.easeOut('0ms', 'left', '400ms') + ', ' + _transitions2.default.easeOut('400ms', 'opacity')
}
- }]);
- return ListItem;
-}(_react.Component);
+ };
-ListItem.muiName = 'ListItem';
-ListItem.defaultProps = {
- autoGenerateNestedIndicator: true,
- disableKeyboardFocus: false,
- disabled: false,
- initiallyOpen: false,
- insetChildren: false,
- nestedItems: [],
- nestedLevel: 0,
- onKeyboardFocus: function onKeyboardFocus() {},
- onMouseEnter: function onMouseEnter() {},
- onMouseLeave: function onMouseLeave() {},
- onNestedListToggle: function onNestedListToggle() {},
- onTouchEnd: function onTouchEnd() {},
- onTouchStart: function onTouchStart() {},
- open: null,
- primaryTogglesNestedList: false,
- secondaryTextLines: 1
-};
-ListItem.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? ListItem.propTypes = {
- /**
- * If true, generate a nested-list-indicator icon when nested list
- * items are detected. Note that an indicator will not be created
- * if a `rightIcon` or `rightIconButton` has been provided to
- * the element.
- */
- autoGenerateNestedIndicator: _react.PropTypes.bool,
- /**
- * Children passed into the `ListItem`.
- */
- children: _react.PropTypes.node,
- /**
- * If true, the element will not be able to be focused by the keyboard.
- */
- disableKeyboardFocus: _react.PropTypes.bool,
- /**
- * If true, the element will not be clickable
- * and will not display hover effects.
- * This is automatically disabled if either `leftCheckbox`
- * or `rightToggle` is set.
- */
- disabled: _react.PropTypes.bool,
- /**
- * Override the hover background color.
- */
- hoverColor: _react.PropTypes.string,
- /**
- * If true, the nested `ListItem`s are initially displayed.
- */
- initiallyOpen: _react.PropTypes.bool,
- /**
- * Override the inline-styles of the inner div element.
- */
- innerDivStyle: _react.PropTypes.object,
- /**
- * If true, the children will be indented by 72px.
- * This is useful if there is no left avatar or left icon.
- */
- insetChildren: _react.PropTypes.bool,
- /**
- * This is the `Avatar` element to be displayed on the left side.
- */
- leftAvatar: _react.PropTypes.element,
- /**
- * This is the `Checkbox` element to be displayed on the left side.
- */
- leftCheckbox: _react.PropTypes.element,
- /**
- * This is the `SvgIcon` or `FontIcon` to be displayed on the left side.
- */
- leftIcon: _react.PropTypes.element,
- /**
- * An array of `ListItem`s to nest underneath the current `ListItem`.
- */
- nestedItems: _react.PropTypes.arrayOf(_react.PropTypes.element),
- /**
- * Controls how deep a `ListItem` appears.
- * This property is automatically managed, so modify at your own risk.
- */
- nestedLevel: _react.PropTypes.number,
- /**
- * Override the inline-styles of the nested items' `NestedList`.
- */
- nestedListStyle: _react.PropTypes.object,
- /**
- * Callback function fired when the `ListItem` is focused or blurred by the keyboard.
- *
- * @param {object} event `focus` or `blur` event targeting the `ListItem`.
- * @param {boolean} isKeyboardFocused If true, the `ListItem` is focused.
- */
- onKeyboardFocus: _react.PropTypes.func,
- /** @ignore */
- onMouseEnter: _react.PropTypes.func,
- /** @ignore */
- onMouseLeave: _react.PropTypes.func,
- /**
- * Callbak function fired when the `ListItem` toggles its nested list.
- *
- * @param {object} listItem The `ListItem`.
- */
- onNestedListToggle: _react.PropTypes.func,
- /** @ignore */
- onTouchEnd: _react.PropTypes.func,
- /** @ignore */
- onTouchStart: _react.PropTypes.func,
- /** @ignore */
- onTouchTap: _react.PropTypes.func,
- /**
- * Control toggle state of nested list.
- */
- open: _react.PropTypes.bool,
- /**
- * This is the block element that contains the primary text.
- * If a string is passed in, a div tag will be rendered.
- */
- primaryText: _react.PropTypes.node,
- /**
- * If true, clicking or tapping the primary text of the `ListItem`
- * toggles the nested list.
- */
- primaryTogglesNestedList: _react.PropTypes.bool,
- /**
- * This is the `Avatar` element to be displayed on the right side.
- */
- rightAvatar: _react.PropTypes.element,
- /**
- * This is the `SvgIcon` or `FontIcon` to be displayed on the right side.
- */
- rightIcon: _react.PropTypes.element,
- /**
- * This is the `IconButton` to be displayed on the right side.
- * Hovering over this button will remove the `ListItem` hover.
- * Also, clicking on this button will not trigger a
- * ripple on the `ListItem`; the event will be stopped and prevented
- * from bubbling up to cause a `ListItem` click.
- */
- rightIconButton: _react.PropTypes.element,
- /**
- * This is the `Toggle` element to display on the right side.
- */
- rightToggle: _react.PropTypes.element,
- /**
- * This is the block element that contains the secondary text.
- * If a string is passed in, a div tag will be rendered.
- */
- secondaryText: _react.PropTypes.node,
- /**
- * Can be 1 or 2. This is the number of secondary
- * text lines before ellipsis will show.
- */
- secondaryTextLines: _react.PropTypes.oneOf([1, 2]),
+ if (props.show) {
+ (0, _simpleAssign2.default)(style.root, {
+ left: 0,
+ opacity: 1,
+ transition: _transitions2.default.easeOut('0ms', 'left') + ', ' + _transitions2.default.easeOut('400ms', 'opacity')
+ });
+ }
+
+ return style;
+}
+
+var Overlay = function (_Component) {
+ (0, _inherits3.default)(Overlay, _Component);
+
+ function Overlay() {
+ (0, _classCallCheck3.default)(this, Overlay);
+ return (0, _possibleConstructorReturn3.default)(this, (Overlay.__proto__ || (0, _getPrototypeOf2.default)(Overlay)).apply(this, arguments));
+ }
+
+ (0, _createClass3.default)(Overlay, [{
+ key: 'setOpacity',
+ value: function setOpacity(opacity) {
+ this.refs.overlay.style.opacity = opacity;
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ autoLockScrolling = _props.autoLockScrolling,
+ show = _props.show,
+ style = _props.style,
+ transitionEnabled = _props.transitionEnabled,
+ other = (0, _objectWithoutProperties3.default)(_props, ['autoLockScrolling', 'show', 'style', 'transitionEnabled']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
+
+ var styles = getStyles(this.props, this.context);
+
+ return _react2.default.createElement(
+ 'div',
+ (0, _extends3.default)({}, other, { ref: 'overlay', style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }),
+ autoLockScrolling && _react2.default.createElement(_AutoLockScrolling2.default, { lock: show })
+ );
+ }
+ }]);
+ return Overlay;
+}(_react.Component);
+
+Overlay.defaultProps = {
+ autoLockScrolling: true,
+ style: {},
+ transitionEnabled: true
+};
+Overlay.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? Overlay.propTypes = {
+ autoLockScrolling: _react.PropTypes.bool,
+ show: _react.PropTypes.bool.isRequired,
/**
* Override the inline-styles of the root element.
*/
- style: _react.PropTypes.object
+ style: _react.PropTypes.object,
+ transitionEnabled: _react.PropTypes.bool
} : void 0;
-exports.default = ListItem;
+exports.default = Overlay;
/***/ }),
-/* 314 */
+/* 325 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -23451,10 +23902,11 @@ exports.default = ListItem;
Object.defineProperty(exports, "__esModule", {
value: true
});
+exports.SHOP_NAME = undefined;
-var _toConsumableArray2 = __webpack_require__(189);
+var _keys = __webpack_require__(62);
-var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
+var _keys2 = _interopRequireDefault(_keys);
var _getPrototypeOf = __webpack_require__(3);
@@ -23476,405 +23928,252 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
-var _toArray2 = __webpack_require__(315);
-
-var _toArray3 = _interopRequireDefault(_toArray2);
+var _react = __webpack_require__(0);
-var _simpleAssign = __webpack_require__(6);
+var _react2 = _interopRequireDefault(_react);
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+var _Tab = __webpack_require__(749);
-var _react = __webpack_require__(0);
+var _Tab2 = _interopRequireDefault(_Tab);
-var _react2 = _interopRequireDefault(_react);
+var _reactRedux = __webpack_require__(19);
-var _reactDom = __webpack_require__(19);
+var _FontIcon = __webpack_require__(321);
-var _reactDom2 = _interopRequireDefault(_reactDom);
+var _FontIcon2 = _interopRequireDefault(_FontIcon);
-var _reactAddonsTransitionGroup = __webpack_require__(128);
+var _IconButton = __webpack_require__(64);
-var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup);
+var _IconButton2 = _interopRequireDefault(_IconButton);
-var _dom = __webpack_require__(316);
+var _colors = __webpack_require__(31);
-var _dom2 = _interopRequireDefault(_dom);
+var _Menus = __webpack_require__(84);
-var _CircleRipple = __webpack_require__(736);
+var menus = _interopRequireWildcard(_Menus);
-var _CircleRipple2 = _interopRequireDefault(_CircleRipple);
+var _Billing = __webpack_require__(750);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _Billing2 = _interopRequireDefault(_Billing);
-// Remove the first element of the array
-var shift = function shift(_ref) {
- var _ref2 = (0, _toArray3.default)(_ref),
- newArray = _ref2.slice(1);
+var _Options = __webpack_require__(820);
- return newArray;
-};
+var _Options2 = _interopRequireDefault(_Options);
-var TouchRipple = function (_Component) {
- (0, _inherits3.default)(TouchRipple, _Component);
+var _Sizes = __webpack_require__(821);
- function TouchRipple(props, context) {
- (0, _classCallCheck3.default)(this, TouchRipple);
+var _Sizes2 = _interopRequireDefault(_Sizes);
- // Touch start produces a mouse down event for compat reasons. To avoid
- // showing ripples twice we skip showing a ripple for the first mouse down
- // after a touch start. Note we don't store ignoreNextMouseDown in this.state
- // to avoid re-rendering when we change it.
- var _this = (0, _possibleConstructorReturn3.default)(this, (TouchRipple.__proto__ || (0, _getPrototypeOf2.default)(TouchRipple)).call(this, props, context));
+var _Atc = __webpack_require__(822);
- _this.handleMouseDown = function (event) {
- // only listen to left clicks
- if (event.button === 0) {
- _this.start(event, false);
- }
- };
+var _Atc2 = _interopRequireDefault(_Atc);
- _this.handleMouseUp = function () {
- _this.end();
- };
+var _Layout = __webpack_require__(343);
- _this.handleMouseLeave = function () {
- _this.end();
- };
+var _Layout2 = _interopRequireDefault(_Layout);
- _this.handleTouchStart = function (event) {
- event.stopPropagation();
- // If the user is swiping (not just tapping), save the position so we can
- // abort ripples if the user appears to be scrolling.
- if (_this.props.abortOnScroll && event.touches) {
- _this.startListeningForScrollAbort(event);
- _this.startTime = Date.now();
- }
- _this.start(event, true);
- };
+var _Badge = __webpack_require__(842);
- _this.handleTouchEnd = function () {
- _this.end();
- };
+var _Badge2 = _interopRequireDefault(_Badge);
- _this.handleTouchMove = function (event) {
- // Stop trying to abort if we're already 300ms into the animation
- var timeSinceStart = Math.abs(Date.now() - _this.startTime);
- if (timeSinceStart > 300) {
- _this.stopListeningForScrollAbort();
- return;
- }
+var _menu = __webpack_require__(844);
- // If the user is scrolling...
- var deltaY = Math.abs(event.touches[0].clientY - _this.firstTouchY);
- var deltaX = Math.abs(event.touches[0].clientX - _this.firstTouchX);
- // Call it a scroll after an arbitrary 6px (feels reasonable in testing)
- if (deltaY > 6 || deltaX > 6) {
- var currentRipples = _this.state.ripples;
- var ripple = currentRipples[0];
- // This clone will replace the ripple in ReactTransitionGroup with a
- // version that will disappear immediately when removed from the DOM
- var abortedRipple = _react2.default.cloneElement(ripple, { aborted: true });
- // Remove the old ripple and replace it with the new updated one
- currentRipples = shift(currentRipples);
- currentRipples = [].concat((0, _toConsumableArray3.default)(currentRipples), [abortedRipple]);
- _this.setState({ ripples: currentRipples }, function () {
- // Call end after we've set the ripple to abort otherwise the setState
- // in end() merges with this and the ripple abort fails
- _this.end();
- });
- }
- };
+var _profiles = __webpack_require__(212);
- _this.ignoreNextMouseDown = false;
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
- _this.state = {
- // This prop allows us to only render the ReactTransitionGroup
- // on the first click of the component, making the inital render faster.
- hasRipples: false,
- nextKey: 0,
- ripples: []
- };
- return _this;
- }
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- (0, _createClass3.default)(TouchRipple, [{
- key: 'start',
- value: function start(event, isRippleTouchGenerated) {
- var theme = this.context.muiTheme.ripple;
+var SHOP_NAME = exports.SHOP_NAME = 'Supreme';
- if (this.ignoreNextMouseDown && !isRippleTouchGenerated) {
- this.ignoreNextMouseDown = false;
- return;
- }
+var Supreme = function (_Component) {
+ (0, _inherits3.default)(Supreme, _Component);
- var ripples = this.state.ripples;
+ function Supreme() {
+ (0, _classCallCheck3.default)(this, Supreme);
+ return (0, _possibleConstructorReturn3.default)(this, (Supreme.__proto__ || (0, _getPrototypeOf2.default)(Supreme)).apply(this, arguments));
+ }
- // Add a ripple to the ripples array
- ripples = [].concat((0, _toConsumableArray3.default)(ripples), [_react2.default.createElement(_CircleRipple2.default, {
- key: this.state.nextKey,
- style: !this.props.centerRipple ? this.getRippleStyle(event) : {},
- color: this.props.color || theme.color,
- opacity: this.props.opacity,
- touchGenerated: isRippleTouchGenerated
- })]);
+ (0, _createClass3.default)(Supreme, [{
+ key: 'getContainerForMenu',
+ value: function getContainerForMenu(menu) {
+ var _this2 = this;
- this.ignoreNextMouseDown = isRippleTouchGenerated;
- this.setState({
- hasRipples: true,
- nextKey: this.state.nextKey + 1,
- ripples: ripples
- });
- }
- }, {
- key: 'end',
- value: function end() {
- var currentRipples = this.state.ripples;
- this.setState({
- ripples: shift(currentRipples)
- });
- if (this.props.abortOnScroll) {
- this.stopListeningForScrollAbort();
+ switch (menu) {
+ case menus.MENU_BILLING:
+ return _react2.default.createElement(_Billing2.default, { onSubmit: function onSubmit(data) {
+ return _this2.onSubmit(menu, data);
+ }, shop: SHOP_NAME });
+ case menus.MENU_OPTIONS:
+ return _react2.default.createElement(_Options2.default, { onSubmit: function onSubmit(data) {
+ return _this2.onSubmit(menu, data);
+ }, shop: SHOP_NAME });
+ case menus.MENU_SIZES:
+ return _react2.default.createElement(_Sizes2.default, { onSubmit: function onSubmit(data) {
+ return _this2.onSubmit(menu, data);
+ }, shop: SHOP_NAME });
+ case menus.MENU_ATC:
+ return _react2.default.createElement(_Atc2.default, { shop: SHOP_NAME });
+ default:
+ return null;
}
}
-
- // Check if the user seems to be scrolling and abort the animation if so
-
}, {
- key: 'startListeningForScrollAbort',
- value: function startListeningForScrollAbort(event) {
- this.firstTouchY = event.touches[0].clientY;
- this.firstTouchX = event.touches[0].clientX;
- // Note that when scolling Chrome throttles this event to every 200ms
- // Also note we don't listen for scroll events directly as there's no general
- // way to cover cases like scrolling within containers on the page
- document.body.addEventListener('touchmove', this.handleTouchMove);
+ key: 'strToNumberReducer',
+ value: function strToNumberReducer(menu, key, value) {
+ // Don't process values for billing
+ if (typeof value === 'string' && !isNaN(value) && menu !== menus.MENU_BILLING) {
+ return +value;
+ }
+ return value;
}
}, {
- key: 'stopListeningForScrollAbort',
- value: function stopListeningForScrollAbort() {
- document.body.removeEventListener('touchmove', this.handleTouchMove);
+ key: 'transform',
+ value: function transform(menu, obj, reducer) {
+ var keys = (0, _keys2.default)(obj);
+ var newObj = {};
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var value = obj[key];
+ newObj[key] = reducer(menu, key, value);
+ }
+ return newObj;
}
}, {
- key: 'getRippleStyle',
- value: function getRippleStyle(event) {
- var el = _reactDom2.default.findDOMNode(this);
- var elHeight = el.offsetHeight;
- var elWidth = el.offsetWidth;
- var offset = _dom2.default.offset(el);
- var isTouchEvent = event.touches && event.touches.length;
- var pageX = isTouchEvent ? event.touches[0].pageX : event.pageX;
- var pageY = isTouchEvent ? event.touches[0].pageY : event.pageY;
- var pointerX = pageX - offset.left;
- var pointerY = pageY - offset.top;
- var topLeftDiag = this.calcDiag(pointerX, pointerY);
- var topRightDiag = this.calcDiag(elWidth - pointerX, pointerY);
- var botRightDiag = this.calcDiag(elWidth - pointerX, elHeight - pointerY);
- var botLeftDiag = this.calcDiag(pointerX, elHeight - pointerY);
- var rippleRadius = Math.max(topLeftDiag, topRightDiag, botRightDiag, botLeftDiag);
- var rippleSize = rippleRadius * 2;
- var left = pointerX - rippleRadius;
- var top = pointerY - rippleRadius;
-
- return {
- directionInvariant: true,
- height: rippleSize,
- width: rippleSize,
- top: top,
- left: left
- };
+ key: 'onSubmit',
+ value: function onSubmit(menu, data) {
+ var newObj = this.transform(menu, data, this.strToNumberReducer);
+ this.props.updateSettings(this.props.currentProfile, SHOP_NAME, menu, newObj);
}
}, {
- key: 'calcDiag',
- value: function calcDiag(a, b) {
- return Math.sqrt(a * a + b * b);
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ if (this.props.menu == null) {
+ this.props.changeMenu(Supreme.getDefaultMenu());
+ }
}
}, {
- key: 'render',
- value: function render() {
- var _props = this.props,
- children = _props.children,
- style = _props.style;
- var _state = this.state,
- hasRipples = _state.hasRipples,
- ripples = _state.ripples;
- var prepareStyles = this.context.muiTheme.prepareStyles;
-
-
- var rippleGroup = void 0;
-
- if (hasRipples) {
- var mergedStyles = (0, _simpleAssign2.default)({
- height: '100%',
- width: '100%',
- position: 'absolute',
- top: 0,
- left: 0,
- overflow: 'hidden',
- pointerEvents: 'none'
- }, style);
-
- rippleGroup = _react2.default.createElement(
- _reactAddonsTransitionGroup2.default,
- { style: prepareStyles(mergedStyles) },
- ripples
+ key: 'getIconForTabMenu',
+ value: function getIconForTabMenu(menu) {
+ if (menu === menus.MENU_ATC) {
+ return _react2.default.createElement(
+ _IconButton2.default,
+ { iconStyle: { color: 'white' }, style: { padding: 0 }, tooltipPosition: 'top-center', tooltipStyles: { color: 'white' } },
+ _react2.default.createElement(
+ _Badge2.default,
+ {
+ badgeStyle: { top: -24, right: 12 },
+ badgeContent: this.props.atcProducts.length,
+ primary: true
+ },
+ _react2.default.createElement(
+ _FontIcon2.default,
+ { style: { color: 'white', top: -24, right: 12 }, className: 'material-icons' },
+ 'done'
+ )
+ )
);
}
-
+ var isIncomplete = !this.props.settings[SHOP_NAME] || !this.props.settings[SHOP_NAME][menu];
+ var color = isIncomplete ? _colors.red300 : 'white';
+ var tip = isIncomplete ? 'This tab hasn\'t been configured yet' : '';
return _react2.default.createElement(
- 'div',
- {
- onMouseUp: this.handleMouseUp,
- onMouseDown: this.handleMouseDown,
- onMouseLeave: this.handleMouseLeave,
- onTouchStart: this.handleTouchStart,
- onTouchEnd: this.handleTouchEnd
- },
- rippleGroup,
- children
+ _IconButton2.default,
+ { iconStyle: { color: color }, tooltip: tip, tooltipPosition: 'top-center', tooltipStyles: { color: 'white' } },
+ _react2.default.createElement(
+ _FontIcon2.default,
+ { style: { color: color }, className: 'material-icons' },
+ isIncomplete ? 'error' : 'done'
+ )
);
}
- }]);
- return TouchRipple;
-}(_react.Component);
-
-TouchRipple.defaultProps = {
- abortOnScroll: true
-};
-TouchRipple.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? TouchRipple.propTypes = {
- abortOnScroll: _react.PropTypes.bool,
- centerRipple: _react.PropTypes.bool,
- children: _react.PropTypes.node,
- color: _react.PropTypes.string,
- opacity: _react.PropTypes.number,
- style: _react.PropTypes.object
-} : void 0;
-exports.default = TouchRipple;
-
-/***/ }),
-/* 315 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-
-var _from = __webpack_require__(302);
-
-var _from2 = _interopRequireDefault(_from);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-exports.default = function (arr) {
- return Array.isArray(arr) ? arr : (0, _from2.default)(arr);
-};
-
-/***/ }),
-/* 316 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = {
- isDescendant: function isDescendant(parent, child) {
- var node = child.parentNode;
-
- while (node !== null) {
- if (node === parent) return true;
- node = node.parentNode;
- }
-
- return false;
- },
- offset: function offset(el) {
- var rect = el.getBoundingClientRect();
- return {
- top: rect.top + document.body.scrollTop,
- left: rect.left + document.body.scrollLeft
- };
- }
-};
-
-/***/ }),
-/* 317 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = undefined;
-
-var _FontIcon = __webpack_require__(738);
-
-var _FontIcon2 = _interopRequireDefault(_FontIcon);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-exports.default = _FontIcon2.default;
-
-/***/ }),
-/* 318 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-var createHelper = function createHelper(func, helperName) {
- var setDisplayName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
- var noArgs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
-
- if (false) {
- var _ret = function () {
- /* eslint-disable global-require */
- var wrapDisplayName = require('./wrapDisplayName').default;
- /* eslint-enable global-require */
-
- if (noArgs) {
- return {
- v: function v(BaseComponent) {
- var Component = func(BaseComponent);
- Component.displayName = wrapDisplayName(BaseComponent, helperName);
- return Component;
- }
- };
- }
-
- return {
- v: function v() {
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
+ }, {
+ key: 'getTabs',
+ value: function getTabs() {
+ var _this3 = this;
- return function (BaseComponent) {
- var Component = func.apply(undefined, args)(BaseComponent);
- Component.displayName = wrapDisplayName(BaseComponent, helperName);
- return Component;
- };
+ return [_react2.default.createElement(_Tab2.default, {
+ label: 'Billing',
+ key: 1,
+ icon: this.getIconForTabMenu(menus.MENU_BILLING),
+ value: menus.MENU_BILLING,
+ onClick: function onClick() {
+ return _this3.props.changeMenu(menus.MENU_BILLING);
}
- };
- }();
+ }), _react2.default.createElement(_Tab2.default, {
+ label: 'Options',
+ key: 2,
+ icon: this.getIconForTabMenu(menus.MENU_OPTIONS),
+ value: menus.MENU_OPTIONS,
+ onClick: function onClick() {
+ return _this3.props.changeMenu(menus.MENU_OPTIONS);
+ }
+ }), _react2.default.createElement(_Tab2.default, {
+ label: 'Sizes',
+ key: 3,
+ icon: this.getIconForTabMenu(menus.MENU_SIZES),
+ value: menus.MENU_SIZES,
+ onClick: function onClick() {
+ return _this3.props.changeMenu(menus.MENU_SIZES);
+ }
+ }), _react2.default.createElement(_Tab2.default, {
+ label: 'AutoCop',
+ key: 4,
+ icon: this.getIconForTabMenu(menus.MENU_ATC),
+ value: menus.MENU_ATC,
+ onClick: function onClick() {
+ return _this3.props.changeMenu(menus.MENU_ATC);
+ }
+ })];
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var menu = this.props.menu;
- if (typeof _ret === "object") return _ret.v;
- }
+ return _react2.default.createElement(
+ _Layout2.default,
+ { title: menu || 'Loading...', tabs: this.getTabs(), currentTab: menu },
+ this.getContainerForMenu(menu)
+ );
+ }
+ }], [{
+ key: 'getDefaultMenu',
+ value: function getDefaultMenu() {
+ return menus.MENU_BILLING;
+ }
+ }]);
+ return Supreme;
+}(_react.Component);
- return func;
-};
+function mapStateToProps(state) {
+ var currentProfile = state.profiles.currentProfile;
+ var settings = state.profiles.profiles.filter(function (x) {
+ return x.name === currentProfile;
+ })[0].settings;
+ return {
+ menu: state.menu.currentMenu,
+ settings: settings,
+ atcProducts: state.atc.atcProducts,
+ currentProfile: currentProfile
+ };
+}
-exports.default = createHelper;
+function mapDispatchToProps(dispatch) {
+ return {
+ changeMenu: function changeMenu(menu) {
+ return dispatch((0, _menu.changeMenu)(menu));
+ },
+ updateSettings: function updateSettings(currentProfile, shop, key, value) {
+ return dispatch((0, _profiles.updateProfileSettings)(currentProfile, shop, key, value));
+ }
+ };
+}
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Supreme);
/***/ }),
-/* 319 */
+/* 326 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -23920,107 +24219,343 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _transitions = __webpack_require__(10);
+var _reactDom = __webpack_require__(16);
-var _transitions2 = _interopRequireDefault(_transitions);
+var _reactDom2 = _interopRequireDefault(_reactDom);
-var _AutoLockScrolling = __webpack_require__(754);
+var _shallowEqual = __webpack_require__(63);
-var _AutoLockScrolling2 = _interopRequireDefault(_AutoLockScrolling);
+var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
+
+var _Popover = __webpack_require__(133);
+
+var _Popover2 = _interopRequireDefault(_Popover);
+
+var _check = __webpack_require__(754);
+
+var _check2 = _interopRequireDefault(_check);
+
+var _ListItem = __webpack_require__(317);
+
+var _ListItem2 = _interopRequireDefault(_ListItem);
+
+var _Menu = __webpack_require__(205);
+
+var _Menu2 = _interopRequireDefault(_Menu);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function getStyles(props, context) {
- var overlay = context.muiTheme.overlay;
+var nestedMenuStyle = {
+ position: 'relative'
+};
+function getStyles(props, context) {
+ var disabledColor = context.muiTheme.baseTheme.palette.disabledColor;
+ var textColor = context.muiTheme.baseTheme.palette.textColor;
+ var indent = props.desktop ? 64 : 72;
+ var sidePadding = props.desktop ? 24 : 16;
- var style = {
+ var styles = {
root: {
- position: 'fixed',
- height: '100%',
- width: '100%',
- top: 0,
- left: '-100%',
- opacity: 0,
- backgroundColor: overlay.backgroundColor,
- WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)', // Remove mobile color flashing (deprecated)
+ color: props.disabled ? disabledColor : textColor,
+ cursor: props.disabled ? 'not-allowed' : 'pointer',
+ minHeight: props.desktop ? '32px' : '48px',
+ lineHeight: props.desktop ? '32px' : '48px',
+ fontSize: props.desktop ? 15 : 16,
+ whiteSpace: 'nowrap'
+ },
- // Two ways to promote overlay to its own render layer
- willChange: 'opacity',
- transform: 'translateZ(0)',
+ innerDivStyle: {
+ paddingLeft: props.leftIcon || props.insetChildren || props.checked ? indent : sidePadding,
+ paddingRight: props.rightIcon ? indent : sidePadding,
+ paddingBottom: 0,
+ paddingTop: 0
+ },
- transition: props.transitionEnabled && _transitions2.default.easeOut('0ms', 'left', '400ms') + ', ' + _transitions2.default.easeOut('400ms', 'opacity')
+ secondaryText: {
+ float: 'right'
+ },
+
+ leftIconDesktop: {
+ margin: 0,
+ left: 24,
+ top: 4
+ },
+
+ rightIconDesktop: {
+ margin: 0,
+ right: 24,
+ top: 4,
+ fill: context.muiTheme.menuItem.rightIconDesktopFill
}
};
- if (props.show) {
- (0, _simpleAssign2.default)(style.root, {
- left: 0,
- opacity: 1,
- transition: _transitions2.default.easeOut('0ms', 'left') + ', ' + _transitions2.default.easeOut('400ms', 'opacity')
- });
- }
-
- return style;
+ return styles;
}
-var Overlay = function (_Component) {
- (0, _inherits3.default)(Overlay, _Component);
+var MenuItem = function (_Component) {
+ (0, _inherits3.default)(MenuItem, _Component);
- function Overlay() {
- (0, _classCallCheck3.default)(this, Overlay);
- return (0, _possibleConstructorReturn3.default)(this, (Overlay.__proto__ || (0, _getPrototypeOf2.default)(Overlay)).apply(this, arguments));
+ function MenuItem() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, MenuItem);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = MenuItem.__proto__ || (0, _getPrototypeOf2.default)(MenuItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ open: false
+ }, _this.cloneMenuItem = function (item) {
+ return _react2.default.cloneElement(item, {
+ onTouchTap: function onTouchTap(event) {
+ if (!item.props.menuItems) {
+ _this.handleRequestClose();
+ }
+
+ if (item.props.onTouchTap) {
+ item.props.onTouchTap(event);
+ }
+ }
+ });
+ }, _this.handleTouchTap = function (event) {
+ event.preventDefault();
+
+ _this.setState({
+ open: true,
+ anchorEl: _reactDom2.default.findDOMNode(_this)
+ });
+
+ if (_this.props.onTouchTap) {
+ _this.props.onTouchTap(event);
+ }
+ }, _this.handleRequestClose = function () {
+ _this.setState({
+ open: false,
+ anchorEl: null
+ });
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(Overlay, [{
- key: 'setOpacity',
- value: function setOpacity(opacity) {
- this.refs.overlay.style.opacity = opacity;
+ (0, _createClass3.default)(MenuItem, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ this.applyFocusState();
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ if (this.state.open && nextProps.focusState === 'none') {
+ this.handleRequestClose();
+ }
+ }
+ }, {
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps, nextState, nextContext) {
+ return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext);
+ }
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate() {
+ this.applyFocusState();
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ if (this.state.open) {
+ this.setState({
+ open: false
+ });
+ }
+ }
+ }, {
+ key: 'applyFocusState',
+ value: function applyFocusState() {
+ this.refs.listItem.applyFocusState(this.props.focusState);
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
- autoLockScrolling = _props.autoLockScrolling,
- show = _props.show,
+ checked = _props.checked,
+ children = _props.children,
+ desktop = _props.desktop,
+ disabled = _props.disabled,
+ focusState = _props.focusState,
+ innerDivStyle = _props.innerDivStyle,
+ insetChildren = _props.insetChildren,
+ leftIcon = _props.leftIcon,
+ menuItems = _props.menuItems,
+ rightIcon = _props.rightIcon,
+ secondaryText = _props.secondaryText,
style = _props.style,
- transitionEnabled = _props.transitionEnabled,
- other = (0, _objectWithoutProperties3.default)(_props, ['autoLockScrolling', 'show', 'style', 'transitionEnabled']);
+ animation = _props.animation,
+ value = _props.value,
+ other = (0, _objectWithoutProperties3.default)(_props, ['checked', 'children', 'desktop', 'disabled', 'focusState', 'innerDivStyle', 'insetChildren', 'leftIcon', 'menuItems', 'rightIcon', 'secondaryText', 'style', 'animation', 'value']);
var prepareStyles = this.context.muiTheme.prepareStyles;
var styles = getStyles(this.props, this.context);
+ var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style);
+ var mergedInnerDivStyles = (0, _simpleAssign2.default)(styles.innerDivStyle, innerDivStyle);
+
+ // Left Icon
+ var leftIconElement = leftIcon ? leftIcon : checked ? _react2.default.createElement(_check2.default, null) : null;
+ if (leftIconElement) {
+ var mergedLeftIconStyles = desktop ? (0, _simpleAssign2.default)(styles.leftIconDesktop, leftIconElement.props.style) : leftIconElement.props.style;
+ leftIconElement = _react2.default.cloneElement(leftIconElement, { style: mergedLeftIconStyles });
+ }
+
+ // Right Icon
+ var rightIconElement = void 0;
+ if (rightIcon) {
+ var mergedRightIconStyles = desktop ? (0, _simpleAssign2.default)(styles.rightIconDesktop, rightIcon.props.style) : rightIcon.props.style;
+ rightIconElement = _react2.default.cloneElement(rightIcon, { style: mergedRightIconStyles });
+ }
+
+ // Secondary Text
+ var secondaryTextElement = void 0;
+ if (secondaryText) {
+ var secondaryTextIsAnElement = _react2.default.isValidElement(secondaryText);
+ var mergedSecondaryTextStyles = secondaryTextIsAnElement ? (0, _simpleAssign2.default)(styles.secondaryText, secondaryText.props.style) : null;
+
+ secondaryTextElement = secondaryTextIsAnElement ? _react2.default.cloneElement(secondaryText, { style: mergedSecondaryTextStyles }) : _react2.default.createElement(
+ 'div',
+ { style: prepareStyles(styles.secondaryText) },
+ secondaryText
+ );
+ }
+ var childMenuPopover = void 0;
+ if (menuItems) {
+ childMenuPopover = _react2.default.createElement(
+ _Popover2.default,
+ {
+ animation: animation,
+ anchorOrigin: { horizontal: 'right', vertical: 'top' },
+ anchorEl: this.state.anchorEl,
+ open: this.state.open,
+ useLayerForClickAway: false,
+ onRequestClose: this.handleRequestClose
+ },
+ _react2.default.createElement(
+ _Menu2.default,
+ { desktop: desktop, disabled: disabled, style: nestedMenuStyle },
+ _react2.default.Children.map(menuItems, this.cloneMenuItem)
+ )
+ );
+ other.onTouchTap = this.handleTouchTap;
+ }
return _react2.default.createElement(
- 'div',
- (0, _extends3.default)({}, other, { ref: 'overlay', style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }),
- autoLockScrolling && _react2.default.createElement(_AutoLockScrolling2.default, { lock: show })
+ _ListItem2.default,
+ (0, _extends3.default)({}, other, {
+ disabled: disabled,
+ hoverColor: this.context.muiTheme.menuItem.hoverColor,
+ innerDivStyle: mergedInnerDivStyles,
+ insetChildren: insetChildren,
+ leftIcon: leftIconElement,
+ ref: 'listItem',
+ rightIcon: rightIconElement,
+ style: mergedRootStyles
+ }),
+ children,
+ secondaryTextElement,
+ childMenuPopover
);
}
}]);
- return Overlay;
+ return MenuItem;
}(_react.Component);
-Overlay.defaultProps = {
- autoLockScrolling: true,
- style: {},
- transitionEnabled: true
+MenuItem.muiName = 'MenuItem';
+MenuItem.defaultProps = {
+ checked: false,
+ desktop: false,
+ disabled: false,
+ focusState: 'none',
+ insetChildren: false
};
-Overlay.contextTypes = {
+MenuItem.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? Overlay.propTypes = {
- autoLockScrolling: _react.PropTypes.bool,
- show: _react.PropTypes.bool.isRequired,
+ false ? MenuItem.propTypes = {
+ /**
+ * Override the default animation component used.
+ */
+ animation: _react.PropTypes.func,
+ /**
+ * If true, a left check mark will be rendered.
+ */
+ checked: _react.PropTypes.bool,
+ /**
+ * Elements passed as children to the underlying `ListItem`.
+ */
+ children: _react.PropTypes.node,
+ /**
+ * @ignore
+ * If true, the menu item will render with compact desktop
+ * styles.
+ */
+ desktop: _react.PropTypes.bool,
+ /**
+ * If true, the menu item will be disabled.
+ */
+ disabled: _react.PropTypes.bool,
+ /**
+ * The focus state of the menu item. This prop is used to set the focus
+ * state of the underlying `ListItem`.
+ */
+ focusState: _react.PropTypes.oneOf(['none', 'focused', 'keyboard-focused']),
+ /**
+ * Override the inline-styles of the inner div.
+ */
+ innerDivStyle: _react.PropTypes.object,
+ /**
+ * If true, the children will be indented.
+ * This is only needed when there is no `leftIcon`.
+ */
+ insetChildren: _react.PropTypes.bool,
+ /**
+ * The `SvgIcon` or `FontIcon` to be displayed on the left side.
+ */
+ leftIcon: _react.PropTypes.element,
+ /**
+ * `MenuItem` elements to nest within the menu item.
+ */
+ menuItems: _react.PropTypes.node,
+ /**
+ * Callback function fired when the menu item is touch-tapped.
+ *
+ * @param {object} event TouchTap event targeting the menu item.
+ */
+ onTouchTap: _react.PropTypes.func,
+ /**
+ * Can be used to render primary text within the menu item.
+ */
+ primaryText: _react.PropTypes.node,
+ /**
+ * The `SvgIcon` or `FontIcon` to be displayed on the right side.
+ */
+ rightIcon: _react.PropTypes.element,
+ /**
+ * Can be used to render secondary text within the menu item.
+ */
+ secondaryText: _react.PropTypes.node,
/**
* Override the inline-styles of the root element.
*/
style: _react.PropTypes.object,
- transitionEnabled: _react.PropTypes.bool
+ /**
+ * The value of the menu item.
+ */
+ value: _react.PropTypes.any
} : void 0;
-exports.default = Overlay;
+exports.default = MenuItem;
/***/ }),
-/* 320 */
+/* 327 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -24052,106 +24587,160 @@ var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
-var _reactDom = __webpack_require__(19);
-
-var _reactDom2 = _interopRequireDefault(_reactDom);
+var _reactDom = __webpack_require__(16);
-var _events = __webpack_require__(196);
+var _dom = __webpack_require__(320);
-var _events2 = _interopRequireDefault(_events);
+var _dom2 = _interopRequireDefault(_dom);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var isDescendant = function isDescendant(el, target) {
- if (target !== null) {
- return el === target || isDescendant(el, target.parentNode);
- }
- return false;
-};
-
-var clickAwayEvents = ['mouseup', 'touchend'];
-var bind = function bind(callback) {
- return clickAwayEvents.forEach(function (event) {
- return _events2.default.on(document, event, callback);
- });
-};
-var unbind = function unbind(callback) {
- return clickAwayEvents.forEach(function (event) {
- return _events2.default.off(document, event, callback);
- });
-};
-
-var ClickAwayListener = function (_Component) {
- (0, _inherits3.default)(ClickAwayListener, _Component);
+// heavily inspired by https://github.com/Khan/react-components/blob/master/js/layered-component-mixin.jsx
+var RenderToLayer = function (_Component) {
+ (0, _inherits3.default)(RenderToLayer, _Component);
- function ClickAwayListener() {
+ function RenderToLayer() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, ClickAwayListener);
+ (0, _classCallCheck3.default)(this, RenderToLayer);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClickAwayListener.__proto__ || (0, _getPrototypeOf2.default)(ClickAwayListener)).call.apply(_ref, [this].concat(args))), _this), _this.handleClickAway = function (event) {
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RenderToLayer.__proto__ || (0, _getPrototypeOf2.default)(RenderToLayer)).call.apply(_ref, [this].concat(args))), _this), _this.onClickAway = function (event) {
if (event.defaultPrevented) {
return;
}
- // IE11 support, which trigger the handleClickAway even after the unbind
- if (_this.isCurrentlyMounted) {
- var el = _reactDom2.default.findDOMNode(_this);
+ if (!_this.props.componentClickAway) {
+ return;
+ }
- if (document.documentElement.contains(event.target) && !isDescendant(el, event.target)) {
- _this.props.onClickAway(event);
- }
+ if (!_this.props.open) {
+ return;
+ }
+
+ var el = _this.layer;
+ if (event.target !== el && event.target === window || document.documentElement.contains(event.target) && !_dom2.default.isDescendant(el, event.target)) {
+ _this.props.componentClickAway(event);
}
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(ClickAwayListener, [{
+ (0, _createClass3.default)(RenderToLayer, [{
key: 'componentDidMount',
value: function componentDidMount() {
- this.isCurrentlyMounted = true;
- if (this.props.onClickAway) {
- bind(this.handleClickAway);
- }
+ this.renderLayer();
}
}, {
key: 'componentDidUpdate',
- value: function componentDidUpdate(prevProps) {
- if (prevProps.onClickAway !== this.props.onClickAway) {
- unbind(this.handleClickAway);
- if (this.props.onClickAway) {
- bind(this.handleClickAway);
- }
- }
+ value: function componentDidUpdate() {
+ this.renderLayer();
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
- this.isCurrentlyMounted = false;
- unbind(this.handleClickAway);
+ this.unrenderLayer();
+ }
+ }, {
+ key: 'getLayer',
+ value: function getLayer() {
+ return this.layer;
+ }
+ }, {
+ key: 'unrenderLayer',
+ value: function unrenderLayer() {
+ if (!this.layer) {
+ return;
+ }
+
+ if (this.props.useLayerForClickAway) {
+ this.layer.style.position = 'relative';
+ this.layer.removeEventListener('touchstart', this.onClickAway);
+ this.layer.removeEventListener('click', this.onClickAway);
+ } else {
+ window.removeEventListener('touchstart', this.onClickAway);
+ window.removeEventListener('click', this.onClickAway);
+ }
+
+ (0, _reactDom.unmountComponentAtNode)(this.layer);
+ document.body.removeChild(this.layer);
+ this.layer = null;
+ }
+
+ /**
+ * By calling this method in componentDidMount() and
+ * componentDidUpdate(), you're effectively creating a "wormhole" that
+ * funnels React's hierarchical updates through to a DOM node on an
+ * entirely different part of the page.
+ */
+
+ }, {
+ key: 'renderLayer',
+ value: function renderLayer() {
+ var _this2 = this;
+
+ var _props = this.props,
+ open = _props.open,
+ render = _props.render;
+
+
+ if (open) {
+ if (!this.layer) {
+ this.layer = document.createElement('div');
+ document.body.appendChild(this.layer);
+
+ if (this.props.useLayerForClickAway) {
+ this.layer.addEventListener('touchstart', this.onClickAway);
+ this.layer.addEventListener('click', this.onClickAway);
+ this.layer.style.position = 'fixed';
+ this.layer.style.top = 0;
+ this.layer.style.bottom = 0;
+ this.layer.style.left = 0;
+ this.layer.style.right = 0;
+ this.layer.style.zIndex = this.context.muiTheme.zIndex.layer;
+ } else {
+ setTimeout(function () {
+ window.addEventListener('touchstart', _this2.onClickAway);
+ window.addEventListener('click', _this2.onClickAway);
+ }, 0);
+ }
+ }
+
+ var layerElement = render();
+ this.layerElement = (0, _reactDom.unstable_renderSubtreeIntoContainer)(this, layerElement, this.layer);
+ } else {
+ this.unrenderLayer();
+ }
}
}, {
key: 'render',
value: function render() {
- return this.props.children;
+ return null;
}
}]);
- return ClickAwayListener;
+ return RenderToLayer;
}(_react.Component);
- false ? ClickAwayListener.propTypes = {
- children: _react.PropTypes.element,
- onClickAway: _react.PropTypes.func
+RenderToLayer.defaultProps = {
+ useLayerForClickAway: true
+};
+RenderToLayer.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? RenderToLayer.propTypes = {
+ componentClickAway: _react.PropTypes.func,
+ open: _react.PropTypes.bool.isRequired,
+ render: _react.PropTypes.func.isRequired,
+ useLayerForClickAway: _react.PropTypes.bool
} : void 0;
-exports.default = ClickAwayListener;
+exports.default = RenderToLayer;
/***/ }),
-/* 321 */
+/* 328 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -24165,6 +24754,10 @@ var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
+var _typeof2 = __webpack_require__(61);
+
+var _typeof3 = _interopRequireDefault(_typeof2);
+
var _objectWithoutProperties2 = __webpack_require__(8);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
@@ -24197,343 +24790,640 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactDom = __webpack_require__(19);
+var _reactDom = __webpack_require__(16);
var _reactDom2 = _interopRequireDefault(_reactDom);
-var _shallowEqual = __webpack_require__(58);
+var _keycode = __webpack_require__(26);
-var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
+var _keycode2 = _interopRequireDefault(_keycode);
-var _Popover = __webpack_require__(130);
+var _TextField = __webpack_require__(99);
-var _Popover2 = _interopRequireDefault(_Popover);
+var _TextField2 = _interopRequireDefault(_TextField);
-var _check = __webpack_require__(774);
+var _Menu = __webpack_require__(761);
-var _check2 = _interopRequireDefault(_check);
+var _Menu2 = _interopRequireDefault(_Menu);
-var _ListItem = __webpack_require__(313);
+var _MenuItem = __webpack_require__(97);
-var _ListItem2 = _interopRequireDefault(_ListItem);
+var _MenuItem2 = _interopRequireDefault(_MenuItem);
-var _Menu = __webpack_require__(199);
+var _Divider = __webpack_require__(762);
-var _Menu2 = _interopRequireDefault(_Menu);
+var _Divider2 = _interopRequireDefault(_Divider);
+
+var _Popover = __webpack_require__(133);
+
+var _Popover2 = _interopRequireDefault(_Popover);
+
+var _propTypes = __webpack_require__(39);
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var nestedMenuStyle = {
- position: 'relative'
-};
+function getStyles(props, context, state) {
+ var anchorEl = state.anchorEl;
+ var fullWidth = props.fullWidth;
-function getStyles(props, context) {
- var disabledColor = context.muiTheme.baseTheme.palette.disabledColor;
- var textColor = context.muiTheme.baseTheme.palette.textColor;
- var indent = props.desktop ? 64 : 72;
- var sidePadding = props.desktop ? 24 : 16;
var styles = {
root: {
- color: props.disabled ? disabledColor : textColor,
- cursor: props.disabled ? 'not-allowed' : 'pointer',
- minHeight: props.desktop ? '32px' : '48px',
- lineHeight: props.desktop ? '32px' : '48px',
- fontSize: props.desktop ? 15 : 16,
- whiteSpace: 'nowrap'
- },
-
- innerDivStyle: {
- paddingLeft: props.leftIcon || props.insetChildren || props.checked ? indent : sidePadding,
- paddingRight: props.rightIcon ? indent : sidePadding,
- paddingBottom: 0,
- paddingTop: 0
+ display: 'inline-block',
+ position: 'relative',
+ width: fullWidth ? '100%' : 256
},
-
- secondaryText: {
- float: 'right'
+ menu: {
+ width: '100%'
},
-
- leftIconDesktop: {
- margin: 0,
- left: 24,
- top: 4
+ list: {
+ display: 'block',
+ width: fullWidth ? '100%' : 256
},
-
- rightIconDesktop: {
- margin: 0,
- right: 24,
- top: 4,
- fill: context.muiTheme.menuItem.rightIconDesktopFill
+ innerDiv: {
+ overflow: 'hidden'
}
};
+ if (anchorEl && fullWidth) {
+ styles.popover = {
+ width: anchorEl.clientWidth
+ };
+ }
+
return styles;
}
-var MenuItem = function (_Component) {
- (0, _inherits3.default)(MenuItem, _Component);
+var AutoComplete = function (_Component) {
+ (0, _inherits3.default)(AutoComplete, _Component);
- function MenuItem() {
+ function AutoComplete() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, MenuItem);
+ (0, _classCallCheck3.default)(this, AutoComplete);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = MenuItem.__proto__ || (0, _getPrototypeOf2.default)(MenuItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- open: false
- }, _this.cloneMenuItem = function (item) {
- return _react2.default.cloneElement(item, {
- onTouchTap: function onTouchTap(event) {
- if (!item.props.menuItems) {
- _this.handleRequestClose();
- }
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoComplete.__proto__ || (0, _getPrototypeOf2.default)(AutoComplete)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ anchorEl: null,
+ focusTextField: true,
+ open: false,
+ searchText: undefined
+ }, _this.handleRequestClose = function () {
+ // Only take into account the Popover clickAway when we are
+ // not focusing the TextField.
+ if (!_this.state.focusTextField) {
+ _this.close();
+ }
+ }, _this.handleMouseDown = function (event) {
+ // Keep the TextField focused
+ event.preventDefault();
+ }, _this.handleItemTouchTap = function (event, child) {
+ var dataSource = _this.props.dataSource;
- if (item.props.onTouchTap) {
- item.props.onTouchTap(event);
- }
- }
+ var index = parseInt(child.key, 10);
+ var chosenRequest = dataSource[index];
+ var searchText = _this.chosenRequestText(chosenRequest);
+
+ _this.setState({
+ searchText: searchText
+ }, function () {
+ _this.props.onUpdateInput(searchText, _this.props.dataSource, {
+ source: 'touchTap'
+ });
+
+ _this.timerTouchTapCloseId = setTimeout(function () {
+ _this.timerTouchTapCloseId = null;
+ _this.close();
+ _this.props.onNewRequest(chosenRequest, index);
+ }, _this.props.menuCloseDelay);
});
- }, _this.handleTouchTap = function (event) {
- event.preventDefault();
+ }, _this.chosenRequestText = function (chosenRequest) {
+ if (typeof chosenRequest === 'string') {
+ return chosenRequest;
+ } else {
+ return chosenRequest[_this.props.dataSourceConfig.text];
+ }
+ }, _this.handleEscKeyDown = function () {
+ _this.close();
+ }, _this.handleKeyDown = function (event) {
+ if (_this.props.onKeyDown) _this.props.onKeyDown(event);
+
+ switch ((0, _keycode2.default)(event)) {
+ case 'enter':
+ _this.close();
+ var searchText = _this.state.searchText;
+ if (searchText !== '') {
+ _this.props.onNewRequest(searchText, -1);
+ }
+ break;
+
+ case 'esc':
+ _this.close();
+ break;
+
+ case 'down':
+ event.preventDefault();
+ _this.setState({
+ open: true,
+ focusTextField: false,
+ anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField)
+ });
+ break;
+
+ default:
+ break;
+ }
+ }, _this.handleChange = function (event) {
+ var searchText = event.target.value;
+
+ // Make sure that we have a new searchText.
+ // Fix an issue with a Cordova Webview
+ if (searchText === _this.state.searchText) {
+ return;
+ }
_this.setState({
+ searchText: searchText,
open: true,
- anchorEl: _reactDom2.default.findDOMNode(_this)
+ anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField)
+ }, function () {
+ _this.props.onUpdateInput(searchText, _this.props.dataSource, {
+ source: 'change'
+ });
});
+ }, _this.handleBlur = function (event) {
+ if (_this.state.focusTextField && _this.timerTouchTapCloseId === null) {
+ _this.timerBlurClose = setTimeout(function () {
+ _this.close();
+ }, 0);
+ }
- if (_this.props.onTouchTap) {
- _this.props.onTouchTap(event);
+ if (_this.props.onBlur) {
+ _this.props.onBlur(event);
}
- }, _this.handleRequestClose = function () {
+ }, _this.handleFocus = function (event) {
+ if (!_this.state.open && _this.props.openOnFocus) {
+ _this.setState({
+ open: true,
+ anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField)
+ });
+ }
+
_this.setState({
- open: false,
- anchorEl: null
+ focusTextField: true
});
+
+ if (_this.props.onFocus) {
+ _this.props.onFocus(event);
+ }
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(MenuItem, [{
- key: 'componentDidMount',
- value: function componentDidMount() {
- this.applyFocusState();
+ (0, _createClass3.default)(AutoComplete, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ this.requestsList = [];
+ this.setState({
+ open: this.props.open,
+ searchText: this.props.searchText
+ });
+ this.timerTouchTapCloseId = null;
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
- if (this.state.open && nextProps.focusState === 'none') {
- this.handleRequestClose();
+ if (this.props.searchText !== nextProps.searchText) {
+ this.setState({
+ searchText: nextProps.searchText
+ });
}
}
}, {
- key: 'shouldComponentUpdate',
- value: function shouldComponentUpdate(nextProps, nextState, nextContext) {
- return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext);
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ clearTimeout(this.timerTouchTapCloseId);
+ clearTimeout(this.timerBlurClose);
}
}, {
- key: 'componentDidUpdate',
- value: function componentDidUpdate() {
- this.applyFocusState();
+ key: 'close',
+ value: function close() {
+ this.setState({
+ open: false,
+ anchorEl: null
+ });
+
+ if (this.props.onClose) {
+ this.props.onClose();
+ }
}
}, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- if (this.state.open) {
- this.setState({
- open: false
- });
- }
+ key: 'blur',
+ value: function blur() {
+ this.refs.searchTextField.blur();
}
}, {
- key: 'applyFocusState',
- value: function applyFocusState() {
- this.refs.listItem.applyFocusState(this.props.focusState);
+ key: 'focus',
+ value: function focus() {
+ this.refs.searchTextField.focus();
}
}, {
key: 'render',
value: function render() {
+ var _this2 = this;
+
var _props = this.props,
- checked = _props.checked,
- children = _props.children,
- desktop = _props.desktop,
- disabled = _props.disabled,
- focusState = _props.focusState,
- innerDivStyle = _props.innerDivStyle,
- insetChildren = _props.insetChildren,
- leftIcon = _props.leftIcon,
- menuItems = _props.menuItems,
- rightIcon = _props.rightIcon,
- secondaryText = _props.secondaryText,
- style = _props.style,
+ anchorOrigin = _props.anchorOrigin,
+ animated = _props.animated,
animation = _props.animation,
- value = _props.value,
- other = (0, _objectWithoutProperties3.default)(_props, ['checked', 'children', 'desktop', 'disabled', 'focusState', 'innerDivStyle', 'insetChildren', 'leftIcon', 'menuItems', 'rightIcon', 'secondaryText', 'style', 'animation', 'value']);
+ dataSource = _props.dataSource,
+ dataSourceConfig = _props.dataSourceConfig,
+ disableFocusRipple = _props.disableFocusRipple,
+ errorStyle = _props.errorStyle,
+ floatingLabelText = _props.floatingLabelText,
+ filter = _props.filter,
+ fullWidth = _props.fullWidth,
+ style = _props.style,
+ hintText = _props.hintText,
+ maxSearchResults = _props.maxSearchResults,
+ menuCloseDelay = _props.menuCloseDelay,
+ textFieldStyle = _props.textFieldStyle,
+ menuStyle = _props.menuStyle,
+ menuProps = _props.menuProps,
+ listStyle = _props.listStyle,
+ targetOrigin = _props.targetOrigin,
+ onClose = _props.onClose,
+ onNewRequest = _props.onNewRequest,
+ onUpdateInput = _props.onUpdateInput,
+ openOnFocus = _props.openOnFocus,
+ popoverProps = _props.popoverProps,
+ searchTextProp = _props.searchText,
+ other = (0, _objectWithoutProperties3.default)(_props, ['anchorOrigin', 'animated', 'animation', 'dataSource', 'dataSourceConfig', 'disableFocusRipple', 'errorStyle', 'floatingLabelText', 'filter', 'fullWidth', 'style', 'hintText', 'maxSearchResults', 'menuCloseDelay', 'textFieldStyle', 'menuStyle', 'menuProps', 'listStyle', 'targetOrigin', 'onClose', 'onNewRequest', 'onUpdateInput', 'openOnFocus', 'popoverProps', 'searchText']);
+
+ var _ref2 = popoverProps || {},
+ popoverStyle = _ref2.style,
+ popoverOther = (0, _objectWithoutProperties3.default)(_ref2, ['style']);
+
+ var _state = this.state,
+ open = _state.open,
+ anchorEl = _state.anchorEl,
+ searchText = _state.searchText,
+ focusTextField = _state.focusTextField;
var prepareStyles = this.context.muiTheme.prepareStyles;
- var styles = getStyles(this.props, this.context);
- var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style);
- var mergedInnerDivStyles = (0, _simpleAssign2.default)(styles.innerDivStyle, innerDivStyle);
+ var styles = getStyles(this.props, this.context, this.state);
- // Left Icon
- var leftIconElement = leftIcon ? leftIcon : checked ? _react2.default.createElement(_check2.default, null) : null;
- if (leftIconElement) {
- var mergedLeftIconStyles = desktop ? (0, _simpleAssign2.default)(styles.leftIconDesktop, leftIconElement.props.style) : leftIconElement.props.style;
- leftIconElement = _react2.default.cloneElement(leftIconElement, { style: mergedLeftIconStyles });
- }
+ var requestsList = [];
- // Right Icon
- var rightIconElement = void 0;
- if (rightIcon) {
- var mergedRightIconStyles = desktop ? (0, _simpleAssign2.default)(styles.rightIconDesktop, rightIcon.props.style) : rightIcon.props.style;
- rightIconElement = _react2.default.cloneElement(rightIcon, { style: mergedRightIconStyles });
- }
+ dataSource.every(function (item, index) {
+ switch (typeof item === 'undefined' ? 'undefined' : (0, _typeof3.default)(item)) {
+ case 'string':
+ if (filter(searchText, item, item)) {
+ requestsList.push({
+ text: item,
+ value: _react2.default.createElement(_MenuItem2.default, {
+ innerDivStyle: styles.innerDiv,
+ value: item,
+ primaryText: item,
+ disableFocusRipple: disableFocusRipple,
+ key: index
+ })
+ });
+ }
+ break;
- // Secondary Text
- var secondaryTextElement = void 0;
- if (secondaryText) {
- var secondaryTextIsAnElement = _react2.default.isValidElement(secondaryText);
- var mergedSecondaryTextStyles = secondaryTextIsAnElement ? (0, _simpleAssign2.default)(styles.secondaryText, secondaryText.props.style) : null;
+ case 'object':
+ if (item && typeof item[_this2.props.dataSourceConfig.text] === 'string') {
+ var itemText = item[_this2.props.dataSourceConfig.text];
+ if (!_this2.props.filter(searchText, itemText, item)) break;
- secondaryTextElement = secondaryTextIsAnElement ? _react2.default.cloneElement(secondaryText, { style: mergedSecondaryTextStyles }) : _react2.default.createElement(
- 'div',
- { style: prepareStyles(styles.secondaryText) },
- secondaryText
- );
- }
- var childMenuPopover = void 0;
- if (menuItems) {
- childMenuPopover = _react2.default.createElement(
- _Popover2.default,
- {
- animation: animation,
- anchorOrigin: { horizontal: 'right', vertical: 'top' },
- anchorEl: this.state.anchorEl,
- open: this.state.open,
- useLayerForClickAway: false,
- onRequestClose: this.handleRequestClose
- },
- _react2.default.createElement(
- _Menu2.default,
- { desktop: desktop, disabled: disabled, style: nestedMenuStyle },
- _react2.default.Children.map(menuItems, this.cloneMenuItem)
- )
- );
- other.onTouchTap = this.handleTouchTap;
- }
+ var itemValue = item[_this2.props.dataSourceConfig.value];
+ if (itemValue.type && (itemValue.type.muiName === _MenuItem2.default.muiName || itemValue.type.muiName === _Divider2.default.muiName)) {
+ requestsList.push({
+ text: itemText,
+ value: _react2.default.cloneElement(itemValue, {
+ key: index,
+ disableFocusRipple: disableFocusRipple
+ })
+ });
+ } else {
+ requestsList.push({
+ text: itemText,
+ value: _react2.default.createElement(_MenuItem2.default, {
+ innerDivStyle: styles.innerDiv,
+ primaryText: itemText,
+ disableFocusRipple: disableFocusRipple,
+ key: index
+ })
+ });
+ }
+ }
+ break;
- return _react2.default.createElement(
- _ListItem2.default,
- (0, _extends3.default)({}, other, {
- disabled: disabled,
- hoverColor: this.context.muiTheme.menuItem.hoverColor,
- innerDivStyle: mergedInnerDivStyles,
- insetChildren: insetChildren,
- leftIcon: leftIconElement,
- ref: 'listItem',
- rightIcon: rightIconElement,
- style: mergedRootStyles
+ default:
+ // Do nothing
+ }
+
+ return !(maxSearchResults && maxSearchResults > 0 && requestsList.length === maxSearchResults);
+ });
+
+ this.requestsList = requestsList;
+
+ var menu = open && requestsList.length > 0 && _react2.default.createElement(
+ _Menu2.default,
+ (0, _extends3.default)({}, menuProps, {
+ ref: 'menu',
+ autoWidth: false,
+ disableAutoFocus: focusTextField,
+ onEscKeyDown: this.handleEscKeyDown,
+ initiallyKeyboardFocused: true,
+ onItemTouchTap: this.handleItemTouchTap,
+ onMouseDown: this.handleMouseDown,
+ style: (0, _simpleAssign2.default)(styles.menu, menuStyle),
+ listStyle: (0, _simpleAssign2.default)(styles.list, listStyle)
}),
- children,
- secondaryTextElement,
- childMenuPopover
+ requestsList.map(function (i) {
+ return i.value;
+ })
);
- }
- }]);
- return MenuItem;
-}(_react.Component);
-MenuItem.muiName = 'MenuItem';
-MenuItem.defaultProps = {
- checked: false,
- desktop: false,
- disabled: false,
- focusState: 'none',
- insetChildren: false
+ return _react2.default.createElement(
+ 'div',
+ { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) },
+ _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, {
+ ref: 'searchTextField',
+ autoComplete: 'off',
+ value: searchText,
+ onChange: this.handleChange,
+ onBlur: this.handleBlur,
+ onFocus: this.handleFocus,
+ onKeyDown: this.handleKeyDown,
+ floatingLabelText: floatingLabelText,
+ hintText: hintText,
+ fullWidth: fullWidth,
+ multiLine: false,
+ errorStyle: errorStyle,
+ style: textFieldStyle
+ })),
+ _react2.default.createElement(
+ _Popover2.default,
+ (0, _extends3.default)({
+ style: (0, _simpleAssign2.default)({}, styles.popover, popoverStyle),
+ canAutoPosition: false,
+ anchorOrigin: anchorOrigin,
+ targetOrigin: targetOrigin,
+ open: open,
+ anchorEl: anchorEl,
+ useLayerForClickAway: false,
+ onRequestClose: this.handleRequestClose,
+ animated: animated,
+ animation: animation
+ }, popoverOther),
+ menu
+ )
+ );
+ }
+ }]);
+ return AutoComplete;
+}(_react.Component);
+
+AutoComplete.defaultProps = {
+ anchorOrigin: {
+ vertical: 'bottom',
+ horizontal: 'left'
+ },
+ animated: true,
+ dataSourceConfig: {
+ text: 'text',
+ value: 'value'
+ },
+ disableFocusRipple: true,
+ filter: function filter(searchText, key) {
+ return searchText !== '' && key.indexOf(searchText) !== -1;
+ },
+ fullWidth: false,
+ open: false,
+ openOnFocus: false,
+ onUpdateInput: function onUpdateInput() {},
+ onNewRequest: function onNewRequest() {},
+ searchText: '',
+ menuCloseDelay: 300,
+ targetOrigin: {
+ vertical: 'top',
+ horizontal: 'left'
+ }
};
-MenuItem.contextTypes = {
+AutoComplete.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? MenuItem.propTypes = {
+ false ? AutoComplete.propTypes = {
+ /**
+ * Location of the anchor for the auto complete.
+ */
+ anchorOrigin: _propTypes2.default.origin,
+ /**
+ * If true, the auto complete is animated as it is toggled.
+ */
+ animated: _react.PropTypes.bool,
/**
* Override the default animation component used.
*/
animation: _react.PropTypes.func,
/**
- * If true, a left check mark will be rendered.
+ * Array of strings or nodes used to populate the list.
*/
- checked: _react.PropTypes.bool,
+ dataSource: _react.PropTypes.array.isRequired,
/**
- * Elements passed as children to the underlying `ListItem`.
+ * Config for objects list dataSource.
+ *
+ * @typedef {Object} dataSourceConfig
+ *
+ * @property {string} text `dataSource` element key used to find a string to be matched for search
+ * and shown as a `TextField` input value after choosing the result.
+ * @property {string} value `dataSource` element key used to find a string to be shown in search results.
*/
- children: _react.PropTypes.node,
+ dataSourceConfig: _react.PropTypes.object,
/**
- * @ignore
- * If true, the menu item will render with compact desktop
- * styles.
+ * Disables focus ripple when true.
*/
- desktop: _react.PropTypes.bool,
+ disableFocusRipple: _react.PropTypes.bool,
/**
- * If true, the menu item will be disabled.
+ * Override style prop for error.
*/
- disabled: _react.PropTypes.bool,
+ errorStyle: _react.PropTypes.object,
/**
- * The focus state of the menu item. This prop is used to set the focus
- * state of the underlying `ListItem`.
+ * The error content to display.
*/
- focusState: _react.PropTypes.oneOf(['none', 'focused', 'keyboard-focused']),
+ errorText: _react.PropTypes.node,
/**
- * Override the inline-styles of the inner div.
+ * Callback function used to filter the auto complete.
+ *
+ * @param {string} searchText The text to search for within `dataSource`.
+ * @param {string} key `dataSource` element, or `text` property on that element if it's not a string.
+ * @returns {boolean} `true` indicates the auto complete list will include `key` when the input is `searchText`.
*/
- innerDivStyle: _react.PropTypes.object,
+ filter: _react.PropTypes.func,
/**
- * If true, the children will be indented.
- * This is only needed when there is no `leftIcon`.
+ * The content to use for adding floating label element.
*/
- insetChildren: _react.PropTypes.bool,
+ floatingLabelText: _react.PropTypes.node,
/**
- * The `SvgIcon` or `FontIcon` to be displayed on the left side.
+ * If true, the field receives the property `width: 100%`.
*/
- leftIcon: _react.PropTypes.element,
+ fullWidth: _react.PropTypes.bool,
/**
- * `MenuItem` elements to nest within the menu item.
+ * The hint content to display.
*/
- menuItems: _react.PropTypes.node,
+ hintText: _react.PropTypes.node,
/**
- * Callback function fired when the menu item is touch-tapped.
+ * Override style for list.
+ */
+ listStyle: _react.PropTypes.object,
+ /**
+ * The max number of search results to be shown.
+ * By default it shows all the items which matches filter.
+ */
+ maxSearchResults: _react.PropTypes.number,
+ /**
+ * Delay for closing time of the menu.
+ */
+ menuCloseDelay: _react.PropTypes.number,
+ /**
+ * Props to be passed to menu.
+ */
+ menuProps: _react.PropTypes.object,
+ /**
+ * Override style for menu.
+ */
+ menuStyle: _react.PropTypes.object,
+ /** @ignore */
+ onBlur: _react.PropTypes.func,
+ /**
+ * Callback function fired when the menu is closed.
+ */
+ onClose: _react.PropTypes.func,
+ /** @ignore */
+ onFocus: _react.PropTypes.func,
+ /** @ignore */
+ onKeyDown: _react.PropTypes.func,
+ /**
+ * Callback function that is fired when a list item is selected, or enter is pressed in the `TextField`.
*
- * @param {object} event TouchTap event targeting the menu item.
+ * @param {string} chosenRequest Either the `TextField` input value, if enter is pressed in the `TextField`,
+ * or the text value of the corresponding list item that was selected.
+ * @param {number} index The index in `dataSource` of the list item selected, or `-1` if enter is pressed in the
+ * `TextField`.
*/
- onTouchTap: _react.PropTypes.func,
+ onNewRequest: _react.PropTypes.func,
/**
- * Can be used to render primary text within the menu item.
+ * Callback function that is fired when the user updates the `TextField`.
+ *
+ * @param {string} searchText The auto-complete's `searchText` value.
+ * @param {array} dataSource The auto-complete's `dataSource` array.
+ * @param {object} params Additional information linked the update.
*/
- primaryText: _react.PropTypes.node,
+ onUpdateInput: _react.PropTypes.func,
/**
- * The `SvgIcon` or `FontIcon` to be displayed on the right side.
+ * Auto complete menu is open if true.
*/
- rightIcon: _react.PropTypes.element,
+ open: _react.PropTypes.bool,
/**
- * Can be used to render secondary text within the menu item.
+ * If true, the list item is showed when a focus event triggers.
*/
- secondaryText: _react.PropTypes.node,
+ openOnFocus: _react.PropTypes.bool,
+ /**
+ * Props to be passed to popover.
+ */
+ popoverProps: _react.PropTypes.object,
+ /**
+ * Text being input to auto complete.
+ */
+ searchText: _react.PropTypes.string,
/**
* Override the inline-styles of the root element.
*/
style: _react.PropTypes.object,
/**
- * The value of the menu item.
+ * Origin for location of target.
*/
- value: _react.PropTypes.any
+ targetOrigin: _propTypes2.default.origin,
+ /**
+ * Override the inline-styles of AutoComplete's TextField element.
+ */
+ textFieldStyle: _react.PropTypes.object
} : void 0;
-exports.default = MenuItem;
+
+
+AutoComplete.levenshteinDistance = function (searchText, key) {
+ var current = [];
+ var prev = void 0;
+ var value = void 0;
+
+ for (var i = 0; i <= key.length; i++) {
+ for (var j = 0; j <= searchText.length; j++) {
+ if (i && j) {
+ if (searchText.charAt(j - 1) === key.charAt(i - 1)) value = prev;else value = Math.min(current[j], current[j - 1], prev) + 1;
+ } else {
+ value = i + j;
+ }
+ prev = current[j];
+ current[j] = value;
+ }
+ }
+ return current.pop();
+};
+
+AutoComplete.noFilter = function () {
+ return true;
+};
+
+AutoComplete.defaultFilter = AutoComplete.caseSensitiveFilter = function (searchText, key) {
+ return searchText !== '' && key.indexOf(searchText) !== -1;
+};
+
+AutoComplete.caseInsensitiveFilter = function (searchText, key) {
+ return key.toLowerCase().indexOf(searchText.toLowerCase()) !== -1;
+};
+
+AutoComplete.levenshteinDistanceFilter = function (distanceLessThan) {
+ if (distanceLessThan === undefined) {
+ return AutoComplete.levenshteinDistance;
+ } else if (typeof distanceLessThan !== 'number') {
+ throw 'Error: AutoComplete.levenshteinDistanceFilter is a filter generator, not a filter!';
+ }
+
+ return function (s, k) {
+ return AutoComplete.levenshteinDistance(s, k) < distanceLessThan;
+ };
+};
+
+AutoComplete.fuzzyFilter = function (searchText, key) {
+ var compareString = key.toLowerCase();
+ searchText = searchText.toLowerCase();
+
+ var searchTextIndex = 0;
+ for (var index = 0; index < key.length; index++) {
+ if (compareString[index] === searchText[searchTextIndex]) {
+ searchTextIndex += 1;
+ }
+ }
+
+ return searchTextIndex === searchText.length;
+};
+
+AutoComplete.Item = _MenuItem2.default;
+AutoComplete.Divider = _Divider2.default;
+
+exports.default = AutoComplete;
/***/ }),
-/* 322 */
+/* 329 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -24543,182 +25433,198 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _getPrototypeOf = __webpack_require__(3);
-
-var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+var _simpleAssign = __webpack_require__(6);
-var _classCallCheck2 = __webpack_require__(1);
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+var _react = __webpack_require__(0);
-var _createClass2 = __webpack_require__(2);
+var _react2 = _interopRequireDefault(_react);
-var _createClass3 = _interopRequireDefault(_createClass2);
+var _transitions = __webpack_require__(10);
-var _possibleConstructorReturn2 = __webpack_require__(4);
+var _transitions2 = _interopRequireDefault(_transitions);
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _inherits2 = __webpack_require__(5);
+function getStyles(props) {
+ var hintColor = props.muiTheme.textField.hintColor,
+ show = props.show;
-var _inherits3 = _interopRequireDefault(_inherits2);
-var _react = __webpack_require__(0);
+ return {
+ root: {
+ position: 'absolute',
+ opacity: show ? 1 : 0,
+ color: hintColor,
+ transition: _transitions2.default.easeOut(),
+ bottom: 12
+ }
+ };
+}
-var _reactDom = __webpack_require__(19);
+var TextFieldHint = function TextFieldHint(props) {
+ var prepareStyles = props.muiTheme.prepareStyles,
+ style = props.style,
+ text = props.text;
-var _dom = __webpack_require__(316);
-var _dom2 = _interopRequireDefault(_dom);
+ var styles = getStyles(props);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ return _react2.default.createElement(
+ 'div',
+ { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) },
+ text
+ );
+};
-// heavily inspired by https://github.com/Khan/react-components/blob/master/js/layered-component-mixin.jsx
-var RenderToLayer = function (_Component) {
- (0, _inherits3.default)(RenderToLayer, _Component);
+ false ? TextFieldHint.propTypes = {
+ /**
+ * @ignore
+ * The material-ui theme applied to this component.
+ */
+ muiTheme: _react.PropTypes.object.isRequired,
+ /**
+ * True if the hint text should be visible.
+ */
+ show: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object,
+ /**
+ * The hint text displayed.
+ */
+ text: _react.PropTypes.node
+} : void 0;
- function RenderToLayer() {
- var _ref;
+TextFieldHint.defaultProps = {
+ show: true
+};
- var _temp, _this, _ret;
+exports.default = TextFieldHint;
- (0, _classCallCheck3.default)(this, RenderToLayer);
+/***/ }),
+/* 330 */
+/***/ (function(module, exports, __webpack_require__) {
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
+"use strict";
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RenderToLayer.__proto__ || (0, _getPrototypeOf2.default)(RenderToLayer)).call.apply(_ref, [this].concat(args))), _this), _this.onClickAway = function (event) {
- if (event.defaultPrevented) {
- return;
- }
- if (!_this.props.componentClickAway) {
- return;
- }
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
- if (!_this.props.open) {
- return;
- }
+var _simpleAssign = __webpack_require__(6);
- var el = _this.layer;
- if (event.target !== el && event.target === window || document.documentElement.contains(event.target) && !_dom2.default.isDescendant(el, event.target)) {
- _this.props.componentClickAway(event);
- }
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
- }
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
- (0, _createClass3.default)(RenderToLayer, [{
- key: 'componentDidMount',
- value: function componentDidMount() {
- this.renderLayer();
- }
- }, {
- key: 'componentDidUpdate',
- value: function componentDidUpdate() {
- this.renderLayer();
- }
- }, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- this.unrenderLayer();
- }
- }, {
- key: 'getLayer',
- value: function getLayer() {
- return this.layer;
- }
- }, {
- key: 'unrenderLayer',
- value: function unrenderLayer() {
- if (!this.layer) {
- return;
- }
+var _react = __webpack_require__(0);
- if (this.props.useLayerForClickAway) {
- this.layer.style.position = 'relative';
- this.layer.removeEventListener('touchstart', this.onClickAway);
- this.layer.removeEventListener('click', this.onClickAway);
- } else {
- window.removeEventListener('touchstart', this.onClickAway);
- window.removeEventListener('click', this.onClickAway);
- }
+var _react2 = _interopRequireDefault(_react);
- (0, _reactDom.unmountComponentAtNode)(this.layer);
- document.body.removeChild(this.layer);
- this.layer = null;
- }
+var _transitions = __webpack_require__(10);
- /**
- * By calling this method in componentDidMount() and
- * componentDidUpdate(), you're effectively creating a "wormhole" that
- * funnels React's hierarchical updates through to a DOM node on an
- * entirely different part of the page.
- */
+var _transitions2 = _interopRequireDefault(_transitions);
- }, {
- key: 'renderLayer',
- value: function renderLayer() {
- var _this2 = this;
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var _props = this.props,
- open = _props.open,
- render = _props.render;
+function getStyles(props) {
+ var defaultStyles = {
+ position: 'absolute',
+ lineHeight: '22px',
+ top: 38,
+ transition: _transitions2.default.easeOut(),
+ zIndex: 1, // Needed to display label above Chrome's autocomplete field background
+ transform: 'scale(1) translate(0, 0)',
+ transformOrigin: 'left top',
+ pointerEvents: 'auto',
+ userSelect: 'none'
+ };
+ var shrinkStyles = props.shrink ? (0, _simpleAssign2.default)({
+ transform: 'scale(0.75) translate(0, -28px)',
+ pointerEvents: 'none'
+ }, props.shrinkStyle) : null;
- if (open) {
- if (!this.layer) {
- this.layer = document.createElement('div');
- document.body.appendChild(this.layer);
+ return {
+ root: (0, _simpleAssign2.default)(defaultStyles, props.style, shrinkStyles)
+ };
+}
- if (this.props.useLayerForClickAway) {
- this.layer.addEventListener('touchstart', this.onClickAway);
- this.layer.addEventListener('click', this.onClickAway);
- this.layer.style.position = 'fixed';
- this.layer.style.top = 0;
- this.layer.style.bottom = 0;
- this.layer.style.left = 0;
- this.layer.style.right = 0;
- this.layer.style.zIndex = this.context.muiTheme.zIndex.layer;
- } else {
- setTimeout(function () {
- window.addEventListener('touchstart', _this2.onClickAway);
- window.addEventListener('click', _this2.onClickAway);
- }, 0);
- }
- }
+var TextFieldLabel = function TextFieldLabel(props) {
+ var muiTheme = props.muiTheme,
+ className = props.className,
+ children = props.children,
+ htmlFor = props.htmlFor,
+ onTouchTap = props.onTouchTap;
+ var prepareStyles = muiTheme.prepareStyles;
- var layerElement = render();
- this.layerElement = (0, _reactDom.unstable_renderSubtreeIntoContainer)(this, layerElement, this.layer);
- } else {
- this.unrenderLayer();
- }
- }
- }, {
- key: 'render',
- value: function render() {
- return null;
- }
- }]);
- return RenderToLayer;
-}(_react.Component);
+ var styles = getStyles(props);
-RenderToLayer.defaultProps = {
- useLayerForClickAway: true
-};
-RenderToLayer.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
+ return _react2.default.createElement(
+ 'label',
+ {
+ className: className,
+ style: prepareStyles(styles.root),
+ htmlFor: htmlFor,
+ onTouchTap: onTouchTap
+ },
+ children
+ );
};
- false ? RenderToLayer.propTypes = {
- componentClickAway: _react.PropTypes.func,
- open: _react.PropTypes.bool.isRequired,
- render: _react.PropTypes.func.isRequired,
- useLayerForClickAway: _react.PropTypes.bool
+
+ false ? TextFieldLabel.propTypes = {
+ /**
+ * The label contents.
+ */
+ children: _react.PropTypes.node,
+ /**
+ * The css class name of the root element.
+ */
+ className: _react.PropTypes.string,
+ /**
+ * Disables the label if set to true.
+ */
+ disabled: _react.PropTypes.bool,
+ /**
+ * The id of the target element that this label should refer to.
+ */
+ htmlFor: _react.PropTypes.string,
+ /**
+ * @ignore
+ * The material-ui theme applied to this component.
+ */
+ muiTheme: _react.PropTypes.object.isRequired,
+ /**
+ * Callback function for when the label is selected via a touch tap.
+ *
+ * @param {object} event TouchTap event targeting the text field label.
+ */
+ onTouchTap: _react.PropTypes.func,
+ /**
+ * True if the floating label should shrink.
+ */
+ shrink: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the root element when shrunk.
+ */
+ shrinkStyle: _react.PropTypes.object,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
} : void 0;
-exports.default = RenderToLayer;
+
+TextFieldLabel.defaultProps = {
+ disabled: false,
+ shrink: false
+};
+
+exports.default = TextFieldLabel;
/***/ }),
-/* 323 */
+/* 331 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -24727,18 +25633,136 @@ exports.default = RenderToLayer;
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.default = undefined;
-var _Dialog = __webpack_require__(808);
+var _simpleAssign = __webpack_require__(6);
-var _Dialog2 = _interopRequireDefault(_Dialog);
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _transitions = __webpack_require__(10);
+
+var _transitions2 = _interopRequireDefault(_transitions);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-exports.default = _Dialog2.default;
+var propTypes = {
+ /**
+ * True if the parent `TextField` is disabled.
+ */
+ disabled: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the underline when parent `TextField` is disabled.
+ */
+ disabledStyle: _react.PropTypes.object,
+ /**
+ * True if the parent `TextField` has an error.
+ */
+ error: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the underline when parent `TextField` has an error.
+ */
+ errorStyle: _react.PropTypes.object,
+ /**
+ * True if the parent `TextField` is focused.
+ */
+ focus: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the underline when parent `TextField` is focused.
+ */
+ focusStyle: _react.PropTypes.object,
+ /**
+ * @ignore
+ * The material-ui theme applied to this component.
+ */
+ muiTheme: _react.PropTypes.object.isRequired,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
+};
+
+var defaultProps = {
+ disabled: false,
+ disabledStyle: {},
+ error: false,
+ errorStyle: {},
+ focus: false,
+ focusStyle: {},
+ style: {}
+};
+
+var TextFieldUnderline = function TextFieldUnderline(props) {
+ var disabled = props.disabled,
+ disabledStyle = props.disabledStyle,
+ error = props.error,
+ errorStyle = props.errorStyle,
+ focus = props.focus,
+ focusStyle = props.focusStyle,
+ muiTheme = props.muiTheme,
+ style = props.style;
+ var errorStyleColor = errorStyle.color;
+ var prepareStyles = muiTheme.prepareStyles,
+ _muiTheme$textField = muiTheme.textField,
+ borderColor = _muiTheme$textField.borderColor,
+ disabledTextColor = _muiTheme$textField.disabledTextColor,
+ errorColor = _muiTheme$textField.errorColor,
+ focusColor = _muiTheme$textField.focusColor;
+
+
+ var styles = {
+ root: {
+ borderTop: 'none',
+ borderLeft: 'none',
+ borderRight: 'none',
+ borderBottom: 'solid 1px',
+ borderColor: borderColor,
+ bottom: 8,
+ boxSizing: 'content-box',
+ margin: 0,
+ position: 'absolute',
+ width: '100%'
+ },
+ disabled: {
+ borderBottom: 'dotted 2px',
+ borderColor: disabledTextColor
+ },
+ focus: {
+ borderBottom: 'solid 2px',
+ borderColor: focusColor,
+ transform: 'scaleX(0)',
+ transition: _transitions2.default.easeOut()
+ },
+ error: {
+ borderColor: errorStyleColor ? errorStyleColor : errorColor,
+ transform: 'scaleX(1)'
+ }
+ };
+
+ var underline = (0, _simpleAssign2.default)({}, styles.root, style);
+ var focusedUnderline = (0, _simpleAssign2.default)({}, underline, styles.focus, focusStyle);
+
+ if (disabled) underline = (0, _simpleAssign2.default)({}, underline, styles.disabled, disabledStyle);
+ if (focus) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, { transform: 'scaleX(1)' });
+ if (error) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, styles.error);
+
+ return _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement('hr', { style: prepareStyles(underline) }),
+ _react2.default.createElement('hr', { style: prepareStyles(focusedUnderline) })
+ );
+};
+
+ false ? TextFieldUnderline.propTypes = propTypes : void 0;
+TextFieldUnderline.defaultProps = defaultProps;
+
+exports.default = TextFieldUnderline;
/***/ }),
-/* 324 */
+/* 332 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -24776,7 +25800,7 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _Paper = __webpack_require__(34);
+var _Paper = __webpack_require__(32);
var _Paper2 = _interopRequireDefault(_Paper);
@@ -24784,7 +25808,7 @@ var _transitions = __webpack_require__(10);
var _transitions2 = _interopRequireDefault(_transitions);
-var _propTypes = __webpack_require__(41);
+var _propTypes = __webpack_require__(39);
var _propTypes2 = _interopRequireDefault(_propTypes);
@@ -24887,7 +25911,7 @@ PopoverAnimationVertical.contextTypes = {
exports.default = PopoverAnimationVertical;
/***/ }),
-/* 325 */
+/* 333 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -24898,11 +25922,11 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = exports.RadioButtonGroup = exports.RadioButton = undefined;
-var _RadioButton2 = __webpack_require__(810);
+var _RadioButton2 = __webpack_require__(787);
var _RadioButton3 = _interopRequireDefault(_RadioButton2);
-var _RadioButtonGroup2 = __webpack_require__(813);
+var _RadioButtonGroup2 = __webpack_require__(790);
var _RadioButtonGroup3 = _interopRequireDefault(_RadioButtonGroup2);
@@ -24913,7 +25937,7 @@ exports.RadioButtonGroup = _RadioButtonGroup3.default;
exports.default = _RadioButton3.default;
/***/ }),
-/* 326 */
+/* 334 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -24921,11 +25945,11 @@ exports.default = _RadioButton3.default;
exports.__esModule = true;
-var _isIterable2 = __webpack_require__(834);
+var _isIterable2 = __webpack_require__(811);
var _isIterable3 = _interopRequireDefault(_isIterable2);
-var _getIterator2 = __webpack_require__(837);
+var _getIterator2 = __webpack_require__(335);
var _getIterator3 = _interopRequireDefault(_getIterator2);
@@ -24970,7 +25994,13 @@ exports.default = function () {
}();
/***/ }),
-/* 327 */
+/* 335 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(814), __esModule: true };
+
+/***/ }),
+/* 336 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -25000,7 +26030,7 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
-var _slicedToArray2 = __webpack_require__(326);
+var _slicedToArray2 = __webpack_require__(334);
var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
@@ -25008,7 +26038,7 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _timeUtils = __webpack_require__(98);
+var _timeUtils = __webpack_require__(101);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -25111,10 +26141,491 @@ ClockNumber.contextTypes = {
type: _react.PropTypes.oneOf(['hour', 'minute']),
value: _react.PropTypes.number
} : void 0;
-exports.default = ClockNumber;
+exports.default = ClockNumber;
+
+/***/ }),
+/* 337 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _timeUtils = __webpack_require__(101);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function calcAngle(value, base) {
+ value %= base;
+ var angle = 360 / base * value;
+ return angle;
+}
+
+function getStyles(props, context, state) {
+ var hasSelected = props.hasSelected,
+ type = props.type,
+ value = props.value;
+ var inner = state.inner;
+ var timePicker = context.muiTheme.timePicker;
+
+ var angle = type === 'hour' ? calcAngle(value, 12) : calcAngle(value, 60);
+
+ var styles = {
+ root: {
+ height: inner ? '30%' : '40%',
+ background: timePicker.accentColor,
+ width: 2,
+ left: 'calc(50% - 1px)',
+ position: 'absolute',
+ bottom: '50%',
+ transformOrigin: 'bottom',
+ pointerEvents: 'none',
+ transform: 'rotateZ(' + angle + 'deg)'
+ },
+ mark: {
+ boxSizing: 'content-box',
+ background: timePicker.selectTextColor,
+ border: '4px solid ' + timePicker.accentColor,
+ display: hasSelected && 'none',
+ width: 7,
+ height: 7,
+ position: 'absolute',
+ top: -5,
+ left: -6,
+ borderRadius: '100%'
+ }
+ };
+
+ return styles;
+}
+
+var ClockPointer = function (_Component) {
+ (0, _inherits3.default)(ClockPointer, _Component);
+
+ function ClockPointer() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, ClockPointer);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockPointer.__proto__ || (0, _getPrototypeOf2.default)(ClockPointer)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ inner: false
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
+
+ (0, _createClass3.default)(ClockPointer, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ this.setState({
+ inner: (0, _timeUtils.isInner)(this.props)
+ });
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ this.setState({
+ inner: (0, _timeUtils.isInner)(nextProps)
+ });
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ if (this.props.value === null) {
+ return _react2.default.createElement('span', null);
+ }
+
+ var styles = getStyles(this.props, this.context, this.state);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
+
+
+ return _react2.default.createElement(
+ 'div',
+ { style: prepareStyles(styles.root) },
+ _react2.default.createElement('div', { style: prepareStyles(styles.mark) })
+ );
+ }
+ }]);
+ return ClockPointer;
+}(_react.Component);
+
+ClockPointer.defaultProps = {
+ hasSelected: false,
+ value: null,
+ type: 'minute'
+};
+ClockPointer.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? ClockPointer.propTypes = {
+ hasSelected: _react.PropTypes.bool,
+ type: _react.PropTypes.oneOf(['hour', 'minute']),
+ value: _react.PropTypes.number
+} : void 0;
+exports.default = ClockPointer;
+
+/***/ }),
+/* 338 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _keys = __webpack_require__(62);
+
+var _keys2 = _interopRequireDefault(_keys);
+
+exports.isObjectEmpty = isObjectEmpty;
+exports.getQueryStringValue = getQueryStringValue;
+exports.pageHasNodeOfClass = pageHasNodeOfClass;
+exports.hasStringInPath = hasStringInPath;
+exports.pathCount = pathCount;
+exports.setTimeForToday = setTimeForToday;
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function isObjectEmpty(obj) {
+ return (0, _keys2.default)(obj).length === 0 && obj.constructor === Object;
+}
+
+function getQueryStringValue(key) {
+ var urlParams = new URLSearchParams(window.location.search);
+ return urlParams.get(key);
+}
+
+function pageHasNodeOfClass(className) {
+ return document.getElementsByClassName(className).length > 0;
+}
+
+function hasStringInPath(value) {
+ return location.pathname.substring(1).split('/').filter(function (x) {
+ return !!x && x === value;
+ }).length > 0;
+}
+
+function pathCount() {
+ return location.pathname.substring(1).split('/').length;
+}
+
+function setTimeForToday(time) {
+ var d = new Date();
+ var split = time.split(':');
+ if (!split.length || split.length > 3) {
+ return null;
+ }
+ var hour = +split[0];
+ var minute = +split[1];
+ var seconds = +split[2];
+ if (isNaN(hour) || hour > 24) {
+ return null;
+ }
+
+ if (isNaN(minute) || minute > 60 || hour === 24 && minute > 0) {
+ return null;
+ }
+
+ if (isNaN(seconds) || seconds > 60) {
+ return null;
+ }
+ if (hour < 0 || minute < 0 || seconds < 0) return null;
+ d.setHours(hour);
+ d.setMinutes(minute);
+ d.setSeconds(seconds);
+ return d;
+}
+
+/***/ }),
+/* 339 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = exports.TableRowColumn = exports.TableRow = exports.TableHeaderColumn = exports.TableHeader = exports.TableFooter = exports.TableBody = exports.Table = undefined;
+
+var _Table2 = __webpack_require__(823);
+
+var _Table3 = _interopRequireDefault(_Table2);
+
+var _TableBody2 = __webpack_require__(824);
+
+var _TableBody3 = _interopRequireDefault(_TableBody2);
+
+var _TableFooter2 = __webpack_require__(825);
+
+var _TableFooter3 = _interopRequireDefault(_TableFooter2);
+
+var _TableHeader2 = __webpack_require__(826);
+
+var _TableHeader3 = _interopRequireDefault(_TableHeader2);
+
+var _TableHeaderColumn2 = __webpack_require__(340);
+
+var _TableHeaderColumn3 = _interopRequireDefault(_TableHeaderColumn2);
+
+var _TableRow2 = __webpack_require__(827);
+
+var _TableRow3 = _interopRequireDefault(_TableRow2);
+
+var _TableRowColumn2 = __webpack_require__(211);
+
+var _TableRowColumn3 = _interopRequireDefault(_TableRowColumn2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.Table = _Table3.default;
+exports.TableBody = _TableBody3.default;
+exports.TableFooter = _TableFooter3.default;
+exports.TableHeader = _TableHeader3.default;
+exports.TableHeaderColumn = _TableHeaderColumn3.default;
+exports.TableRow = _TableRow3.default;
+exports.TableRowColumn = _TableRowColumn3.default;
+exports.default = _Table3.default;
+
+/***/ }),
+/* 340 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _extends2 = __webpack_require__(7);
+
+var _extends3 = _interopRequireDefault(_extends2);
+
+var _objectWithoutProperties2 = __webpack_require__(8);
+
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _simpleAssign = __webpack_require__(6);
+
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _Tooltip = __webpack_require__(322);
+
+var _Tooltip2 = _interopRequireDefault(_Tooltip);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function getStyles(props, context) {
+ var tableHeaderColumn = context.muiTheme.tableHeaderColumn;
+
+
+ return {
+ root: {
+ fontWeight: 'normal',
+ fontSize: 12,
+ paddingLeft: tableHeaderColumn.spacing,
+ paddingRight: tableHeaderColumn.spacing,
+ height: tableHeaderColumn.height,
+ textAlign: 'left',
+ whiteSpace: 'nowrap',
+ textOverflow: 'ellipsis',
+ color: tableHeaderColumn.textColor,
+ position: 'relative'
+ },
+ tooltip: {
+ boxSizing: 'border-box',
+ marginTop: tableHeaderColumn.height / 2
+ }
+ };
+}
+
+var TableHeaderColumn = function (_Component) {
+ (0, _inherits3.default)(TableHeaderColumn, _Component);
+
+ function TableHeaderColumn() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, TableHeaderColumn);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableHeaderColumn.__proto__ || (0, _getPrototypeOf2.default)(TableHeaderColumn)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ hovered: false
+ }, _this.onMouseEnter = function () {
+ if (_this.props.tooltip !== undefined) {
+ _this.setState({ hovered: true });
+ }
+ }, _this.onMouseLeave = function () {
+ if (_this.props.tooltip !== undefined) {
+ _this.setState({ hovered: false });
+ }
+ }, _this.onClick = function (event) {
+ if (_this.props.onClick) {
+ _this.props.onClick(event, _this.props.columnNumber);
+ }
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
+
+ (0, _createClass3.default)(TableHeaderColumn, [{
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ children = _props.children,
+ className = _props.className,
+ columnNumber = _props.columnNumber,
+ hoverable = _props.hoverable,
+ onClick = _props.onClick,
+ onHover = _props.onHover,
+ onHoverExit = _props.onHoverExit,
+ style = _props.style,
+ tooltip = _props.tooltip,
+ tooltipStyle = _props.tooltipStyle,
+ other = (0, _objectWithoutProperties3.default)(_props, ['children', 'className', 'columnNumber', 'hoverable', 'onClick', 'onHover', 'onHoverExit', 'style', 'tooltip', 'tooltipStyle']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
+
+ var styles = getStyles(this.props, this.context);
+
+ var handlers = {
+ onMouseEnter: this.onMouseEnter,
+ onMouseLeave: this.onMouseLeave,
+ onClick: this.onClick
+ };
+
+ var tooltipNode = void 0;
+
+ if (tooltip !== undefined) {
+ tooltipNode = _react2.default.createElement(_Tooltip2.default, {
+ label: tooltip,
+ show: this.state.hovered,
+ style: (0, _simpleAssign2.default)(styles.tooltip, tooltipStyle)
+ });
+ }
+
+ return _react2.default.createElement(
+ 'th',
+ (0, _extends3.default)({
+ className: className,
+ style: prepareStyles((0, _simpleAssign2.default)(styles.root, style))
+ }, handlers, other),
+ tooltipNode,
+ children
+ );
+ }
+ }]);
+ return TableHeaderColumn;
+}(_react.Component);
+
+TableHeaderColumn.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? TableHeaderColumn.propTypes = {
+ children: _react.PropTypes.node,
+ /**
+ * The css class name of the root element.
+ */
+ className: _react.PropTypes.string,
+ /**
+ * Number to identify the header row. This property
+ * is automatically populated when used with TableHeader.
+ */
+ columnNumber: _react.PropTypes.number,
+ /**
+ * @ignore
+ * Not used here but we need to remove it from the root element.
+ */
+ hoverable: _react.PropTypes.bool,
+ /** @ignore */
+ onClick: _react.PropTypes.func,
+ /**
+ * @ignore
+ * Not used here but we need to remove it from the root element.
+ */
+ onHover: _react.PropTypes.func,
+ /**
+ * @ignore
+ * Not used here but we need to remove it from the root element.
+ */
+ onHoverExit: _react.PropTypes.func,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object,
+ /**
+ * The string to supply to the tooltip. If not
+ * string is supplied no tooltip will be shown.
+ */
+ tooltip: _react.PropTypes.string,
+ /**
+ * Additional styling that can be applied to the tooltip.
+ */
+ tooltipStyle: _react.PropTypes.object
+} : void 0;
+exports.default = TableHeaderColumn;
/***/ }),
-/* 328 */
+/* 341 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -25124,311 +26635,245 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _getPrototypeOf = __webpack_require__(3);
+var _react = __webpack_require__(0);
-var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+var _react2 = _interopRequireDefault(_react);
-var _classCallCheck2 = __webpack_require__(1);
+var _pure = __webpack_require__(20);
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+var _pure2 = _interopRequireDefault(_pure);
-var _createClass2 = __webpack_require__(2);
+var _SvgIcon = __webpack_require__(21);
-var _createClass3 = _interopRequireDefault(_createClass2);
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
-var _possibleConstructorReturn2 = __webpack_require__(4);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+var ActionDelete = function ActionDelete(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z' })
+ );
+};
+ActionDelete = (0, _pure2.default)(ActionDelete);
+ActionDelete.displayName = 'ActionDelete';
+ActionDelete.muiName = 'SvgIcon';
-var _inherits2 = __webpack_require__(5);
+exports.default = ActionDelete;
-var _inherits3 = _interopRequireDefault(_inherits2);
+/***/ }),
+/* 342 */
+/***/ (function(module, exports, __webpack_require__) {
-var _react = __webpack_require__(0);
+"use strict";
-var _react2 = _interopRequireDefault(_react);
-var _timeUtils = __webpack_require__(98);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = addNotification;
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _ActionTypes = __webpack_require__(49);
-function calcAngle(value, base) {
- value %= base;
- var angle = 360 / base * value;
- return angle;
+var types = _interopRequireWildcard(_ActionTypes);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function addNotification(message) {
+ return {
+ type: types.NOTIFICATION_ADD,
+ message: message
+ };
}
-function getStyles(props, context, state) {
- var hasSelected = props.hasSelected,
- type = props.type,
- value = props.value;
- var inner = state.inner;
- var timePicker = context.muiTheme.timePicker;
+/***/ }),
+/* 343 */
+/***/ (function(module, exports, __webpack_require__) {
- var angle = type === 'hour' ? calcAngle(value, 12) : calcAngle(value, 60);
+"use strict";
- var styles = {
- root: {
- height: inner ? '30%' : '40%',
- background: timePicker.accentColor,
- width: 2,
- left: 'calc(50% - 1px)',
- position: 'absolute',
- bottom: '50%',
- transformOrigin: 'bottom',
- pointerEvents: 'none',
- transform: 'rotateZ(' + angle + 'deg)'
- },
- mark: {
- boxSizing: 'content-box',
- background: timePicker.selectTextColor,
- border: '4px solid ' + timePicker.accentColor,
- display: hasSelected && 'none',
- width: 7,
- height: 7,
- position: 'absolute',
- top: -5,
- left: -6,
- borderRadius: '100%'
- }
- };
- return styles;
-}
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-var ClockPointer = function (_Component) {
- (0, _inherits3.default)(ClockPointer, _Component);
+var _assign = __webpack_require__(42);
- function ClockPointer() {
- var _ref;
+var _assign2 = _interopRequireDefault(_assign);
- var _temp, _this, _ret;
+exports.default = Layout;
- (0, _classCallCheck3.default)(this, ClockPointer);
+var _react = __webpack_require__(0);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
+var _react2 = _interopRequireDefault(_react);
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockPointer.__proto__ || (0, _getPrototypeOf2.default)(ClockPointer)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- inner: false
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
- }
+var _AppBar = __webpack_require__(836);
- (0, _createClass3.default)(ClockPointer, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
- this.setState({
- inner: (0, _timeUtils.isInner)(this.props)
- });
- }
- }, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- this.setState({
- inner: (0, _timeUtils.isInner)(nextProps)
- });
- }
- }, {
- key: 'render',
- value: function render() {
- if (this.props.value === null) {
- return _react2.default.createElement('span', null);
- }
+var _AppBar2 = _interopRequireDefault(_AppBar);
- var styles = getStyles(this.props, this.context, this.state);
- var prepareStyles = this.context.muiTheme.prepareStyles;
+var _Tabs = __webpack_require__(839);
+var _Tabs2 = _interopRequireDefault(_Tabs);
- return _react2.default.createElement(
- 'div',
- { style: prepareStyles(styles.root) },
- _react2.default.createElement('div', { style: prepareStyles(styles.mark) })
- );
- }
- }]);
- return ClockPointer;
-}(_react.Component);
+var _Paper = __webpack_require__(32);
-ClockPointer.defaultProps = {
- hasSelected: false,
- value: null,
- type: 'minute'
-};
-ClockPointer.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? ClockPointer.propTypes = {
- hasSelected: _react.PropTypes.bool,
- type: _react.PropTypes.oneOf(['hour', 'minute']),
- value: _react.PropTypes.number
-} : void 0;
-exports.default = ClockPointer;
+var _Paper2 = _interopRequireDefault(_Paper);
-/***/ }),
-/* 329 */
-/***/ (function(module, exports, __webpack_require__) {
+var _Styles = __webpack_require__(52);
-"use strict";
+var _Styles2 = _interopRequireDefault(_Styles);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-var countries = exports.countries = [{ "text": "USA", "value": "USA" }, { "text": "CANADA", "value": "CANADA" }, { "text": "JAPAN", "value": "JAPAN" }, { "text": "UK", "value": "GB" }, { "text": "UK (N. IRELAND)", "value": "NB" }, { "text": "AUSTRIA", "value": "AT" }, { "text": "BELARUS", "value": "BY" }, { "text": "BELGIUM", "value": "BE" }, { "text": "BULGARIA", "value": "BG" }, { "text": "CROATIA", "value": "HR" }, { "text": "CZECH REPUBLIC", "value": "CZ" }, { "text": "DENMARK", "value": "DK" }, { "text": "ESTONIA", "value": "EE" }, { "text": "FINLAND", "value": "FI" }, { "text": "FRANCE", "value": "FR" }, { "text": "GERMANY", "value": "DE" }, { "text": "GREECE", "value": "GR" }, { "text": "HUNGARY", "value": "HU" }, { "text": "ICELAND", "value": "IS" }, { "text": "IRELAND", "value": "IE" }, { "text": "ITALY", "value": "IT" }, { "text": "LATVIA", "value": "LV" }, { "text": "LITHUANIA", "value": "LT" }, { "text": "LUXEMBOURG", "value": "LU" }, { "text": "MONACO", "value": "MC" }, { "text": "NETHERLANDS", "value": "NL" }, { "text": "NORWAY", "value": "NO" }, { "text": "POLAND", "value": "PL" }, { "text": "PORTUGAL", "value": "PT" }, { "text": "ROMANIA", "value": "RO" }, { "text": "RUSSIA", "value": "RU" }, { "text": "SLOVAKIA", "value": "SK" }, { "text": "SLOVENIA", "value": "SI" }, { "text": "SPAIN", "value": "ES" }, { "text": "SWEDEN", "value": "SE" }, { "text": "SWITZERLAND", "value": "CH" }, { "text": "TURKEY", "value": "TR" }];
-var sizes = exports.sizes = ["Small", "Medium", "Large", "XLarge"];
-var sizesPants = exports.sizesPants = [28, 30, 32, 34, 36, 38, 40];
-var shoeSizes = exports.shoeSizes = [4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14, 14.5];
-var usaRegions = exports.usaRegions = [{ "text": "AL", "value": "AL" }, { "text": "AK", "value": "AK" }, { "text": "AS", "value": "AS" }, { "text": "AZ", "value": "AZ" }, { "text": "AR", "value": "AR" }, { "text": "CA", "value": "CA" }, { "text": "CO", "value": "CO" }, { "text": "CT", "value": "CT" }, { "text": "DE", "value": "DE" }, { "text": "DC", "value": "DC" }, { "text": "FM", "value": "FM" }, { "text": "FL", "value": "FL" }, { "text": "GA", "value": "GA" }, { "text": "GU", "value": "GU" }, { "text": "HI", "value": "HI" }, { "text": "ID", "value": "ID" }, { "text": "IL", "value": "IL" }, { "text": "IN", "value": "IN" }, { "text": "IA", "value": "IA" }, { "text": "KS", "value": "KS" }, { "text": "KY", "value": "KY" }, { "text": "LA", "value": "LA" }, { "text": "ME", "value": "ME" }, { "text": "MH", "value": "MH" }, { "text": "MD", "value": "MD" }, { "text": "MA", "value": "MA" }, { "text": "MI", "value": "MI" }, { "text": "MN", "value": "MN" }, { "text": "MS", "value": "MS" }, { "text": "MO", "value": "MO" }, { "text": "MT", "value": "MT" }, { "text": "NE", "value": "NE" }, { "text": "NV", "value": "NV" }, { "text": "NH", "value": "NH" }, { "text": "NJ", "value": "NJ" }, { "text": "NM", "value": "NM" }, { "text": "NY", "value": "NY" }, { "text": "NC", "value": "NC" }, { "text": "ND", "value": "ND" }, { "text": "MP", "value": "MP" }, { "text": "OH", "value": "OH" }, { "text": "OK", "value": "OK" }, { "text": "OR", "value": "OR" }, { "text": "PW", "value": "PW" }, { "text": "PA", "value": "PA" }, { "text": "PR", "value": "PR" }, { "text": "RI", "value": "RI" }, { "text": "SC", "value": "SC" }, { "text": "SD", "value": "SD" }, { "text": "TN", "value": "TN" }, { "text": "TX", "value": "TX" }, { "text": "UT", "value": "UT" }, { "text": "VT", "value": "VT" }, { "text": "VI", "value": "VI" }, { "text": "VA", "value": "VA" }, { "text": "WA", "value": "WA" }, { "text": "WV", "value": "WV" }, { "text": "WI", "value": "WI" }, { "text": "WY", "value": "WY" }];
-var canadaRegions = exports.canadaRegions = [{ "text": "AB", "value": "AB" }, { "text": "BC", "value": "BC" }, { "text": "MB", "value": "MB" }, { "text": "NB", "value": "NB" }, { "text": "NL", "value": "NL" }, { "text": "NT", "value": "NT" }, { "text": "NS", "value": "NS" }, { "text": "NU", "value": "NU" }, { "text": "ON", "value": "ON" }, { "text": "PE", "value": "PE" }, { "text": "QC", "value": "QC" }, { "text": "SK", "value": "SK" }, { "text": "YT", "value": "YT" }];
-var japanRegions = exports.japanRegions = [{ "text": " 北海道", "value": " 北海道" }, { "text": " 青森県", "value": " 青森県" }, { "text": " 岩手県", "value": " 岩手県" }, { "text": " 宮城県", "value": " 宮城県" }, { "text": " 秋田県", "value": " 秋田県" }, { "text": " 山形県", "value": " 山形県" }, { "text": " 福島県", "value": " 福島県" }, { "text": " 茨城県", "value": " 茨城県" }, { "text": " 栃木県", "value": " 栃木県" }, { "text": " 群馬県", "value": " 群馬県" }, { "text": " 埼玉県", "value": " 埼玉県" }, { "text": " 千葉県", "value": " 千葉県" }, { "text": " 東京都", "value": " 東京都" }, { "text": " 神奈川県", "value": " 神奈川県" }, { "text": " 新潟県", "value": " 新潟県" }, { "text": " 富山県", "value": " 富山県" }, { "text": " 石川県", "value": " 石川県" }, { "text": " 福井県", "value": " 福井県" }, { "text": " 山梨県", "value": " 山梨県" }, { "text": " 長野県", "value": " 長野県" }, { "text": " 岐阜県", "value": " 岐阜県" }, { "text": " 静岡県", "value": " 静岡県" }, { "text": " 愛知県", "value": " 愛知県" }, { "text": " 三重県", "value": " 三重県" }, { "text": " 滋賀県", "value": " 滋賀県" }, { "text": " 京都府", "value": " 京都府" }, { "text": " 大阪府", "value": " 大阪府" }, { "text": " 兵庫県", "value": " 兵庫県" }, { "text": " 奈良県", "value": " 奈良県" }, { "text": " 和歌山県", "value": " 和歌山県" }, { "text": " 鳥取県", "value": " 鳥取県" }, { "text": " 島根県", "value": " 島根県" }, { "text": " 岡山県", "value": " 岡山県" }, { "text": " 広島県", "value": " 広島県" }, { "text": " 山口県", "value": " 山口県" }, { "text": " 徳島県", "value": " 徳島県" }, { "text": " 香川県", "value": " 香川県" }, { "text": " 愛媛県", "value": " 愛媛県" }, { "text": " 高知県", "value": " 高知県" }, { "text": " 福岡県", "value": " 福岡県" }, { "text": " 佐賀県", "value": " 佐賀県" }, { "text": " 長崎県", "value": " 長崎県" }, { "text": " 熊本県", "value": " 熊本県" }, { "text": " 大分県", "value": " 大分県" }, { "text": " 宮崎県", "value": " 宮崎県" }, { "text": " 鹿児島県", "value": " 鹿児島県" }, { "text": " 沖縄県", "value": " 沖縄県" }];
+function Layout(props) {
+ var children = props.children,
+ title = props.title,
+ contentStyle = props.contentStyle,
+ tabs = props.tabs,
+ currentTab = props.currentTab;
-/***/ }),
-/* 330 */
-/***/ (function(module, exports, __webpack_require__) {
-module.exports = { "default": __webpack_require__(862), __esModule: true };
+ var appBarStyles = (0, _assign2.default)({}, _Styles2.default.appBar);
-/***/ }),
-/* 331 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (tabs) {
+ appBarStyles.marginBottom = 64;
+ }
-// 7.3.20 SpeciesConstructor(O, defaultConstructor)
-var anObject = __webpack_require__(36);
-var aFunction = __webpack_require__(99);
-var SPECIES = __webpack_require__(22)('species');
-module.exports = function (O, D) {
- var C = anObject(O).constructor;
- var S;
- return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
+ return _react2.default.createElement(
+ 'div',
+ { style: _Styles2.default.container },
+ _react2.default.createElement(
+ _AppBar2.default,
+ { title: title, showMenuIconButton: false, style: appBarStyles },
+ tabs && _react2.default.createElement(
+ 'div',
+ { style: { width: '100%' } },
+ _react2.default.createElement(
+ _Tabs2.default,
+ { style: _Styles2.default.tabs, value: currentTab },
+ tabs
+ )
+ )
+ ),
+ _react2.default.createElement(
+ 'div',
+ { style: { width: '100%' } },
+ _react2.default.createElement(
+ 'div',
+ { style: (0, _assign2.default)({}, _Styles2.default.content, contentStyle) },
+ _react2.default.createElement(
+ _Paper2.default,
+ { style: _Styles2.default.paper },
+ children
+ )
+ )
+ )
+ );
+}
+
+Layout.propTypes = {
+ children: _react.PropTypes.node,
+ title: _react.PropTypes.string.isRequired,
+ contentStyle: _react.PropTypes.object,
+ tabs: _react.PropTypes.arrayOf(_react.PropTypes.node),
+ currentTab: _react.PropTypes.any
};
+/***/ }),
+/* 344 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(858), __esModule: true };
/***/ }),
-/* 332 */
+/* 345 */
/***/ (function(module, exports, __webpack_require__) {
-var ctx = __webpack_require__(61);
-var invoke = __webpack_require__(866);
-var html = __webpack_require__(297);
-var cel = __webpack_require__(131);
-var global = __webpack_require__(23);
-var process = global.process;
-var setTask = global.setImmediate;
-var clearTask = global.clearImmediate;
-var MessageChannel = global.MessageChannel;
-var Dispatch = global.Dispatch;
-var counter = 0;
-var queue = {};
-var ONREADYSTATECHANGE = 'onreadystatechange';
-var defer, channel, port;
-var run = function () {
+var ctx = __webpack_require__(67)
+ , invoke = __webpack_require__(863)
+ , html = __webpack_require__(299)
+ , cel = __webpack_require__(137)
+ , global = __webpack_require__(25)
+ , process = global.process
+ , setTask = global.setImmediate
+ , clearTask = global.clearImmediate
+ , MessageChannel = global.MessageChannel
+ , counter = 0
+ , queue = {}
+ , ONREADYSTATECHANGE = 'onreadystatechange'
+ , defer, channel, port;
+var run = function(){
var id = +this;
- // eslint-disable-next-line no-prototype-builtins
- if (queue.hasOwnProperty(id)) {
+ if(queue.hasOwnProperty(id)){
var fn = queue[id];
delete queue[id];
fn();
}
};
-var listener = function (event) {
+var listener = function(event){
run.call(event.data);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
-if (!setTask || !clearTask) {
- setTask = function setImmediate(fn) {
- var args = [];
- var i = 1;
- while (arguments.length > i) args.push(arguments[i++]);
- queue[++counter] = function () {
- // eslint-disable-next-line no-new-func
+if(!setTask || !clearTask){
+ setTask = function setImmediate(fn){
+ var args = [], i = 1;
+ while(arguments.length > i)args.push(arguments[i++]);
+ queue[++counter] = function(){
invoke(typeof fn == 'function' ? fn : Function(fn), args);
};
defer(counter);
return counter;
};
- clearTask = function clearImmediate(id) {
+ clearTask = function clearImmediate(id){
delete queue[id];
};
// Node.js 0.8-
- if (__webpack_require__(83)(process) == 'process') {
- defer = function (id) {
+ if(__webpack_require__(87)(process) == 'process'){
+ defer = function(id){
process.nextTick(ctx(run, id, 1));
};
- // Sphere (JS game engine) Dispatch API
- } else if (Dispatch && Dispatch.now) {
- defer = function (id) {
- Dispatch.now(ctx(run, id, 1));
- };
// Browsers with MessageChannel, includes WebWorkers
- } else if (MessageChannel) {
- channel = new MessageChannel();
- port = channel.port2;
+ } else if(MessageChannel){
+ channel = new MessageChannel;
+ port = channel.port2;
channel.port1.onmessage = listener;
defer = ctx(port.postMessage, port, 1);
// Browsers with postMessage, skip WebWorkers
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
- } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
- defer = function (id) {
+ } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){
+ defer = function(id){
global.postMessage(id + '', '*');
};
global.addEventListener('message', listener, false);
// IE8-
- } else if (ONREADYSTATECHANGE in cel('script')) {
- defer = function (id) {
- html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
+ } else if(ONREADYSTATECHANGE in cel('script')){
+ defer = function(id){
+ html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){
html.removeChild(this);
run.call(id);
};
};
// Rest old browsers
} else {
- defer = function (id) {
+ defer = function(id){
setTimeout(ctx(run, id, 1), 0);
};
}
}
module.exports = {
- set: setTask,
+ set: setTask,
clear: clearTask
};
-
-/***/ }),
-/* 333 */
-/***/ (function(module, exports) {
-
-module.exports = function (exec) {
- try {
- return { e: false, v: exec() };
- } catch (e) {
- return { e: true, v: e };
- }
-};
-
-
-/***/ }),
-/* 334 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var newPromiseCapability = __webpack_require__(205);
-
-module.exports = function (C, x) {
- var promiseCapability = newPromiseCapability.f(C);
- var resolve = promiseCapability.resolve;
- resolve(x);
- return promiseCapability.promise;
-};
-
-
/***/ }),
-/* 335 */
+/* 346 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var _assign = __webpack_require__(49);
+var _assign = __webpack_require__(42);
var _assign2 = _interopRequireDefault(_assign);
@@ -25436,41 +26881,41 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactDom = __webpack_require__(19);
+var _reactDom = __webpack_require__(16);
var _reactDom2 = _interopRequireDefault(_reactDom);
-var _reactRouter = __webpack_require__(156);
+var _reactRouter = __webpack_require__(163);
-var _redux = __webpack_require__(111);
+var _redux = __webpack_require__(115);
-var _reactRedux = __webpack_require__(27);
+var _reactRedux = __webpack_require__(19);
-var _reduxLogger = __webpack_require__(476);
+var _reduxLogger = __webpack_require__(484);
var _reduxLogger2 = _interopRequireDefault(_reduxLogger);
-var _reactRouterRedux = __webpack_require__(481);
+var _reactRouterRedux = __webpack_require__(489);
-var _reactTapEventPlugin = __webpack_require__(484);
+var _reactTapEventPlugin = __webpack_require__(492);
var _reactTapEventPlugin2 = _interopRequireDefault(_reactTapEventPlugin);
-var _reduxForm = __webpack_require__(113);
+var _reduxForm = __webpack_require__(82);
-var _reduxThunk = __webpack_require__(653);
+var _reduxThunk = __webpack_require__(636);
var _reduxThunk2 = _interopRequireDefault(_reduxThunk);
-var _reducers = __webpack_require__(654);
+var _reducers = __webpack_require__(637);
var reducers = _interopRequireWildcard(_reducers);
-var _routes = __webpack_require__(658);
+var _routes = __webpack_require__(660);
var _routes2 = _interopRequireDefault(_routes);
-var _StorageManager = __webpack_require__(857);
+var _StorageManager = __webpack_require__(853);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
@@ -25486,19 +26931,34 @@ if (false) {
}
var savedState = (0, _StorageManager.loadSavedState)(VERSION);
-var store = (0, _redux.createStore)((0, _redux.combineReducers)((0, _assign2.default)({}, reducers, {
+var appReducer = (0, _redux.combineReducers)((0, _assign2.default)({}, reducers, {
routing: _reactRouterRedux.routerReducer,
form: _reduxForm.reducer
-})), savedState, _redux.applyMiddleware.apply(undefined, middleware));
+}));
+
+var rootReducer = function rootReducer(state, action) {
+ if (action.type === 'PROFILE_CHANGE') {
+ return appReducer(undefined, action);
+ }
+ return appReducer(state, action);
+};
+var store = (0, _redux.createStore)(rootReducer, savedState, _redux.applyMiddleware.apply(undefined, middleware));
// Save state in localStorage automatically
store.subscribe(function () {
var state = store.getState();
if (state) {
- (0, _StorageManager.saveState)({ menu: state.menu, settings: state.settings }, VERSION);
- if (typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined') {
- (0, _StorageManager.saveToChromeStorage)('settings', state.settings.values || {});
- }
+ (function () {
+ (0, _StorageManager.saveState)({ menu: state.menu, profiles: state.profiles, atc: state.atc }, VERSION);
+ var currentProfile = state.profiles.currentProfile;
+ var settings = state.profiles.profiles.filter(function (x) {
+ return x.name === currentProfile;
+ })[0].settings;
+ if (typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined') {
+ (0, _StorageManager.saveToChromeStorage)('settings', settings || {});
+ (0, _StorageManager.saveToChromeStorage)('atc', state.atc || {});
+ }
+ })();
}
});
@@ -25515,374 +26975,170 @@ _reactDom2.default.render(_react2.default.createElement(
), document.getElementById('app'));
/***/ }),
-/* 336 */
+/* 347 */
/***/ (function(module, exports, __webpack_require__) {
-__webpack_require__(337);
+__webpack_require__(348);
module.exports = __webpack_require__(18).Object.assign;
-
/***/ }),
-/* 337 */
+/* 348 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.1 Object.assign(target, source)
-var $export = __webpack_require__(28);
-
-$export($export.S + $export.F, 'Object', { assign: __webpack_require__(338) });
+var $export = __webpack_require__(33);
+$export($export.S + $export.F, 'Object', {assign: __webpack_require__(349)});
/***/ }),
-/* 338 */
+/* 349 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 19.1.2.1 Object.assign(target, source, ...)
-var getKeys = __webpack_require__(64);
-var gOPS = __webpack_require__(139);
-var pIE = __webpack_require__(101);
-var toObject = __webpack_require__(84);
-var IObject = __webpack_require__(208);
-var $assign = Object.assign;
+var getKeys = __webpack_require__(70)
+ , gOPS = __webpack_require__(145)
+ , pIE = __webpack_require__(104)
+ , toObject = __webpack_require__(88)
+ , IObject = __webpack_require__(215)
+ , $assign = Object.assign;
// should work with symbols and should have deterministic property order (V8 bug)
-module.exports = !$assign || __webpack_require__(63)(function () {
- var A = {};
- var B = {};
- // eslint-disable-next-line no-undef
- var S = Symbol();
- var K = 'abcdefghijklmnopqrst';
+module.exports = !$assign || __webpack_require__(69)(function(){
+ var A = {}
+ , B = {}
+ , S = Symbol()
+ , K = 'abcdefghijklmnopqrst';
A[S] = 7;
- K.split('').forEach(function (k) { B[k] = k; });
+ K.split('').forEach(function(k){ B[k] = k; });
return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
-}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
- var T = toObject(target);
- var aLen = arguments.length;
- var index = 1;
- var getSymbols = gOPS.f;
- var isEnum = pIE.f;
- while (aLen > index) {
- var S = IObject(arguments[index++]);
- var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
- var length = keys.length;
- var j = 0;
- var key;
- while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
+}) ? function assign(target, source){ // eslint-disable-line no-unused-vars
+ var T = toObject(target)
+ , aLen = arguments.length
+ , index = 1
+ , getSymbols = gOPS.f
+ , isEnum = pIE.f;
+ while(aLen > index){
+ var S = IObject(arguments[index++])
+ , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
+ , length = keys.length
+ , j = 0
+ , key;
+ while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
} return T;
} : $assign;
-
/***/ }),
-/* 339 */
+/* 350 */
/***/ (function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
-var toIObject = __webpack_require__(52);
-var toLength = __webpack_require__(134);
-var toAbsoluteIndex = __webpack_require__(340);
-module.exports = function (IS_INCLUDES) {
- return function ($this, el, fromIndex) {
- var O = toIObject($this);
- var length = toLength(O.length);
- var index = toAbsoluteIndex(fromIndex, length);
- var value;
+var toIObject = __webpack_require__(55)
+ , toLength = __webpack_require__(140)
+ , toIndex = __webpack_require__(351);
+module.exports = function(IS_INCLUDES){
+ return function($this, el, fromIndex){
+ var O = toIObject($this)
+ , length = toLength(O.length)
+ , index = toIndex(fromIndex, length)
+ , value;
// Array#includes uses SameValueZero equality algorithm
- // eslint-disable-next-line no-self-compare
- if (IS_INCLUDES && el != el) while (length > index) {
+ if(IS_INCLUDES && el != el)while(length > index){
value = O[index++];
- // eslint-disable-next-line no-self-compare
- if (value != value) return true;
- // Array#indexOf ignores holes, Array#includes - not
- } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
- if (O[index] === el) return IS_INCLUDES || index || 0;
+ if(value != value)return true;
+ // Array#toIndex ignores holes, Array#includes - not
+ } else for(;length > index; index++)if(IS_INCLUDES || index in O){
+ if(O[index] === el)return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
-
-/***/ }),
-/* 340 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var toInteger = __webpack_require__(135);
-var max = Math.max;
-var min = Math.min;
-module.exports = function (index, length) {
- index = toInteger(index);
- return index < 0 ? max(index + length, 0) : min(index, length);
-};
-
-
-/***/ }),
-/* 341 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/**
- * Copyright 2014-2015, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- */
-
-
-
-/**
- * Forked from fbjs/warning:
- * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
- *
- * Only change is we use console.warn instead of console.error,
- * and do nothing when 'console' is not supported.
- * This really simplifies the code.
- * ---
- * Similar to invariant but only logs a warning if the condition is not met.
- * This can be used to log issues in development environments in critical
- * paths. Removing the logging code for production environments will keep the
- * same logic and follow the same code paths.
- */
-
-var lowPriorityWarning = function () {};
-
-if (false) {
- var printWarning = function (format) {
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- if (typeof console !== 'undefined') {
- console.warn(message);
- }
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- throw new Error(message);
- } catch (x) {}
- };
-
- lowPriorityWarning = function (condition, format) {
- if (format === undefined) {
- throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
- }
- if (!condition) {
- for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
- args[_key2 - 2] = arguments[_key2];
- }
-
- printWarning.apply(undefined, [format].concat(args));
- }
- };
-}
-
-module.exports = lowPriorityWarning;
-
/***/ }),
-/* 342 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- */
-
-
-
-var PooledClass = __webpack_require__(343);
-var ReactElement = __webpack_require__(66);
-
-var emptyFunction = __webpack_require__(24);
-var traverseAllChildren = __webpack_require__(344);
-
-var twoArgumentPooler = PooledClass.twoArgumentPooler;
-var fourArgumentPooler = PooledClass.fourArgumentPooler;
-
-var userProvidedKeyEscapeRegex = /\/+/g;
-function escapeUserProvidedKey(text) {
- return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
-}
-
-/**
- * PooledClass representing the bookkeeping associated with performing a child
- * traversal. Allows avoiding binding callbacks.
- *
- * @constructor ForEachBookKeeping
- * @param {!function} forEachFunction Function to perform traversal with.
- * @param {?*} forEachContext Context to perform context with.
- */
-function ForEachBookKeeping(forEachFunction, forEachContext) {
- this.func = forEachFunction;
- this.context = forEachContext;
- this.count = 0;
-}
-ForEachBookKeeping.prototype.destructor = function () {
- this.func = null;
- this.context = null;
- this.count = 0;
-};
-PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
-
-function forEachSingleChild(bookKeeping, child, name) {
- var func = bookKeeping.func,
- context = bookKeeping.context;
-
- func.call(context, child, bookKeeping.count++);
-}
-
-/**
- * Iterates through children that are typically specified as `props.children`.
- *
- * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach
- *
- * The provided forEachFunc(child, index) will be called for each
- * leaf child.
- *
- * @param {?*} children Children tree container.
- * @param {function(*, int)} forEachFunc
- * @param {*} forEachContext Context for forEachContext.
- */
-function forEachChildren(children, forEachFunc, forEachContext) {
- if (children == null) {
- return children;
- }
- var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
- traverseAllChildren(children, forEachSingleChild, traverseContext);
- ForEachBookKeeping.release(traverseContext);
-}
-
-/**
- * PooledClass representing the bookkeeping associated with performing a child
- * mapping. Allows avoiding binding callbacks.
- *
- * @constructor MapBookKeeping
- * @param {!*} mapResult Object containing the ordered map of results.
- * @param {!function} mapFunction Function to perform mapping with.
- * @param {?*} mapContext Context to perform mapping with.
- */
-function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
- this.result = mapResult;
- this.keyPrefix = keyPrefix;
- this.func = mapFunction;
- this.context = mapContext;
- this.count = 0;
-}
-MapBookKeeping.prototype.destructor = function () {
- this.result = null;
- this.keyPrefix = null;
- this.func = null;
- this.context = null;
- this.count = 0;
-};
-PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
-
-function mapSingleChildIntoContext(bookKeeping, child, childKey) {
- var result = bookKeeping.result,
- keyPrefix = bookKeeping.keyPrefix,
- func = bookKeeping.func,
- context = bookKeeping.context;
-
-
- var mappedChild = func.call(context, child, bookKeeping.count++);
- if (Array.isArray(mappedChild)) {
- mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
- } else if (mappedChild != null) {
- if (ReactElement.isValidElement(mappedChild)) {
- mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
- // Keep both the (mapped) and old keys if they differ, just as
- // traverseAllChildren used to do for objects as children
- keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
- }
- result.push(mappedChild);
- }
-}
-
-function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
- var escapedPrefix = '';
- if (prefix != null) {
- escapedPrefix = escapeUserProvidedKey(prefix) + '/';
- }
- var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
- traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
- MapBookKeeping.release(traverseContext);
-}
-
-/**
- * Maps children that are typically specified as `props.children`.
- *
- * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map
- *
- * The provided mapFunction(child, key, index) will be called for each
- * leaf child.
- *
- * @param {?*} children Children tree container.
- * @param {function(*, int)} func The map function.
- * @param {*} context Context for mapFunction.
- * @return {object} Object containing the ordered map of results.
- */
-function mapChildren(children, func, context) {
- if (children == null) {
- return children;
- }
- var result = [];
- mapIntoWithKeyPrefixInternal(children, result, null, func, context);
- return result;
-}
+/* 351 */
+/***/ (function(module, exports, __webpack_require__) {
-function forEachSingleChildDummy(traverseContext, child, name) {
- return null;
-}
+var toInteger = __webpack_require__(141)
+ , max = Math.max
+ , min = Math.min;
+module.exports = function(index, length){
+ index = toInteger(index);
+ return index < 0 ? max(index + length, 0) : min(index, length);
+};
+
+/***/ }),
+/* 352 */
+/***/ (function(module, exports, __webpack_require__) {
+"use strict";
/**
- * Count the number of children that are typically specified as
- * `props.children`.
+ * Copyright 2014-2015, Facebook, Inc.
+ * All rights reserved.
*
- * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
*
- * @param {?*} children Children tree container.
- * @return {number} The number of children.
*/
-function countChildren(children, context) {
- return traverseAllChildren(children, forEachSingleChildDummy, null);
-}
+
+
/**
- * Flatten a children object (typically specified as `props.children`) and
- * return an array with appropriately re-keyed children.
+ * Forked from fbjs/warning:
+ * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
*
- * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray
+ * Only change is we use console.warn instead of console.error,
+ * and do nothing when 'console' is not supported.
+ * This really simplifies the code.
+ * ---
+ * Similar to invariant but only logs a warning if the condition is not met.
+ * This can be used to log issues in development environments in critical
+ * paths. Removing the logging code for production environments will keep the
+ * same logic and follow the same code paths.
*/
-function toArray(children) {
- var result = [];
- mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
- return result;
-}
-var ReactChildren = {
- forEach: forEachChildren,
- map: mapChildren,
- mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
- count: countChildren,
- toArray: toArray
-};
+var lowPriorityWarning = function () {};
-module.exports = ReactChildren;
+if (false) {
+ var printWarning = function (format) {
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+
+ var argIndex = 0;
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
+ return args[argIndex++];
+ });
+ if (typeof console !== 'undefined') {
+ console.warn(message);
+ }
+ try {
+ // --- Welcome to debugging React ---
+ // This error was thrown as a convenience so that you can use this stack
+ // to find the callsite that caused this warning to fire.
+ throw new Error(message);
+ } catch (x) {}
+ };
+
+ lowPriorityWarning = function (condition, format) {
+ if (format === undefined) {
+ throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
+ }
+ if (!condition) {
+ for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
+ args[_key2 - 2] = arguments[_key2];
+ }
+
+ printWarning.apply(undefined, [format].concat(args));
+ }
+ };
+}
+
+module.exports = lowPriorityWarning;
/***/ }),
-/* 343 */
+/* 353 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -25899,7 +27155,7 @@ module.exports = ReactChildren;
-var _prodInvariant = __webpack_require__(85);
+var _prodInvariant = __webpack_require__(71);
var invariant = __webpack_require__(9);
@@ -25999,7 +27255,227 @@ var PooledClass = {
module.exports = PooledClass;
/***/ }),
-/* 344 */
+/* 354 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
+
+
+
+/* global Symbol */
+
+var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
+var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
+
+/**
+ * Returns the iterator method function contained on the iterable object.
+ *
+ * Be sure to invoke the function with the iterable as context:
+ *
+ * var iteratorFn = getIteratorFn(myIterable);
+ * if (iteratorFn) {
+ * var iterator = iteratorFn.call(myIterable);
+ * ...
+ * }
+ *
+ * @param {?object} maybeIterable
+ * @return {?function}
+ */
+function getIteratorFn(maybeIterable) {
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
+ if (typeof iteratorFn === 'function') {
+ return iteratorFn;
+ }
+}
+
+module.exports = getIteratorFn;
+
+/***/ }),
+/* 355 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var ReactElement = __webpack_require__(57);
+
+/**
+ * Create a factory that creates HTML tag elements.
+ *
+ * @private
+ */
+var createDOMFactory = ReactElement.createFactory;
+if (false) {
+ var ReactElementValidator = require('./ReactElementValidator');
+ createDOMFactory = ReactElementValidator.createFactory;
+}
+
+/**
+ * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
+ *
+ * @public
+ */
+var ReactDOMFactories = {
+ a: createDOMFactory('a'),
+ abbr: createDOMFactory('abbr'),
+ address: createDOMFactory('address'),
+ area: createDOMFactory('area'),
+ article: createDOMFactory('article'),
+ aside: createDOMFactory('aside'),
+ audio: createDOMFactory('audio'),
+ b: createDOMFactory('b'),
+ base: createDOMFactory('base'),
+ bdi: createDOMFactory('bdi'),
+ bdo: createDOMFactory('bdo'),
+ big: createDOMFactory('big'),
+ blockquote: createDOMFactory('blockquote'),
+ body: createDOMFactory('body'),
+ br: createDOMFactory('br'),
+ button: createDOMFactory('button'),
+ canvas: createDOMFactory('canvas'),
+ caption: createDOMFactory('caption'),
+ cite: createDOMFactory('cite'),
+ code: createDOMFactory('code'),
+ col: createDOMFactory('col'),
+ colgroup: createDOMFactory('colgroup'),
+ data: createDOMFactory('data'),
+ datalist: createDOMFactory('datalist'),
+ dd: createDOMFactory('dd'),
+ del: createDOMFactory('del'),
+ details: createDOMFactory('details'),
+ dfn: createDOMFactory('dfn'),
+ dialog: createDOMFactory('dialog'),
+ div: createDOMFactory('div'),
+ dl: createDOMFactory('dl'),
+ dt: createDOMFactory('dt'),
+ em: createDOMFactory('em'),
+ embed: createDOMFactory('embed'),
+ fieldset: createDOMFactory('fieldset'),
+ figcaption: createDOMFactory('figcaption'),
+ figure: createDOMFactory('figure'),
+ footer: createDOMFactory('footer'),
+ form: createDOMFactory('form'),
+ h1: createDOMFactory('h1'),
+ h2: createDOMFactory('h2'),
+ h3: createDOMFactory('h3'),
+ h4: createDOMFactory('h4'),
+ h5: createDOMFactory('h5'),
+ h6: createDOMFactory('h6'),
+ head: createDOMFactory('head'),
+ header: createDOMFactory('header'),
+ hgroup: createDOMFactory('hgroup'),
+ hr: createDOMFactory('hr'),
+ html: createDOMFactory('html'),
+ i: createDOMFactory('i'),
+ iframe: createDOMFactory('iframe'),
+ img: createDOMFactory('img'),
+ input: createDOMFactory('input'),
+ ins: createDOMFactory('ins'),
+ kbd: createDOMFactory('kbd'),
+ keygen: createDOMFactory('keygen'),
+ label: createDOMFactory('label'),
+ legend: createDOMFactory('legend'),
+ li: createDOMFactory('li'),
+ link: createDOMFactory('link'),
+ main: createDOMFactory('main'),
+ map: createDOMFactory('map'),
+ mark: createDOMFactory('mark'),
+ menu: createDOMFactory('menu'),
+ menuitem: createDOMFactory('menuitem'),
+ meta: createDOMFactory('meta'),
+ meter: createDOMFactory('meter'),
+ nav: createDOMFactory('nav'),
+ noscript: createDOMFactory('noscript'),
+ object: createDOMFactory('object'),
+ ol: createDOMFactory('ol'),
+ optgroup: createDOMFactory('optgroup'),
+ option: createDOMFactory('option'),
+ output: createDOMFactory('output'),
+ p: createDOMFactory('p'),
+ param: createDOMFactory('param'),
+ picture: createDOMFactory('picture'),
+ pre: createDOMFactory('pre'),
+ progress: createDOMFactory('progress'),
+ q: createDOMFactory('q'),
+ rp: createDOMFactory('rp'),
+ rt: createDOMFactory('rt'),
+ ruby: createDOMFactory('ruby'),
+ s: createDOMFactory('s'),
+ samp: createDOMFactory('samp'),
+ script: createDOMFactory('script'),
+ section: createDOMFactory('section'),
+ select: createDOMFactory('select'),
+ small: createDOMFactory('small'),
+ source: createDOMFactory('source'),
+ span: createDOMFactory('span'),
+ strong: createDOMFactory('strong'),
+ style: createDOMFactory('style'),
+ sub: createDOMFactory('sub'),
+ summary: createDOMFactory('summary'),
+ sup: createDOMFactory('sup'),
+ table: createDOMFactory('table'),
+ tbody: createDOMFactory('tbody'),
+ td: createDOMFactory('td'),
+ textarea: createDOMFactory('textarea'),
+ tfoot: createDOMFactory('tfoot'),
+ th: createDOMFactory('th'),
+ thead: createDOMFactory('thead'),
+ time: createDOMFactory('time'),
+ title: createDOMFactory('title'),
+ tr: createDOMFactory('tr'),
+ track: createDOMFactory('track'),
+ u: createDOMFactory('u'),
+ ul: createDOMFactory('ul'),
+ 'var': createDOMFactory('var'),
+ video: createDOMFactory('video'),
+ wbr: createDOMFactory('wbr'),
+
+ // SVG
+ circle: createDOMFactory('circle'),
+ clipPath: createDOMFactory('clipPath'),
+ defs: createDOMFactory('defs'),
+ ellipse: createDOMFactory('ellipse'),
+ g: createDOMFactory('g'),
+ image: createDOMFactory('image'),
+ line: createDOMFactory('line'),
+ linearGradient: createDOMFactory('linearGradient'),
+ mask: createDOMFactory('mask'),
+ path: createDOMFactory('path'),
+ pattern: createDOMFactory('pattern'),
+ polygon: createDOMFactory('polygon'),
+ polyline: createDOMFactory('polyline'),
+ radialGradient: createDOMFactory('radialGradient'),
+ rect: createDOMFactory('rect'),
+ stop: createDOMFactory('stop'),
+ svg: createDOMFactory('svg'),
+ text: createDOMFactory('text'),
+ tspan: createDOMFactory('tspan')
+};
+
+module.exports = ReactDOMFactories;
+
+/***/ }),
+/* 356 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -26015,218 +27491,534 @@ module.exports = PooledClass;
-var _prodInvariant = __webpack_require__(85);
+var _require = __webpack_require__(57),
+ isValidElement = _require.isValidElement;
+
+var factory = __webpack_require__(223);
+
+module.exports = factory(isValidElement);
+
+/***/ }),
+/* 357 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
+
+
+
+var emptyFunction = __webpack_require__(22);
+var invariant = __webpack_require__(9);
+var warning = __webpack_require__(11);
+
+var ReactPropTypesSecret = __webpack_require__(224);
+var checkPropTypes = __webpack_require__(358);
+
+module.exports = function(isValidElement, throwOnDirectAccess) {
+ /* global Symbol */
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
+
+ /**
+ * Returns the iterator method function contained on the iterable object.
+ *
+ * Be sure to invoke the function with the iterable as context:
+ *
+ * var iteratorFn = getIteratorFn(myIterable);
+ * if (iteratorFn) {
+ * var iterator = iteratorFn.call(myIterable);
+ * ...
+ * }
+ *
+ * @param {?object} maybeIterable
+ * @return {?function}
+ */
+ function getIteratorFn(maybeIterable) {
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
+ if (typeof iteratorFn === 'function') {
+ return iteratorFn;
+ }
+ }
+
+ /**
+ * Collection of methods that allow declaration and validation of props that are
+ * supplied to React components. Example usage:
+ *
+ * var Props = require('ReactPropTypes');
+ * var MyArticle = React.createClass({
+ * propTypes: {
+ * // An optional string prop named "description".
+ * description: Props.string,
+ *
+ * // A required enum prop named "category".
+ * category: Props.oneOf(['News','Photos']).isRequired,
+ *
+ * // A prop named "dialog" that requires an instance of Dialog.
+ * dialog: Props.instanceOf(Dialog).isRequired
+ * },
+ * render: function() { ... }
+ * });
+ *
+ * A more formal specification of how these methods are used:
+ *
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
+ * decl := ReactPropTypes.{type}(.isRequired)?
+ *
+ * Each and every declaration produces a function with the same signature. This
+ * allows the creation of custom validation functions. For example:
+ *
+ * var MyLink = React.createClass({
+ * propTypes: {
+ * // An optional string or URI prop named "href".
+ * href: function(props, propName, componentName) {
+ * var propValue = props[propName];
+ * if (propValue != null && typeof propValue !== 'string' &&
+ * !(propValue instanceof URI)) {
+ * return new Error(
+ * 'Expected a string or an URI for ' + propName + ' in ' +
+ * componentName
+ * );
+ * }
+ * }
+ * },
+ * render: function() {...}
+ * });
+ *
+ * @internal
+ */
+
+ var ANONYMOUS = '<>';
+
+ // Important!
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
+ var ReactPropTypes = {
+ array: createPrimitiveTypeChecker('array'),
+ bool: createPrimitiveTypeChecker('boolean'),
+ func: createPrimitiveTypeChecker('function'),
+ number: createPrimitiveTypeChecker('number'),
+ object: createPrimitiveTypeChecker('object'),
+ string: createPrimitiveTypeChecker('string'),
+ symbol: createPrimitiveTypeChecker('symbol'),
+
+ any: createAnyTypeChecker(),
+ arrayOf: createArrayOfTypeChecker,
+ element: createElementTypeChecker(),
+ instanceOf: createInstanceTypeChecker,
+ node: createNodeChecker(),
+ objectOf: createObjectOfTypeChecker,
+ oneOf: createEnumTypeChecker,
+ oneOfType: createUnionTypeChecker,
+ shape: createShapeTypeChecker
+ };
+
+ /**
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
+ */
+ /*eslint-disable no-self-compare*/
+ function is(x, y) {
+ // SameValue algorithm
+ if (x === y) {
+ // Steps 1-5, 7-10
+ // Steps 6.b-6.e: +0 != -0
+ return x !== 0 || 1 / x === 1 / y;
+ } else {
+ // Step 6.a: NaN == NaN
+ return x !== x && y !== y;
+ }
+ }
+ /*eslint-enable no-self-compare*/
+
+ /**
+ * We use an Error-like object for backward compatibility as people may call
+ * PropTypes directly and inspect their output. However, we don't use real
+ * Errors anymore. We don't inspect their stack anyway, and creating them
+ * is prohibitively expensive if they are created too often, such as what
+ * happens in oneOfType() for any type before the one that matched.
+ */
+ function PropTypeError(message) {
+ this.message = message;
+ this.stack = '';
+ }
+ // Make `instanceof Error` still work for returned errors.
+ PropTypeError.prototype = Error.prototype;
+
+ function createChainableTypeChecker(validate) {
+ if (false) {
+ var manualPropTypeCallCache = {};
+ var manualPropTypeWarningCount = 0;
+ }
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
+ componentName = componentName || ANONYMOUS;
+ propFullName = propFullName || propName;
+
+ if (secret !== ReactPropTypesSecret) {
+ if (throwOnDirectAccess) {
+ // New behavior only for users of `prop-types` package
+ invariant(
+ false,
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
+ 'Use `PropTypes.checkPropTypes()` to call them. ' +
+ 'Read more at http://fb.me/use-check-prop-types'
+ );
+ } else if (false) {
+ // Old behavior for people using React.PropTypes
+ var cacheKey = componentName + ':' + propName;
+ if (
+ !manualPropTypeCallCache[cacheKey] &&
+ // Avoid spamming the console because they are often not actionable except for lib authors
+ manualPropTypeWarningCount < 3
+ ) {
+ warning(
+ false,
+ 'You are manually calling a React.PropTypes validation ' +
+ 'function for the `%s` prop on `%s`. This is deprecated ' +
+ 'and will throw in the standalone `prop-types` package. ' +
+ 'You may be seeing this warning due to a third-party PropTypes ' +
+ 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
+ propFullName,
+ componentName
+ );
+ manualPropTypeCallCache[cacheKey] = true;
+ manualPropTypeWarningCount++;
+ }
+ }
+ }
+ if (props[propName] == null) {
+ if (isRequired) {
+ if (props[propName] === null) {
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
+ }
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
+ }
+ return null;
+ } else {
+ return validate(props, propName, componentName, location, propFullName);
+ }
+ }
+
+ var chainedCheckType = checkType.bind(null, false);
+ chainedCheckType.isRequired = checkType.bind(null, true);
-var ReactCurrentOwner = __webpack_require__(37);
-var REACT_ELEMENT_TYPE = __webpack_require__(212);
+ return chainedCheckType;
+ }
-var getIteratorFn = __webpack_require__(345);
-var invariant = __webpack_require__(9);
-var KeyEscapeUtils = __webpack_require__(346);
-var warning = __webpack_require__(12);
+ function createPrimitiveTypeChecker(expectedType) {
+ function validate(props, propName, componentName, location, propFullName, secret) {
+ var propValue = props[propName];
+ var propType = getPropType(propValue);
+ if (propType !== expectedType) {
+ // `propValue` being instance of, say, date/regexp, pass the 'object'
+ // check, but we can offer a more precise error message here rather than
+ // 'of type `object`'.
+ var preciseType = getPreciseType(propValue);
-var SEPARATOR = '.';
-var SUBSEPARATOR = ':';
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
+ }
-/**
- * This is inlined from ReactElement since this file is shared between
- * isomorphic and renderers. We could extract this to a
- *
- */
+ function createAnyTypeChecker() {
+ return createChainableTypeChecker(emptyFunction.thatReturnsNull);
+ }
-/**
- * TODO: Test that a single child and an array with one item have the same key
- * pattern.
- */
+ function createArrayOfTypeChecker(typeChecker) {
+ function validate(props, propName, componentName, location, propFullName) {
+ if (typeof typeChecker !== 'function') {
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
+ }
+ var propValue = props[propName];
+ if (!Array.isArray(propValue)) {
+ var propType = getPropType(propValue);
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
+ }
+ for (var i = 0; i < propValue.length; i++) {
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
+ if (error instanceof Error) {
+ return error;
+ }
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
+ }
-var didWarnAboutMaps = false;
+ function createElementTypeChecker() {
+ function validate(props, propName, componentName, location, propFullName) {
+ var propValue = props[propName];
+ if (!isValidElement(propValue)) {
+ var propType = getPropType(propValue);
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
+ }
-/**
- * Generate a key string that identifies a component within a set.
- *
- * @param {*} component A component that could contain a manual key.
- * @param {number} index Index that is used if a manual key is not provided.
- * @return {string}
- */
-function getComponentKey(component, index) {
- // Do some typechecking here since we call this blindly. We want to ensure
- // that we don't block potential future ES APIs.
- if (component && typeof component === 'object' && component.key != null) {
- // Explicit key
- return KeyEscapeUtils.escape(component.key);
+ function createInstanceTypeChecker(expectedClass) {
+ function validate(props, propName, componentName, location, propFullName) {
+ if (!(props[propName] instanceof expectedClass)) {
+ var expectedClassName = expectedClass.name || ANONYMOUS;
+ var actualClassName = getClassName(props[propName]);
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
}
- // Implicit key determined by the index in the set
- return index.toString(36);
-}
-/**
- * @param {?*} children Children tree container.
- * @param {!string} nameSoFar Name of the key path so far.
- * @param {!function} callback Callback to invoke with each child found.
- * @param {?*} traverseContext Used to pass information throughout the traversal
- * process.
- * @return {!number} The number of children in this subtree.
- */
-function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
- var type = typeof children;
+ function createEnumTypeChecker(expectedValues) {
+ if (!Array.isArray(expectedValues)) {
+ false ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
+ return emptyFunction.thatReturnsNull;
+ }
- if (type === 'undefined' || type === 'boolean') {
- // All of the above are perceived as null.
- children = null;
+ function validate(props, propName, componentName, location, propFullName) {
+ var propValue = props[propName];
+ for (var i = 0; i < expectedValues.length; i++) {
+ if (is(propValue, expectedValues[i])) {
+ return null;
+ }
+ }
+
+ var valuesString = JSON.stringify(expectedValues);
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
+ }
+ return createChainableTypeChecker(validate);
}
- if (children === null || type === 'string' || type === 'number' ||
- // The following is inlined from ReactElement. This means we can optimize
- // some checks. React Fiber also inlines this logic for similar purposes.
- type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
- callback(traverseContext, children,
- // If it's the only child, treat the name as if it was wrapped in an array
- // so that it's consistent if the number of children grows.
- nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
- return 1;
+ function createObjectOfTypeChecker(typeChecker) {
+ function validate(props, propName, componentName, location, propFullName) {
+ if (typeof typeChecker !== 'function') {
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
+ }
+ var propValue = props[propName];
+ var propType = getPropType(propValue);
+ if (propType !== 'object') {
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
+ }
+ for (var key in propValue) {
+ if (propValue.hasOwnProperty(key)) {
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
+ if (error instanceof Error) {
+ return error;
+ }
+ }
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
}
- var child;
- var nextName;
- var subtreeCount = 0; // Count of children found in the current subtree.
- var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
+ if (!Array.isArray(arrayOfTypeCheckers)) {
+ false ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
+ return emptyFunction.thatReturnsNull;
+ }
- if (Array.isArray(children)) {
- for (var i = 0; i < children.length; i++) {
- child = children[i];
- nextName = nextNamePrefix + getComponentKey(child, i);
- subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
+ var checker = arrayOfTypeCheckers[i];
+ if (typeof checker !== 'function') {
+ warning(
+ false,
+ 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +
+ 'received %s at index %s.',
+ getPostfixForTypeWarning(checker),
+ i
+ );
+ return emptyFunction.thatReturnsNull;
+ }
}
- } else {
- var iteratorFn = getIteratorFn(children);
- if (iteratorFn) {
- var iterator = iteratorFn.call(children);
- var step;
- if (iteratorFn !== children.entries) {
- var ii = 0;
- while (!(step = iterator.next()).done) {
- child = step.value;
- nextName = nextNamePrefix + getComponentKey(child, ii++);
- subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
- }
- } else {
- if (false) {
- var mapsAsChildrenAddendum = '';
- if (ReactCurrentOwner.current) {
- var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
- if (mapsAsChildrenOwnerName) {
- mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
- }
- }
- process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
- didWarnAboutMaps = true;
- }
- // Iterator will provide entry [k,v] tuples rather than values.
- while (!(step = iterator.next()).done) {
- var entry = step.value;
- if (entry) {
- child = entry[1];
- nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
- subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
- }
+
+ function validate(props, propName, componentName, location, propFullName) {
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
+ var checker = arrayOfTypeCheckers[i];
+ if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
+ return null;
}
}
- } else if (type === 'object') {
- var addendum = '';
- if (false) {
- addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
- if (children._isReactElement) {
- addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.';
+
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
+ }
+ return createChainableTypeChecker(validate);
+ }
+
+ function createNodeChecker() {
+ function validate(props, propName, componentName, location, propFullName) {
+ if (!isNode(props[propName])) {
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
+ }
+
+ function createShapeTypeChecker(shapeTypes) {
+ function validate(props, propName, componentName, location, propFullName) {
+ var propValue = props[propName];
+ var propType = getPropType(propValue);
+ if (propType !== 'object') {
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
+ }
+ for (var key in shapeTypes) {
+ var checker = shapeTypes[key];
+ if (!checker) {
+ continue;
}
- if (ReactCurrentOwner.current) {
- var name = ReactCurrentOwner.current.getName();
- if (name) {
- addendum += ' Check the render method of `' + name + '`.';
- }
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
+ if (error) {
+ return error;
}
}
- var childrenString = String(children);
- true ? false ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
+ return null;
}
+ return createChainableTypeChecker(validate);
}
- return subtreeCount;
-}
+ function isNode(propValue) {
+ switch (typeof propValue) {
+ case 'number':
+ case 'string':
+ case 'undefined':
+ return true;
+ case 'boolean':
+ return !propValue;
+ case 'object':
+ if (Array.isArray(propValue)) {
+ return propValue.every(isNode);
+ }
+ if (propValue === null || isValidElement(propValue)) {
+ return true;
+ }
-/**
- * Traverses children that are typically specified as `props.children`, but
- * might also be specified through attributes:
- *
- * - `traverseAllChildren(this.props.children, ...)`
- * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
- *
- * The `traverseContext` is an optional argument that is passed through the
- * entire traversal. It can be used to store accumulations or anything else that
- * the callback might find relevant.
- *
- * @param {?*} children Children tree object.
- * @param {!function} callback To invoke upon traversing each child.
- * @param {?*} traverseContext Context for traversal.
- * @return {!number} The number of children in this subtree.
- */
-function traverseAllChildren(children, callback, traverseContext) {
- if (children == null) {
- return 0;
- }
+ var iteratorFn = getIteratorFn(propValue);
+ if (iteratorFn) {
+ var iterator = iteratorFn.call(propValue);
+ var step;
+ if (iteratorFn !== propValue.entries) {
+ while (!(step = iterator.next()).done) {
+ if (!isNode(step.value)) {
+ return false;
+ }
+ }
+ } else {
+ // Iterator will provide entry [k,v] tuples rather than values.
+ while (!(step = iterator.next()).done) {
+ var entry = step.value;
+ if (entry) {
+ if (!isNode(entry[1])) {
+ return false;
+ }
+ }
+ }
+ }
+ } else {
+ return false;
+ }
- return traverseAllChildrenImpl(children, '', callback, traverseContext);
-}
+ return true;
+ default:
+ return false;
+ }
+ }
-module.exports = traverseAllChildren;
+ function isSymbol(propType, propValue) {
+ // Native Symbol.
+ if (propType === 'symbol') {
+ return true;
+ }
-/***/ }),
-/* 345 */
-/***/ (function(module, exports, __webpack_require__) {
+ // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
+ if (propValue['@@toStringTag'] === 'Symbol') {
+ return true;
+ }
-"use strict";
-/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- *
- */
+ // Fallback for non-spec compliant Symbols which are polyfilled.
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
+ return true;
+ }
+ return false;
+ }
+ // Equivalent of `typeof` but with special handling for array and regexp.
+ function getPropType(propValue) {
+ var propType = typeof propValue;
+ if (Array.isArray(propValue)) {
+ return 'array';
+ }
+ if (propValue instanceof RegExp) {
+ // Old webkits (at least until Android 4.0) return 'function' rather than
+ // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
+ // passes PropTypes.object.
+ return 'object';
+ }
+ if (isSymbol(propType, propValue)) {
+ return 'symbol';
+ }
+ return propType;
+ }
-/* global Symbol */
+ // This handles more types than `getPropType`. Only used for error messages.
+ // See `createPrimitiveTypeChecker`.
+ function getPreciseType(propValue) {
+ if (typeof propValue === 'undefined' || propValue === null) {
+ return '' + propValue;
+ }
+ var propType = getPropType(propValue);
+ if (propType === 'object') {
+ if (propValue instanceof Date) {
+ return 'date';
+ } else if (propValue instanceof RegExp) {
+ return 'regexp';
+ }
+ }
+ return propType;
+ }
-var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
-var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
+ // Returns a string that is postfixed to a warning about an invalid type.
+ // For example, "undefined" or "of type array"
+ function getPostfixForTypeWarning(value) {
+ var type = getPreciseType(value);
+ switch (type) {
+ case 'array':
+ case 'object':
+ return 'an ' + type;
+ case 'boolean':
+ case 'date':
+ case 'regexp':
+ return 'a ' + type;
+ default:
+ return type;
+ }
+ }
-/**
- * Returns the iterator method function contained on the iterable object.
- *
- * Be sure to invoke the function with the iterable as context:
- *
- * var iteratorFn = getIteratorFn(myIterable);
- * if (iteratorFn) {
- * var iterator = iteratorFn.call(myIterable);
- * ...
- * }
- *
- * @param {?object} maybeIterable
- * @return {?function}
- */
-function getIteratorFn(maybeIterable) {
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
- if (typeof iteratorFn === 'function') {
- return iteratorFn;
+ // Returns class name of the object, if any.
+ function getClassName(propValue) {
+ if (!propValue.constructor || !propValue.constructor.name) {
+ return ANONYMOUS;
+ }
+ return propValue.constructor.name;
}
-}
-module.exports = getIteratorFn;
+ ReactPropTypes.checkPropTypes = checkPropTypes;
+ ReactPropTypes.PropTypes = ReactPropTypes;
+
+ return ReactPropTypes;
+};
+
/***/ }),
-/* 346 */
+/* 358 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -26237,60 +28029,64 @@ module.exports = getIteratorFn;
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
- *
- *
*/
-/**
- * Escape and wrap key so it is safe to use as a reactid
- *
- * @param {string} key to be escaped.
- * @return {string} the escaped key.
- */
-
-function escape(key) {
- var escapeRegex = /[=:]/g;
- var escaperLookup = {
- '=': '=0',
- ':': '=2'
- };
- var escapedString = ('' + key).replace(escapeRegex, function (match) {
- return escaperLookup[match];
- });
-
- return '$' + escapedString;
+if (false) {
+ var invariant = require('fbjs/lib/invariant');
+ var warning = require('fbjs/lib/warning');
+ var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
+ var loggedTypeFailures = {};
}
/**
- * Unescape and unwrap key for human-readable display
+ * Assert that the values match with the type specs.
+ * Error messages are memorized and will only be shown once.
*
- * @param {string} key to unescape.
- * @return {string} the unescaped key.
+ * @param {object} typeSpecs Map of name to a ReactPropType
+ * @param {object} values Runtime values that need to be type-checked
+ * @param {string} location e.g. "prop", "context", "child context"
+ * @param {string} componentName Name of the component for error messages.
+ * @param {?Function} getStack Returns the component stack.
+ * @private
*/
-function unescape(key) {
- var unescapeRegex = /(=0|=2)/g;
- var unescaperLookup = {
- '=0': '=',
- '=2': ':'
- };
- var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
+function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
+ if (false) {
+ for (var typeSpecName in typeSpecs) {
+ if (typeSpecs.hasOwnProperty(typeSpecName)) {
+ var error;
+ // Prop type validation may throw. In case they do, we don't want to
+ // fail the render phase where it didn't fail before. So we log it.
+ // After these have been cleaned up, we'll let them throw.
+ try {
+ // This is intentionally an invariant that gets caught. It's the same
+ // behavior as without this statement except with a better message.
+ invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
+ } catch (ex) {
+ error = ex;
+ }
+ warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
+ // Only monitor this failure once because there tends to be a lot of the
+ // same error.
+ loggedTypeFailures[error.message] = true;
- return ('' + keySubstring).replace(unescapeRegex, function (match) {
- return unescaperLookup[match];
- });
+ var stack = getStack ? getStack() : '';
+
+ warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
+ }
+ }
+ }
+ }
}
-var KeyEscapeUtils = {
- escape: escape,
- unescape: unescape
-};
+module.exports = checkPropTypes;
-module.exports = KeyEscapeUtils;
/***/ }),
-/* 347 */
+/* 359 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -26306,165 +28102,10 @@ module.exports = KeyEscapeUtils;
-var ReactElement = __webpack_require__(66);
-
-/**
- * Create a factory that creates HTML tag elements.
- *
- * @private
- */
-var createDOMFactory = ReactElement.createFactory;
-if (false) {
- var ReactElementValidator = require('./ReactElementValidator');
- createDOMFactory = ReactElementValidator.createFactory;
-}
-
-/**
- * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
- *
- * @public
- */
-var ReactDOMFactories = {
- a: createDOMFactory('a'),
- abbr: createDOMFactory('abbr'),
- address: createDOMFactory('address'),
- area: createDOMFactory('area'),
- article: createDOMFactory('article'),
- aside: createDOMFactory('aside'),
- audio: createDOMFactory('audio'),
- b: createDOMFactory('b'),
- base: createDOMFactory('base'),
- bdi: createDOMFactory('bdi'),
- bdo: createDOMFactory('bdo'),
- big: createDOMFactory('big'),
- blockquote: createDOMFactory('blockquote'),
- body: createDOMFactory('body'),
- br: createDOMFactory('br'),
- button: createDOMFactory('button'),
- canvas: createDOMFactory('canvas'),
- caption: createDOMFactory('caption'),
- cite: createDOMFactory('cite'),
- code: createDOMFactory('code'),
- col: createDOMFactory('col'),
- colgroup: createDOMFactory('colgroup'),
- data: createDOMFactory('data'),
- datalist: createDOMFactory('datalist'),
- dd: createDOMFactory('dd'),
- del: createDOMFactory('del'),
- details: createDOMFactory('details'),
- dfn: createDOMFactory('dfn'),
- dialog: createDOMFactory('dialog'),
- div: createDOMFactory('div'),
- dl: createDOMFactory('dl'),
- dt: createDOMFactory('dt'),
- em: createDOMFactory('em'),
- embed: createDOMFactory('embed'),
- fieldset: createDOMFactory('fieldset'),
- figcaption: createDOMFactory('figcaption'),
- figure: createDOMFactory('figure'),
- footer: createDOMFactory('footer'),
- form: createDOMFactory('form'),
- h1: createDOMFactory('h1'),
- h2: createDOMFactory('h2'),
- h3: createDOMFactory('h3'),
- h4: createDOMFactory('h4'),
- h5: createDOMFactory('h5'),
- h6: createDOMFactory('h6'),
- head: createDOMFactory('head'),
- header: createDOMFactory('header'),
- hgroup: createDOMFactory('hgroup'),
- hr: createDOMFactory('hr'),
- html: createDOMFactory('html'),
- i: createDOMFactory('i'),
- iframe: createDOMFactory('iframe'),
- img: createDOMFactory('img'),
- input: createDOMFactory('input'),
- ins: createDOMFactory('ins'),
- kbd: createDOMFactory('kbd'),
- keygen: createDOMFactory('keygen'),
- label: createDOMFactory('label'),
- legend: createDOMFactory('legend'),
- li: createDOMFactory('li'),
- link: createDOMFactory('link'),
- main: createDOMFactory('main'),
- map: createDOMFactory('map'),
- mark: createDOMFactory('mark'),
- menu: createDOMFactory('menu'),
- menuitem: createDOMFactory('menuitem'),
- meta: createDOMFactory('meta'),
- meter: createDOMFactory('meter'),
- nav: createDOMFactory('nav'),
- noscript: createDOMFactory('noscript'),
- object: createDOMFactory('object'),
- ol: createDOMFactory('ol'),
- optgroup: createDOMFactory('optgroup'),
- option: createDOMFactory('option'),
- output: createDOMFactory('output'),
- p: createDOMFactory('p'),
- param: createDOMFactory('param'),
- picture: createDOMFactory('picture'),
- pre: createDOMFactory('pre'),
- progress: createDOMFactory('progress'),
- q: createDOMFactory('q'),
- rp: createDOMFactory('rp'),
- rt: createDOMFactory('rt'),
- ruby: createDOMFactory('ruby'),
- s: createDOMFactory('s'),
- samp: createDOMFactory('samp'),
- script: createDOMFactory('script'),
- section: createDOMFactory('section'),
- select: createDOMFactory('select'),
- small: createDOMFactory('small'),
- source: createDOMFactory('source'),
- span: createDOMFactory('span'),
- strong: createDOMFactory('strong'),
- style: createDOMFactory('style'),
- sub: createDOMFactory('sub'),
- summary: createDOMFactory('summary'),
- sup: createDOMFactory('sup'),
- table: createDOMFactory('table'),
- tbody: createDOMFactory('tbody'),
- td: createDOMFactory('td'),
- textarea: createDOMFactory('textarea'),
- tfoot: createDOMFactory('tfoot'),
- th: createDOMFactory('th'),
- thead: createDOMFactory('thead'),
- time: createDOMFactory('time'),
- title: createDOMFactory('title'),
- tr: createDOMFactory('tr'),
- track: createDOMFactory('track'),
- u: createDOMFactory('u'),
- ul: createDOMFactory('ul'),
- 'var': createDOMFactory('var'),
- video: createDOMFactory('video'),
- wbr: createDOMFactory('wbr'),
-
- // SVG
- circle: createDOMFactory('circle'),
- clipPath: createDOMFactory('clipPath'),
- defs: createDOMFactory('defs'),
- ellipse: createDOMFactory('ellipse'),
- g: createDOMFactory('g'),
- image: createDOMFactory('image'),
- line: createDOMFactory('line'),
- linearGradient: createDOMFactory('linearGradient'),
- mask: createDOMFactory('mask'),
- path: createDOMFactory('path'),
- pattern: createDOMFactory('pattern'),
- polygon: createDOMFactory('polygon'),
- polyline: createDOMFactory('polyline'),
- radialGradient: createDOMFactory('radialGradient'),
- rect: createDOMFactory('rect'),
- stop: createDOMFactory('stop'),
- svg: createDOMFactory('svg'),
- text: createDOMFactory('text'),
- tspan: createDOMFactory('tspan')
-};
-
-module.exports = ReactDOMFactories;
+module.exports = '15.6.1';
/***/ }),
-/* 348 */
+/* 360 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -26480,15 +28121,19 @@ module.exports = ReactDOMFactories;
-var _require = __webpack_require__(66),
- isValidElement = _require.isValidElement;
+var _require = __webpack_require__(216),
+ Component = _require.Component;
+
+var _require2 = __webpack_require__(57),
+ isValidElement = _require2.isValidElement;
-var factory = __webpack_require__(213);
+var ReactNoopUpdateQueue = __webpack_require__(217);
+var factory = __webpack_require__(361);
-module.exports = factory(isValidElement);
+module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue);
/***/ }),
-/* 349 */
+/* 361 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -26499,630 +28144,875 @@ module.exports = factory(isValidElement);
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
+ *
*/
-var emptyFunction = __webpack_require__(24);
-var invariant = __webpack_require__(9);
-var warning = __webpack_require__(12);
+var _assign = __webpack_require__(13);
+
+var emptyObject = __webpack_require__(105);
+var _invariant = __webpack_require__(9);
-var ReactPropTypesSecret = __webpack_require__(214);
-var checkPropTypes = __webpack_require__(350);
+if (false) {
+ var warning = require('fbjs/lib/warning');
+}
-module.exports = function(isValidElement, throwOnDirectAccess) {
- /* global Symbol */
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
+var MIXINS_KEY = 'mixins';
+
+// Helper function to allow the creation of anonymous functions which do not
+// have .name set to the name of the variable being assigned to.
+function identity(fn) {
+ return fn;
+}
+
+var ReactPropTypeLocationNames;
+if (false) {
+ ReactPropTypeLocationNames = {
+ prop: 'prop',
+ context: 'context',
+ childContext: 'child context'
+ };
+} else {
+ ReactPropTypeLocationNames = {};
+}
+function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
/**
- * Returns the iterator method function contained on the iterable object.
- *
- * Be sure to invoke the function with the iterable as context:
- *
- * var iteratorFn = getIteratorFn(myIterable);
- * if (iteratorFn) {
- * var iterator = iteratorFn.call(myIterable);
- * ...
- * }
- *
- * @param {?object} maybeIterable
- * @return {?function}
+ * Policies that describe methods in `ReactClassInterface`.
*/
- function getIteratorFn(maybeIterable) {
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
- if (typeof iteratorFn === 'function') {
- return iteratorFn;
- }
- }
+
+ var injectedMixins = [];
/**
- * Collection of methods that allow declaration and validation of props that are
- * supplied to React components. Example usage:
- *
- * var Props = require('ReactPropTypes');
- * var MyArticle = React.createClass({
- * propTypes: {
- * // An optional string prop named "description".
- * description: Props.string,
+ * Composite components are higher-level components that compose other composite
+ * or host components.
*
- * // A required enum prop named "category".
- * category: Props.oneOf(['News','Photos']).isRequired,
+ * To create a new type of `ReactClass`, pass a specification of
+ * your new class to `React.createClass`. The only requirement of your class
+ * specification is that you implement a `render` method.
*
- * // A prop named "dialog" that requires an instance of Dialog.
- * dialog: Props.instanceOf(Dialog).isRequired
- * },
- * render: function() { ... }
+ * var MyComponent = React.createClass({
+ * render: function() {
+ * return
Hello World
;
+ * }
* });
*
- * A more formal specification of how these methods are used:
- *
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
- * decl := ReactPropTypes.{type}(.isRequired)?
- *
- * Each and every declaration produces a function with the same signature. This
- * allows the creation of custom validation functions. For example:
- *
- * var MyLink = React.createClass({
- * propTypes: {
- * // An optional string or URI prop named "href".
- * href: function(props, propName, componentName) {
- * var propValue = props[propName];
- * if (propValue != null && typeof propValue !== 'string' &&
- * !(propValue instanceof URI)) {
- * return new Error(
- * 'Expected a string or an URI for ' + propName + ' in ' +
- * componentName
- * );
- * }
- * }
- * },
- * render: function() {...}
- * });
+ * The class specification supports a specific protocol of methods that have
+ * special meaning (e.g. `render`). See `ReactClassInterface` for
+ * more the comprehensive protocol. Any other properties and methods in the
+ * class specification will be available on the prototype.
*
+ * @interface ReactClassInterface
* @internal
*/
+ var ReactClassInterface = {
+ /**
+ * An array of Mixin objects to include when defining your component.
+ *
+ * @type {array}
+ * @optional
+ */
+ mixins: 'DEFINE_MANY',
- var ANONYMOUS = '<>';
+ /**
+ * An object containing properties and methods that should be defined on
+ * the component's constructor instead of its prototype (static methods).
+ *
+ * @type {object}
+ * @optional
+ */
+ statics: 'DEFINE_MANY',
- // Important!
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
- var ReactPropTypes = {
- array: createPrimitiveTypeChecker('array'),
- bool: createPrimitiveTypeChecker('boolean'),
- func: createPrimitiveTypeChecker('function'),
- number: createPrimitiveTypeChecker('number'),
- object: createPrimitiveTypeChecker('object'),
- string: createPrimitiveTypeChecker('string'),
- symbol: createPrimitiveTypeChecker('symbol'),
+ /**
+ * Definition of prop types for this component.
+ *
+ * @type {object}
+ * @optional
+ */
+ propTypes: 'DEFINE_MANY',
- any: createAnyTypeChecker(),
- arrayOf: createArrayOfTypeChecker,
- element: createElementTypeChecker(),
- instanceOf: createInstanceTypeChecker,
- node: createNodeChecker(),
- objectOf: createObjectOfTypeChecker,
- oneOf: createEnumTypeChecker,
- oneOfType: createUnionTypeChecker,
- shape: createShapeTypeChecker
- };
+ /**
+ * Definition of context types for this component.
+ *
+ * @type {object}
+ * @optional
+ */
+ contextTypes: 'DEFINE_MANY',
+
+ /**
+ * Definition of context types this component sets for its children.
+ *
+ * @type {object}
+ * @optional
+ */
+ childContextTypes: 'DEFINE_MANY',
+
+ // ==== Definition methods ====
+
+ /**
+ * Invoked when the component is mounted. Values in the mapping will be set on
+ * `this.props` if that prop is not specified (i.e. using an `in` check).
+ *
+ * This method is invoked before `getInitialState` and therefore cannot rely
+ * on `this.state` or use `this.setState`.
+ *
+ * @return {object}
+ * @optional
+ */
+ getDefaultProps: 'DEFINE_MANY_MERGED',
+
+ /**
+ * Invoked once before the component is mounted. The return value will be used
+ * as the initial value of `this.state`.
+ *
+ * getInitialState: function() {
+ * return {
+ * isOn: false,
+ * fooBaz: new BazFoo()
+ * }
+ * }
+ *
+ * @return {object}
+ * @optional
+ */
+ getInitialState: 'DEFINE_MANY_MERGED',
+
+ /**
+ * @return {object}
+ * @optional
+ */
+ getChildContext: 'DEFINE_MANY_MERGED',
+
+ /**
+ * Uses props from `this.props` and state from `this.state` to render the
+ * structure of the component.
+ *
+ * No guarantees are made about when or how often this method is invoked, so
+ * it must not have side effects.
+ *
+ * render: function() {
+ * var name = this.props.name;
+ * return
Hello, {name}!
;
+ * }
+ *
+ * @return {ReactComponent}
+ * @required
+ */
+ render: 'DEFINE_ONCE',
+
+ // ==== Delegate methods ====
+
+ /**
+ * Invoked when the component is initially created and about to be mounted.
+ * This may have side effects, but any external subscriptions or data created
+ * by this method must be cleaned up in `componentWillUnmount`.
+ *
+ * @optional
+ */
+ componentWillMount: 'DEFINE_MANY',
+
+ /**
+ * Invoked when the component has been mounted and has a DOM representation.
+ * However, there is no guarantee that the DOM node is in the document.
+ *
+ * Use this as an opportunity to operate on the DOM when the component has
+ * been mounted (initialized and rendered) for the first time.
+ *
+ * @param {DOMElement} rootNode DOM element representing the component.
+ * @optional
+ */
+ componentDidMount: 'DEFINE_MANY',
+
+ /**
+ * Invoked before the component receives new props.
+ *
+ * Use this as an opportunity to react to a prop transition by updating the
+ * state using `this.setState`. Current props are accessed via `this.props`.
+ *
+ * componentWillReceiveProps: function(nextProps, nextContext) {
+ * this.setState({
+ * likesIncreasing: nextProps.likeCount > this.props.likeCount
+ * });
+ * }
+ *
+ * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
+ * transition may cause a state change, but the opposite is not true. If you
+ * need it, you are probably looking for `componentWillUpdate`.
+ *
+ * @param {object} nextProps
+ * @optional
+ */
+ componentWillReceiveProps: 'DEFINE_MANY',
+
+ /**
+ * Invoked while deciding if the component should be updated as a result of
+ * receiving new props, state and/or context.
+ *
+ * Use this as an opportunity to `return false` when you're certain that the
+ * transition to the new props/state/context will not require a component
+ * update.
+ *
+ * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
+ * return !equal(nextProps, this.props) ||
+ * !equal(nextState, this.state) ||
+ * !equal(nextContext, this.context);
+ * }
+ *
+ * @param {object} nextProps
+ * @param {?object} nextState
+ * @param {?object} nextContext
+ * @return {boolean} True if the component should update.
+ * @optional
+ */
+ shouldComponentUpdate: 'DEFINE_ONCE',
+
+ /**
+ * Invoked when the component is about to update due to a transition from
+ * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
+ * and `nextContext`.
+ *
+ * Use this as an opportunity to perform preparation before an update occurs.
+ *
+ * NOTE: You **cannot** use `this.setState()` in this method.
+ *
+ * @param {object} nextProps
+ * @param {?object} nextState
+ * @param {?object} nextContext
+ * @param {ReactReconcileTransaction} transaction
+ * @optional
+ */
+ componentWillUpdate: 'DEFINE_MANY',
+
+ /**
+ * Invoked when the component's DOM representation has been updated.
+ *
+ * Use this as an opportunity to operate on the DOM when the component has
+ * been updated.
+ *
+ * @param {object} prevProps
+ * @param {?object} prevState
+ * @param {?object} prevContext
+ * @param {DOMElement} rootNode DOM element representing the component.
+ * @optional
+ */
+ componentDidUpdate: 'DEFINE_MANY',
+
+ /**
+ * Invoked when the component is about to be removed from its parent and have
+ * its DOM representation destroyed.
+ *
+ * Use this as an opportunity to deallocate any external resources.
+ *
+ * NOTE: There is no `componentDidUnmount` since your component will have been
+ * destroyed by that point.
+ *
+ * @optional
+ */
+ componentWillUnmount: 'DEFINE_MANY',
- /**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
- /*eslint-disable no-self-compare*/
- function is(x, y) {
- // SameValue algorithm
- if (x === y) {
- // Steps 1-5, 7-10
- // Steps 6.b-6.e: +0 != -0
- return x !== 0 || 1 / x === 1 / y;
- } else {
- // Step 6.a: NaN == NaN
- return x !== x && y !== y;
- }
- }
- /*eslint-enable no-self-compare*/
+ // ==== Advanced methods ====
+
+ /**
+ * Updates the component's currently mounted DOM representation.
+ *
+ * By default, this implements React's rendering and reconciliation algorithm.
+ * Sophisticated clients may wish to override this.
+ *
+ * @param {ReactReconcileTransaction} transaction
+ * @internal
+ * @overridable
+ */
+ updateComponent: 'OVERRIDE_BASE'
+ };
/**
- * We use an Error-like object for backward compatibility as people may call
- * PropTypes directly and inspect their output. However, we don't use real
- * Errors anymore. We don't inspect their stack anyway, and creating them
- * is prohibitively expensive if they are created too often, such as what
- * happens in oneOfType() for any type before the one that matched.
+ * Mapping from class specification keys to special processing functions.
+ *
+ * Although these are declared like instance properties in the specification
+ * when defining classes using `React.createClass`, they are actually static
+ * and are accessible on the constructor instead of the prototype. Despite
+ * being static, they must be defined outside of the "statics" key under
+ * which all other static methods are defined.
*/
- function PropTypeError(message) {
- this.message = message;
- this.stack = '';
- }
- // Make `instanceof Error` still work for returned errors.
- PropTypeError.prototype = Error.prototype;
-
- function createChainableTypeChecker(validate) {
- if (false) {
- var manualPropTypeCallCache = {};
- var manualPropTypeWarningCount = 0;
- }
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
- componentName = componentName || ANONYMOUS;
- propFullName = propFullName || propName;
-
- if (secret !== ReactPropTypesSecret) {
- if (throwOnDirectAccess) {
- // New behavior only for users of `prop-types` package
- invariant(
- false,
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
- 'Read more at http://fb.me/use-check-prop-types'
- );
- } else if (false) {
- // Old behavior for people using React.PropTypes
- var cacheKey = componentName + ':' + propName;
- if (
- !manualPropTypeCallCache[cacheKey] &&
- // Avoid spamming the console because they are often not actionable except for lib authors
- manualPropTypeWarningCount < 3
- ) {
- warning(
- false,
- 'You are manually calling a React.PropTypes validation ' +
- 'function for the `%s` prop on `%s`. This is deprecated ' +
- 'and will throw in the standalone `prop-types` package. ' +
- 'You may be seeing this warning due to a third-party PropTypes ' +
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
- propFullName,
- componentName
- );
- manualPropTypeCallCache[cacheKey] = true;
- manualPropTypeWarningCount++;
- }
+ var RESERVED_SPEC_KEYS = {
+ displayName: function(Constructor, displayName) {
+ Constructor.displayName = displayName;
+ },
+ mixins: function(Constructor, mixins) {
+ if (mixins) {
+ for (var i = 0; i < mixins.length; i++) {
+ mixSpecIntoComponent(Constructor, mixins[i]);
}
}
- if (props[propName] == null) {
- if (isRequired) {
- if (props[propName] === null) {
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
- }
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
- }
- return null;
- } else {
- return validate(props, propName, componentName, location, propFullName);
+ },
+ childContextTypes: function(Constructor, childContextTypes) {
+ if (false) {
+ validateTypeDef(Constructor, childContextTypes, 'childContext');
}
- }
-
- var chainedCheckType = checkType.bind(null, false);
- chainedCheckType.isRequired = checkType.bind(null, true);
-
- return chainedCheckType;
- }
-
- function createPrimitiveTypeChecker(expectedType) {
- function validate(props, propName, componentName, location, propFullName, secret) {
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== expectedType) {
- // `propValue` being instance of, say, date/regexp, pass the 'object'
- // check, but we can offer a more precise error message here rather than
- // 'of type `object`'.
- var preciseType = getPreciseType(propValue);
-
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
+ Constructor.childContextTypes = _assign(
+ {},
+ Constructor.childContextTypes,
+ childContextTypes
+ );
+ },
+ contextTypes: function(Constructor, contextTypes) {
+ if (false) {
+ validateTypeDef(Constructor, contextTypes, 'context');
}
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createAnyTypeChecker() {
- return createChainableTypeChecker(emptyFunction.thatReturnsNull);
- }
-
- function createArrayOfTypeChecker(typeChecker) {
- function validate(props, propName, componentName, location, propFullName) {
- if (typeof typeChecker !== 'function') {
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
+ Constructor.contextTypes = _assign(
+ {},
+ Constructor.contextTypes,
+ contextTypes
+ );
+ },
+ /**
+ * Special case getDefaultProps which should move into statics but requires
+ * automatic merging.
+ */
+ getDefaultProps: function(Constructor, getDefaultProps) {
+ if (Constructor.getDefaultProps) {
+ Constructor.getDefaultProps = createMergedResultFunction(
+ Constructor.getDefaultProps,
+ getDefaultProps
+ );
+ } else {
+ Constructor.getDefaultProps = getDefaultProps;
}
- var propValue = props[propName];
- if (!Array.isArray(propValue)) {
- var propType = getPropType(propValue);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
+ },
+ propTypes: function(Constructor, propTypes) {
+ if (false) {
+ validateTypeDef(Constructor, propTypes, 'prop');
}
- for (var i = 0; i < propValue.length; i++) {
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
- if (error instanceof Error) {
- return error;
+ Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
+ },
+ statics: function(Constructor, statics) {
+ mixStaticSpecIntoComponent(Constructor, statics);
+ },
+ autobind: function() {}
+ };
+
+ function validateTypeDef(Constructor, typeDef, location) {
+ for (var propName in typeDef) {
+ if (typeDef.hasOwnProperty(propName)) {
+ // use a warning instead of an _invariant so components
+ // don't show up in prod but only in __DEV__
+ if (false) {
+ warning(
+ typeof typeDef[propName] === 'function',
+ '%s: %s type `%s` is invalid; it must be a function, usually from ' +
+ 'React.PropTypes.',
+ Constructor.displayName || 'ReactClass',
+ ReactPropTypeLocationNames[location],
+ propName
+ );
}
}
- return null;
}
- return createChainableTypeChecker(validate);
}
- function createElementTypeChecker() {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- if (!isValidElement(propValue)) {
- var propType = getPropType(propValue);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
- }
- return null;
+ function validateMethodOverride(isAlreadyDefined, name) {
+ var specPolicy = ReactClassInterface.hasOwnProperty(name)
+ ? ReactClassInterface[name]
+ : null;
+
+ // Disallow overriding of base class methods unless explicitly allowed.
+ if (ReactClassMixin.hasOwnProperty(name)) {
+ _invariant(
+ specPolicy === 'OVERRIDE_BASE',
+ 'ReactClassInterface: You are attempting to override ' +
+ '`%s` from your class specification. Ensure that your method names ' +
+ 'do not overlap with React methods.',
+ name
+ );
}
- return createChainableTypeChecker(validate);
- }
- function createInstanceTypeChecker(expectedClass) {
- function validate(props, propName, componentName, location, propFullName) {
- if (!(props[propName] instanceof expectedClass)) {
- var expectedClassName = expectedClass.name || ANONYMOUS;
- var actualClassName = getClassName(props[propName]);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
- }
- return null;
+ // Disallow defining methods more than once unless explicitly allowed.
+ if (isAlreadyDefined) {
+ _invariant(
+ specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
+ 'ReactClassInterface: You are attempting to define ' +
+ '`%s` on your component more than once. This conflict may be due ' +
+ 'to a mixin.',
+ name
+ );
}
- return createChainableTypeChecker(validate);
}
- function createEnumTypeChecker(expectedValues) {
- if (!Array.isArray(expectedValues)) {
- false ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
- return emptyFunction.thatReturnsNull;
- }
+ /**
+ * Mixin helper which handles policy validation and reserved
+ * specification keys when building React classes.
+ */
+ function mixSpecIntoComponent(Constructor, spec) {
+ if (!spec) {
+ if (false) {
+ var typeofSpec = typeof spec;
+ var isMixinValid = typeofSpec === 'object' && spec !== null;
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- for (var i = 0; i < expectedValues.length; i++) {
- if (is(propValue, expectedValues[i])) {
- return null;
+ if (process.env.NODE_ENV !== 'production') {
+ warning(
+ isMixinValid,
+ "%s: You're attempting to include a mixin that is either null " +
+ 'or not an object. Check the mixins included by the component, ' +
+ 'as well as any mixins they include themselves. ' +
+ 'Expected object but got %s.',
+ Constructor.displayName || 'ReactClass',
+ spec === null ? null : typeofSpec
+ );
}
}
- var valuesString = JSON.stringify(expectedValues);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
+ return;
}
- return createChainableTypeChecker(validate);
- }
- function createObjectOfTypeChecker(typeChecker) {
- function validate(props, propName, componentName, location, propFullName) {
- if (typeof typeChecker !== 'function') {
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
+ _invariant(
+ typeof spec !== 'function',
+ "ReactClass: You're attempting to " +
+ 'use a component class or function as a mixin. Instead, just use a ' +
+ 'regular object.'
+ );
+ _invariant(
+ !isValidElement(spec),
+ "ReactClass: You're attempting to " +
+ 'use a component as a mixin. Instead, just use a regular object.'
+ );
+
+ var proto = Constructor.prototype;
+ var autoBindPairs = proto.__reactAutoBindPairs;
+
+ // By handling mixins before any other properties, we ensure the same
+ // chaining order is applied to methods with DEFINE_MANY policy, whether
+ // mixins are listed before or after these methods in the spec.
+ if (spec.hasOwnProperty(MIXINS_KEY)) {
+ RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
+ }
+
+ for (var name in spec) {
+ if (!spec.hasOwnProperty(name)) {
+ continue;
}
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== 'object') {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
+
+ if (name === MIXINS_KEY) {
+ // We have already handled mixins in a special case above.
+ continue;
}
- for (var key in propValue) {
- if (propValue.hasOwnProperty(key)) {
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
- if (error instanceof Error) {
- return error;
+
+ var property = spec[name];
+ var isAlreadyDefined = proto.hasOwnProperty(name);
+ validateMethodOverride(isAlreadyDefined, name);
+
+ if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
+ RESERVED_SPEC_KEYS[name](Constructor, property);
+ } else {
+ // Setup methods on prototype:
+ // The following member methods should not be automatically bound:
+ // 1. Expected ReactClass methods (in the "interface").
+ // 2. Overridden methods (that were mixed in).
+ var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
+ var isFunction = typeof property === 'function';
+ var shouldAutoBind =
+ isFunction &&
+ !isReactClassMethod &&
+ !isAlreadyDefined &&
+ spec.autobind !== false;
+
+ if (shouldAutoBind) {
+ autoBindPairs.push(name, property);
+ proto[name] = property;
+ } else {
+ if (isAlreadyDefined) {
+ var specPolicy = ReactClassInterface[name];
+
+ // These cases should already be caught by validateMethodOverride.
+ _invariant(
+ isReactClassMethod &&
+ (specPolicy === 'DEFINE_MANY_MERGED' ||
+ specPolicy === 'DEFINE_MANY'),
+ 'ReactClass: Unexpected spec policy %s for key %s ' +
+ 'when mixing in component specs.',
+ specPolicy,
+ name
+ );
+
+ // For methods which are defined more than once, call the existing
+ // methods before calling the new property, merging if appropriate.
+ if (specPolicy === 'DEFINE_MANY_MERGED') {
+ proto[name] = createMergedResultFunction(proto[name], property);
+ } else if (specPolicy === 'DEFINE_MANY') {
+ proto[name] = createChainedFunction(proto[name], property);
+ }
+ } else {
+ proto[name] = property;
+ if (false) {
+ // Add verbose displayName to the function, which helps when looking
+ // at profiling tools.
+ if (typeof property === 'function' && spec.displayName) {
+ proto[name].displayName = spec.displayName + '_' + name;
+ }
+ }
}
}
}
- return null;
}
- return createChainableTypeChecker(validate);
}
- function createUnionTypeChecker(arrayOfTypeCheckers) {
- if (!Array.isArray(arrayOfTypeCheckers)) {
- false ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
- return emptyFunction.thatReturnsNull;
+ function mixStaticSpecIntoComponent(Constructor, statics) {
+ if (!statics) {
+ return;
}
-
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
- var checker = arrayOfTypeCheckers[i];
- if (typeof checker !== 'function') {
- warning(
- false,
- 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +
- 'received %s at index %s.',
- getPostfixForTypeWarning(checker),
- i
- );
- return emptyFunction.thatReturnsNull;
+ for (var name in statics) {
+ var property = statics[name];
+ if (!statics.hasOwnProperty(name)) {
+ continue;
}
- }
- function validate(props, propName, componentName, location, propFullName) {
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
- var checker = arrayOfTypeCheckers[i];
- if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
- return null;
- }
- }
+ var isReserved = name in RESERVED_SPEC_KEYS;
+ _invariant(
+ !isReserved,
+ 'ReactClass: You are attempting to define a reserved ' +
+ 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
+ 'as an instance property instead; it will still be accessible on the ' +
+ 'constructor.',
+ name
+ );
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
+ var isInherited = name in Constructor;
+ _invariant(
+ !isInherited,
+ 'ReactClass: You are attempting to define ' +
+ '`%s` on your component more than once. This conflict may be ' +
+ 'due to a mixin.',
+ name
+ );
+ Constructor[name] = property;
}
- return createChainableTypeChecker(validate);
}
- function createNodeChecker() {
- function validate(props, propName, componentName, location, propFullName) {
- if (!isNode(props[propName])) {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
+ /**
+ * Merge two objects, but throw if both contain the same key.
+ *
+ * @param {object} one The first object, which is mutated.
+ * @param {object} two The second object
+ * @return {object} one after it has been mutated to contain everything in two.
+ */
+ function mergeIntoWithNoDuplicateKeys(one, two) {
+ _invariant(
+ one && two && typeof one === 'object' && typeof two === 'object',
+ 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
+ );
+
+ for (var key in two) {
+ if (two.hasOwnProperty(key)) {
+ _invariant(
+ one[key] === undefined,
+ 'mergeIntoWithNoDuplicateKeys(): ' +
+ 'Tried to merge two objects with the same key: `%s`. This conflict ' +
+ 'may be due to a mixin; in particular, this may be caused by two ' +
+ 'getInitialState() or getDefaultProps() methods returning objects ' +
+ 'with clashing keys.',
+ key
+ );
+ one[key] = two[key];
}
- return null;
}
- return createChainableTypeChecker(validate);
+ return one;
}
- function createShapeTypeChecker(shapeTypes) {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== 'object') {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
- }
- for (var key in shapeTypes) {
- var checker = shapeTypes[key];
- if (!checker) {
- continue;
- }
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
- if (error) {
- return error;
- }
+ /**
+ * Creates a function that invokes two functions and merges their return values.
+ *
+ * @param {function} one Function to invoke first.
+ * @param {function} two Function to invoke second.
+ * @return {function} Function that invokes the two argument functions.
+ * @private
+ */
+ function createMergedResultFunction(one, two) {
+ return function mergedResult() {
+ var a = one.apply(this, arguments);
+ var b = two.apply(this, arguments);
+ if (a == null) {
+ return b;
+ } else if (b == null) {
+ return a;
}
- return null;
- }
- return createChainableTypeChecker(validate);
+ var c = {};
+ mergeIntoWithNoDuplicateKeys(c, a);
+ mergeIntoWithNoDuplicateKeys(c, b);
+ return c;
+ };
+ }
+
+ /**
+ * Creates a function that invokes two functions and ignores their return vales.
+ *
+ * @param {function} one Function to invoke first.
+ * @param {function} two Function to invoke second.
+ * @return {function} Function that invokes the two argument functions.
+ * @private
+ */
+ function createChainedFunction(one, two) {
+ return function chainedFunction() {
+ one.apply(this, arguments);
+ two.apply(this, arguments);
+ };
}
- function isNode(propValue) {
- switch (typeof propValue) {
- case 'number':
- case 'string':
- case 'undefined':
- return true;
- case 'boolean':
- return !propValue;
- case 'object':
- if (Array.isArray(propValue)) {
- return propValue.every(isNode);
- }
- if (propValue === null || isValidElement(propValue)) {
- return true;
+ /**
+ * Binds a method to the component.
+ *
+ * @param {object} component Component whose method is going to be bound.
+ * @param {function} method Method to be bound.
+ * @return {function} The bound method.
+ */
+ function bindAutoBindMethod(component, method) {
+ var boundMethod = method.bind(component);
+ if (false) {
+ boundMethod.__reactBoundContext = component;
+ boundMethod.__reactBoundMethod = method;
+ boundMethod.__reactBoundArguments = null;
+ var componentName = component.constructor.displayName;
+ var _bind = boundMethod.bind;
+ boundMethod.bind = function(newThis) {
+ for (
+ var _len = arguments.length,
+ args = Array(_len > 1 ? _len - 1 : 0),
+ _key = 1;
+ _key < _len;
+ _key++
+ ) {
+ args[_key - 1] = arguments[_key];
}
- var iteratorFn = getIteratorFn(propValue);
- if (iteratorFn) {
- var iterator = iteratorFn.call(propValue);
- var step;
- if (iteratorFn !== propValue.entries) {
- while (!(step = iterator.next()).done) {
- if (!isNode(step.value)) {
- return false;
- }
- }
- } else {
- // Iterator will provide entry [k,v] tuples rather than values.
- while (!(step = iterator.next()).done) {
- var entry = step.value;
- if (entry) {
- if (!isNode(entry[1])) {
- return false;
- }
- }
- }
+ // User is trying to bind() an autobound method; we effectively will
+ // ignore the value of "this" that the user is trying to use, so
+ // let's warn.
+ if (newThis !== component && newThis !== null) {
+ if (process.env.NODE_ENV !== 'production') {
+ warning(
+ false,
+ 'bind(): React component methods may only be bound to the ' +
+ 'component instance. See %s',
+ componentName
+ );
}
- } else {
- return false;
+ } else if (!args.length) {
+ if (process.env.NODE_ENV !== 'production') {
+ warning(
+ false,
+ 'bind(): You are binding a component method to the component. ' +
+ 'React does this for you automatically in a high-performance ' +
+ 'way, so you can safely remove this call. See %s',
+ componentName
+ );
+ }
+ return boundMethod;
}
-
- return true;
- default:
- return false;
+ var reboundMethod = _bind.apply(boundMethod, arguments);
+ reboundMethod.__reactBoundContext = component;
+ reboundMethod.__reactBoundMethod = method;
+ reboundMethod.__reactBoundArguments = args;
+ return reboundMethod;
+ };
}
+ return boundMethod;
}
- function isSymbol(propType, propValue) {
- // Native Symbol.
- if (propType === 'symbol') {
- return true;
- }
-
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
- if (propValue['@@toStringTag'] === 'Symbol') {
- return true;
- }
-
- // Fallback for non-spec compliant Symbols which are polyfilled.
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
- return true;
+ /**
+ * Binds all auto-bound methods in a component.
+ *
+ * @param {object} component Component whose method is going to be bound.
+ */
+ function bindAutoBindMethods(component) {
+ var pairs = component.__reactAutoBindPairs;
+ for (var i = 0; i < pairs.length; i += 2) {
+ var autoBindKey = pairs[i];
+ var method = pairs[i + 1];
+ component[autoBindKey] = bindAutoBindMethod(component, method);
}
-
- return false;
}
- // Equivalent of `typeof` but with special handling for array and regexp.
- function getPropType(propValue) {
- var propType = typeof propValue;
- if (Array.isArray(propValue)) {
- return 'array';
- }
- if (propValue instanceof RegExp) {
- // Old webkits (at least until Android 4.0) return 'function' rather than
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
- // passes PropTypes.object.
- return 'object';
- }
- if (isSymbol(propType, propValue)) {
- return 'symbol';
+ var IsMountedPreMixin = {
+ componentDidMount: function() {
+ this.__isMounted = true;
}
- return propType;
- }
+ };
- // This handles more types than `getPropType`. Only used for error messages.
- // See `createPrimitiveTypeChecker`.
- function getPreciseType(propValue) {
- if (typeof propValue === 'undefined' || propValue === null) {
- return '' + propValue;
- }
- var propType = getPropType(propValue);
- if (propType === 'object') {
- if (propValue instanceof Date) {
- return 'date';
- } else if (propValue instanceof RegExp) {
- return 'regexp';
- }
+ var IsMountedPostMixin = {
+ componentWillUnmount: function() {
+ this.__isMounted = false;
}
- return propType;
- }
+ };
- // Returns a string that is postfixed to a warning about an invalid type.
- // For example, "undefined" or "of type array"
- function getPostfixForTypeWarning(value) {
- var type = getPreciseType(value);
- switch (type) {
- case 'array':
- case 'object':
- return 'an ' + type;
- case 'boolean':
- case 'date':
- case 'regexp':
- return 'a ' + type;
- default:
- return type;
- }
- }
+ /**
+ * Add more to the ReactClass base class. These are all legacy features and
+ * therefore not already part of the modern ReactComponent.
+ */
+ var ReactClassMixin = {
+ /**
+ * TODO: This will be deprecated because state should always keep a consistent
+ * type signature and the only use case for this, is to avoid that.
+ */
+ replaceState: function(newState, callback) {
+ this.updater.enqueueReplaceState(this, newState, callback);
+ },
- // Returns class name of the object, if any.
- function getClassName(propValue) {
- if (!propValue.constructor || !propValue.constructor.name) {
- return ANONYMOUS;
+ /**
+ * Checks whether or not this composite component is mounted.
+ * @return {boolean} True if mounted, false otherwise.
+ * @protected
+ * @final
+ */
+ isMounted: function() {
+ if (false) {
+ warning(
+ this.__didWarnIsMounted,
+ '%s: isMounted is deprecated. Instead, make sure to clean up ' +
+ 'subscriptions and pending requests in componentWillUnmount to ' +
+ 'prevent memory leaks.',
+ (this.constructor && this.constructor.displayName) ||
+ this.name ||
+ 'Component'
+ );
+ this.__didWarnIsMounted = true;
+ }
+ return !!this.__isMounted;
}
- return propValue.constructor.name;
- }
-
- ReactPropTypes.checkPropTypes = checkPropTypes;
- ReactPropTypes.PropTypes = ReactPropTypes;
-
- return ReactPropTypes;
-};
-
+ };
-/***/ }),
-/* 350 */
-/***/ (function(module, exports, __webpack_require__) {
+ var ReactClassComponent = function() {};
+ _assign(
+ ReactClassComponent.prototype,
+ ReactComponent.prototype,
+ ReactClassMixin
+ );
-"use strict";
-/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- */
+ /**
+ * Creates a composite component class given a class specification.
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
+ *
+ * @param {object} spec Class specification (which must define `render`).
+ * @return {function} Component constructor function.
+ * @public
+ */
+ function createClass(spec) {
+ // To keep our warnings more understandable, we'll use a little hack here to
+ // ensure that Constructor.name !== 'Constructor'. This makes sure we don't
+ // unnecessarily identify a class without displayName as 'Constructor'.
+ var Constructor = identity(function(props, context, updater) {
+ // This constructor gets overridden by mocks. The argument is used
+ // by mocks to assert on what gets mounted.
+ if (false) {
+ warning(
+ this instanceof Constructor,
+ 'Something is calling a React component directly. Use a factory or ' +
+ 'JSX instead. See: https://fb.me/react-legacyfactory'
+ );
+ }
+ // Wire up auto-binding
+ if (this.__reactAutoBindPairs.length) {
+ bindAutoBindMethods(this);
+ }
-if (false) {
- var invariant = require('fbjs/lib/invariant');
- var warning = require('fbjs/lib/warning');
- var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
- var loggedTypeFailures = {};
-}
+ this.props = props;
+ this.context = context;
+ this.refs = emptyObject;
+ this.updater = updater || ReactNoopUpdateQueue;
-/**
- * Assert that the values match with the type specs.
- * Error messages are memorized and will only be shown once.
- *
- * @param {object} typeSpecs Map of name to a ReactPropType
- * @param {object} values Runtime values that need to be type-checked
- * @param {string} location e.g. "prop", "context", "child context"
- * @param {string} componentName Name of the component for error messages.
- * @param {?Function} getStack Returns the component stack.
- * @private
- */
-function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
- if (false) {
- for (var typeSpecName in typeSpecs) {
- if (typeSpecs.hasOwnProperty(typeSpecName)) {
- var error;
- // Prop type validation may throw. In case they do, we don't want to
- // fail the render phase where it didn't fail before. So we log it.
- // After these have been cleaned up, we'll let them throw.
- try {
- // This is intentionally an invariant that gets caught. It's the same
- // behavior as without this statement except with a better message.
- invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
- } catch (ex) {
- error = ex;
- }
- warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
- // Only monitor this failure once because there tends to be a lot of the
- // same error.
- loggedTypeFailures[error.message] = true;
+ this.state = null;
- var stack = getStack ? getStack() : '';
+ // ReactClasses doesn't have constructors. Instead, they use the
+ // getInitialState and componentWillMount methods for initialization.
- warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
+ var initialState = this.getInitialState ? this.getInitialState() : null;
+ if (false) {
+ // We allow auto-mocks to proceed as if they're returning null.
+ if (
+ initialState === undefined &&
+ this.getInitialState._isMockFunction
+ ) {
+ // This is probably bad practice. Consider warning here and
+ // deprecating this convenience.
+ initialState = null;
}
}
- }
- }
-}
-
-module.exports = checkPropTypes;
-
-
-/***/ }),
-/* 351 */
-/***/ (function(module, exports, __webpack_require__) {
+ _invariant(
+ typeof initialState === 'object' && !Array.isArray(initialState),
+ '%s.getInitialState(): must return an object or null',
+ Constructor.displayName || 'ReactCompositeComponent'
+ );
-"use strict";
-/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- */
+ this.state = initialState;
+ });
+ Constructor.prototype = new ReactClassComponent();
+ Constructor.prototype.constructor = Constructor;
+ Constructor.prototype.__reactAutoBindPairs = [];
+ injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
+ mixSpecIntoComponent(Constructor, IsMountedPreMixin);
+ mixSpecIntoComponent(Constructor, spec);
+ mixSpecIntoComponent(Constructor, IsMountedPostMixin);
-module.exports = '15.6.1';
+ // Initialize the defaultProps property after all mixins have been merged.
+ if (Constructor.getDefaultProps) {
+ Constructor.defaultProps = Constructor.getDefaultProps();
+ }
-/***/ }),
-/* 352 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (false) {
+ // This is a tag to indicate that the use of these method names is ok,
+ // since it's used with createClass. If it's not, then it's likely a
+ // mistake so we'll warn you to use the static property, property
+ // initializer or constructor respectively.
+ if (Constructor.getDefaultProps) {
+ Constructor.getDefaultProps.isReactClassApproved = {};
+ }
+ if (Constructor.prototype.getInitialState) {
+ Constructor.prototype.getInitialState.isReactClassApproved = {};
+ }
+ }
-"use strict";
-/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- */
+ _invariant(
+ Constructor.prototype.render,
+ 'createClass(...): Class specification must implement a `render` method.'
+ );
+ if (false) {
+ warning(
+ !Constructor.prototype.componentShouldUpdate,
+ '%s has a method called ' +
+ 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
+ 'The name is phrased as a question because the function is ' +
+ 'expected to return a value.',
+ spec.displayName || 'A component'
+ );
+ warning(
+ !Constructor.prototype.componentWillRecieveProps,
+ '%s has a method called ' +
+ 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
+ spec.displayName || 'A component'
+ );
+ }
+ // Reduce time spent doing lookups by setting these on the prototype.
+ for (var methodName in ReactClassInterface) {
+ if (!Constructor.prototype[methodName]) {
+ Constructor.prototype[methodName] = null;
+ }
+ }
-var _require = __webpack_require__(209),
- Component = _require.Component;
+ return Constructor;
+ }
-var _require2 = __webpack_require__(66),
- isValidElement = _require2.isValidElement;
+ return createClass;
+}
-var ReactNoopUpdateQueue = __webpack_require__(210);
-var factory = __webpack_require__(215);
+module.exports = factory;
-module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue);
/***/ }),
-/* 353 */
+/* 362 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -27137,9 +29027,9 @@ module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue);
*/
-var _prodInvariant = __webpack_require__(85);
+var _prodInvariant = __webpack_require__(71);
-var ReactElement = __webpack_require__(66);
+var ReactElement = __webpack_require__(57);
var invariant = __webpack_require__(9);
@@ -27165,7 +29055,7 @@ function onlyChild(children) {
module.exports = onlyChild;
/***/ }),
-/* 354 */
+/* 363 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -27183,17 +29073,17 @@ module.exports = onlyChild;
-var ReactDOMComponentTree = __webpack_require__(16);
-var ReactDefaultInjection = __webpack_require__(355);
-var ReactMount = __webpack_require__(239);
-var ReactReconciler = __webpack_require__(70);
-var ReactUpdates = __webpack_require__(31);
-var ReactVersion = __webpack_require__(427);
+var ReactDOMComponentTree = __webpack_require__(14);
+var ReactDefaultInjection = __webpack_require__(364);
+var ReactMount = __webpack_require__(245);
+var ReactReconciler = __webpack_require__(75);
+var ReactUpdates = __webpack_require__(28);
+var ReactVersion = __webpack_require__(436);
-var findDOMNode = __webpack_require__(428);
-var getHostComponentFromComposite = __webpack_require__(240);
-var renderSubtreeIntoContainer = __webpack_require__(429);
-var warning = __webpack_require__(12);
+var findDOMNode = __webpack_require__(437);
+var getHostComponentFromComposite = __webpack_require__(246);
+var renderSubtreeIntoContainer = __webpack_require__(438);
+var warning = __webpack_require__(11);
ReactDefaultInjection.inject();
@@ -27206,7 +29096,6 @@ var ReactDOM = {
/* eslint-disable camelcase */
unstable_batchedUpdates: ReactUpdates.batchedUpdates,
unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer
- /* eslint-enable camelcase */
};
// Inject the runtime into a devtools global hook regardless of browser.
@@ -27235,6 +29124,7 @@ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVT
if (false) {
var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
+
// First check if devtools is not installed
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
// If we're in Chrome or Firefox, provide a download link if not installed.
@@ -27246,7 +29136,7 @@ if (false) {
}
var testFunc = function testFn() {};
- process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, "It looks like you're using a minified copy of the development build " + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0;
+ process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0;
// If we're in IE8, check to see if we are in compatibility mode and provide
// information on preventing compatibility mode
@@ -27281,7 +29171,7 @@ if (false) {
module.exports = ReactDOM;
/***/ }),
-/* 355 */
+/* 364 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -27297,25 +29187,25 @@ module.exports = ReactDOM;
-var ARIADOMPropertyConfig = __webpack_require__(356);
-var BeforeInputEventPlugin = __webpack_require__(357);
-var ChangeEventPlugin = __webpack_require__(361);
-var DefaultEventPluginOrder = __webpack_require__(364);
-var EnterLeaveEventPlugin = __webpack_require__(365);
-var HTMLDOMPropertyConfig = __webpack_require__(366);
-var ReactComponentBrowserEnvironment = __webpack_require__(367);
-var ReactDOMComponent = __webpack_require__(373);
-var ReactDOMComponentTree = __webpack_require__(16);
-var ReactDOMEmptyComponent = __webpack_require__(398);
-var ReactDOMTreeTraversal = __webpack_require__(399);
-var ReactDOMTextComponent = __webpack_require__(400);
-var ReactDefaultBatchingStrategy = __webpack_require__(401);
-var ReactEventListener = __webpack_require__(402);
-var ReactInjection = __webpack_require__(404);
-var ReactReconcileTransaction = __webpack_require__(405);
-var SVGDOMPropertyConfig = __webpack_require__(411);
-var SelectEventPlugin = __webpack_require__(412);
-var SimpleEventPlugin = __webpack_require__(413);
+var ARIADOMPropertyConfig = __webpack_require__(365);
+var BeforeInputEventPlugin = __webpack_require__(366);
+var ChangeEventPlugin = __webpack_require__(370);
+var DefaultEventPluginOrder = __webpack_require__(373);
+var EnterLeaveEventPlugin = __webpack_require__(374);
+var HTMLDOMPropertyConfig = __webpack_require__(375);
+var ReactComponentBrowserEnvironment = __webpack_require__(376);
+var ReactDOMComponent = __webpack_require__(382);
+var ReactDOMComponentTree = __webpack_require__(14);
+var ReactDOMEmptyComponent = __webpack_require__(407);
+var ReactDOMTreeTraversal = __webpack_require__(408);
+var ReactDOMTextComponent = __webpack_require__(409);
+var ReactDefaultBatchingStrategy = __webpack_require__(410);
+var ReactEventListener = __webpack_require__(411);
+var ReactInjection = __webpack_require__(413);
+var ReactReconcileTransaction = __webpack_require__(414);
+var SVGDOMPropertyConfig = __webpack_require__(420);
+var SelectEventPlugin = __webpack_require__(421);
+var SimpleEventPlugin = __webpack_require__(422);
var alreadyInjected = false;
@@ -27372,7 +29262,7 @@ module.exports = {
};
/***/ }),
-/* 356 */
+/* 365 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -27451,7 +29341,7 @@ var ARIADOMPropertyConfig = {
module.exports = ARIADOMPropertyConfig;
/***/ }),
-/* 357 */
+/* 366 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -27467,11 +29357,11 @@ module.exports = ARIADOMPropertyConfig;
-var EventPropagators = __webpack_require__(68);
-var ExecutionEnvironment = __webpack_require__(21);
-var FallbackCompositionState = __webpack_require__(358);
-var SyntheticCompositionEvent = __webpack_require__(359);
-var SyntheticInputEvent = __webpack_require__(360);
+var EventPropagators = __webpack_require__(73);
+var ExecutionEnvironment = __webpack_require__(23);
+var FallbackCompositionState = __webpack_require__(367);
+var SyntheticCompositionEvent = __webpack_require__(368);
+var SyntheticInputEvent = __webpack_require__(369);
var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
var START_KEYCODE = 229;
@@ -27830,6 +29720,7 @@ function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEv
* `composition` event types.
*/
var BeforeInputEventPlugin = {
+
eventTypes: eventTypes,
extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
@@ -27840,7 +29731,7 @@ var BeforeInputEventPlugin = {
module.exports = BeforeInputEventPlugin;
/***/ }),
-/* 358 */
+/* 367 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -27856,11 +29747,11 @@ module.exports = BeforeInputEventPlugin;
-var _assign = __webpack_require__(15);
+var _assign = __webpack_require__(13);
-var PooledClass = __webpack_require__(53);
+var PooledClass = __webpack_require__(58);
-var getTextContentAccessor = __webpack_require__(219);
+var getTextContentAccessor = __webpack_require__(228);
/**
* This helper class stores information about text content of a target node,
@@ -27940,7 +29831,7 @@ PooledClass.addPoolingTo(FallbackCompositionState);
module.exports = FallbackCompositionState;
/***/ }),
-/* 359 */
+/* 368 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -27956,7 +29847,7 @@ module.exports = FallbackCompositionState;
-var SyntheticEvent = __webpack_require__(38);
+var SyntheticEvent = __webpack_require__(37);
/**
* @interface Event
@@ -27981,7 +29872,7 @@ SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface
module.exports = SyntheticCompositionEvent;
/***/ }),
-/* 360 */
+/* 369 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -27997,7 +29888,7 @@ module.exports = SyntheticCompositionEvent;
-var SyntheticEvent = __webpack_require__(38);
+var SyntheticEvent = __webpack_require__(37);
/**
* @interface Event
@@ -28023,7 +29914,7 @@ SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
module.exports = SyntheticInputEvent;
/***/ }),
-/* 361 */
+/* 370 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -28039,17 +29930,16 @@ module.exports = SyntheticInputEvent;
-var EventPluginHub = __webpack_require__(69);
-var EventPropagators = __webpack_require__(68);
-var ExecutionEnvironment = __webpack_require__(21);
-var ReactDOMComponentTree = __webpack_require__(16);
-var ReactUpdates = __webpack_require__(31);
-var SyntheticEvent = __webpack_require__(38);
+var EventPluginHub = __webpack_require__(74);
+var EventPropagators = __webpack_require__(73);
+var ExecutionEnvironment = __webpack_require__(23);
+var ReactDOMComponentTree = __webpack_require__(14);
+var ReactUpdates = __webpack_require__(28);
+var SyntheticEvent = __webpack_require__(37);
-var inputValueTracking = __webpack_require__(222);
-var getEventTarget = __webpack_require__(142);
-var isEventSupported = __webpack_require__(143);
-var isTextInputElement = __webpack_require__(223);
+var getEventTarget = __webpack_require__(148);
+var isEventSupported = __webpack_require__(149);
+var isTextInputElement = __webpack_require__(231);
var eventTypes = {
change: {
@@ -28061,17 +29951,13 @@ var eventTypes = {
}
};
-function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
- var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target);
- event.type = 'change';
- EventPropagators.accumulateTwoPhaseDispatches(event);
- return event;
-}
/**
* For IE shims
*/
var activeElement = null;
var activeElementInst = null;
+var activeElementValue = null;
+var activeElementValueProp = null;
/**
* SECTION: handle `change` event
@@ -28088,7 +29974,8 @@ if (ExecutionEnvironment.canUseDOM) {
}
function manualDispatchChangeEvent(nativeEvent) {
- var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));
+ var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent));
+ EventPropagators.accumulateTwoPhaseDispatches(event);
// If change and propertychange bubbled, we'd just bind to it like all the
// other events and have it go through ReactBrowserEventEmitter. Since it
@@ -28124,21 +30011,11 @@ function stopWatchingForChangeEventIE8() {
activeElementInst = null;
}
-function getInstIfValueChanged(targetInst, nativeEvent) {
- var updated = inputValueTracking.updateValueIfChanged(targetInst);
- var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough;
-
- if (updated || simulated) {
- return targetInst;
- }
-}
-
function getTargetInstForChangeEvent(topLevelType, targetInst) {
if (topLevelType === 'topChange') {
return targetInst;
}
}
-
function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
if (topLevelType === 'topFocus') {
// stopWatching() should be a noop here but we call it just in case we
@@ -28157,54 +30034,105 @@ var isInputEventSupported = false;
if (ExecutionEnvironment.canUseDOM) {
// IE9 claims to support the input event but fails to trigger it when
// deleting text, so we ignore its input events.
-
- isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 9);
+ // IE10+ fire input events to often, such when a placeholder
+ // changes or when an input with a placeholder is focused.
+ isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11);
}
/**
- * (For IE <=9) Starts tracking propertychange events on the passed-in element
+ * (For IE <=11) Replacement getter/setter for the `value` property that gets
+ * set on the active element.
+ */
+var newValueProp = {
+ get: function () {
+ return activeElementValueProp.get.call(this);
+ },
+ set: function (val) {
+ // Cast to a string so we can do equality checks.
+ activeElementValue = '' + val;
+ activeElementValueProp.set.call(this, val);
+ }
+};
+
+/**
+ * (For IE <=11) Starts tracking propertychange events on the passed-in element
* and override the value property so that we can distinguish user events from
* value changes in JS.
*/
function startWatchingForValueChange(target, targetInst) {
activeElement = target;
activeElementInst = targetInst;
- activeElement.attachEvent('onpropertychange', handlePropertyChange);
+ activeElementValue = target.value;
+ activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');
+
+ // Not guarded in a canDefineProperty check: IE8 supports defineProperty only
+ // on DOM elements
+ Object.defineProperty(activeElement, 'value', newValueProp);
+ if (activeElement.attachEvent) {
+ activeElement.attachEvent('onpropertychange', handlePropertyChange);
+ } else {
+ activeElement.addEventListener('propertychange', handlePropertyChange, false);
+ }
}
/**
- * (For IE <=9) Removes the event listeners from the currently-tracked element,
+ * (For IE <=11) Removes the event listeners from the currently-tracked element,
* if any exists.
*/
function stopWatchingForValueChange() {
if (!activeElement) {
return;
}
- activeElement.detachEvent('onpropertychange', handlePropertyChange);
+
+ // delete restores the original property definition
+ delete activeElement.value;
+
+ if (activeElement.detachEvent) {
+ activeElement.detachEvent('onpropertychange', handlePropertyChange);
+ } else {
+ activeElement.removeEventListener('propertychange', handlePropertyChange, false);
+ }
activeElement = null;
activeElementInst = null;
+ activeElementValue = null;
+ activeElementValueProp = null;
}
/**
- * (For IE <=9) Handles a propertychange event, sending a `change` event if
+ * (For IE <=11) Handles a propertychange event, sending a `change` event if
* the value of the active element has changed.
*/
function handlePropertyChange(nativeEvent) {
if (nativeEvent.propertyName !== 'value') {
return;
}
- if (getInstIfValueChanged(activeElementInst, nativeEvent)) {
- manualDispatchChangeEvent(nativeEvent);
+ var value = nativeEvent.srcElement.value;
+ if (value === activeElementValue) {
+ return;
+ }
+ activeElementValue = value;
+
+ manualDispatchChangeEvent(nativeEvent);
+}
+
+/**
+ * If a `change` event should be fired, returns the target's ID.
+ */
+function getTargetInstForInputEvent(topLevelType, targetInst) {
+ if (topLevelType === 'topInput') {
+ // In modern browsers (i.e., not IE8 or IE9), the input event is exactly
+ // what we want so fall through here and trigger an abstract event
+ return targetInst;
}
}
-function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
+function handleEventsForInputEventIE(topLevelType, target, targetInst) {
if (topLevelType === 'topFocus') {
// In IE8, we can capture almost all .value changes by adding a
// propertychange handler and looking for events with propertyName
// equal to 'value'
- // In IE9, propertychange fires for most input events but is buggy and
+ // In IE9-11, propertychange fires for most input events but is buggy and
// doesn't fire when text is deleted, but conveniently, selectionchange
// appears to fire in all of the remaining cases so we catch those and
// forward the event if the value has changed
@@ -28222,7 +30150,7 @@ function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
}
// For IE8 and IE9.
-function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) {
+function getTargetInstForInputEventIE(topLevelType, targetInst) {
if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
// On the selectionchange event, the target is just document which isn't
// helpful for us so just check activeElement instead.
@@ -28234,7 +30162,10 @@ function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEven
// keystroke if user does a key repeat (it'll be a little delayed: right
// before the second keystroke). Other input methods (e.g., paste) seem to
// fire selectionchange normally.
- return getInstIfValueChanged(activeElementInst, nativeEvent);
+ if (activeElement && activeElement.value !== activeElementValue) {
+ activeElementValue = activeElement.value;
+ return activeElementInst;
+ }
}
}
@@ -28245,39 +30176,12 @@ function shouldUseClickEvent(elem) {
// Use the `click` event to detect changes to checkbox and radio inputs.
// This approach works across all browsers, whereas `change` does not fire
// until `blur` in IE8.
- var nodeName = elem.nodeName;
- return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
+ return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
}
-function getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) {
+function getTargetInstForClickEvent(topLevelType, targetInst) {
if (topLevelType === 'topClick') {
- return getInstIfValueChanged(targetInst, nativeEvent);
- }
-}
-
-function getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) {
- if (topLevelType === 'topInput' || topLevelType === 'topChange') {
- return getInstIfValueChanged(targetInst, nativeEvent);
- }
-}
-
-function handleControlledInputBlur(inst, node) {
- // TODO: In IE, inst is occasionally null. Why?
- if (inst == null) {
- return;
- }
-
- // Fiber and ReactDOM keep wrapper state in separate places
- var state = inst._wrapperState || node._wrapperState;
-
- if (!state || !state.controlled || node.type !== 'number') {
- return;
- }
-
- // If controlled, assign the value attribute to the current value on blur
- var value = '' + node.value;
- if (node.getAttribute('value') !== value) {
- node.setAttribute('value', value);
+ return targetInst;
}
}
@@ -28292,10 +30196,8 @@ function handleControlledInputBlur(inst, node) {
* - select
*/
var ChangeEventPlugin = {
- eventTypes: eventTypes,
- _allowSimulatedPassThrough: true,
- _isInputEventSupported: isInputEventSupported,
+ eventTypes: eventTypes,
extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
@@ -28309,19 +30211,21 @@ var ChangeEventPlugin = {
}
} else if (isTextInputElement(targetNode)) {
if (isInputEventSupported) {
- getTargetInstFunc = getTargetInstForInputOrChangeEvent;
+ getTargetInstFunc = getTargetInstForInputEvent;
} else {
- getTargetInstFunc = getTargetInstForInputEventPolyfill;
- handleEventFunc = handleEventsForInputEventPolyfill;
+ getTargetInstFunc = getTargetInstForInputEventIE;
+ handleEventFunc = handleEventsForInputEventIE;
}
} else if (shouldUseClickEvent(targetNode)) {
getTargetInstFunc = getTargetInstForClickEvent;
}
if (getTargetInstFunc) {
- var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent);
+ var inst = getTargetInstFunc(topLevelType, targetInst);
if (inst) {
- var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
+ var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget);
+ event.type = 'change';
+ EventPropagators.accumulateTwoPhaseDispatches(event);
return event;
}
}
@@ -28329,18 +30233,14 @@ var ChangeEventPlugin = {
if (handleEventFunc) {
handleEventFunc(topLevelType, targetNode, targetInst);
}
-
- // When blurring, set the value attribute for number inputs
- if (topLevelType === 'topBlur') {
- handleControlledInputBlur(targetInst, targetNode);
- }
}
+
};
module.exports = ChangeEventPlugin;
/***/ }),
-/* 362 */
+/* 371 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -28357,7 +30257,7 @@ module.exports = ChangeEventPlugin;
-var ReactOwner = __webpack_require__(363);
+var ReactOwner = __webpack_require__(372);
var ReactRef = {};
@@ -28434,7 +30334,7 @@ ReactRef.detachRefs = function (instance, element) {
module.exports = ReactRef;
/***/ }),
-/* 363 */
+/* 372 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -28451,7 +30351,7 @@ module.exports = ReactRef;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
var invariant = __webpack_require__(9);
@@ -28527,12 +30427,13 @@ var ReactOwner = {
owner.detachRef(ref);
}
}
+
};
module.exports = ReactOwner;
/***/ }),
-/* 364 */
+/* 373 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -28563,7 +30464,7 @@ var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'Tap
module.exports = DefaultEventPluginOrder;
/***/ }),
-/* 365 */
+/* 374 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -28579,9 +30480,9 @@ module.exports = DefaultEventPluginOrder;
-var EventPropagators = __webpack_require__(68);
-var ReactDOMComponentTree = __webpack_require__(16);
-var SyntheticMouseEvent = __webpack_require__(105);
+var EventPropagators = __webpack_require__(73);
+var ReactDOMComponentTree = __webpack_require__(14);
+var SyntheticMouseEvent = __webpack_require__(108);
var eventTypes = {
mouseEnter: {
@@ -28595,6 +30496,7 @@ var eventTypes = {
};
var EnterLeaveEventPlugin = {
+
eventTypes: eventTypes,
/**
@@ -28661,12 +30563,13 @@ var EnterLeaveEventPlugin = {
return [leave, enter];
}
+
};
module.exports = EnterLeaveEventPlugin;
/***/ }),
-/* 366 */
+/* 375 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -28682,7 +30585,7 @@ module.exports = EnterLeaveEventPlugin;
-var DOMProperty = __webpack_require__(67);
+var DOMProperty = __webpack_require__(72);
var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
@@ -28877,37 +30780,13 @@ var HTMLDOMPropertyConfig = {
htmlFor: 'for',
httpEquiv: 'http-equiv'
},
- DOMPropertyNames: {},
- DOMMutationMethods: {
- value: function (node, value) {
- if (value == null) {
- return node.removeAttribute('value');
- }
-
- // Number inputs get special treatment due to some edge cases in
- // Chrome. Let everything else assign the value attribute as normal.
- // https://github.com/facebook/react/issues/7253#issuecomment-236074326
- if (node.type !== 'number' || node.hasAttribute('value') === false) {
- node.setAttribute('value', '' + value);
- } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) {
- // Don't assign an attribute if validation reports bad
- // input. Chrome will clear the value. Additionally, don't
- // operate on inputs that have focus, otherwise Chrome might
- // strip off trailing decimal places and cause the user's
- // cursor position to jump to the beginning of the input.
- //
- // In ReactDOMInput, we have an onBlur event that will trigger
- // this function again when focus is lost.
- node.setAttribute('value', '' + value);
- }
- }
- }
+ DOMPropertyNames: {}
};
module.exports = HTMLDOMPropertyConfig;
/***/ }),
-/* 367 */
+/* 376 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -28923,8 +30802,8 @@ module.exports = HTMLDOMPropertyConfig;
-var DOMChildrenOperations = __webpack_require__(146);
-var ReactDOMIDOperations = __webpack_require__(372);
+var DOMChildrenOperations = __webpack_require__(152);
+var ReactDOMIDOperations = __webpack_require__(381);
/**
* Abstracts away all functionality of the reconciler that requires knowledge of
@@ -28932,15 +30811,17 @@ var ReactDOMIDOperations = __webpack_require__(372);
* need for this injection.
*/
var ReactComponentBrowserEnvironment = {
+
processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
+
};
module.exports = ReactComponentBrowserEnvironment;
/***/ }),
-/* 368 */
+/* 377 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -28956,16 +30837,17 @@ module.exports = ReactComponentBrowserEnvironment;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
-var DOMLazyTree = __webpack_require__(72);
-var ExecutionEnvironment = __webpack_require__(21);
+var DOMLazyTree = __webpack_require__(77);
+var ExecutionEnvironment = __webpack_require__(23);
-var createNodesFromMarkup = __webpack_require__(369);
-var emptyFunction = __webpack_require__(24);
+var createNodesFromMarkup = __webpack_require__(378);
+var emptyFunction = __webpack_require__(22);
var invariant = __webpack_require__(9);
var Danger = {
+
/**
* Replaces a node with a string of markup at its current position within its
* parent. The markup must render into a single root node.
@@ -28986,12 +30868,13 @@ var Danger = {
DOMLazyTree.replaceChildWithTree(oldChild, markup);
}
}
+
};
module.exports = Danger;
/***/ }),
-/* 369 */
+/* 378 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -29010,10 +30893,10 @@ module.exports = Danger;
/*eslint-disable fb-www/unsafe-html*/
-var ExecutionEnvironment = __webpack_require__(21);
+var ExecutionEnvironment = __webpack_require__(23);
-var createArrayFromMixed = __webpack_require__(370);
-var getMarkupWrap = __webpack_require__(371);
+var createArrayFromMixed = __webpack_require__(379);
+var getMarkupWrap = __webpack_require__(380);
var invariant = __webpack_require__(9);
/**
@@ -29080,7 +30963,7 @@ function createNodesFromMarkup(markup, handleScript) {
module.exports = createNodesFromMarkup;
/***/ }),
-/* 370 */
+/* 379 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -29212,7 +31095,7 @@ function createArrayFromMixed(obj) {
module.exports = createArrayFromMixed;
/***/ }),
-/* 371 */
+/* 380 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -29230,7 +31113,7 @@ module.exports = createArrayFromMixed;
/*eslint-disable fb-www/unsafe-html */
-var ExecutionEnvironment = __webpack_require__(21);
+var ExecutionEnvironment = __webpack_require__(23);
var invariant = __webpack_require__(9);
@@ -29312,7 +31195,7 @@ function getMarkupWrap(nodeName) {
module.exports = getMarkupWrap;
/***/ }),
-/* 372 */
+/* 381 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -29328,13 +31211,14 @@ module.exports = getMarkupWrap;
-var DOMChildrenOperations = __webpack_require__(146);
-var ReactDOMComponentTree = __webpack_require__(16);
+var DOMChildrenOperations = __webpack_require__(152);
+var ReactDOMComponentTree = __webpack_require__(14);
/**
* Operations used to process updates to DOM nodes.
*/
var ReactDOMIDOperations = {
+
/**
* Updates a component's children by processing a series of updates.
*
@@ -29350,7 +31234,7 @@ var ReactDOMIDOperations = {
module.exports = ReactDOMIDOperations;
/***/ }),
-/* 373 */
+/* 382 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -29368,36 +31252,35 @@ module.exports = ReactDOMIDOperations;
-var _prodInvariant = __webpack_require__(13),
- _assign = __webpack_require__(15);
-
-var AutoFocusUtils = __webpack_require__(374);
-var CSSPropertyOperations = __webpack_require__(375);
-var DOMLazyTree = __webpack_require__(72);
-var DOMNamespaces = __webpack_require__(147);
-var DOMProperty = __webpack_require__(67);
-var DOMPropertyOperations = __webpack_require__(227);
-var EventPluginHub = __webpack_require__(69);
-var EventPluginRegistry = __webpack_require__(140);
-var ReactBrowserEventEmitter = __webpack_require__(108);
-var ReactDOMComponentFlags = __webpack_require__(216);
-var ReactDOMComponentTree = __webpack_require__(16);
-var ReactDOMInput = __webpack_require__(385);
-var ReactDOMOption = __webpack_require__(387);
-var ReactDOMSelect = __webpack_require__(228);
-var ReactDOMTextarea = __webpack_require__(388);
-var ReactInstrumentation = __webpack_require__(29);
-var ReactMultiChild = __webpack_require__(389);
-var ReactServerRenderingTransaction = __webpack_require__(396);
-
-var emptyFunction = __webpack_require__(24);
-var escapeTextContentForBrowser = __webpack_require__(107);
+var _prodInvariant = __webpack_require__(12),
+ _assign = __webpack_require__(13);
+
+var AutoFocusUtils = __webpack_require__(383);
+var CSSPropertyOperations = __webpack_require__(384);
+var DOMLazyTree = __webpack_require__(77);
+var DOMNamespaces = __webpack_require__(153);
+var DOMProperty = __webpack_require__(72);
+var DOMPropertyOperations = __webpack_require__(235);
+var EventPluginHub = __webpack_require__(74);
+var EventPluginRegistry = __webpack_require__(146);
+var ReactBrowserEventEmitter = __webpack_require__(111);
+var ReactDOMComponentFlags = __webpack_require__(225);
+var ReactDOMComponentTree = __webpack_require__(14);
+var ReactDOMInput = __webpack_require__(394);
+var ReactDOMOption = __webpack_require__(396);
+var ReactDOMSelect = __webpack_require__(236);
+var ReactDOMTextarea = __webpack_require__(397);
+var ReactInstrumentation = __webpack_require__(27);
+var ReactMultiChild = __webpack_require__(398);
+var ReactServerRenderingTransaction = __webpack_require__(405);
+
+var emptyFunction = __webpack_require__(22);
+var escapeTextContentForBrowser = __webpack_require__(110);
var invariant = __webpack_require__(9);
-var isEventSupported = __webpack_require__(143);
-var shallowEqual = __webpack_require__(87);
-var inputValueTracking = __webpack_require__(222);
-var validateDOMNesting = __webpack_require__(154);
-var warning = __webpack_require__(12);
+var isEventSupported = __webpack_require__(149);
+var shallowEqual = __webpack_require__(90);
+var validateDOMNesting = __webpack_require__(161);
+var warning = __webpack_require__(11);
var Flags = ReactDOMComponentFlags;
var deleteListener = EventPluginHub.deleteListener;
@@ -29406,7 +31289,7 @@ var listenTo = ReactBrowserEventEmitter.listenTo;
var registrationNameModules = EventPluginRegistry.registrationNameModules;
// For quickly matching children type, to test if can be treated as content.
-var CONTENT_TYPES = { string: true, number: true };
+var CONTENT_TYPES = { 'string': true, 'number': true };
var STYLE = 'style';
var HTML = '__html';
@@ -29515,7 +31398,7 @@ function enqueuePutListener(inst, registrationName, listener, transaction) {
if (false) {
// IE8 has no API for event capturing and the `onScroll` event doesn't
// bubble.
- process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), "This browser doesn't support the `onScroll` event") : void 0;
+ process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : void 0;
}
var containerInfo = inst._hostContainerInfo;
var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;
@@ -29605,10 +31488,6 @@ var mediaEvents = {
topWaiting: 'waiting'
};
-function trackInputValue() {
- inputValueTracking.track(this);
-}
-
function trapBubbledEventsLocal() {
var inst = this;
// If a component renders to null or if another component fatals and causes
@@ -29624,6 +31503,7 @@ function trapBubbledEventsLocal() {
break;
case 'video':
case 'audio':
+
inst._wrapperState.listeners = [];
// Create listener for each media event
for (var event in mediaEvents) {
@@ -29657,35 +31537,34 @@ function postUpdateSelectWrapper() {
// those special-case tags.
var omittedCloseTags = {
- area: true,
- base: true,
- br: true,
- col: true,
- embed: true,
- hr: true,
- img: true,
- input: true,
- keygen: true,
- link: true,
- meta: true,
- param: true,
- source: true,
- track: true,
- wbr: true
- // NOTE: menuitem's close tag should be omitted, but that causes problems.
+ 'area': true,
+ 'base': true,
+ 'br': true,
+ 'col': true,
+ 'embed': true,
+ 'hr': true,
+ 'img': true,
+ 'input': true,
+ 'keygen': true,
+ 'link': true,
+ 'meta': true,
+ 'param': true,
+ 'source': true,
+ 'track': true,
+ 'wbr': true
};
var newlineEatingTags = {
- listing: true,
- pre: true,
- textarea: true
+ 'listing': true,
+ 'pre': true,
+ 'textarea': true
};
// For HTML, certain tags cannot have children. This has the same purpose as
// `omittedCloseTags` except that `menuitem` should still have its closing tag.
var voidElementTags = _assign({
- menuitem: true
+ 'menuitem': true
}, omittedCloseTags);
// We accept any tag to be rendered but since this gets injected into arbitrary
@@ -29749,6 +31628,7 @@ function ReactDOMComponent(element) {
ReactDOMComponent.displayName = 'ReactDOMComponent';
ReactDOMComponent.Mixin = {
+
/**
* Generates root tag markup then recurses. This method has side effects and
* is not idempotent.
@@ -29785,7 +31665,6 @@ ReactDOMComponent.Mixin = {
case 'input':
ReactDOMInput.mountWrapper(this, props, hostParent);
props = ReactDOMInput.getHostProps(this, props);
- transaction.getReactMountReady().enqueue(trackInputValue, this);
transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
break;
case 'option':
@@ -29800,7 +31679,6 @@ ReactDOMComponent.Mixin = {
case 'textarea':
ReactDOMTextarea.mountWrapper(this, props, hostParent);
props = ReactDOMTextarea.getHostProps(this, props);
- transaction.getReactMountReady().enqueue(trackInputValue, this);
transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
break;
}
@@ -30326,10 +32204,6 @@ ReactDOMComponent.Mixin = {
}
}
break;
- case 'input':
- case 'textarea':
- inputValueTracking.stopTracking(this);
- break;
case 'html':
case 'head':
case 'body':
@@ -30358,6 +32232,7 @@ ReactDOMComponent.Mixin = {
getPublicInstance: function () {
return getNode(this);
}
+
};
_assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
@@ -30365,7 +32240,7 @@ _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mi
module.exports = ReactDOMComponent;
/***/ }),
-/* 374 */
+/* 383 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -30381,9 +32256,9 @@ module.exports = ReactDOMComponent;
-var ReactDOMComponentTree = __webpack_require__(16);
+var ReactDOMComponentTree = __webpack_require__(14);
-var focusNode = __webpack_require__(225);
+var focusNode = __webpack_require__(233);
var AutoFocusUtils = {
focusDOMComponent: function () {
@@ -30394,7 +32269,7 @@ var AutoFocusUtils = {
module.exports = AutoFocusUtils;
/***/ }),
-/* 375 */
+/* 384 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -30410,15 +32285,15 @@ module.exports = AutoFocusUtils;
-var CSSProperty = __webpack_require__(226);
-var ExecutionEnvironment = __webpack_require__(21);
-var ReactInstrumentation = __webpack_require__(29);
+var CSSProperty = __webpack_require__(234);
+var ExecutionEnvironment = __webpack_require__(23);
+var ReactInstrumentation = __webpack_require__(27);
-var camelizeStyleName = __webpack_require__(376);
-var dangerousStyleValue = __webpack_require__(378);
-var hyphenateStyleName = __webpack_require__(379);
-var memoizeStringOnly = __webpack_require__(381);
-var warning = __webpack_require__(12);
+var camelizeStyleName = __webpack_require__(385);
+var dangerousStyleValue = __webpack_require__(387);
+var hyphenateStyleName = __webpack_require__(388);
+var memoizeStringOnly = __webpack_require__(390);
+var warning = __webpack_require__(11);
var processStyleName = memoizeStringOnly(function (styleName) {
return hyphenateStyleName(styleName);
@@ -30475,7 +32350,7 @@ if (false) {
}
warnedStyleValues[value] = true;
- process.env.NODE_ENV !== 'production' ? warning(false, "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
+ process.env.NODE_ENV !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
};
var warnStyleValueIsNaN = function (name, value, owner) {
@@ -30525,6 +32400,7 @@ if (false) {
* Operations for dealing with CSS properties.
*/
var CSSPropertyOperations = {
+
/**
* Serializes a mapping of style properties for use as inline styles:
*
@@ -30544,16 +32420,13 @@ var CSSPropertyOperations = {
if (!styles.hasOwnProperty(styleName)) {
continue;
}
- var isCustomProperty = styleName.indexOf('--') === 0;
var styleValue = styles[styleName];
if (false) {
- if (!isCustomProperty) {
- warnValidStyle(styleName, styleValue, component);
- }
+ warnValidStyle(styleName, styleValue, component);
}
if (styleValue != null) {
serialized += processStyleName(styleName) + ':';
- serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';';
+ serialized += dangerousStyleValue(styleName, styleValue, component) + ';';
}
}
return serialized || null;
@@ -30581,19 +32454,14 @@ var CSSPropertyOperations = {
if (!styles.hasOwnProperty(styleName)) {
continue;
}
- var isCustomProperty = styleName.indexOf('--') === 0;
if (false) {
- if (!isCustomProperty) {
- warnValidStyle(styleName, styles[styleName], component);
- }
+ warnValidStyle(styleName, styles[styleName], component);
}
- var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty);
+ var styleValue = dangerousStyleValue(styleName, styles[styleName], component);
if (styleName === 'float' || styleName === 'cssFloat') {
styleName = styleFloatAccessor;
}
- if (isCustomProperty) {
- style.setProperty(styleName, styleValue);
- } else if (styleValue) {
+ if (styleValue) {
style[styleName] = styleValue;
} else {
var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
@@ -30609,12 +32477,13 @@ var CSSPropertyOperations = {
}
}
}
+
};
module.exports = CSSPropertyOperations;
/***/ }),
-/* 376 */
+/* 385 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -30631,7 +32500,7 @@ module.exports = CSSPropertyOperations;
-var camelize = __webpack_require__(377);
+var camelize = __webpack_require__(386);
var msPattern = /^-ms-/;
@@ -30659,7 +32528,7 @@ function camelizeStyleName(string) {
module.exports = camelizeStyleName;
/***/ }),
-/* 377 */
+/* 386 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -30696,7 +32565,7 @@ function camelize(string) {
module.exports = camelize;
/***/ }),
-/* 378 */
+/* 387 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -30712,8 +32581,8 @@ module.exports = camelize;
-var CSSProperty = __webpack_require__(226);
-var warning = __webpack_require__(12);
+var CSSProperty = __webpack_require__(234);
+var warning = __webpack_require__(11);
var isUnitlessNumber = CSSProperty.isUnitlessNumber;
var styleWarnings = {};
@@ -30728,7 +32597,7 @@ var styleWarnings = {};
* @param {ReactDOMComponent} component
* @return {string} Normalized style value with dimensions applied.
*/
-function dangerousStyleValue(name, value, component, isCustomProperty) {
+function dangerousStyleValue(name, value, component) {
// Note that we've removed escapeTextForBrowser() calls here since the
// whole string will be escaped when the attribute is injected into
// the markup. If you provide unsafe user data here they can inject
@@ -30745,7 +32614,7 @@ function dangerousStyleValue(name, value, component, isCustomProperty) {
}
var isNonNumeric = isNaN(value);
- if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
+ if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
return '' + value; // cast to string
}
@@ -30780,7 +32649,7 @@ function dangerousStyleValue(name, value, component, isCustomProperty) {
module.exports = dangerousStyleValue;
/***/ }),
-/* 379 */
+/* 388 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -30797,7 +32666,7 @@ module.exports = dangerousStyleValue;
-var hyphenate = __webpack_require__(380);
+var hyphenate = __webpack_require__(389);
var msPattern = /^ms-/;
@@ -30824,7 +32693,7 @@ function hyphenateStyleName(string) {
module.exports = hyphenateStyleName;
/***/ }),
-/* 380 */
+/* 389 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -30862,7 +32731,7 @@ function hyphenate(string) {
module.exports = hyphenate;
/***/ }),
-/* 381 */
+/* 390 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -30897,7 +32766,7 @@ function memoizeStringOnly(callback) {
module.exports = memoizeStringOnly;
/***/ }),
-/* 382 */
+/* 391 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -30913,7 +32782,7 @@ module.exports = memoizeStringOnly;
-var escapeTextContentForBrowser = __webpack_require__(107);
+var escapeTextContentForBrowser = __webpack_require__(110);
/**
* Escapes attribute value to prevent scripting attacks.
@@ -30928,7 +32797,7 @@ function quoteAttributeValueForBrowser(value) {
module.exports = quoteAttributeValueForBrowser;
/***/ }),
-/* 383 */
+/* 392 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -30944,7 +32813,7 @@ module.exports = quoteAttributeValueForBrowser;
-var EventPluginHub = __webpack_require__(69);
+var EventPluginHub = __webpack_require__(74);
function runEventQueueInBatch(events) {
EventPluginHub.enqueueEvents(events);
@@ -30952,6 +32821,7 @@ function runEventQueueInBatch(events) {
}
var ReactEventEmitterMixin = {
+
/**
* Streams a fired top-level event to `EventPluginHub` where plugins have the
* opportunity to create `ReactEvent`s to be dispatched.
@@ -30965,7 +32835,7 @@ var ReactEventEmitterMixin = {
module.exports = ReactEventEmitterMixin;
/***/ }),
-/* 384 */
+/* 393 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -30981,7 +32851,7 @@ module.exports = ReactEventEmitterMixin;
-var ExecutionEnvironment = __webpack_require__(21);
+var ExecutionEnvironment = __webpack_require__(23);
/**
* Generate a mapping of standard vendor prefixes using the defined style property and event name.
@@ -31071,7 +32941,7 @@ function getVendorPrefixedEventName(eventName) {
module.exports = getVendorPrefixedEventName;
/***/ }),
-/* 385 */
+/* 394 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -31087,16 +32957,16 @@ module.exports = getVendorPrefixedEventName;
-var _prodInvariant = __webpack_require__(13),
- _assign = __webpack_require__(15);
+var _prodInvariant = __webpack_require__(12),
+ _assign = __webpack_require__(13);
-var DOMPropertyOperations = __webpack_require__(227);
-var LinkedValueUtils = __webpack_require__(149);
-var ReactDOMComponentTree = __webpack_require__(16);
-var ReactUpdates = __webpack_require__(31);
+var DOMPropertyOperations = __webpack_require__(235);
+var LinkedValueUtils = __webpack_require__(155);
+var ReactDOMComponentTree = __webpack_require__(14);
+var ReactUpdates = __webpack_require__(28);
var invariant = __webpack_require__(9);
-var warning = __webpack_require__(12);
+var warning = __webpack_require__(11);
var didWarnValueLink = false;
var didWarnCheckedLink = false;
@@ -31189,9 +33059,12 @@ var ReactDOMInput = {
initialChecked: props.checked != null ? props.checked : props.defaultChecked,
initialValue: props.value != null ? props.value : defaultValue,
listeners: null,
- onChange: _handleChange.bind(inst),
- controlled: isControlled(props)
+ onChange: _handleChange.bind(inst)
};
+
+ if (false) {
+ inst._wrapperState.controlled = isControlled(props);
+ }
},
updateWrapper: function (inst) {
@@ -31220,26 +33093,14 @@ var ReactDOMInput = {
var node = ReactDOMComponentTree.getNodeFromInstance(inst);
var value = LinkedValueUtils.getValue(props);
if (value != null) {
- if (value === 0 && node.value === '') {
- node.value = '0';
- // Note: IE9 reports a number inputs as 'text', so check props instead.
- } else if (props.type === 'number') {
- // Simulate `input.valueAsNumber`. IE9 does not support it
- var valueAsNumber = parseFloat(node.value, 10) || 0;
- if (
- // eslint-disable-next-line
- value != valueAsNumber ||
- // eslint-disable-next-line
- value == valueAsNumber && node.value != value) {
- // Cast `value` to a string to ensure the value is set correctly. While
- // browsers typically do this as necessary, jsdom doesn't.
- node.value = '' + value;
- }
- } else if (node.value !== '' + value) {
- // Cast `value` to a string to ensure the value is set correctly. While
- // browsers typically do this as necessary, jsdom doesn't.
- node.value = '' + value;
+ // Cast `value` to a string to ensure the value is set correctly. While
+ // browsers typically do this as necessary, jsdom doesn't.
+ var newValue = '' + value;
+
+ // To avoid side effects (such as losing text selection), only set value if changed
+ if (newValue !== node.value) {
+ node.value = newValue;
}
} else {
if (props.value == null && props.defaultValue != null) {
@@ -31363,7 +33224,7 @@ function _handleChange(event) {
module.exports = ReactDOMInput;
/***/ }),
-/* 386 */
+/* 395 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -31385,7 +33246,7 @@ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
module.exports = ReactPropTypesSecret;
/***/ }),
-/* 387 */
+/* 396 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -31401,13 +33262,13 @@ module.exports = ReactPropTypesSecret;
-var _assign = __webpack_require__(15);
+var _assign = __webpack_require__(13);
-var React = __webpack_require__(65);
-var ReactDOMComponentTree = __webpack_require__(16);
-var ReactDOMSelect = __webpack_require__(228);
+var React = __webpack_require__(56);
+var ReactDOMComponentTree = __webpack_require__(14);
+var ReactDOMSelect = __webpack_require__(236);
-var warning = __webpack_require__(12);
+var warning = __webpack_require__(11);
var didWarnInvalidOptionChildren = false;
function flattenChildren(children) {
@@ -31507,12 +33368,13 @@ var ReactDOMOption = {
return hostProps;
}
+
};
module.exports = ReactDOMOption;
/***/ }),
-/* 388 */
+/* 397 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -31528,15 +33390,15 @@ module.exports = ReactDOMOption;
-var _prodInvariant = __webpack_require__(13),
- _assign = __webpack_require__(15);
+var _prodInvariant = __webpack_require__(12),
+ _assign = __webpack_require__(13);
-var LinkedValueUtils = __webpack_require__(149);
-var ReactDOMComponentTree = __webpack_require__(16);
-var ReactUpdates = __webpack_require__(31);
+var LinkedValueUtils = __webpack_require__(155);
+var ReactDOMComponentTree = __webpack_require__(14);
+var ReactUpdates = __webpack_require__(28);
var invariant = __webpack_require__(9);
-var warning = __webpack_require__(12);
+var warning = __webpack_require__(11);
var didWarnValueLink = false;
var didWarnValDefaultVal = false;
@@ -31677,7 +33539,7 @@ function _handleChange(event) {
module.exports = ReactDOMTextarea;
/***/ }),
-/* 389 */
+/* 398 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -31693,18 +33555,18 @@ module.exports = ReactDOMTextarea;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
-var ReactComponentEnvironment = __webpack_require__(150);
-var ReactInstanceMap = __webpack_require__(86);
-var ReactInstrumentation = __webpack_require__(29);
+var ReactComponentEnvironment = __webpack_require__(156);
+var ReactInstanceMap = __webpack_require__(89);
+var ReactInstrumentation = __webpack_require__(27);
-var ReactCurrentOwner = __webpack_require__(37);
-var ReactReconciler = __webpack_require__(70);
-var ReactChildReconciler = __webpack_require__(390);
+var ReactCurrentOwner = __webpack_require__(36);
+var ReactReconciler = __webpack_require__(75);
+var ReactChildReconciler = __webpack_require__(399);
-var emptyFunction = __webpack_require__(24);
-var flattenChildren = __webpack_require__(395);
+var emptyFunction = __webpack_require__(22);
+var flattenChildren = __webpack_require__(404);
var invariant = __webpack_require__(9);
/**
@@ -31851,6 +33713,7 @@ if (false) {
* @internal
*/
var ReactMultiChild = {
+
/**
* Provides common functionality for components that must reconcile multiple
* children. This is used by `ReactDOMComponent` to mount, update, and
@@ -31859,6 +33722,7 @@ var ReactMultiChild = {
* @lends {ReactMultiChild.prototype}
*/
Mixin: {
+
_reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {
if (false) {
var selfDebugID = getDebugID(this);
@@ -32122,13 +33986,15 @@ var ReactMultiChild = {
child._mountIndex = null;
return update;
}
+
}
+
};
module.exports = ReactMultiChild;
/***/ }),
-/* 390 */
+/* 399 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -32144,13 +34010,13 @@ module.exports = ReactMultiChild;
-var ReactReconciler = __webpack_require__(70);
+var ReactReconciler = __webpack_require__(75);
-var instantiateReactComponent = __webpack_require__(230);
-var KeyEscapeUtils = __webpack_require__(152);
-var shouldUpdateReactComponent = __webpack_require__(151);
-var traverseAllChildren = __webpack_require__(234);
-var warning = __webpack_require__(12);
+var instantiateReactComponent = __webpack_require__(237);
+var KeyEscapeUtils = __webpack_require__(158);
+var shouldUpdateReactComponent = __webpack_require__(157);
+var traverseAllChildren = __webpack_require__(241);
+var warning = __webpack_require__(11);
var ReactComponentTreeHook;
@@ -32160,7 +34026,7 @@ if (typeof process !== 'undefined' && Object({"NODE_ENV":'production'}) && 'prod
// https://github.com/facebook/react/issues/7240
// Remove the inline requires when we don't need them anymore:
// https://github.com/facebook/react/pull/7178
- ReactComponentTreeHook = __webpack_require__(235);
+ ReactComponentTreeHook = __webpack_require__(159);
}
function instantiateChild(childInstances, child, name, selfDebugID) {
@@ -32193,8 +34059,8 @@ var ReactChildReconciler = {
* @return {?object} A set of child instances.
* @internal
*/
- instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID) // 0 in production and for roots
- {
+ instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots
+ ) {
if (nestedChildNodes == null) {
return null;
}
@@ -32220,8 +34086,8 @@ var ReactChildReconciler = {
* @return {?object} A new set of child instances.
* @internal
*/
- updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) // 0 in production and for roots
- {
+ updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots
+ ) {
// We currently don't have a way to track moves here but if we use iterators
// instead of for..in we can zip the iterators and check if an item has
// moved.
@@ -32281,13 +34147,14 @@ var ReactChildReconciler = {
}
}
}
+
};
module.exports = ReactChildReconciler;
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(229)))
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(112)))
/***/ }),
-/* 391 */
+/* 400 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -32303,27 +34170,27 @@ module.exports = ReactChildReconciler;
-var _prodInvariant = __webpack_require__(13),
- _assign = __webpack_require__(15);
+var _prodInvariant = __webpack_require__(12),
+ _assign = __webpack_require__(13);
-var React = __webpack_require__(65);
-var ReactComponentEnvironment = __webpack_require__(150);
-var ReactCurrentOwner = __webpack_require__(37);
-var ReactErrorUtils = __webpack_require__(141);
-var ReactInstanceMap = __webpack_require__(86);
-var ReactInstrumentation = __webpack_require__(29);
-var ReactNodeTypes = __webpack_require__(231);
-var ReactReconciler = __webpack_require__(70);
+var React = __webpack_require__(56);
+var ReactComponentEnvironment = __webpack_require__(156);
+var ReactCurrentOwner = __webpack_require__(36);
+var ReactErrorUtils = __webpack_require__(147);
+var ReactInstanceMap = __webpack_require__(89);
+var ReactInstrumentation = __webpack_require__(27);
+var ReactNodeTypes = __webpack_require__(238);
+var ReactReconciler = __webpack_require__(75);
if (false) {
var checkReactTypeSpec = require('./checkReactTypeSpec');
}
-var emptyObject = __webpack_require__(102);
+var emptyObject = __webpack_require__(105);
var invariant = __webpack_require__(9);
-var shallowEqual = __webpack_require__(87);
-var shouldUpdateReactComponent = __webpack_require__(151);
-var warning = __webpack_require__(12);
+var shallowEqual = __webpack_require__(90);
+var shouldUpdateReactComponent = __webpack_require__(157);
+var warning = __webpack_require__(11);
var CompositeTypes = {
ImpureClass: 0,
@@ -32410,6 +34277,7 @@ var nextMountID = 1;
* @lends {ReactCompositeComponent.prototype}
*/
var ReactCompositeComponent = {
+
/**
* Base constructor for all composite component.
*
@@ -32505,7 +34373,7 @@ var ReactCompositeComponent = {
var propsMutated = inst.props !== publicProps;
var componentName = Component.displayName || Component.name || 'Component';
- process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", componentName, componentName) : void 0;
+ process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + 'up the same props that your component\'s constructor was passed.', componentName, componentName) : void 0;
}
// These should be set up in the constructor, but as a convenience for
@@ -32806,7 +34674,7 @@ var ReactCompositeComponent = {
if (childContext) {
!(typeof Component.childContextTypes === 'object') ? false ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;
if (false) {
- this._checkContextTypes(Component.childContextTypes, childContext, 'child context');
+ this._checkContextTypes(Component.childContextTypes, childContext, 'childContext');
}
for (var name in childContext) {
!(name in Component.childContextTypes) ? false ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0;
@@ -33187,12 +35055,13 @@ var ReactCompositeComponent = {
// Stub
_instantiateReactComponent: null
+
};
module.exports = ReactCompositeComponent;
/***/ }),
-/* 392 */
+/* 401 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -33218,7 +35087,7 @@ function getNextDebugID() {
module.exports = getNextDebugID;
/***/ }),
-/* 393 */
+/* 402 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -33243,7 +35112,7 @@ var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol
module.exports = REACT_ELEMENT_TYPE;
/***/ }),
-/* 394 */
+/* 403 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -33289,7 +35158,7 @@ function getIteratorFn(maybeIterable) {
module.exports = getIteratorFn;
/***/ }),
-/* 395 */
+/* 404 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -33306,9 +35175,9 @@ module.exports = getIteratorFn;
-var KeyEscapeUtils = __webpack_require__(152);
-var traverseAllChildren = __webpack_require__(234);
-var warning = __webpack_require__(12);
+var KeyEscapeUtils = __webpack_require__(158);
+var traverseAllChildren = __webpack_require__(241);
+var warning = __webpack_require__(11);
var ReactComponentTreeHook;
@@ -33318,7 +35187,7 @@ if (typeof process !== 'undefined' && Object({"NODE_ENV":'production'}) && 'prod
// https://github.com/facebook/react/issues/7240
// Remove the inline requires when we don't need them anymore:
// https://github.com/facebook/react/pull/7178
- ReactComponentTreeHook = __webpack_require__(235);
+ ReactComponentTreeHook = __webpack_require__(159);
}
/**
@@ -33368,10 +35237,10 @@ function flattenChildren(children, selfDebugID) {
}
module.exports = flattenChildren;
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(229)))
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(112)))
/***/ }),
-/* 396 */
+/* 405 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -33387,12 +35256,12 @@ module.exports = flattenChildren;
-var _assign = __webpack_require__(15);
+var _assign = __webpack_require__(13);
-var PooledClass = __webpack_require__(53);
-var Transaction = __webpack_require__(104);
-var ReactInstrumentation = __webpack_require__(29);
-var ReactServerUpdateQueue = __webpack_require__(397);
+var PooledClass = __webpack_require__(58);
+var Transaction = __webpack_require__(107);
+var ReactInstrumentation = __webpack_require__(27);
+var ReactServerUpdateQueue = __webpack_require__(406);
/**
* Executed within the scope of the `Transaction` instance. Consider these as
@@ -33466,7 +35335,7 @@ PooledClass.addPoolingTo(ReactServerRenderingTransaction);
module.exports = ReactServerRenderingTransaction;
/***/ }),
-/* 397 */
+/* 406 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -33485,9 +35354,9 @@ module.exports = ReactServerRenderingTransaction;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-var ReactUpdateQueue = __webpack_require__(153);
+var ReactUpdateQueue = __webpack_require__(160);
-var warning = __webpack_require__(12);
+var warning = __webpack_require__(11);
function warnNoop(publicInstance, callerName) {
if (false) {
@@ -33610,7 +35479,7 @@ var ReactServerUpdateQueue = function () {
module.exports = ReactServerUpdateQueue;
/***/ }),
-/* 398 */
+/* 407 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -33626,10 +35495,10 @@ module.exports = ReactServerUpdateQueue;
-var _assign = __webpack_require__(15);
+var _assign = __webpack_require__(13);
-var DOMLazyTree = __webpack_require__(72);
-var ReactDOMComponentTree = __webpack_require__(16);
+var DOMLazyTree = __webpack_require__(77);
+var ReactDOMComponentTree = __webpack_require__(14);
var ReactDOMEmptyComponent = function (instantiate) {
// ReactCompositeComponent uses this:
@@ -33675,7 +35544,7 @@ _assign(ReactDOMEmptyComponent.prototype, {
module.exports = ReactDOMEmptyComponent;
/***/ }),
-/* 399 */
+/* 408 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -33691,7 +35560,7 @@ module.exports = ReactDOMEmptyComponent;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
var invariant = __webpack_require__(9);
@@ -33816,7 +35685,7 @@ module.exports = {
};
/***/ }),
-/* 400 */
+/* 409 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -33832,16 +35701,16 @@ module.exports = {
-var _prodInvariant = __webpack_require__(13),
- _assign = __webpack_require__(15);
+var _prodInvariant = __webpack_require__(12),
+ _assign = __webpack_require__(13);
-var DOMChildrenOperations = __webpack_require__(146);
-var DOMLazyTree = __webpack_require__(72);
-var ReactDOMComponentTree = __webpack_require__(16);
+var DOMChildrenOperations = __webpack_require__(152);
+var DOMLazyTree = __webpack_require__(77);
+var ReactDOMComponentTree = __webpack_require__(14);
-var escapeTextContentForBrowser = __webpack_require__(107);
+var escapeTextContentForBrowser = __webpack_require__(110);
var invariant = __webpack_require__(9);
-var validateDOMNesting = __webpack_require__(154);
+var validateDOMNesting = __webpack_require__(161);
/**
* Text nodes violate a couple assumptions that React makes about components:
@@ -33874,6 +35743,7 @@ var ReactDOMTextComponent = function (text) {
};
_assign(ReactDOMTextComponent.prototype, {
+
/**
* Creates the markup for this text node. This node is not intended to have
* any features besides containing text content.
@@ -33978,12 +35848,13 @@ _assign(ReactDOMTextComponent.prototype, {
this._commentNodes = null;
ReactDOMComponentTree.uncacheNode(this);
}
+
});
module.exports = ReactDOMTextComponent;
/***/ }),
-/* 401 */
+/* 410 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -33999,12 +35870,12 @@ module.exports = ReactDOMTextComponent;
-var _assign = __webpack_require__(15);
+var _assign = __webpack_require__(13);
-var ReactUpdates = __webpack_require__(31);
-var Transaction = __webpack_require__(104);
+var ReactUpdates = __webpack_require__(28);
+var Transaction = __webpack_require__(107);
-var emptyFunction = __webpack_require__(24);
+var emptyFunction = __webpack_require__(22);
var RESET_BATCHED_UPDATES = {
initialize: emptyFunction,
@@ -34056,7 +35927,7 @@ var ReactDefaultBatchingStrategy = {
module.exports = ReactDefaultBatchingStrategy;
/***/ }),
-/* 402 */
+/* 411 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -34072,16 +35943,16 @@ module.exports = ReactDefaultBatchingStrategy;
-var _assign = __webpack_require__(15);
+var _assign = __webpack_require__(13);
-var EventListener = __webpack_require__(236);
-var ExecutionEnvironment = __webpack_require__(21);
-var PooledClass = __webpack_require__(53);
-var ReactDOMComponentTree = __webpack_require__(16);
-var ReactUpdates = __webpack_require__(31);
+var EventListener = __webpack_require__(242);
+var ExecutionEnvironment = __webpack_require__(23);
+var PooledClass = __webpack_require__(58);
+var ReactDOMComponentTree = __webpack_require__(14);
+var ReactUpdates = __webpack_require__(28);
-var getEventTarget = __webpack_require__(142);
-var getUnboundedScrollPosition = __webpack_require__(403);
+var getEventTarget = __webpack_require__(148);
+var getUnboundedScrollPosition = __webpack_require__(412);
/**
* Find the deepest React component completely containing the root of the
@@ -34216,7 +36087,7 @@ var ReactEventListener = {
module.exports = ReactEventListener;
/***/ }),
-/* 403 */
+/* 412 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -34260,7 +36131,7 @@ function getUnboundedScrollPosition(scrollable) {
module.exports = getUnboundedScrollPosition;
/***/ }),
-/* 404 */
+/* 413 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -34276,14 +36147,14 @@ module.exports = getUnboundedScrollPosition;
-var DOMProperty = __webpack_require__(67);
-var EventPluginHub = __webpack_require__(69);
-var EventPluginUtils = __webpack_require__(103);
-var ReactComponentEnvironment = __webpack_require__(150);
-var ReactEmptyComponent = __webpack_require__(232);
-var ReactBrowserEventEmitter = __webpack_require__(108);
-var ReactHostComponent = __webpack_require__(233);
-var ReactUpdates = __webpack_require__(31);
+var DOMProperty = __webpack_require__(72);
+var EventPluginHub = __webpack_require__(74);
+var EventPluginUtils = __webpack_require__(106);
+var ReactComponentEnvironment = __webpack_require__(156);
+var ReactEmptyComponent = __webpack_require__(239);
+var ReactBrowserEventEmitter = __webpack_require__(111);
+var ReactHostComponent = __webpack_require__(240);
+var ReactUpdates = __webpack_require__(28);
var ReactInjection = {
Component: ReactComponentEnvironment.injection,
@@ -34299,7 +36170,7 @@ var ReactInjection = {
module.exports = ReactInjection;
/***/ }),
-/* 405 */
+/* 414 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -34315,15 +36186,15 @@ module.exports = ReactInjection;
-var _assign = __webpack_require__(15);
+var _assign = __webpack_require__(13);
-var CallbackQueue = __webpack_require__(220);
-var PooledClass = __webpack_require__(53);
-var ReactBrowserEventEmitter = __webpack_require__(108);
-var ReactInputSelection = __webpack_require__(237);
-var ReactInstrumentation = __webpack_require__(29);
-var Transaction = __webpack_require__(104);
-var ReactUpdateQueue = __webpack_require__(153);
+var CallbackQueue = __webpack_require__(229);
+var PooledClass = __webpack_require__(58);
+var ReactBrowserEventEmitter = __webpack_require__(111);
+var ReactInputSelection = __webpack_require__(243);
+var ReactInstrumentation = __webpack_require__(27);
+var Transaction = __webpack_require__(107);
+var ReactUpdateQueue = __webpack_require__(160);
/**
* Ensures that, when possible, the selection range (currently selected text
@@ -34482,7 +36353,7 @@ PooledClass.addPoolingTo(ReactReconcileTransaction);
module.exports = ReactReconcileTransaction;
/***/ }),
-/* 406 */
+/* 415 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -34498,10 +36369,10 @@ module.exports = ReactReconcileTransaction;
-var ExecutionEnvironment = __webpack_require__(21);
+var ExecutionEnvironment = __webpack_require__(23);
-var getNodeForCharacterOffset = __webpack_require__(407);
-var getTextContentAccessor = __webpack_require__(219);
+var getNodeForCharacterOffset = __webpack_require__(416);
+var getTextContentAccessor = __webpack_require__(228);
/**
* While `isCollapsed` is available on the Selection object and `collapsed`
@@ -34699,7 +36570,7 @@ var ReactDOMSelection = {
module.exports = ReactDOMSelection;
/***/ }),
-/* 407 */
+/* 416 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -34778,7 +36649,7 @@ function getNodeForCharacterOffset(root, offset) {
module.exports = getNodeForCharacterOffset;
/***/ }),
-/* 408 */
+/* 417 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -34795,7 +36666,7 @@ module.exports = getNodeForCharacterOffset;
*
*/
-var isTextNode = __webpack_require__(409);
+var isTextNode = __webpack_require__(418);
/*eslint-disable no-bitwise */
@@ -34823,7 +36694,7 @@ function containsNode(outerNode, innerNode) {
module.exports = containsNode;
/***/ }),
-/* 409 */
+/* 418 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -34840,7 +36711,7 @@ module.exports = containsNode;
* @typechecks
*/
-var isNode = __webpack_require__(410);
+var isNode = __webpack_require__(419);
/**
* @param {*} object The object to check.
@@ -34853,7 +36724,7 @@ function isTextNode(object) {
module.exports = isTextNode;
/***/ }),
-/* 410 */
+/* 419 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -34883,7 +36754,7 @@ function isNode(object) {
module.exports = isNode;
/***/ }),
-/* 411 */
+/* 420 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -35190,7 +37061,7 @@ Object.keys(ATTRS).forEach(function (key) {
module.exports = SVGDOMPropertyConfig;
/***/ }),
-/* 412 */
+/* 421 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -35206,15 +37077,15 @@ module.exports = SVGDOMPropertyConfig;
-var EventPropagators = __webpack_require__(68);
-var ExecutionEnvironment = __webpack_require__(21);
-var ReactDOMComponentTree = __webpack_require__(16);
-var ReactInputSelection = __webpack_require__(237);
-var SyntheticEvent = __webpack_require__(38);
+var EventPropagators = __webpack_require__(73);
+var ExecutionEnvironment = __webpack_require__(23);
+var ReactDOMComponentTree = __webpack_require__(14);
+var ReactInputSelection = __webpack_require__(243);
+var SyntheticEvent = __webpack_require__(37);
-var getActiveElement = __webpack_require__(238);
-var isTextInputElement = __webpack_require__(223);
-var shallowEqual = __webpack_require__(87);
+var getActiveElement = __webpack_require__(244);
+var isTextInputElement = __webpack_require__(231);
+var shallowEqual = __webpack_require__(90);
var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;
@@ -35319,6 +37190,7 @@ function constructSelectEvent(nativeEvent, nativeEventTarget) {
* - Fires after user input.
*/
var SelectEventPlugin = {
+
eventTypes: eventTypes,
extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
@@ -35342,6 +37214,7 @@ var SelectEventPlugin = {
activeElementInst = null;
lastSelection = null;
break;
+
// Don't fire the event while the user is dragging. This matches the
// semantics of the native select event.
case 'topMouseDown':
@@ -35351,6 +37224,7 @@ var SelectEventPlugin = {
case 'topMouseUp':
mouseDown = false;
return constructSelectEvent(nativeEvent, nativeEventTarget);
+
// Chrome and IE fire non-standard event when selection is changed (and
// sometimes when it hasn't). IE's event fires out of order with respect
// to key and input events on deletion, so we discard it.
@@ -35383,7 +37257,7 @@ var SelectEventPlugin = {
module.exports = SelectEventPlugin;
/***/ }),
-/* 413 */
+/* 422 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -35400,25 +37274,25 @@ module.exports = SelectEventPlugin;
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
-var EventListener = __webpack_require__(236);
-var EventPropagators = __webpack_require__(68);
-var ReactDOMComponentTree = __webpack_require__(16);
-var SyntheticAnimationEvent = __webpack_require__(414);
-var SyntheticClipboardEvent = __webpack_require__(415);
-var SyntheticEvent = __webpack_require__(38);
-var SyntheticFocusEvent = __webpack_require__(416);
-var SyntheticKeyboardEvent = __webpack_require__(417);
-var SyntheticMouseEvent = __webpack_require__(105);
-var SyntheticDragEvent = __webpack_require__(419);
-var SyntheticTouchEvent = __webpack_require__(420);
-var SyntheticTransitionEvent = __webpack_require__(421);
-var SyntheticUIEvent = __webpack_require__(71);
-var SyntheticWheelEvent = __webpack_require__(422);
+var EventListener = __webpack_require__(242);
+var EventPropagators = __webpack_require__(73);
+var ReactDOMComponentTree = __webpack_require__(14);
+var SyntheticAnimationEvent = __webpack_require__(423);
+var SyntheticClipboardEvent = __webpack_require__(424);
+var SyntheticEvent = __webpack_require__(37);
+var SyntheticFocusEvent = __webpack_require__(425);
+var SyntheticKeyboardEvent = __webpack_require__(426);
+var SyntheticMouseEvent = __webpack_require__(108);
+var SyntheticDragEvent = __webpack_require__(428);
+var SyntheticTouchEvent = __webpack_require__(429);
+var SyntheticTransitionEvent = __webpack_require__(430);
+var SyntheticUIEvent = __webpack_require__(76);
+var SyntheticWheelEvent = __webpack_require__(431);
-var emptyFunction = __webpack_require__(24);
-var getEventCharCode = __webpack_require__(155);
+var emptyFunction = __webpack_require__(22);
+var getEventCharCode = __webpack_require__(162);
var invariant = __webpack_require__(9);
/**
@@ -35470,6 +37344,7 @@ function isInteractive(tag) {
}
var SimpleEventPlugin = {
+
eventTypes: eventTypes,
extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
@@ -35609,12 +37484,13 @@ var SimpleEventPlugin = {
delete onClickListeners[key];
}
}
+
};
module.exports = SimpleEventPlugin;
/***/ }),
-/* 414 */
+/* 423 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -35630,7 +37506,7 @@ module.exports = SimpleEventPlugin;
-var SyntheticEvent = __webpack_require__(38);
+var SyntheticEvent = __webpack_require__(37);
/**
* @interface Event
@@ -35658,7 +37534,7 @@ SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);
module.exports = SyntheticAnimationEvent;
/***/ }),
-/* 415 */
+/* 424 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -35674,7 +37550,7 @@ module.exports = SyntheticAnimationEvent;
-var SyntheticEvent = __webpack_require__(38);
+var SyntheticEvent = __webpack_require__(37);
/**
* @interface Event
@@ -35701,7 +37577,7 @@ SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
module.exports = SyntheticClipboardEvent;
/***/ }),
-/* 416 */
+/* 425 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -35717,7 +37593,7 @@ module.exports = SyntheticClipboardEvent;
-var SyntheticUIEvent = __webpack_require__(71);
+var SyntheticUIEvent = __webpack_require__(76);
/**
* @interface FocusEvent
@@ -35742,7 +37618,7 @@ SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
module.exports = SyntheticFocusEvent;
/***/ }),
-/* 417 */
+/* 426 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -35758,11 +37634,11 @@ module.exports = SyntheticFocusEvent;
-var SyntheticUIEvent = __webpack_require__(71);
+var SyntheticUIEvent = __webpack_require__(76);
-var getEventCharCode = __webpack_require__(155);
-var getEventKey = __webpack_require__(418);
-var getEventModifierState = __webpack_require__(145);
+var getEventCharCode = __webpack_require__(162);
+var getEventKey = __webpack_require__(427);
+var getEventModifierState = __webpack_require__(151);
/**
* @interface KeyboardEvent
@@ -35831,7 +37707,7 @@ SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
module.exports = SyntheticKeyboardEvent;
/***/ }),
-/* 418 */
+/* 427 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -35847,25 +37723,25 @@ module.exports = SyntheticKeyboardEvent;
-var getEventCharCode = __webpack_require__(155);
+var getEventCharCode = __webpack_require__(162);
/**
* Normalization of deprecated HTML5 `key` values
* @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
*/
var normalizeKey = {
- Esc: 'Escape',
- Spacebar: ' ',
- Left: 'ArrowLeft',
- Up: 'ArrowUp',
- Right: 'ArrowRight',
- Down: 'ArrowDown',
- Del: 'Delete',
- Win: 'OS',
- Menu: 'ContextMenu',
- Apps: 'ContextMenu',
- Scroll: 'ScrollLock',
- MozPrintableKey: 'Unidentified'
+ 'Esc': 'Escape',
+ 'Spacebar': ' ',
+ 'Left': 'ArrowLeft',
+ 'Up': 'ArrowUp',
+ 'Right': 'ArrowRight',
+ 'Down': 'ArrowDown',
+ 'Del': 'Delete',
+ 'Win': 'OS',
+ 'Menu': 'ContextMenu',
+ 'Apps': 'ContextMenu',
+ 'Scroll': 'ScrollLock',
+ 'MozPrintableKey': 'Unidentified'
};
/**
@@ -35895,18 +37771,8 @@ var translateToKey = {
40: 'ArrowDown',
45: 'Insert',
46: 'Delete',
- 112: 'F1',
- 113: 'F2',
- 114: 'F3',
- 115: 'F4',
- 116: 'F5',
- 117: 'F6',
- 118: 'F7',
- 119: 'F8',
- 120: 'F9',
- 121: 'F10',
- 122: 'F11',
- 123: 'F12',
+ 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6',
+ 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12',
144: 'NumLock',
145: 'ScrollLock',
224: 'Meta'
@@ -35948,7 +37814,7 @@ function getEventKey(nativeEvent) {
module.exports = getEventKey;
/***/ }),
-/* 419 */
+/* 428 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -35964,7 +37830,7 @@ module.exports = getEventKey;
-var SyntheticMouseEvent = __webpack_require__(105);
+var SyntheticMouseEvent = __webpack_require__(108);
/**
* @interface DragEvent
@@ -35989,7 +37855,7 @@ SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
module.exports = SyntheticDragEvent;
/***/ }),
-/* 420 */
+/* 429 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -36005,9 +37871,9 @@ module.exports = SyntheticDragEvent;
-var SyntheticUIEvent = __webpack_require__(71);
+var SyntheticUIEvent = __webpack_require__(76);
-var getEventModifierState = __webpack_require__(145);
+var getEventModifierState = __webpack_require__(151);
/**
* @interface TouchEvent
@@ -36039,7 +37905,7 @@ SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
module.exports = SyntheticTouchEvent;
/***/ }),
-/* 421 */
+/* 430 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -36055,7 +37921,7 @@ module.exports = SyntheticTouchEvent;
-var SyntheticEvent = __webpack_require__(38);
+var SyntheticEvent = __webpack_require__(37);
/**
* @interface Event
@@ -36083,7 +37949,7 @@ SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);
module.exports = SyntheticTransitionEvent;
/***/ }),
-/* 422 */
+/* 431 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -36099,7 +37965,7 @@ module.exports = SyntheticTransitionEvent;
-var SyntheticMouseEvent = __webpack_require__(105);
+var SyntheticMouseEvent = __webpack_require__(108);
/**
* @interface WheelEvent
@@ -36107,12 +37973,15 @@ var SyntheticMouseEvent = __webpack_require__(105);
*/
var WheelEventInterface = {
deltaX: function (event) {
- return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
+ return 'deltaX' in event ? event.deltaX :
+ // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
},
deltaY: function (event) {
- return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
- 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
+ return 'deltaY' in event ? event.deltaY :
+ // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
+ 'wheelDeltaY' in event ? -event.wheelDeltaY :
+ // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
'wheelDelta' in event ? -event.wheelDelta : 0;
},
deltaZ: null,
@@ -36139,7 +38008,7 @@ SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
module.exports = SyntheticWheelEvent;
/***/ }),
-/* 423 */
+/* 432 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -36155,7 +38024,7 @@ module.exports = SyntheticWheelEvent;
-var validateDOMNesting = __webpack_require__(154);
+var validateDOMNesting = __webpack_require__(161);
var DOC_NODE_TYPE = 9;
@@ -36177,7 +38046,7 @@ function ReactDOMContainerInfo(topLevelWrapper, node) {
module.exports = ReactDOMContainerInfo;
/***/ }),
-/* 424 */
+/* 433 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -36201,7 +38070,7 @@ var ReactDOMFeatureFlags = {
module.exports = ReactDOMFeatureFlags;
/***/ }),
-/* 425 */
+/* 434 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -36217,7 +38086,7 @@ module.exports = ReactDOMFeatureFlags;
-var adler32 = __webpack_require__(426);
+var adler32 = __webpack_require__(435);
var TAG_END = /\/?>/;
var COMMENT_START = /^<\!\-\-/;
@@ -36256,7 +38125,7 @@ var ReactMarkupChecksum = {
module.exports = ReactMarkupChecksum;
/***/ }),
-/* 426 */
+/* 435 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -36305,7 +38174,7 @@ function adler32(data) {
module.exports = adler32;
/***/ }),
-/* 427 */
+/* 436 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -36321,10 +38190,10 @@ module.exports = adler32;
-module.exports = '15.6.1';
+module.exports = '15.4.2';
/***/ }),
-/* 428 */
+/* 437 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -36340,15 +38209,15 @@ module.exports = '15.6.1';
-var _prodInvariant = __webpack_require__(13);
+var _prodInvariant = __webpack_require__(12);
-var ReactCurrentOwner = __webpack_require__(37);
-var ReactDOMComponentTree = __webpack_require__(16);
-var ReactInstanceMap = __webpack_require__(86);
+var ReactCurrentOwner = __webpack_require__(36);
+var ReactDOMComponentTree = __webpack_require__(14);
+var ReactInstanceMap = __webpack_require__(89);
-var getHostComponentFromComposite = __webpack_require__(240);
+var getHostComponentFromComposite = __webpack_require__(246);
var invariant = __webpack_require__(9);
-var warning = __webpack_require__(12);
+var warning = __webpack_require__(11);
/**
* Returns the DOM node rendered by this element.
@@ -36389,7 +38258,7 @@ function findDOMNode(componentOrElement) {
module.exports = findDOMNode;
/***/ }),
-/* 429 */
+/* 438 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -36405,29 +38274,25 @@ module.exports = findDOMNode;
-var ReactMount = __webpack_require__(239);
+var ReactMount = __webpack_require__(245);
module.exports = ReactMount.renderSubtreeIntoContainer;
/***/ }),
-/* 430 */
+/* 439 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(20);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(17);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(39);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createTransitionManager__ = __webpack_require__(241);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(88);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouterContext__ = __webpack_require__(158);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__RouteUtils__ = __webpack_require__(45);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__RouterUtils__ = __webpack_require__(243);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__routerWarning__ = __webpack_require__(73);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createTransitionManager__ = __webpack_require__(247);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__ = __webpack_require__(91);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouterContext__ = __webpack_require__(165);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouteUtils__ = __webpack_require__(44);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__RouterUtils__ = __webpack_require__(249);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__routerWarning__ = __webpack_require__(78);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
@@ -36442,35 +38307,37 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
-
-
-var propTypes = {
- history: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"],
- children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["d" /* routes */],
- routes: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["d" /* routes */], // alias for children
- render: __WEBPACK_IMPORTED_MODULE_3_prop_types__["func"],
- createElement: __WEBPACK_IMPORTED_MODULE_3_prop_types__["func"],
- onError: __WEBPACK_IMPORTED_MODULE_3_prop_types__["func"],
- onUpdate: __WEBPACK_IMPORTED_MODULE_3_prop_types__["func"],
-
- // PRIVATE: For client-side rehydration of server match.
- matchContext: __WEBPACK_IMPORTED_MODULE_3_prop_types__["object"]
-};
+var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_1_react___default.a.PropTypes,
+ func = _React$PropTypes.func,
+ object = _React$PropTypes.object;
/**
* A is a high-level API for automatically setting up
* a router that renders a with all the props
* it needs each time the URL changes.
*/
-var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({
+
+var Router = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({
displayName: 'Router',
- propTypes: propTypes,
+
+ propTypes: {
+ history: object,
+ children: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["d" /* routes */],
+ routes: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["d" /* routes */], // alias for children
+ render: func,
+ createElement: func,
+ onError: func,
+ onUpdate: func,
+
+ // PRIVATE: For client-side rehydration of server match.
+ matchContext: object
+ },
getDefaultProps: function getDefaultProps() {
return {
render: function render(props) {
- return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6__RouterContext__["a" /* default */], props);
+ return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4__RouterContext__["a" /* default */], props);
}
};
},
@@ -36499,7 +38366,7 @@ var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({
var history = this.props.history;
- return Object(__WEBPACK_IMPORTED_MODULE_8__RouterUtils__["b" /* createRouterObject */])(history, this.transitionManager, state);
+ return __WEBPACK_IMPORTED_MODULE_6__RouterUtils__["b" /* createRouterObject */](history, this.transitionManager, state);
},
createTransitionManager: function createTransitionManager() {
var matchContext = this.props.matchContext;
@@ -36514,9 +38381,9 @@ var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({
children = _props.children;
- !history.getCurrentLocation ? false ? invariant(false, 'You have provided a history object created with history v4.x or v2.x ' + 'and earlier. This version of React Router is only compatible with v3 ' + 'history objects. Please change to history v3.x.') : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0;
+ !history.getCurrentLocation ? false ? invariant(false, 'You have provided a history object created with history v4.x or v2.x ' + 'and earlier. This version of React Router is only compatible with v3 ' + 'history objects. Please change to history v3.x.') : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0;
- return Object(__WEBPACK_IMPORTED_MODULE_4__createTransitionManager__["a" /* default */])(history, Object(__WEBPACK_IMPORTED_MODULE_7__RouteUtils__["b" /* createRoutes */])(routes || children));
+ return __WEBPACK_IMPORTED_MODULE_2__createTransitionManager__["a" /* default */](history, __WEBPACK_IMPORTED_MODULE_5__RouteUtils__["b" /* createRoutes */](routes || children));
},
componentWillMount: function componentWillMount() {
var _this = this;
@@ -36530,7 +38397,7 @@ var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({
} else {
// Keep the identity of this.router because of a caveat in ContextUtils:
// they only work if the object identity is preserved.
- Object(__WEBPACK_IMPORTED_MODULE_8__RouterUtils__["a" /* assignRouterState */])(_this.router, state);
+ __WEBPACK_IMPORTED_MODULE_6__RouterUtils__["a" /* assignRouterState */](_this.router, state);
_this.setState(state, _this.props.onUpdate);
}
});
@@ -36562,7 +38429,7 @@ var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({
// Only forward non-Router-specific props to routing context, as those are
// the only ones that might be custom routing context props.
- Object.keys(propTypes).forEach(function (propType) {
+ Object.keys(Router.propTypes).forEach(function (propType) {
return delete props[propType];
});
@@ -36580,83 +38447,17 @@ var Router = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({
/* harmony default export */ __webpack_exports__["a"] = (Router);
/***/ }),
-/* 431 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- */
-
-
-
-var emptyFunction = __webpack_require__(24);
-var invariant = __webpack_require__(9);
-var ReactPropTypesSecret = __webpack_require__(214);
-
-module.exports = function() {
- function shim(props, propName, componentName, location, propFullName, secret) {
- if (secret === ReactPropTypesSecret) {
- // It is still safe when called from React.
- return;
- }
- invariant(
- false,
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
- 'Use PropTypes.checkPropTypes() to call them. ' +
- 'Read more at http://fb.me/use-check-prop-types'
- );
- };
- shim.isRequired = shim;
- function getShim() {
- return shim;
- };
- // Important!
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
- var ReactPropTypes = {
- array: shim,
- bool: shim,
- func: shim,
- number: shim,
- object: shim,
- string: shim,
- symbol: shim,
-
- any: shim,
- arrayOf: getShim,
- element: shim,
- instanceOf: getShim,
- node: shim,
- objectOf: getShim,
- oneOf: getShim,
- oneOfType: getShim,
- shape: getShim
- };
-
- ReactPropTypes.checkPropTypes = emptyFunction;
- ReactPropTypes.PropTypes = ReactPropTypes;
-
- return ReactPropTypes;
-};
-
-
-/***/ }),
-/* 432 */
+/* 440 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(74);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(79);
function routeParamsChanged(route, prevState, nextState) {
if (!route.path) return false;
- var paramNames = Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__["b" /* getParamNames */])(route.path);
+ var paramNames = __WEBPACK_IMPORTED_MODULE_0__PatternUtils__["b" /* getParamNames */](route.path);
return paramNames.some(function (paramName) {
return prevState.params[paramName] !== nextState.params[paramName];
@@ -36684,29 +38485,31 @@ function computeChangedRoutes(prevState, nextState) {
changeRoutes = void 0,
enterRoutes = void 0;
if (prevRoutes) {
- var parentIsLeaving = false;
- leaveRoutes = prevRoutes.filter(function (route) {
- if (parentIsLeaving) {
- return true;
- } else {
- var isLeaving = nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState);
- if (isLeaving) parentIsLeaving = true;
- return isLeaving;
- }
- });
+ (function () {
+ var parentIsLeaving = false;
+ leaveRoutes = prevRoutes.filter(function (route) {
+ if (parentIsLeaving) {
+ return true;
+ } else {
+ var isLeaving = nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState);
+ if (isLeaving) parentIsLeaving = true;
+ return isLeaving;
+ }
+ });
- // onLeave hooks start at the leaf route.
- leaveRoutes.reverse();
+ // onLeave hooks start at the leaf route.
+ leaveRoutes.reverse();
- enterRoutes = [];
- changeRoutes = [];
+ enterRoutes = [];
+ changeRoutes = [];
- nextRoutes.forEach(function (route) {
- var isNew = prevRoutes.indexOf(route) === -1;
- var paramsChanged = leaveRoutes.indexOf(route) !== -1;
+ nextRoutes.forEach(function (route) {
+ var isNew = prevRoutes.indexOf(route) === -1;
+ var paramsChanged = leaveRoutes.indexOf(route) !== -1;
- if (isNew || paramsChanged) enterRoutes.push(route);else changeRoutes.push(route);
- });
+ if (isNew || paramsChanged) enterRoutes.push(route);else changeRoutes.push(route);
+ });
+ })();
} else {
leaveRoutes = [];
changeRoutes = [];
@@ -36723,12 +38526,14 @@ function computeChangedRoutes(prevState, nextState) {
/* harmony default export */ __webpack_exports__["a"] = (computeChangedRoutes);
/***/ }),
-/* 433 */
+/* 441 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony export (immutable) */ __webpack_exports__["a"] = getTransitionUtils;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(157);
+/* harmony export (immutable) */ __webpack_exports__["b"] = runEnterHooks;
+/* harmony export (immutable) */ __webpack_exports__["a"] = runChangeHooks;
+/* harmony export (immutable) */ __webpack_exports__["c"] = runLeaveHooks;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(164);
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -36759,140 +38564,132 @@ var PendingHooks = function PendingHooks() {
};
};
-function getTransitionUtils() {
- var enterHooks = new PendingHooks();
- var changeHooks = new PendingHooks();
+var enterHooks = new PendingHooks();
+var changeHooks = new PendingHooks();
- function createTransitionHook(hook, route, asyncArity, pendingHooks) {
- var isSync = hook.length < asyncArity;
-
- var transitionHook = function transitionHook() {
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
+function createTransitionHook(hook, route, asyncArity, pendingHooks) {
+ var isSync = hook.length < asyncArity;
- hook.apply(route, args);
-
- if (isSync) {
- var callback = args[args.length - 1];
- // Assume hook executes synchronously and
- // automatically call the callback.
- callback();
- }
- };
+ var transitionHook = function transitionHook() {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
- pendingHooks.add(transitionHook);
+ hook.apply(route, args);
- return transitionHook;
- }
+ if (isSync) {
+ var callback = args[args.length - 1];
+ // Assume hook executes synchronously and
+ // automatically call the callback.
+ callback();
+ }
+ };
- function getEnterHooks(routes) {
- return routes.reduce(function (hooks, route) {
- if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks));
- return hooks;
- }, []);
- }
+ pendingHooks.add(transitionHook);
- function getChangeHooks(routes) {
- return routes.reduce(function (hooks, route) {
- if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks));
- return hooks;
- }, []);
- }
+ return transitionHook;
+}
- function runTransitionHooks(length, iter, callback) {
- if (!length) {
- callback();
- return;
- }
+function getEnterHooks(routes) {
+ return routes.reduce(function (hooks, route) {
+ if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3, enterHooks));
+ return hooks;
+ }, []);
+}
- var redirectInfo = void 0;
- function replace(location) {
- redirectInfo = location;
- }
+function getChangeHooks(routes) {
+ return routes.reduce(function (hooks, route) {
+ if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4, changeHooks));
+ return hooks;
+ }, []);
+}
- Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */])(length, function (index, next, done) {
- iter(index, replace, function (error) {
- if (error || redirectInfo) {
- done(error, redirectInfo); // No need to continue.
- } else {
- next();
- }
- });
- }, callback);
+function runTransitionHooks(length, iter, callback) {
+ if (!length) {
+ callback();
+ return;
}
- /**
- * Runs all onEnter hooks in the given array of routes in order
- * with onEnter(nextState, replace, callback) and calls
- * callback(error, redirectInfo) when finished. The first hook
- * to use replace short-circuits the loop.
- *
- * If a hook needs to run asynchronously, it may use the callback
- * function. However, doing so will cause the transition to pause,
- * which could lead to a non-responsive UI if the hook is slow.
- */
- function runEnterHooks(routes, nextState, callback) {
- enterHooks.clear();
- var hooks = getEnterHooks(routes);
- return runTransitionHooks(hooks.length, function (index, replace, next) {
- var wrappedNext = function wrappedNext() {
- if (enterHooks.has(hooks[index])) {
- next.apply(undefined, arguments);
- enterHooks.remove(hooks[index]);
- }
- };
- hooks[index](nextState, replace, wrappedNext);
- }, callback);
+ var redirectInfo = void 0;
+ function replace(location) {
+ redirectInfo = location;
}
- /**
- * Runs all onChange hooks in the given array of routes in order
- * with onChange(prevState, nextState, replace, callback) and calls
- * callback(error, redirectInfo) when finished. The first hook
- * to use replace short-circuits the loop.
- *
- * If a hook needs to run asynchronously, it may use the callback
- * function. However, doing so will cause the transition to pause,
- * which could lead to a non-responsive UI if the hook is slow.
- */
- function runChangeHooks(routes, state, nextState, callback) {
- changeHooks.clear();
- var hooks = getChangeHooks(routes);
- return runTransitionHooks(hooks.length, function (index, replace, next) {
- var wrappedNext = function wrappedNext() {
- if (changeHooks.has(hooks[index])) {
- next.apply(undefined, arguments);
- changeHooks.remove(hooks[index]);
- }
- };
- hooks[index](state, nextState, replace, wrappedNext);
- }, callback);
- }
+ __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */](length, function (index, next, done) {
+ iter(index, replace, function (error) {
+ if (error || redirectInfo) {
+ done(error, redirectInfo); // No need to continue.
+ } else {
+ next();
+ }
+ });
+ }, callback);
+}
- /**
- * Runs all onLeave hooks in the given array of routes in order.
- */
- function runLeaveHooks(routes, prevState) {
- for (var i = 0, len = routes.length; i < len; ++i) {
- if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState);
- }
- }
+/**
+ * Runs all onEnter hooks in the given array of routes in order
+ * with onEnter(nextState, replace, callback) and calls
+ * callback(error, redirectInfo) when finished. The first hook
+ * to use replace short-circuits the loop.
+ *
+ * If a hook needs to run asynchronously, it may use the callback
+ * function. However, doing so will cause the transition to pause,
+ * which could lead to a non-responsive UI if the hook is slow.
+ */
+function runEnterHooks(routes, nextState, callback) {
+ enterHooks.clear();
+ var hooks = getEnterHooks(routes);
+ return runTransitionHooks(hooks.length, function (index, replace, next) {
+ var wrappedNext = function wrappedNext() {
+ if (enterHooks.has(hooks[index])) {
+ next.apply(undefined, arguments);
+ enterHooks.remove(hooks[index]);
+ }
+ };
+ hooks[index](nextState, replace, wrappedNext);
+ }, callback);
+}
- return {
- runEnterHooks: runEnterHooks,
- runChangeHooks: runChangeHooks,
- runLeaveHooks: runLeaveHooks
- };
+/**
+ * Runs all onChange hooks in the given array of routes in order
+ * with onChange(prevState, nextState, replace, callback) and calls
+ * callback(error, redirectInfo) when finished. The first hook
+ * to use replace short-circuits the loop.
+ *
+ * If a hook needs to run asynchronously, it may use the callback
+ * function. However, doing so will cause the transition to pause,
+ * which could lead to a non-responsive UI if the hook is slow.
+ */
+function runChangeHooks(routes, state, nextState, callback) {
+ changeHooks.clear();
+ var hooks = getChangeHooks(routes);
+ return runTransitionHooks(hooks.length, function (index, replace, next) {
+ var wrappedNext = function wrappedNext() {
+ if (changeHooks.has(hooks[index])) {
+ next.apply(undefined, arguments);
+ changeHooks.remove(hooks[index]);
+ }
+ };
+ hooks[index](state, nextState, replace, wrappedNext);
+ }, callback);
+}
+
+/**
+ * Runs all onLeave hooks in the given array of routes in order.
+ */
+function runLeaveHooks(routes, prevState) {
+ for (var i = 0, len = routes.length; i < len; ++i) {
+ if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState);
+ }
}
/***/ }),
-/* 434 */
+/* 442 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = isActive;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(74);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(79);
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
@@ -36976,7 +38773,7 @@ function routeIsActive(pathname, routes, params) {
}
if (remainingPathname !== null && pattern) {
- var matched = Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__["c" /* matchPattern */])(pattern, remainingPathname);
+ var matched = __WEBPACK_IMPORTED_MODULE_0__PatternUtils__["c" /* matchPattern */](pattern, remainingPathname);
if (matched) {
remainingPathname = matched.remainingPathname;
paramNames = [].concat(paramNames, matched.paramNames);
@@ -37040,12 +38837,12 @@ function isActive(_ref, indexOnly, currentLocation, routes, params) {
}
/***/ }),
-/* 435 */
+/* 443 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(157);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(242);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(164);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(248);
@@ -37058,7 +38855,7 @@ function getComponentsForRoute(nextState, route, callback) {
var getComponent = route.getComponent || route.getComponents;
if (getComponent) {
var componentReturn = getComponent.call(route, nextState, callback);
- if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */])(componentReturn)) componentReturn.then(function (component) {
+ if (__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */](componentReturn)) componentReturn.then(function (component) {
return callback(null, component);
}, callback);
} else {
@@ -37074,7 +38871,7 @@ function getComponentsForRoute(nextState, route, callback) {
* asynchronous getComponents method.
*/
function getComponents(nextState, callback) {
- Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["b" /* mapAsync */])(nextState.routes, function (route, index, callback) {
+ __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["b" /* mapAsync */](nextState.routes, function (route, index, callback) {
getComponentsForRoute(nextState, route, callback);
}, callback);
}
@@ -37082,18 +38879,20 @@ function getComponents(nextState, callback) {
/* harmony default export */ __webpack_exports__["a"] = (getComponents);
/***/ }),
-/* 436 */
+/* 444 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = matchRoutes;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(157);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(242);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PatternUtils__ = __webpack_require__(74);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routerWarning__ = __webpack_require__(73);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(45);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__ = __webpack_require__(164);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__PromiseUtils__ = __webpack_require__(248);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__PatternUtils__ = __webpack_require__(79);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routerWarning__ = __webpack_require__(78);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(44);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
@@ -37117,7 +38916,7 @@ function getChildRoutes(route, location, paramNames, paramValues, callback) {
};
var childRoutesReturn = route.getChildRoutes(partialNextState, function (error, childRoutes) {
- childRoutes = !error && Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(childRoutes);
+ childRoutes = !error && __WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */](childRoutes);
if (sync) {
result = [error, childRoutes];
return;
@@ -37126,8 +38925,8 @@ function getChildRoutes(route, location, paramNames, paramValues, callback) {
callback(error, childRoutes);
});
- if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */])(childRoutesReturn)) childRoutesReturn.then(function (childRoutes) {
- return callback(null, Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(childRoutes));
+ if (__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */](childRoutesReturn)) childRoutesReturn.then(function (childRoutes) {
+ return callback(null, __WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */](childRoutes));
}, callback);
sync = false;
@@ -37144,11 +38943,11 @@ function getIndexRoute(route, location, paramNames, paramValues, callback) {
};
var indexRoutesReturn = route.getIndexRoute(partialNextState, function (error, indexRoute) {
- callback(error, !error && Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(indexRoute)[0]);
+ callback(error, !error && __WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */](indexRoute)[0]);
});
- if (Object(__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */])(indexRoutesReturn)) indexRoutesReturn.then(function (indexRoute) {
- return callback(null, Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(indexRoute)[0]);
+ if (__WEBPACK_IMPORTED_MODULE_1__PromiseUtils__["a" /* isPromise */](indexRoutesReturn)) indexRoutesReturn.then(function (indexRoute) {
+ return callback(null, __WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */](indexRoute)[0]);
}, callback);
} else if (route.childRoutes || route.getChildRoutes) {
var onChildRoutes = function onChildRoutes(error, childRoutes) {
@@ -37161,7 +38960,7 @@ function getIndexRoute(route, location, paramNames, paramValues, callback) {
return !childRoute.path;
});
- Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */])(pathless.length, function (index, next, done) {
+ __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */](pathless.length, function (index, next, done) {
getIndexRoute(pathless[index], location, paramNames, paramValues, function (error, indexRoute) {
if (error || indexRoute) {
var routes = [pathless[index]].concat(Array.isArray(indexRoute) ? indexRoute : [indexRoute]);
@@ -37217,7 +39016,7 @@ function matchRouteDeep(route, location, remainingPathname, paramNames, paramVal
// we're not just searching for potential nested absolute paths.
if (remainingPathname !== null && pattern) {
try {
- var matched = Object(__WEBPACK_IMPORTED_MODULE_2__PatternUtils__["c" /* matchPattern */])(pattern, remainingPathname);
+ var matched = __WEBPACK_IMPORTED_MODULE_2__PatternUtils__["c" /* matchPattern */](pattern, remainingPathname);
if (matched) {
remainingPathname = matched.remainingPathname;
paramNames = [].concat(paramNames, matched.paramNames);
@@ -37232,32 +39031,38 @@ function matchRouteDeep(route, location, remainingPathname, paramNames, paramVal
// By assumption, pattern is non-empty here, which is the prerequisite for
// actually terminating a match.
if (remainingPathname === '') {
- var match = {
- routes: [route],
- params: createParams(paramNames, paramValues)
- };
+ var _ret = function () {
+ var match = {
+ routes: [route],
+ params: createParams(paramNames, paramValues)
+ };
- getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) {
- if (error) {
- callback(error);
- } else {
- if (Array.isArray(indexRoute)) {
- var _match$routes;
-
- false ? warning(indexRoute.every(function (route) {
- return !route.path;
- }), 'Index routes should not have paths') : void 0;
- (_match$routes = match.routes).push.apply(_match$routes, indexRoute);
- } else if (indexRoute) {
- false ? warning(!indexRoute.path, 'Index routes should not have paths') : void 0;
- match.routes.push(indexRoute);
+ getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) {
+ if (error) {
+ callback(error);
+ } else {
+ if (Array.isArray(indexRoute)) {
+ var _match$routes;
+
+ false ? warning(indexRoute.every(function (route) {
+ return !route.path;
+ }), 'Index routes should not have paths') : void 0;
+ (_match$routes = match.routes).push.apply(_match$routes, indexRoute);
+ } else if (indexRoute) {
+ false ? warning(!indexRoute.path, 'Index routes should not have paths') : void 0;
+ match.routes.push(indexRoute);
+ }
+
+ callback(null, match);
}
+ });
- callback(null, match);
- }
- });
+ return {
+ v: void 0
+ };
+ }();
- return;
+ if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
}
}
@@ -37322,7 +39127,7 @@ function matchRoutes(routes, location, callback, remainingPathname) {
remainingPathname = location.pathname;
}
- Object(__WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */])(routes.length, function (index, next, done) {
+ __WEBPACK_IMPORTED_MODULE_0__AsyncUtils__["a" /* loopAsync */](routes.length, function (index, next, done) {
matchRouteDeep(routes[index], location, remainingPathname, paramNames, paramValues, function (error, match) {
if (error || match) {
done(error, match);
@@ -37334,11 +39139,11 @@ function matchRoutes(routes, location, callback, remainingPathname) {
}
/***/ }),
-/* 437 */
+/* 445 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(74);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__PatternUtils__ = __webpack_require__(79);
/**
@@ -37350,7 +39155,7 @@ function getRouteParams(route, params) {
if (!route.path) return routeParams;
- Object(__WEBPACK_IMPORTED_MODULE_0__PatternUtils__["b" /* getParamNames */])(route.path).forEach(function (p) {
+ __WEBPACK_IMPORTED_MODULE_0__PatternUtils__["b" /* getParamNames */](route.path).forEach(function (p) {
if (Object.prototype.hasOwnProperty.call(params, p)) {
routeParams[p] = params[p];
}
@@ -37362,50 +39167,44 @@ function getRouteParams(route, params) {
/* harmony default export */ __webpack_exports__["a"] = (getRouteParams);
/***/ }),
-/* 438 */
+/* 446 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class__ = __webpack_require__(39);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_create_react_class__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(244);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Link__ = __webpack_require__(250);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
/**
* An is used to link to an .
*/
-var IndexLink = __WEBPACK_IMPORTED_MODULE_1_create_react_class___default()({
+var IndexLink = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({
displayName: 'IndexLink',
-
render: function render() {
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_2__Link__["a" /* default */], _extends({}, this.props, { onlyActiveOnIndex: true }));
+ return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__Link__["a" /* default */], _extends({}, this.props, { onlyActiveOnIndex: true }));
}
});
/* harmony default export */ __webpack_exports__["a"] = (IndexLink);
/***/ }),
-/* 439 */
+/* 447 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = withRouter;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(20);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(17);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class__ = __webpack_require__(39);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_create_react_class__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__ = __webpack_require__(161);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ContextUtils__ = __webpack_require__(159);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__PropTypes__ = __webpack_require__(160);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(168);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ContextUtils__ = __webpack_require__(166);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__PropTypes__ = __webpack_require__(167);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
@@ -37414,7 +39213,6 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
-
function getDisplayName(WrappedComponent) {
return WrappedComponent.displayName || WrappedComponent.name || 'Component';
}
@@ -37422,16 +39220,16 @@ function getDisplayName(WrappedComponent) {
function withRouter(WrappedComponent, options) {
var withRef = options && options.withRef;
- var WithRouter = __WEBPACK_IMPORTED_MODULE_2_create_react_class___default()({
+ var WithRouter = __WEBPACK_IMPORTED_MODULE_1_react___default.a.createClass({
displayName: 'WithRouter',
- mixins: [Object(__WEBPACK_IMPORTED_MODULE_4__ContextUtils__["b" /* ContextSubscriber */])('router')],
+ mixins: [__WEBPACK_IMPORTED_MODULE_3__ContextUtils__["b" /* ContextSubscriber */]('router')],
- contextTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__["b" /* routerShape */] },
- propTypes: { router: __WEBPACK_IMPORTED_MODULE_5__PropTypes__["b" /* routerShape */] },
+ contextTypes: { router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__["b" /* routerShape */] },
+ propTypes: { router: __WEBPACK_IMPORTED_MODULE_4__PropTypes__["b" /* routerShape */] },
getWrappedInstance: function getWrappedInstance() {
- !withRef ? false ? invariant(false, 'To access the wrapped instance, you need to specify ' + '`{ withRef: true }` as the second argument of the withRouter() call.') : __WEBPACK_IMPORTED_MODULE_0_invariant___default()(false) : void 0;
+ !withRef ? false ? invariant(false, 'To access the wrapped instance, you need to specify ' + '`{ withRef: true }` as the second argument of the withRouter() call.') : __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(false) : void 0;
return this.wrappedInstance;
},
@@ -37462,42 +39260,45 @@ function withRouter(WrappedComponent, options) {
WithRouter.displayName = 'withRouter(' + getDisplayName(WrappedComponent) + ')';
WithRouter.WrappedComponent = WrappedComponent;
- return __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default()(WithRouter, WrappedComponent);
+ return __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default.a(WithRouter, WrappedComponent);
}
/***/ }),
-/* 440 */
+/* 448 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(39);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(73);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Redirect__ = __webpack_require__(245);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(88);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__routerWarning__ = __webpack_require__(78);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(17);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Redirect__ = __webpack_require__(251);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(91);
+var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes,
+ string = _React$PropTypes.string,
+ object = _React$PropTypes.object;
/**
* An is used to redirect from an indexRoute.
*/
/* eslint-disable react/require-render-return */
-var IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({
+
+var IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({
displayName: 'IndexRedirect',
+
statics: {
createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) {
/* istanbul ignore else: sanity check */
if (parentRoute) {
- parentRoute.indexRoute = __WEBPACK_IMPORTED_MODULE_4__Redirect__["a" /* default */].createRouteFromReactElement(element);
+ parentRoute.indexRoute = __WEBPACK_IMPORTED_MODULE_3__Redirect__["a" /* default */].createRouteFromReactElement(element);
} else {
false ? warning(false, 'An does not make sense at the root of your route config') : void 0;
}
@@ -37505,55 +39306,56 @@ var IndexRedirect = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({
},
propTypes: {
- to: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"].isRequired,
- query: __WEBPACK_IMPORTED_MODULE_1_prop_types__["object"],
- state: __WEBPACK_IMPORTED_MODULE_1_prop_types__["object"],
- onEnter: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["c" /* falsy */],
- children: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["c" /* falsy */]
+ to: string.isRequired,
+ query: object,
+ state: object,
+ onEnter: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */],
+ children: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */]
},
/* istanbul ignore next: sanity check */
render: function render() {
- true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_3_invariant___default()(false) : void 0;
+ true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_2_invariant___default.a(false) : void 0;
}
});
/* harmony default export */ __webpack_exports__["a"] = (IndexRedirect);
/***/ }),
-/* 441 */
+/* 449 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(39);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(73);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(45);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__ = __webpack_require__(88);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__routerWarning__ = __webpack_require__(78);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(17);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(44);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(91);
+var func = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes.func;
/**
* An is used to specify its parent's in
* a JSX route config.
*/
/* eslint-disable react/require-render-return */
-var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({
+
+var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({
displayName: 'IndexRoute',
+
statics: {
createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) {
/* istanbul ignore else: sanity check */
if (parentRoute) {
- parentRoute.indexRoute = Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["a" /* createRouteFromReactElement */])(element);
+ parentRoute.indexRoute = __WEBPACK_IMPORTED_MODULE_3__RouteUtils__["a" /* createRouteFromReactElement */](element);
} else {
false ? warning(false, 'An does not make sense at the root of your route config') : void 0;
}
@@ -37561,39 +39363,40 @@ var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({
},
propTypes: {
- path: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["c" /* falsy */],
- component: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["a" /* component */],
- components: __WEBPACK_IMPORTED_MODULE_5__InternalPropTypes__["b" /* components */],
- getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__["func"],
- getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__["func"]
+ path: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["c" /* falsy */],
+ component: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["a" /* component */],
+ components: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["b" /* components */],
+ getComponent: func,
+ getComponents: func
},
/* istanbul ignore next: sanity check */
render: function render() {
- true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_3_invariant___default()(false) : void 0;
+ true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_2_invariant___default.a(false) : void 0;
}
});
/* harmony default export */ __webpack_exports__["a"] = (IndexRoute);
/***/ }),
-/* 442 */
+/* 450 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class__ = __webpack_require__(39);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_create_react_class__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__RouteUtils__ = __webpack_require__(45);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__ = __webpack_require__(88);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__RouteUtils__ = __webpack_require__(44);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__ = __webpack_require__(91);
+var _React$PropTypes = __WEBPACK_IMPORTED_MODULE_0_react___default.a.PropTypes,
+ string = _React$PropTypes.string,
+ func = _React$PropTypes.func;
/**
* A is used to declare which components are rendered to the
@@ -37606,42 +39409,44 @@ var IndexRoute = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({
* rendered into the DOM, nested in the same order as in the tree.
*/
/* eslint-disable react/require-render-return */
-var Route = __WEBPACK_IMPORTED_MODULE_0_create_react_class___default()({
+
+var Route = __WEBPACK_IMPORTED_MODULE_0_react___default.a.createClass({
displayName: 'Route',
+
statics: {
- createRouteFromReactElement: __WEBPACK_IMPORTED_MODULE_3__RouteUtils__["a" /* createRouteFromReactElement */]
+ createRouteFromReactElement: __WEBPACK_IMPORTED_MODULE_2__RouteUtils__["a" /* createRouteFromReactElement */]
},
propTypes: {
- path: __WEBPACK_IMPORTED_MODULE_1_prop_types__["string"],
- component: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["a" /* component */],
- components: __WEBPACK_IMPORTED_MODULE_4__InternalPropTypes__["b" /* components */],
- getComponent: __WEBPACK_IMPORTED_MODULE_1_prop_types__["func"],
- getComponents: __WEBPACK_IMPORTED_MODULE_1_prop_types__["func"]
+ path: string,
+ component: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["a" /* component */],
+ components: __WEBPACK_IMPORTED_MODULE_3__InternalPropTypes__["b" /* components */],
+ getComponent: func,
+ getComponents: func
},
/* istanbul ignore next: sanity check */
render: function render() {
- true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_2_invariant___default()(false) : void 0;
+ true ? false ? invariant(false, ' elements are for router configuration only and should not be rendered') : __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(false) : void 0;
}
});
/* harmony default export */ __webpack_exports__["a"] = (Route);
/***/ }),
-/* 443 */
+/* 451 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__ = __webpack_require__(109);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__ = __webpack_require__(113);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_Actions___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_Actions__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(20);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(246);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = __webpack_require__(241);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(45);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtils__ = __webpack_require__(243);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__ = __webpack_require__(252);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__ = __webpack_require__(247);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__RouteUtils__ = __webpack_require__(44);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtils__ = __webpack_require__(249);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
@@ -37669,10 +39474,10 @@ function match(_ref, callback) {
location = _ref.location,
options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']);
- !(history || location) ? false ? invariant(false, 'match needs a history or a location') : __WEBPACK_IMPORTED_MODULE_1_invariant___default()(false) : void 0;
+ !(history || location) ? false ? invariant(false, 'match needs a history or a location') : __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(false) : void 0;
- history = history ? history : Object(__WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__["a" /* default */])(options);
- var transitionManager = Object(__WEBPACK_IMPORTED_MODULE_3__createTransitionManager__["a" /* default */])(history, Object(__WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */])(routes));
+ history = history ? history : __WEBPACK_IMPORTED_MODULE_2__createMemoryHistory__["a" /* default */](options);
+ var transitionManager = __WEBPACK_IMPORTED_MODULE_3__createTransitionManager__["a" /* default */](history, __WEBPACK_IMPORTED_MODULE_4__RouteUtils__["b" /* createRoutes */](routes));
if (location) {
// Allow match({ location: '/the/path', ... })
@@ -37685,7 +39490,7 @@ function match(_ref, callback) {
var renderProps = void 0;
if (nextState) {
- var router = Object(__WEBPACK_IMPORTED_MODULE_5__RouterUtils__["b" /* createRouterObject */])(history, transitionManager, nextState);
+ var router = __WEBPACK_IMPORTED_MODULE_5__RouterUtils__["b" /* createRouterObject */](history, transitionManager, nextState);
renderProps = _extends({}, nextState, {
router: router,
matchContext: { transitionManager: transitionManager, router: router }
@@ -37699,13 +39504,13 @@ function match(_ref, callback) {
/* harmony default export */ __webpack_exports__["a"] = (match);
/***/ }),
-/* 444 */
+/* 452 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var strictUriEncode = __webpack_require__(445);
-var objectAssign = __webpack_require__(15);
+var strictUriEncode = __webpack_require__(453);
+var objectAssign = __webpack_require__(13);
function encoderForArrayFormat(opts) {
switch (opts.arrayFormat) {
@@ -37751,9 +39556,9 @@ function parserForArrayFormat(opts) {
switch (opts.arrayFormat) {
case 'index':
return function (key, value, accumulator) {
- result = /\[(\d*)\]$/.exec(key);
+ result = /\[(\d*)]$/.exec(key);
- key = key.replace(/\[\d*\]$/, '');
+ key = key.replace(/\[\d*]$/, '');
if (!result) {
accumulator[key] = value;
@@ -37769,15 +39574,13 @@ function parserForArrayFormat(opts) {
case 'bracket':
return function (key, value, accumulator) {
- result = /(\[\])$/.exec(key);
- key = key.replace(/\[\]$/, '');
+ result = /(\[])$/.exec(key);
- if (!result) {
+ key = key.replace(/\[]$/, '');
+
+ if (!result || accumulator[key] === undefined) {
accumulator[key] = value;
return;
- } else if (accumulator[key] === undefined) {
- accumulator[key] = [value];
- return;
}
accumulator[key] = [].concat(accumulator[key], value);
@@ -37911,7 +39714,7 @@ exports.stringify = function (obj, opts) {
/***/ }),
-/* 445 */
+/* 453 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -37924,7 +39727,7 @@ module.exports = function (str) {
/***/ }),
-/* 446 */
+/* 454 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -37934,23 +39737,23 @@ exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-var _warning = __webpack_require__(17);
+var _warning = __webpack_require__(15);
var _warning2 = _interopRequireDefault(_warning);
-var _invariant = __webpack_require__(20);
+var _invariant = __webpack_require__(17);
var _invariant2 = _interopRequireDefault(_invariant);
-var _LocationUtils = __webpack_require__(75);
+var _LocationUtils = __webpack_require__(80);
-var _PathUtils = __webpack_require__(46);
+var _PathUtils = __webpack_require__(45);
-var _createHistory = __webpack_require__(163);
+var _createHistory = __webpack_require__(170);
var _createHistory2 = _interopRequireDefault(_createHistory);
-var _Actions = __webpack_require__(109);
+var _Actions = __webpack_require__(113);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -37964,7 +39767,7 @@ var createStateStorage = function createStateStorage(entries) {
};
var createMemoryHistory = function createMemoryHistory() {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+ var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
if (Array.isArray(options)) {
options = { entries: options };
@@ -38031,9 +39834,9 @@ var createMemoryHistory = function createMemoryHistory() {
go: go
}));
- var _options = options,
- entries = _options.entries,
- current = _options.current;
+ var _options = options;
+ var entries = _options.entries;
+ var current = _options.current;
if (typeof entries === 'string') {
@@ -38070,7 +39873,7 @@ var createMemoryHistory = function createMemoryHistory() {
exports.default = createMemoryHistory;
/***/ }),
-/* 447 */
+/* 455 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -38132,14 +39935,14 @@ var loopAsync = exports.loopAsync = function loopAsync(turns, work, callback) {
};
/***/ }),
-/* 448 */
+/* 456 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RouterContext__ = __webpack_require__(158);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(73);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__RouterContext__ = __webpack_require__(165);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__routerWarning__ = __webpack_require__(78);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
@@ -38183,19 +39986,19 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
});
/***/ }),
-/* 449 */
+/* 457 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = __webpack_require__(450);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__ = __webpack_require__(458);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(251);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(257);
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a));
+/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0_history_lib_createBrowserHistory___default.a));
/***/ }),
-/* 450 */
+/* 458 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -38205,23 +40008,23 @@ exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-var _invariant = __webpack_require__(20);
+var _invariant = __webpack_require__(17);
var _invariant2 = _interopRequireDefault(_invariant);
-var _ExecutionEnvironment = __webpack_require__(164);
+var _ExecutionEnvironment = __webpack_require__(171);
-var _BrowserProtocol = __webpack_require__(165);
+var _BrowserProtocol = __webpack_require__(172);
var BrowserProtocol = _interopRequireWildcard(_BrowserProtocol);
-var _RefreshProtocol = __webpack_require__(451);
+var _RefreshProtocol = __webpack_require__(459);
var RefreshProtocol = _interopRequireWildcard(_RefreshProtocol);
-var _DOMUtils = __webpack_require__(110);
+var _DOMUtils = __webpack_require__(114);
-var _createHistory = __webpack_require__(163);
+var _createHistory = __webpack_require__(170);
var _createHistory2 = _interopRequireDefault(_createHistory);
@@ -38240,18 +40043,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* behavior using { forceRefresh: true } in options.
*/
var createBrowserHistory = function createBrowserHistory() {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+ var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
!_ExecutionEnvironment.canUseDOM ? false ? (0, _invariant2.default)(false, 'Browser history needs a DOM') : (0, _invariant2.default)(false) : void 0;
var useRefresh = options.forceRefresh || !(0, _DOMUtils.supportsHistory)();
var Protocol = useRefresh ? RefreshProtocol : BrowserProtocol;
- var getUserConfirmation = Protocol.getUserConfirmation,
- getCurrentLocation = Protocol.getCurrentLocation,
- pushLocation = Protocol.pushLocation,
- replaceLocation = Protocol.replaceLocation,
- go = Protocol.go;
+ var getUserConfirmation = Protocol.getUserConfirmation;
+ var getCurrentLocation = Protocol.getCurrentLocation;
+ var pushLocation = Protocol.pushLocation;
+ var replaceLocation = Protocol.replaceLocation;
+ var go = Protocol.go;
var history = (0, _createHistory2.default)(_extends({
@@ -38294,7 +40097,7 @@ var createBrowserHistory = function createBrowserHistory() {
exports.default = createBrowserHistory;
/***/ }),
-/* 451 */
+/* 459 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -38303,7 +40106,7 @@ exports.default = createBrowserHistory;
exports.__esModule = true;
exports.replaceLocation = exports.pushLocation = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined;
-var _BrowserProtocol = __webpack_require__(165);
+var _BrowserProtocol = __webpack_require__(172);
Object.defineProperty(exports, 'getUserConfirmation', {
enumerable: true,
@@ -38318,9 +40121,9 @@ Object.defineProperty(exports, 'go', {
}
});
-var _LocationUtils = __webpack_require__(75);
+var _LocationUtils = __webpack_require__(80);
-var _PathUtils = __webpack_require__(46);
+var _PathUtils = __webpack_require__(45);
var getCurrentLocation = exports.getCurrentLocation = function getCurrentLocation() {
return (0, _LocationUtils.createLocation)(window.location);
@@ -38337,19 +40140,19 @@ var replaceLocation = exports.replaceLocation = function replaceLocation(locatio
};
/***/ }),
-/* 452 */
+/* 460 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = __webpack_require__(453);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__ = __webpack_require__(461);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(251);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createRouterHistory__ = __webpack_require__(257);
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a));
+/* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_1__createRouterHistory__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0_history_lib_createHashHistory___default.a));
/***/ }),
-/* 453 */
+/* 461 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -38359,23 +40162,23 @@ exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-var _warning = __webpack_require__(17);
+var _warning = __webpack_require__(15);
var _warning2 = _interopRequireDefault(_warning);
-var _invariant = __webpack_require__(20);
+var _invariant = __webpack_require__(17);
var _invariant2 = _interopRequireDefault(_invariant);
-var _ExecutionEnvironment = __webpack_require__(164);
+var _ExecutionEnvironment = __webpack_require__(171);
-var _DOMUtils = __webpack_require__(110);
+var _DOMUtils = __webpack_require__(114);
-var _HashProtocol = __webpack_require__(454);
+var _HashProtocol = __webpack_require__(462);
var HashProtocol = _interopRequireWildcard(_HashProtocol);
-var _createHistory = __webpack_require__(163);
+var _createHistory = __webpack_require__(170);
var _createHistory2 = _interopRequireDefault(_createHistory);
@@ -38411,12 +40214,12 @@ var HashPathCoders = {
};
var createHashHistory = function createHashHistory() {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+ var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
!_ExecutionEnvironment.canUseDOM ? false ? (0, _invariant2.default)(false, 'Hash history needs a DOM') : (0, _invariant2.default)(false) : void 0;
- var queryKey = options.queryKey,
- hashType = options.hashType;
+ var queryKey = options.queryKey;
+ var hashType = options.hashType;
false ? (0, _warning2.default)(queryKey !== false, 'Using { queryKey: false } no longer works. Instead, just don\'t ' + 'use location state if you don\'t want a key in your URL query string') : void 0;
@@ -38502,7 +40305,7 @@ var createHashHistory = function createHashHistory() {
exports.default = createHashHistory;
/***/ }),
-/* 454 */
+/* 462 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -38511,7 +40314,7 @@ exports.default = createHashHistory;
exports.__esModule = true;
exports.replaceLocation = exports.pushLocation = exports.startListener = exports.getCurrentLocation = exports.go = exports.getUserConfirmation = undefined;
-var _BrowserProtocol = __webpack_require__(165);
+var _BrowserProtocol = __webpack_require__(172);
Object.defineProperty(exports, 'getUserConfirmation', {
enumerable: true,
@@ -38526,17 +40329,17 @@ Object.defineProperty(exports, 'go', {
}
});
-var _warning = __webpack_require__(17);
+var _warning = __webpack_require__(15);
var _warning2 = _interopRequireDefault(_warning);
-var _LocationUtils = __webpack_require__(75);
+var _LocationUtils = __webpack_require__(80);
-var _DOMUtils = __webpack_require__(110);
+var _DOMUtils = __webpack_require__(114);
-var _DOMStateStorage = __webpack_require__(250);
+var _DOMStateStorage = __webpack_require__(256);
-var _PathUtils = __webpack_require__(46);
+var _PathUtils = __webpack_require__(45);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -38611,8 +40414,8 @@ var startListener = exports.startListener = function startListener(listener, pat
};
var updateLocation = function updateLocation(location, pathCoder, queryKey, updateHash) {
- var state = location.state,
- key = location.key;
+ var state = location.state;
+ var key = location.key;
var path = pathCoder.encodePath((0, _PathUtils.createPath)(location));
@@ -38644,11 +40447,11 @@ var replaceLocation = exports.replaceLocation = function replaceLocation(locatio
};
/***/ }),
-/* 455 */
+/* 463 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(116);
/** Used for built-in method references. */
@@ -38698,7 +40501,7 @@ function getRawTag(value) {
/***/ }),
-/* 456 */
+/* 464 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -38727,14 +40530,14 @@ function objectToString(value) {
/***/ }),
-/* 457 */
+/* 465 */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = __webpack_require__(458);
+module.exports = __webpack_require__(466);
/***/ }),
-/* 458 */
+/* 466 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -38744,7 +40547,7 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _ponyfill = __webpack_require__(459);
+var _ponyfill = __webpack_require__(467);
var _ponyfill2 = _interopRequireDefault(_ponyfill);
@@ -38767,10 +40570,10 @@ if (typeof self !== 'undefined') {
var result = (0, _ponyfill2['default'])(root);
exports['default'] = result;
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47), __webpack_require__(256)(module)))
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46), __webpack_require__(262)(module)))
/***/ }),
-/* 459 */
+/* 467 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -38799,14 +40602,14 @@ function symbolObservablePonyfill(root) {
};
/***/ }),
-/* 460 */
+/* 468 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = combineReducers;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(252);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(166);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(257);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(258);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(173);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(263);
@@ -38815,7 +40618,7 @@ function getUndefinedStateErrorMessage(key, action) {
var actionType = action && action.type;
var actionName = actionType && '"' + actionType.toString() + '"' || 'an action';
- return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';
+ return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state.';
}
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
@@ -38826,7 +40629,7 @@ function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, une
return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
}
- if (!Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__["a" /* default */])(inputState)) {
+ if (!__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__["a" /* default */](inputState)) {
return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
}
@@ -38843,18 +40646,18 @@ function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, une
}
}
-function assertReducerShape(reducers) {
+function assertReducerSanity(reducers) {
Object.keys(reducers).forEach(function (key) {
var reducer = reducers[key];
var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT });
if (typeof initialState === 'undefined') {
- throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');
+ throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.');
}
var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
if (typeof reducer(undefined, { type: type }) === 'undefined') {
- throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');
+ throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__["a" /* ActionTypes */].INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.');
}
});
}
@@ -38893,24 +40696,23 @@ function combineReducers(reducers) {
}
var finalReducerKeys = Object.keys(finalReducers);
- var unexpectedKeyCache = void 0;
if (false) {
- unexpectedKeyCache = {};
+ var unexpectedKeyCache = {};
}
- var shapeAssertionError = void 0;
+ var sanityError;
try {
- assertReducerShape(finalReducers);
+ assertReducerSanity(finalReducers);
} catch (e) {
- shapeAssertionError = e;
+ sanityError = e;
}
return function combination() {
- var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+ var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var action = arguments[1];
- if (shapeAssertionError) {
- throw shapeAssertionError;
+ if (sanityError) {
+ throw sanityError;
}
if (false) {
@@ -38922,16 +40724,16 @@ function combineReducers(reducers) {
var hasChanged = false;
var nextState = {};
- for (var _i = 0; _i < finalReducerKeys.length; _i++) {
- var _key = finalReducerKeys[_i];
- var reducer = finalReducers[_key];
- var previousStateForKey = state[_key];
+ for (var i = 0; i < finalReducerKeys.length; i++) {
+ var key = finalReducerKeys[i];
+ var reducer = finalReducers[key];
+ var previousStateForKey = state[key];
var nextStateForKey = reducer(previousStateForKey, action);
if (typeof nextStateForKey === 'undefined') {
- var errorMessage = getUndefinedStateErrorMessage(_key, action);
+ var errorMessage = getUndefinedStateErrorMessage(key, action);
throw new Error(errorMessage);
}
- nextState[_key] = nextStateForKey;
+ nextState[key] = nextStateForKey;
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
}
return hasChanged ? nextState : state;
@@ -38939,7 +40741,7 @@ function combineReducers(reducers) {
}
/***/ }),
-/* 461 */
+/* 469 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -38993,12 +40795,12 @@ function bindActionCreators(actionCreators, dispatch) {
}
/***/ }),
-/* 462 */
+/* 470 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = applyMiddleware;
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(258);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(264);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
@@ -39049,7 +40851,7 @@ function applyMiddleware() {
}
/***/ }),
-/* 463 */
+/* 471 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -39060,15 +40862,11 @@ exports["default"] = undefined;
var _react = __webpack_require__(0);
-var _propTypes = __webpack_require__(14);
-
-var _propTypes2 = _interopRequireDefault(_propTypes);
-
-var _storeShape = __webpack_require__(259);
+var _storeShape = __webpack_require__(265);
var _storeShape2 = _interopRequireDefault(_storeShape);
-var _warning = __webpack_require__(260);
+var _warning = __webpack_require__(266);
var _warning2 = _interopRequireDefault(_warning);
@@ -39130,14 +40928,14 @@ if (false) {
Provider.propTypes = {
store: _storeShape2["default"].isRequired,
- children: _propTypes2["default"].element.isRequired
+ children: _react.PropTypes.element.isRequired
};
Provider.childContextTypes = {
store: _storeShape2["default"].isRequired
};
/***/ }),
-/* 464 */
+/* 472 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -39151,31 +40949,31 @@ exports["default"] = connect;
var _react = __webpack_require__(0);
-var _storeShape = __webpack_require__(259);
+var _storeShape = __webpack_require__(265);
var _storeShape2 = _interopRequireDefault(_storeShape);
-var _shallowEqual = __webpack_require__(465);
+var _shallowEqual = __webpack_require__(473);
var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
-var _wrapActionCreators = __webpack_require__(466);
+var _wrapActionCreators = __webpack_require__(474);
var _wrapActionCreators2 = _interopRequireDefault(_wrapActionCreators);
-var _warning = __webpack_require__(260);
+var _warning = __webpack_require__(266);
var _warning2 = _interopRequireDefault(_warning);
-var _isPlainObject = __webpack_require__(467);
+var _isPlainObject = __webpack_require__(475);
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
-var _hoistNonReactStatics = __webpack_require__(161);
+var _hoistNonReactStatics = __webpack_require__(168);
var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
-var _invariant = __webpack_require__(20);
+var _invariant = __webpack_require__(17);
var _invariant2 = _interopRequireDefault(_invariant);
@@ -39538,7 +41336,7 @@ function connect(mapStateToProps, mapDispatchToProps, mergeProps) {
}
/***/ }),
-/* 465 */
+/* 473 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -39570,7 +41368,7 @@ function shallowEqual(objA, objB) {
}
/***/ }),
-/* 466 */
+/* 474 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -39579,7 +41377,7 @@ function shallowEqual(objA, objB) {
exports.__esModule = true;
exports["default"] = wrapActionCreators;
-var _redux = __webpack_require__(111);
+var _redux = __webpack_require__(115);
function wrapActionCreators(actionCreators) {
return function (dispatch) {
@@ -39588,12 +41386,12 @@ function wrapActionCreators(actionCreators) {
}
/***/ }),
-/* 467 */
+/* 475 */
/***/ (function(module, exports, __webpack_require__) {
-var baseGetTag = __webpack_require__(468),
- getPrototype = __webpack_require__(473),
- isObjectLike = __webpack_require__(475);
+var baseGetTag = __webpack_require__(476),
+ getPrototype = __webpack_require__(481),
+ isObjectLike = __webpack_require__(483);
/** `Object#toString` result references. */
var objectTag = '[object Object]';
@@ -39656,12 +41454,12 @@ module.exports = isPlainObject;
/***/ }),
-/* 468 */
+/* 476 */
/***/ (function(module, exports, __webpack_require__) {
-var Symbol = __webpack_require__(261),
- getRawTag = __webpack_require__(471),
- objectToString = __webpack_require__(472);
+var Symbol = __webpack_require__(267),
+ getRawTag = __webpack_require__(479),
+ objectToString = __webpack_require__(480);
/** `Object#toString` result references. */
var nullTag = '[object Null]',
@@ -39690,10 +41488,10 @@ module.exports = baseGetTag;
/***/ }),
-/* 469 */
+/* 477 */
/***/ (function(module, exports, __webpack_require__) {
-var freeGlobal = __webpack_require__(470);
+var freeGlobal = __webpack_require__(478);
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
@@ -39705,7 +41503,7 @@ module.exports = root;
/***/ }),
-/* 470 */
+/* 478 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
@@ -39713,13 +41511,13 @@ var freeGlobal = typeof global == 'object' && global && global.Object === Object
module.exports = freeGlobal;
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47)))
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46)))
/***/ }),
-/* 471 */
+/* 479 */
/***/ (function(module, exports, __webpack_require__) {
-var Symbol = __webpack_require__(261);
+var Symbol = __webpack_require__(267);
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -39768,7 +41566,7 @@ module.exports = getRawTag;
/***/ }),
-/* 472 */
+/* 480 */
/***/ (function(module, exports) {
/** Used for built-in method references. */
@@ -39796,10 +41594,10 @@ module.exports = objectToString;
/***/ }),
-/* 473 */
+/* 481 */
/***/ (function(module, exports, __webpack_require__) {
-var overArg = __webpack_require__(474);
+var overArg = __webpack_require__(482);
/** Built-in value references. */
var getPrototype = overArg(Object.getPrototypeOf, Object);
@@ -39808,7 +41606,7 @@ module.exports = getPrototype;
/***/ }),
-/* 474 */
+/* 482 */
/***/ (function(module, exports) {
/**
@@ -39829,7 +41627,7 @@ module.exports = overArg;
/***/ }),
-/* 475 */
+/* 483 */
/***/ (function(module, exports) {
/**
@@ -39864,24 +41662,23 @@ module.exports = isObjectLike;
/***/ }),
-/* 476 */
+/* 484 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.logger = exports.defaults = undefined;
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-var _core = __webpack_require__(477);
+var _core = __webpack_require__(485);
-var _helpers = __webpack_require__(262);
+var _helpers = __webpack_require__(268);
-var _defaults = __webpack_require__(480);
+var _defaults = __webpack_require__(488);
var _defaults2 = _interopRequireDefault(_defaults);
@@ -39907,17 +41704,17 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* @returns {function} logger middleware
*/
function createLogger() {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+ var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var loggerOptions = _extends({}, _defaults2.default, options);
- var logger = loggerOptions.logger,
- transformer = loggerOptions.transformer,
- stateTransformer = loggerOptions.stateTransformer,
- errorTransformer = loggerOptions.errorTransformer,
- predicate = loggerOptions.predicate,
- logErrors = loggerOptions.logErrors,
- diffPredicate = loggerOptions.diffPredicate;
+ var logger = loggerOptions.logger;
+ var transformer = loggerOptions.transformer;
+ var stateTransformer = loggerOptions.stateTransformer;
+ var errorTransformer = loggerOptions.errorTransformer;
+ var predicate = loggerOptions.predicate;
+ var logErrors = loggerOptions.logErrors;
+ var diffPredicate = loggerOptions.diffPredicate;
// Return if 'console' object is not defined
@@ -39935,20 +41732,6 @@ function createLogger() {
console.error('Option \'transformer\' is deprecated, use \'stateTransformer\' instead!'); // eslint-disable-line no-console
}
- // Detect if 'createLogger' was passed directly to 'applyMiddleware'.
- if (options.getState && options.dispatch) {
- // eslint-disable-next-line no-console
- console.error('[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\n\n// Logger with default options\nimport { logger } from \'redux-logger\'\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n\n\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\nimport createLogger from \'redux-logger\'\n\nconst logger = createLogger({\n // ...options\n});\n\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n');
-
- return function () {
- return function (next) {
- return function (action) {
- return next(action);
- };
- };
- };
- }
-
var logBuffer = [];
return function (_ref) {
@@ -39968,7 +41751,7 @@ function createLogger() {
logEntry.prevState = stateTransformer(getState());
logEntry.action = action;
- var returnedValue = void 0;
+ var returnedValue = undefined;
if (logErrors) {
try {
returnedValue = next(action);
@@ -39994,16 +41777,11 @@ function createLogger() {
};
}
-var defaultLogger = createLogger();
-
-exports.defaults = _defaults2.default;
-exports.logger = defaultLogger;
exports.default = createLogger;
module.exports = exports['default'];
-
/***/ }),
-/* 477 */
+/* 485 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -40012,14 +41790,11 @@ module.exports = exports['default'];
Object.defineProperty(exports, "__esModule", {
value: true
});
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
exports.printBuffer = printBuffer;
-var _helpers = __webpack_require__(262);
+var _helpers = __webpack_require__(268);
-var _diff = __webpack_require__(478);
+var _diff = __webpack_require__(486);
var _diff2 = _interopRequireDefault(_diff);
@@ -40027,6 +41802,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
+function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; }
+
/**
* Get log level string based on supplied params
*
@@ -40049,40 +41826,40 @@ function getLogLevel(level, action, payload, type) {
}
function defaultTitleFormatter(options) {
- var timestamp = options.timestamp,
- duration = options.duration;
-
+ var timestamp = options.timestamp;
+ var duration = options.duration;
return function (action, time, took) {
var parts = ['action'];
-
- parts.push('%c' + String(action.type));
- if (timestamp) parts.push('%c@ ' + time);
- if (duration) parts.push('%c(in ' + took.toFixed(2) + ' ms)');
-
+ if (timestamp) {
+ parts.push('@ ' + time);
+ }
+ parts.push(action.type);
+ if (duration) {
+ parts.push('(in ' + took.toFixed(2) + ' ms)');
+ }
return parts.join(' ');
};
}
function printBuffer(buffer, options) {
- var logger = options.logger,
- actionTransformer = options.actionTransformer,
- _options$titleFormatt = options.titleFormatter,
- titleFormatter = _options$titleFormatt === undefined ? defaultTitleFormatter(options) : _options$titleFormatt,
- collapsed = options.collapsed,
- colors = options.colors,
- level = options.level,
- diff = options.diff;
-
+ var logger = options.logger;
+ var actionTransformer = options.actionTransformer;
+ var _options$titleFormatt = options.titleFormatter;
+ var titleFormatter = _options$titleFormatt === undefined ? defaultTitleFormatter(options) : _options$titleFormatt;
+ var collapsed = options.collapsed;
+ var colors = options.colors;
+ var level = options.level;
+ var diff = options.diff;
buffer.forEach(function (logEntry, key) {
- var started = logEntry.started,
- startedTime = logEntry.startedTime,
- action = logEntry.action,
- prevState = logEntry.prevState,
- error = logEntry.error;
- var took = logEntry.took,
- nextState = logEntry.nextState;
+ var started = logEntry.started;
+ var startedTime = logEntry.startedTime;
+ var action = logEntry.action;
+ var prevState = logEntry.prevState;
+ var error = logEntry.error;
+ var took = logEntry.took;
+ var nextState = logEntry.nextState;
var nextEntry = buffer[key + 1];
@@ -40095,22 +41872,18 @@ function printBuffer(buffer, options) {
var formattedAction = actionTransformer(action);
var isCollapsed = typeof collapsed === 'function' ? collapsed(function () {
return nextState;
- }, action, logEntry) : collapsed;
+ }, action) : collapsed;
var formattedTime = (0, _helpers.formatTime)(startedTime);
- var titleCSS = colors.title ? 'color: ' + colors.title(formattedAction) + ';' : '';
- var headerCSS = ['color: gray; font-weight: lighter;'];
- headerCSS.push(titleCSS);
- if (options.timestamp) headerCSS.push('color: gray; font-weight: lighter;');
- if (options.duration) headerCSS.push('color: gray; font-weight: lighter;');
+ var titleCSS = colors.title ? 'color: ' + colors.title(formattedAction) + ';' : null;
var title = titleFormatter(formattedAction, formattedTime, took);
// Render
try {
if (isCollapsed) {
- if (colors.title) logger.groupCollapsed.apply(logger, ['%c ' + title].concat(headerCSS));else logger.groupCollapsed(title);
+ if (colors.title) logger.groupCollapsed('%c ' + title, titleCSS);else logger.groupCollapsed(title);
} else {
- if (colors.title) logger.group.apply(logger, ['%c ' + title].concat(headerCSS));else logger.group(title);
+ if (colors.title) logger.group('%c ' + title, titleCSS);else logger.group(title);
}
} catch (e) {
logger.log(title);
@@ -40126,11 +41899,11 @@ function printBuffer(buffer, options) {
}
if (actionLevel) {
- if (colors.action) logger[actionLevel]('%c action ', 'color: ' + colors.action(formattedAction) + '; font-weight: bold', formattedAction);else logger[actionLevel]('action ', formattedAction);
+ if (colors.action) logger[actionLevel]('%c action', 'color: ' + colors.action(formattedAction) + '; font-weight: bold', formattedAction);else logger[actionLevel]('action', formattedAction);
}
if (error && errorLevel) {
- if (colors.error) logger[errorLevel]('%c error ', 'color: ' + colors.error(error, prevState) + '; font-weight: bold;', error);else logger[errorLevel]('error ', error);
+ if (colors.error) logger[errorLevel]('%c error', 'color: ' + colors.error(error, prevState) + '; font-weight: bold', error);else logger[errorLevel]('error', error);
}
if (nextStateLevel) {
@@ -40144,13 +41917,13 @@ function printBuffer(buffer, options) {
try {
logger.groupEnd();
} catch (e) {
- logger.log('\u2014\u2014 log end \u2014\u2014');
+ logger.log('—— log end ——');
}
});
}
/***/ }),
-/* 478 */
+/* 486 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -40161,14 +41934,12 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = diffLogger;
-var _deepDiff = __webpack_require__(479);
+var _deepDiff = __webpack_require__(487);
var _deepDiff2 = _interopRequireDefault(_deepDiff);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
-
// https://github.com/flitbit/diff#differences
var dictionary = {
'E': {
@@ -40194,25 +41965,24 @@ function style(kind) {
}
function render(diff) {
- var kind = diff.kind,
- path = diff.path,
- lhs = diff.lhs,
- rhs = diff.rhs,
- index = diff.index,
- item = diff.item;
-
+ var kind = diff.kind;
+ var path = diff.path;
+ var lhs = diff.lhs;
+ var rhs = diff.rhs;
+ var index = diff.index;
+ var item = diff.item;
switch (kind) {
case 'E':
- return [path.join('.'), lhs, '\u2192', rhs];
+ return path.join('.') + ' ' + lhs + ' → ' + rhs;
case 'N':
- return [path.join('.'), rhs];
+ return path.join('.') + ' ' + rhs;
case 'D':
- return [path.join('.')];
+ return '' + path.join('.');
case 'A':
return [path.join('.') + '[' + index + ']', item];
default:
- return [];
+ return null;
}
}
@@ -40235,22 +42005,22 @@ function diffLogger(prevState, newState, logger, isCollapsed) {
var output = render(elem);
- logger.log.apply(logger, ['%c ' + dictionary[kind].text, style(kind)].concat(_toConsumableArray(output)));
+ logger.log('%c ' + dictionary[kind].text, style(kind), output);
});
} else {
- logger.log('\u2014\u2014 no diff \u2014\u2014');
+ logger.log('—— no diff ——');
}
try {
logger.groupEnd();
} catch (e) {
- logger.log('\u2014\u2014 diff end \u2014\u2014 ');
+ logger.log('—— diff end —— ');
}
}
module.exports = exports['default'];
/***/ }),
-/* 479 */
+/* 487 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@@ -40677,10 +42447,10 @@ module.exports = exports['default'];
return accumulateDiff;
}));
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47)))
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46)))
/***/ }),
-/* 480 */
+/* 488 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -40729,10 +42499,10 @@ exports.default = {
// Deprecated options
transformer: undefined
};
-module.exports = exports["default"];
+module.exports = exports['default'];
/***/ }),
-/* 481 */
+/* 489 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -40743,7 +42513,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.routerMiddleware = exports.routerActions = exports.goForward = exports.goBack = exports.go = exports.replace = exports.push = exports.CALL_HISTORY_METHOD = exports.routerReducer = exports.LOCATION_CHANGE = exports.syncHistoryWithStore = undefined;
-var _reducer = __webpack_require__(263);
+var _reducer = __webpack_require__(269);
Object.defineProperty(exports, 'LOCATION_CHANGE', {
enumerable: true,
@@ -40758,7 +42528,7 @@ Object.defineProperty(exports, 'routerReducer', {
}
});
-var _actions = __webpack_require__(264);
+var _actions = __webpack_require__(270);
Object.defineProperty(exports, 'CALL_HISTORY_METHOD', {
enumerable: true,
@@ -40803,11 +42573,11 @@ Object.defineProperty(exports, 'routerActions', {
}
});
-var _sync = __webpack_require__(482);
+var _sync = __webpack_require__(490);
var _sync2 = _interopRequireDefault(_sync);
-var _middleware = __webpack_require__(483);
+var _middleware = __webpack_require__(491);
var _middleware2 = _interopRequireDefault(_middleware);
@@ -40817,7 +42587,7 @@ exports.syncHistoryWithStore = _sync2['default'];
exports.routerMiddleware = _middleware2['default'];
/***/ }),
-/* 482 */
+/* 490 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -40831,7 +42601,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
exports['default'] = syncHistoryWithStore;
-var _reducer = __webpack_require__(263);
+var _reducer = __webpack_require__(269);
var defaultSelectLocationState = function defaultSelectLocationState(state) {
return state.routing;
@@ -40926,7 +42696,7 @@ function syncHistoryWithStore(history, store) {
};
unsubscribeFromHistory = history.listen(handleLocationChange);
- // History 3.x doesn't call listen synchronously, so fire the initial location change ourselves
+ // support history 3.x
if (history.getCurrentLocation) {
handleLocationChange(history.getCurrentLocation());
}
@@ -40952,12 +42722,10 @@ function syncHistoryWithStore(history, store) {
}
});
- // History 2.x listeners expect a synchronous call. Make the first call to the
+ // History listeners expect a synchronous call. Make the first call to the
// listener after subscribing to the store, in case the listener causes a
// location change (e.g. when it redirects)
- if (!history.getCurrentLocation) {
- listener(lastPublishedLocation);
- }
+ listener(lastPublishedLocation);
// Let user unsubscribe later
return function () {
@@ -40978,7 +42746,7 @@ function syncHistoryWithStore(history, store) {
}
/***/ }),
-/* 483 */
+/* 491 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -40989,7 +42757,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports['default'] = routerMiddleware;
-var _actions = __webpack_require__(264);
+var _actions = __webpack_require__(270);
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
@@ -41017,11 +42785,11 @@ function routerMiddleware(history) {
}
/***/ }),
-/* 484 */
+/* 492 */
/***/ (function(module, exports, __webpack_require__) {
var invariant = __webpack_require__(9);
-var defaultClickRejectionStrategy = __webpack_require__(485);
+var defaultClickRejectionStrategy = __webpack_require__(493);
var alreadyInjected = false;
@@ -41042,14 +42810,14 @@ should be injected by the application.'
alreadyInjected = true;
- __webpack_require__(69).injection.injectEventPluginsByName({
- 'TapEventPlugin': __webpack_require__(486)(shouldRejectClick)
+ __webpack_require__(74).injection.injectEventPluginsByName({
+ 'TapEventPlugin': __webpack_require__(494)(shouldRejectClick)
});
};
/***/ }),
-/* 485 */
+/* 493 */
/***/ (function(module, exports) {
module.exports = function(lastTouchEvent, clickTimestamp) {
@@ -41060,7 +42828,7 @@ module.exports = function(lastTouchEvent, clickTimestamp) {
/***/ }),
-/* 486 */
+/* 494 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -41085,14 +42853,14 @@ module.exports = function(lastTouchEvent, clickTimestamp) {
-var EventConstants = __webpack_require__(487);
-var EventPluginUtils = __webpack_require__(103);
-var EventPropagators = __webpack_require__(68);
-var SyntheticUIEvent = __webpack_require__(71);
-var TouchEventUtils = __webpack_require__(488);
-var ViewportMetrics = __webpack_require__(144);
+var EventConstants = __webpack_require__(495);
+var EventPluginUtils = __webpack_require__(106);
+var EventPropagators = __webpack_require__(73);
+var SyntheticUIEvent = __webpack_require__(76);
+var TouchEventUtils = __webpack_require__(496);
+var ViewportMetrics = __webpack_require__(150);
-var keyOf = __webpack_require__(489);
+var keyOf = __webpack_require__(497);
var topLevelTypes = EventConstants.topLevelTypes;
var isStartish = EventPluginUtils.isStartish;
@@ -41238,7 +43006,7 @@ module.exports = createTapEventPlugin;
/***/ }),
-/* 487 */
+/* 495 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -41335,7 +43103,7 @@ var EventConstants = {
module.exports = EventConstants;
/***/ }),
-/* 488 */
+/* 496 */
/***/ (function(module, exports) {
/**
@@ -41383,7 +43151,7 @@ module.exports = TouchEventUtils;
/***/ }),
-/* 489 */
+/* 497 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -41423,1020 +43191,649 @@ var keyOf = function keyOf(oneKeyObj) {
module.exports = keyOf;
/***/ }),
-/* 490 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-
-
-
-var Form = function (_Component) {
- _inherits(Form, _Component);
-
- function Form(props, context) {
- _classCallCheck(this, Form);
-
- var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props, context));
-
- if (!context._reduxForm) {
- throw new Error('Form must be inside a component decorated with reduxForm()');
- }
- return _this;
- }
-
- _createClass(Form, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
- this.context._reduxForm.registerInnerOnSubmit(this.props.onSubmit);
- }
- }, {
- key: 'render',
- value: function render() {
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('form', this.props);
- }
- }]);
-
- return Form;
-}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
-
-Form.propTypes = {
- onSubmit: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired
-};
-Form.contextTypes = {
- _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
-};
-
-/* harmony default export */ __webpack_exports__["a"] = (Form);
-
-/***/ }),
-/* 491 */
+/* 498 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util_prefixName__ = __webpack_require__(89);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__reducer__ = __webpack_require__(499);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__reduxForm__ = __webpack_require__(525);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Field__ = __webpack_require__(611);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Fields__ = __webpack_require__(616);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__FieldArray__ = __webpack_require__(618);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__formValueSelector__ = __webpack_require__(621);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__values__ = __webpack_require__(622);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__selectors_getFormValues__ = __webpack_require__(623);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__selectors_getFormInitialValues__ = __webpack_require__(624);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__selectors_getFormSyncErrors__ = __webpack_require__(625);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__selectors_getFormAsyncErrors__ = __webpack_require__(626);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__selectors_getFormSubmitErrors__ = __webpack_require__(627);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__selectors_isDirty__ = __webpack_require__(628);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__selectors_isInvalid__ = __webpack_require__(629);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__selectors_isPristine__ = __webpack_require__(296);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__selectors_isValid__ = __webpack_require__(191);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__selectors_isSubmitting__ = __webpack_require__(630);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__selectors_hasSubmitSucceeded__ = __webpack_require__(631);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__selectors_hasSubmitFailed__ = __webpack_require__(632);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__Form__ = __webpack_require__(633);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__FormSection__ = __webpack_require__(634);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__SubmissionError__ = __webpack_require__(289);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__propTypes__ = __webpack_require__(635);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__actions__ = __webpack_require__(288);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__actionTypes__ = __webpack_require__(174);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-var FormSection = function (_Component) {
- _inherits(FormSection, _Component);
- function FormSection(props, context) {
- _classCallCheck(this, FormSection);
- var _this = _possibleConstructorReturn(this, (FormSection.__proto__ || Object.getPrototypeOf(FormSection)).call(this, props, context));
- if (!context._reduxForm) {
- throw new Error('FormSection must be inside a component decorated with reduxForm()');
- }
- return _this;
- }
- _createClass(FormSection, [{
- key: 'getChildContext',
- value: function getChildContext() {
- var context = this.context,
- name = this.props.name;
- return {
- _reduxForm: _extends({}, context._reduxForm, {
- sectionPrefix: Object(__WEBPACK_IMPORTED_MODULE_2__util_prefixName__["a" /* default */])(context, name)
- })
- };
- }
- }, {
- key: 'render',
- value: function render() {
- var _props = this.props,
- children = _props.children,
- name = _props.name,
- component = _props.component,
- rest = _objectWithoutProperties(_props, ['children', 'name', 'component']);
- if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(children)) {
- return children;
- }
- return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, rest, {
- children: children
- }));
- }
- }]);
- return FormSection;
-}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
-FormSection.propTypes = {
- name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,
- component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string])
-};
-FormSection.defaultProps = {
- component: 'div'
-};
-FormSection.childContextTypes = {
- _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired
-};
-FormSection.contextTypes = {
- _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
-};
-/* harmony default export */ __webpack_exports__["a"] = (FormSection);
-/***/ }),
-/* 492 */
-/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-function _extendableBuiltin(cls) {
- function ExtendableBuiltin() {
- cls.apply(this, arguments);
- }
- ExtendableBuiltin.prototype = Object.create(cls.prototype, {
- constructor: {
- value: cls,
- enumerable: false,
- writable: true,
- configurable: true
- }
+var createAll = function createAll(structure) {
+ return _extends({
+ // separate out field actions
+ actionTypes: __WEBPACK_IMPORTED_MODULE_24__actionTypes__
+ }, __WEBPACK_IMPORTED_MODULE_23__actions__, {
+ Field: __WEBPACK_IMPORTED_MODULE_2__Field__["a" /* default */](structure),
+ Fields: __WEBPACK_IMPORTED_MODULE_3__Fields__["a" /* default */](structure),
+ FieldArray: __WEBPACK_IMPORTED_MODULE_4__FieldArray__["a" /* default */](structure),
+ Form: __WEBPACK_IMPORTED_MODULE_19__Form__["a" /* default */],
+ FormSection: __WEBPACK_IMPORTED_MODULE_20__FormSection__["a" /* default */],
+ formValueSelector: __WEBPACK_IMPORTED_MODULE_5__formValueSelector__["a" /* default */](structure),
+ getFormValues: __WEBPACK_IMPORTED_MODULE_7__selectors_getFormValues__["a" /* default */](structure),
+ getFormInitialValues: __WEBPACK_IMPORTED_MODULE_8__selectors_getFormInitialValues__["a" /* default */](structure),
+ getFormSyncErrors: __WEBPACK_IMPORTED_MODULE_9__selectors_getFormSyncErrors__["a" /* default */](structure),
+ getFormAsyncErrors: __WEBPACK_IMPORTED_MODULE_10__selectors_getFormAsyncErrors__["a" /* default */](structure),
+ getFormSubmitErrors: __WEBPACK_IMPORTED_MODULE_11__selectors_getFormSubmitErrors__["a" /* default */](structure),
+ isDirty: __WEBPACK_IMPORTED_MODULE_12__selectors_isDirty__["a" /* default */](structure),
+ isInvalid: __WEBPACK_IMPORTED_MODULE_13__selectors_isInvalid__["a" /* default */](structure),
+ isPristine: __WEBPACK_IMPORTED_MODULE_14__selectors_isPristine__["a" /* default */](structure),
+ isValid: __WEBPACK_IMPORTED_MODULE_15__selectors_isValid__["a" /* default */](structure),
+ isSubmitting: __WEBPACK_IMPORTED_MODULE_16__selectors_isSubmitting__["a" /* default */](structure),
+ hasSubmitSucceeded: __WEBPACK_IMPORTED_MODULE_17__selectors_hasSubmitSucceeded__["a" /* default */](structure),
+ hasSubmitFailed: __WEBPACK_IMPORTED_MODULE_18__selectors_hasSubmitFailed__["a" /* default */](structure),
+ propTypes: __WEBPACK_IMPORTED_MODULE_22__propTypes__["a" /* default */],
+ reduxForm: __WEBPACK_IMPORTED_MODULE_1__reduxForm__["a" /* default */](structure),
+ reducer: __WEBPACK_IMPORTED_MODULE_0__reducer__["a" /* default */](structure),
+ SubmissionError: __WEBPACK_IMPORTED_MODULE_21__SubmissionError__["a" /* default */],
+ values: __WEBPACK_IMPORTED_MODULE_6__values__["a" /* default */](structure)
});
-
- if (Object.setPrototypeOf) {
- Object.setPrototypeOf(ExtendableBuiltin, cls);
- } else {
- ExtendableBuiltin.__proto__ = cls;
- }
-
- return ExtendableBuiltin;
-}
-
-var ExtendableError = function (_extendableBuiltin2) {
- _inherits(ExtendableError, _extendableBuiltin2);
-
- function ExtendableError() {
- var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
-
- _classCallCheck(this, ExtendableError);
-
- // extending Error is weird and does not propagate `message`
- var _this = _possibleConstructorReturn(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message));
-
- Object.defineProperty(_this, 'message', {
- configurable: true,
- enumerable: false,
- value: message,
- writable: true
- });
-
- Object.defineProperty(_this, 'name', {
- configurable: true,
- enumerable: false,
- value: _this.constructor.name,
- writable: true
- });
-
- if (Error.hasOwnProperty('captureStackTrace')) {
- Error.captureStackTrace(_this, _this.constructor);
- return _possibleConstructorReturn(_this);
- }
-
- Object.defineProperty(_this, 'stack', {
- configurable: true,
- enumerable: false,
- value: new Error(message).stack,
- writable: true
- });
- return _this;
- }
-
- return ExtendableError;
-}(_extendableBuiltin(Error));
-
-exports.default = ExtendableError;
-module.exports = exports['default'];
-
-
-/***/ }),
-/* 493 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return formPropTypes; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return fieldInputPropTypes; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return fieldMetaPropTypes; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return fieldPropTypes; });
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
-
-
-var any = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.any,
- bool = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.bool,
- func = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func,
- shape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape,
- string = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.string,
- oneOfType = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.oneOfType,
- object = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.object;
-
-
-var formPropTypes = {
- // State:
- anyTouched: bool.isRequired, // true if any of the fields have been marked as touched
- asyncValidating: oneOfType([bool, string]).isRequired, // true if async validation is running, a string if a field triggered async validation
- dirty: bool.isRequired, // true if any values are different from initialValues
- error: any, // form-wide error from '_error' key in validation result
- form: string.isRequired, // the name of the form
- invalid: bool.isRequired, // true if there are any validation errors
- initialized: bool.isRequired, // true if the form has been initialized
- initialValues: object, // the initialValues object passed to reduxForm
- pristine: bool.isRequired, // true if the values are the same as initialValues
- pure: bool.isRequired, // if true, implements shouldComponentUpdate
- submitting: bool.isRequired, // true if the form is in the process of being submitted
- submitFailed: bool.isRequired, // true if the form was submitted and failed for any reason
- submitSucceeded: bool.isRequired, // true if the form was successfully submitted
- valid: bool.isRequired, // true if there are no validation errors
- warning: any, // form-wide warning from '_warning' key in validation result
- // Actions:
- array: shape({
- insert: func.isRequired, // function to insert a value into an array field
- move: func.isRequired, // function to move a value within an array field
- pop: func.isRequired, // function to pop a value off of an array field
- push: func.isRequired, // function to push a value onto an array field
- remove: func.isRequired, // function to remove a value from an array field
- removeAll: func.isRequired, // function to remove all the values from an array field
- shift: func.isRequired, // function to shift a value out of an array field
- splice: func.isRequired, // function to splice a value into an array field
- swap: func.isRequired, // function to swap values in an array field
- unshift: func.isRequired // function to unshift a value into an array field
- }),
- asyncValidate: func.isRequired, // function to trigger async validation
- autofill: func.isRequired, // action to set a value of a field and mark it as autofilled
- blur: func.isRequired, // action to mark a field as blurred
- change: func.isRequired, // action to change the value of a field
- clearAsyncError: func.isRequired, // action to clear the async error of a field
- destroy: func.isRequired, // action to destroy the form's data in Redux
- dispatch: func.isRequired, // the Redux dispatch action
- handleSubmit: func.isRequired, // function to submit the form
- initialize: func.isRequired, // action to initialize form data
- reset: func.isRequired, // action to reset the form data to previously initialized values
- touch: func.isRequired, // action to mark fields as touched
- submit: func.isRequired, // action to trigger a submission of the specified form
- untouch: func.isRequired, // action to mark fields as untouched
-
- // triggerSubmit
- triggerSubmit: bool, // if true, submits the form on componentWillReceiveProps
- clearSubmit: func.isRequired // called before a triggered submit, by default clears triggerSubmit
};
-var fieldInputPropTypes = {
- checked: bool,
- name: string.isRequired,
- onBlur: func.isRequired,
- onChange: func.isRequired,
- onDragStart: func.isRequired,
- onDrop: func.isRequired,
- onFocus: func.isRequired,
- value: any
-};
-
-var fieldMetaPropTypes = {
- active: bool.isRequired,
- asyncValidating: bool.isRequired,
- autofilled: bool.isRequired,
- dirty: bool.isRequired,
- dispatch: func.isRequired,
- error: string,
- form: string.isRequired,
- invalid: bool.isRequired,
- pristine: bool.isRequired,
- submitting: bool.isRequired,
- submitFailed: bool.isRequired,
- touched: bool.isRequired,
- valid: bool.isRequired,
- visited: bool.isRequired,
- warning: string
-};
-
-var fieldPropTypes = {
- input: shape(fieldInputPropTypes).isRequired,
- meta: shape(fieldMetaPropTypes).isRequired,
- custom: object.isRequired
-};
-
-/* harmony default export */ __webpack_exports__["a"] = (formPropTypes);
-
-/***/ }),
-/* 494 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createField__ = __webpack_require__(495);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
-
-
-
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createField__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+/* harmony default export */ __webpack_exports__["a"] = (createAll);
/***/ }),
-/* 495 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ConnectedField__ = __webpack_require__(496);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__ = __webpack_require__(281);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_prefixName__ = __webpack_require__(89);
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-
-
-
-
-
-
-
-var createField = function createField(_ref) {
- var deepEqual = _ref.deepEqual,
- getIn = _ref.getIn,
- setIn = _ref.setIn,
- toJS = _ref.toJS;
-
- var ConnectedField = Object(__WEBPACK_IMPORTED_MODULE_3__ConnectedField__["a" /* default */])({
- deepEqual: deepEqual,
- getIn: getIn,
- toJS: toJS
- });
-
- var Field = function (_Component) {
- _inherits(Field, _Component);
-
- function Field(props, context) {
- _classCallCheck(this, Field);
-
- var _this = _possibleConstructorReturn(this, (Field.__proto__ || Object.getPrototypeOf(Field)).call(this, props, context));
-
- if (!context._reduxForm) {
- throw new Error('Field must be inside a component decorated with reduxForm()');
- }
-
- _this.normalize = _this.normalize.bind(_this);
- return _this;
- }
-
- _createClass(Field, [{
- key: 'shouldComponentUpdate',
- value: function shouldComponentUpdate(nextProps, nextState) {
- return Object(__WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__["a" /* default */])(this, nextProps, nextState);
- }
- }, {
- key: 'componentWillMount',
- value: function componentWillMount() {
- var _this2 = this;
-
- this.context._reduxForm.register(this.name, 'Field', function () {
- return _this2.props.validate;
- }, function () {
- return _this2.props.warn;
- });
- }
- }, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- if (this.props.name !== nextProps.name) {
- // unregister old name
- this.context._reduxForm.unregister(this.name
- // register new name
- );this.context._reduxForm.register(Object(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */])(this.context, nextProps.name), 'Field');
- }
- }
- }, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- this.context._reduxForm.unregister(this.name);
- }
- }, {
- key: 'getRenderedComponent',
- value: function getRenderedComponent() {
- __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Field');
- return this.refs.connected.getWrappedInstance().getRenderedComponent();
- }
- }, {
- key: 'normalize',
- value: function normalize(name, value) {
- var normalize = this.props.normalize;
-
- if (!normalize) {
- return value;
- }
- var previousValues = this.context._reduxForm.getValues();
- var previousValue = this.value;
- var nextValues = setIn(previousValues, name, value);
- return normalize(value, previousValue, nextValues, previousValues);
- }
- }, {
- key: 'render',
- value: function render() {
- return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(ConnectedField, _extends({}, this.props, {
- name: this.name,
- normalize: this.normalize,
- _reduxForm: this.context._reduxForm,
- ref: 'connected'
- }));
- }
- }, {
- key: 'name',
- get: function get() {
- return Object(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */])(this.context, this.props.name);
- }
- }, {
- key: 'dirty',
- get: function get() {
- return !this.pristine;
- }
- }, {
- key: 'pristine',
- get: function get() {
- return this.refs.connected.getWrappedInstance().isPristine();
- }
- }, {
- key: 'value',
- get: function get() {
- return this.refs.connected && this.refs.connected.getWrappedInstance().getValue();
- }
- }]);
-
- return Field;
- }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
-
- Field.propTypes = {
- name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,
- component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired,
- format: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
- normalize: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
- onBlur: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
- onChange: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
- onFocus: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
- onDragStart: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
- onDrop: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
- parse: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
- props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
- validate: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]),
- warn: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]),
- withRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool
- };
- Field.contextTypes = {
- _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
- };
-
- return Field;
-};
-
-/* harmony default export */ __webpack_exports__["a"] = (createField);
-
-/***/ }),
-/* 496 */
+/* 499 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(27);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createFieldProps__ = __webpack_require__(269);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__ = __webpack_require__(270);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__ = __webpack_require__(499);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__structure_plain__ = __webpack_require__(11);
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(174);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__ = __webpack_require__(500);
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-
-
-
-
-
-
-
-var propsToNotUpdateFor = ['_reduxForm'];
-
-var isObject = function isObject(entity) {
- return entity && (typeof entity === 'undefined' ? 'undefined' : _typeof(entity)) === 'object';
-};
-
-var isFunction = function isFunction(entity) {
- return entity && typeof entity === 'function';
-};
-var eventPreventDefault = function eventPreventDefault(event) {
- if (isObject(event) && isFunction(event.preventDefault)) {
- event.preventDefault();
- }
-};
-var eventDataTransferGetData = function eventDataTransferGetData(event, key) {
- if (isObject(event) && isObject(event.dataTransfer) && isFunction(event.dataTransfer.getData)) {
- return event.dataTransfer.getData(key);
- }
-};
-
-var eventDataTransferSetData = function eventDataTransferSetData(event, key, value) {
- if (isObject(event) && isObject(event.dataTransfer) && isFunction(event.dataTransfer.setData)) {
- event.dataTransfer.setData(key, value);
- }
-};
+var createReducer = function createReducer(structure) {
+ var _behaviors;
-var createConnectedField = function createConnectedField(_ref) {
- var deepEqual = _ref.deepEqual,
- getIn = _ref.getIn,
- toJS = _ref.toJS;
+ var deepEqual = structure.deepEqual,
+ empty = structure.empty,
+ getIn = structure.getIn,
+ setIn = structure.setIn,
+ deleteIn = structure.deleteIn,
+ fromJS = structure.fromJS,
+ keys = structure.keys,
+ size = structure.size,
+ splice = structure.splice;
- var getSyncError = function getSyncError(syncErrors, name) {
- var error = __WEBPACK_IMPORTED_MODULE_6__structure_plain__["a" /* default */].getIn(syncErrors, name
- // Because the error for this field might not be at a level in the error structure where
- // it can be set directly, it might need to be unwrapped from the _error property
- );return error && error._error ? error._error : error;
+ var deleteInWithCleanUp = __WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__["a" /* default */](structure);
+ var doSplice = function doSplice(state, key, field, index, removeNum, value, force) {
+ var existing = getIn(state, key + '.' + field);
+ return existing || force ? setIn(state, key + '.' + field, splice(existing, index, removeNum, value)) : state;
};
-
- var getSyncWarning = function getSyncWarning(syncWarnings, name) {
- var warning = getIn(syncWarnings, name
- // Because the warning for this field might not be at a level in the warning structure where
- // it can be set directly, it might need to be unwrapped from the _warning property
- );return warning && warning._warning ? warning._warning : warning;
+ var rootKeys = ['values', 'fields', 'submitErrors', 'asyncErrors'];
+ var arraySplice = function arraySplice(state, field, index, removeNum, value) {
+ var result = state;
+ var nonValuesValue = value != null ? empty : undefined;
+ result = doSplice(result, 'values', field, index, removeNum, value, true);
+ result = doSplice(result, 'fields', field, index, removeNum, nonValuesValue);
+ result = doSplice(result, 'submitErrors', field, index, removeNum, nonValuesValue);
+ result = doSplice(result, 'asyncErrors', field, index, removeNum, nonValuesValue);
+ return result;
};
- var ConnectedField = function (_Component) {
- _inherits(ConnectedField, _Component);
-
- function ConnectedField(props) {
- _classCallCheck(this, ConnectedField);
+ var behaviors = (_behaviors = {}, _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], function (state, _ref) {
+ var _ref$meta = _ref.meta,
+ field = _ref$meta.field,
+ index = _ref$meta.index,
+ payload = _ref.payload;
- var _this = _possibleConstructorReturn(this, (ConnectedField.__proto__ || Object.getPrototypeOf(ConnectedField)).call(this, props));
+ return arraySplice(state, field, index, 0, payload);
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], function (state, _ref2) {
+ var _ref2$meta = _ref2.meta,
+ field = _ref2$meta.field,
+ from = _ref2$meta.from,
+ to = _ref2$meta.to;
- _this.handleChange = _this.handleChange.bind(_this);
- _this.handleFocus = _this.handleFocus.bind(_this);
- _this.handleBlur = _this.handleBlur.bind(_this);
- _this.handleDragStart = _this.handleDragStart.bind(_this);
- _this.handleDrop = _this.handleDrop.bind(_this);
- return _this;
+ var array = getIn(state, 'values.' + field);
+ var length = array ? size(array) : 0;
+ var result = state;
+ if (length) {
+ rootKeys.forEach(function (key) {
+ var path = key + '.' + field;
+ if (getIn(result, path)) {
+ var value = getIn(result, path + '[' + from + ']');
+ result = setIn(result, path, splice(getIn(result, path), from, 1)); // remove
+ result = setIn(result, path, splice(getIn(result, path), to, 0, value)); // insert
+ }
+ });
}
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], function (state, _ref3) {
+ var field = _ref3.meta.field;
- _createClass(ConnectedField, [{
- key: 'shouldComponentUpdate',
- value: function shouldComponentUpdate(nextProps) {
- var _this2 = this;
+ var array = getIn(state, 'values.' + field);
+ var length = array ? size(array) : 0;
+ return length ? arraySplice(state, field, length - 1, 1) : state;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], function (state, _ref4) {
+ var field = _ref4.meta.field,
+ payload = _ref4.payload;
- var nextPropsKeys = Object.keys(nextProps);
- var thisPropsKeys = Object.keys(this.props);
- return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) {
- return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]);
- });
- }
- }, {
- key: 'isPristine',
- value: function isPristine() {
- return this.props.pristine;
- }
- }, {
- key: 'getValue',
- value: function getValue() {
- return this.props.value;
- }
- }, {
- key: 'getRenderedComponent',
- value: function getRenderedComponent() {
- return this.refs.renderedComponent;
- }
- }, {
- key: 'handleChange',
- value: function handleChange(event) {
- var _props = this.props,
- name = _props.name,
- dispatch = _props.dispatch,
- parse = _props.parse,
- normalize = _props.normalize,
- onChange = _props.onChange,
- _reduxForm = _props._reduxForm,
- previousValue = _props.value;
+ var array = getIn(state, 'values.' + field);
+ var length = array ? size(array) : 0;
+ return arraySplice(state, field, length, 0, payload);
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], function (state, _ref5) {
+ var _ref5$meta = _ref5.meta,
+ field = _ref5$meta.field,
+ index = _ref5$meta.index;
- var newValue = Object(__WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize });
+ return arraySplice(state, field, index, 1);
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], function (state, _ref6) {
+ var field = _ref6.meta.field;
- var defaultPrevented = false;
- if (onChange) {
- onChange(_extends({}, event, {
- preventDefault: function preventDefault() {
- defaultPrevented = true;
- return eventPreventDefault(event);
- }
- }), newValue, previousValue);
- }
- if (!defaultPrevented) {
- // dispatch change action
- dispatch(_reduxForm.change(name, newValue));
- }
- }
- }, {
- key: 'handleFocus',
- value: function handleFocus(event) {
- var _props2 = this.props,
- name = _props2.name,
- dispatch = _props2.dispatch,
- onFocus = _props2.onFocus,
- _reduxForm = _props2._reduxForm;
+ var array = getIn(state, 'values.' + field);
+ var length = array ? size(array) : 0;
+ return length ? arraySplice(state, field, 0, length) : state;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], function (state, _ref7) {
+ var field = _ref7.meta.field;
+ return arraySplice(state, field, 0, 1);
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SPLICE"], function (state, _ref8) {
+ var _ref8$meta = _ref8.meta,
+ field = _ref8$meta.field,
+ index = _ref8$meta.index,
+ removeNum = _ref8$meta.removeNum,
+ payload = _ref8.payload;
- var defaultPrevented = false;
- if (onFocus) {
- onFocus(_extends({}, event, {
- preventDefault: function preventDefault() {
- defaultPrevented = true;
- return eventPreventDefault(event);
- }
- }));
- }
+ return arraySplice(state, field, index, removeNum, payload);
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SWAP"], function (state, _ref9) {
+ var _ref9$meta = _ref9.meta,
+ field = _ref9$meta.field,
+ indexA = _ref9$meta.indexA,
+ indexB = _ref9$meta.indexB;
- if (!defaultPrevented) {
- dispatch(_reduxForm.focus(name));
- }
+ var result = state;
+ rootKeys.forEach(function (key) {
+ var valueA = getIn(result, key + '.' + field + '[' + indexA + ']');
+ var valueB = getIn(result, key + '.' + field + '[' + indexB + ']');
+ if (valueA !== undefined || valueB !== undefined) {
+ result = setIn(result, key + '.' + field + '[' + indexA + ']', valueB);
+ result = setIn(result, key + '.' + field + '[' + indexB + ']', valueA);
}
- }, {
- key: 'handleBlur',
- value: function handleBlur(event) {
- var _props3 = this.props,
- name = _props3.name,
- dispatch = _props3.dispatch,
- parse = _props3.parse,
- normalize = _props3.normalize,
- onBlur = _props3.onBlur,
- _reduxForm = _props3._reduxForm,
- _value = _props3._value,
- previousValue = _props3.value;
-
- var newValue = Object(__WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize }
-
- // for checkbox and radio, if the value property of checkbox or radio equals
- // the value passed by blur event, then fire blur action with previousValue.
- );if (newValue === _value && _value !== undefined) {
- newValue = previousValue;
- }
+ });
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], function (state, _ref10) {
+ var field = _ref10.meta.field,
+ payload = _ref10.payload;
- var defaultPrevented = false;
- if (onBlur) {
- onBlur(_extends({}, event, {
- preventDefault: function preventDefault() {
- defaultPrevented = true;
- return eventPreventDefault(event);
- }
- }), newValue, previousValue);
- }
+ return arraySplice(state, field, 0, 0, payload);
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], function (state, _ref11) {
+ var field = _ref11.meta.field,
+ payload = _ref11.payload;
- if (!defaultPrevented) {
- // dispatch blur action
- dispatch(_reduxForm.blur(name, newValue)
+ var result = state;
+ result = deleteInWithCleanUp(result, 'asyncErrors.' + field);
+ result = deleteInWithCleanUp(result, 'submitErrors.' + field);
+ result = setIn(result, 'fields.' + field + '.autofilled', true);
+ result = setIn(result, 'values.' + field, payload);
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], function (state, _ref12) {
+ var _ref12$meta = _ref12.meta,
+ field = _ref12$meta.field,
+ touch = _ref12$meta.touch,
+ payload = _ref12.payload;
- // call post-blur callback
- );if (_reduxForm.asyncValidate) {
- _reduxForm.asyncValidate(name, newValue);
- }
- }
- }
- }, {
- key: 'handleDragStart',
- value: function handleDragStart(event) {
- var _props4 = this.props,
- onDragStart = _props4.onDragStart,
- value = _props4.value;
+ var result = state;
+ var initial = getIn(result, 'initial.' + field);
+ if (initial === undefined && payload === '') {
+ result = deleteInWithCleanUp(result, 'values.' + field);
+ } else if (payload !== undefined) {
+ result = setIn(result, 'values.' + field, payload);
+ }
+ if (field === getIn(result, 'active')) {
+ result = deleteIn(result, 'active');
+ }
+ result = deleteIn(result, 'fields.' + field + '.active');
+ if (touch) {
+ result = setIn(result, 'fields.' + field + '.touched', true);
+ result = setIn(result, 'anyTouched', true);
+ }
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], function (state, _ref13) {
+ var _ref13$meta = _ref13.meta,
+ field = _ref13$meta.field,
+ touch = _ref13$meta.touch,
+ persistentSubmitErrors = _ref13$meta.persistentSubmitErrors,
+ payload = _ref13.payload;
- eventDataTransferSetData(event, __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */], value == null ? '' : value);
+ var result = state;
+ var initial = getIn(result, 'initial.' + field);
+ if (initial === undefined && payload === '') {
+ result = deleteInWithCleanUp(result, 'values.' + field);
+ } else if (payload !== undefined) {
+ result = setIn(result, 'values.' + field, payload);
+ }
+ result = deleteInWithCleanUp(result, 'asyncErrors.' + field);
+ if (!persistentSubmitErrors) {
+ result = deleteInWithCleanUp(result, 'submitErrors.' + field);
+ }
+ result = deleteInWithCleanUp(result, 'fields.' + field + '.autofilled');
+ if (touch) {
+ result = setIn(result, 'fields.' + field + '.touched', true);
+ result = setIn(result, 'anyTouched', true);
+ }
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], function (state) {
+ return deleteIn(state, 'triggerSubmit');
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], function (state, _ref14) {
+ var field = _ref14.meta.field;
- if (onDragStart) {
- onDragStart(event);
- }
- }
- }, {
- key: 'handleDrop',
- value: function handleDrop(event) {
- var _props5 = this.props,
- name = _props5.name,
- dispatch = _props5.dispatch,
- onDrop = _props5.onDrop,
- _reduxForm = _props5._reduxForm,
- previousValue = _props5.value;
+ return deleteIn(state, 'asyncErrors.' + field);
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["FOCUS"], function (state, _ref15) {
+ var field = _ref15.meta.field;
- var newValue = eventDataTransferGetData(event, __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */]);
+ var result = state;
+ var previouslyActive = getIn(state, 'active');
+ result = deleteIn(result, 'fields.' + previouslyActive + '.active');
+ result = setIn(result, 'fields.' + field + '.visited', true);
+ result = setIn(result, 'fields.' + field + '.active', true);
+ result = setIn(result, 'active', field);
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], function (state, _ref16) {
+ var payload = _ref16.payload,
+ _ref16$meta = _ref16.meta,
+ keepDirty = _ref16$meta.keepDirty,
+ keepSubmitSucceeded = _ref16$meta.keepSubmitSucceeded;
- var defaultPrevented = false;
- if (onDrop) {
- onDrop(_extends({}, event, {
- preventDefault: function preventDefault() {
- defaultPrevented = true;
- return eventPreventDefault(event);
- }
- }), newValue, previousValue);
- }
+ var mapData = fromJS(payload);
+ var result = empty; // clean all field state
- if (!defaultPrevented) {
- // dispatch change action
- dispatch(_reduxForm.change(name, newValue));
- eventPreventDefault(event);
- }
- }
- }, {
- key: 'render',
- value: function render() {
- var _props6 = this.props,
- component = _props6.component,
- withRef = _props6.withRef,
- name = _props6.name,
- _reduxForm = _props6._reduxForm,
- normalize = _props6.normalize,
- onBlur = _props6.onBlur,
- onChange = _props6.onChange,
- onFocus = _props6.onFocus,
- onDragStart = _props6.onDragStart,
- onDrop = _props6.onDrop,
- rest = _objectWithoutProperties(_props6, ['component', 'withRef', 'name', '_reduxForm', 'normalize', 'onBlur', 'onChange', 'onFocus', 'onDragStart', 'onDrop']);
+ // persist old warnings, they will get recalculated if the new form values are different from the old values
+ var warning = getIn(state, 'warning');
+ if (warning) {
+ result = setIn(result, 'warning', warning);
+ }
+ var syncWarnings = getIn(state, 'syncWarnings');
+ if (syncWarnings) {
+ result = setIn(result, 'syncWarnings', syncWarnings);
+ }
- var _createFieldProps = Object(__WEBPACK_IMPORTED_MODULE_3__createFieldProps__["a" /* default */])({ getIn: getIn, toJS: toJS }, name, _extends({}, rest, {
- form: _reduxForm.form,
- onBlur: this.handleBlur,
- onChange: this.handleChange,
- onDrop: this.handleDrop,
- onDragStart: this.handleDragStart,
- onFocus: this.handleFocus
- })),
- custom = _createFieldProps.custom,
- props = _objectWithoutProperties(_createFieldProps, ['custom']);
+ // persist old errors, they will get recalculated if the new form values are different from the old values
+ var error = getIn(state, 'error');
+ if (error) {
+ result = setIn(result, 'error', error);
+ }
+ var syncErrors = getIn(state, 'syncErrors');
+ if (syncErrors) {
+ result = setIn(result, 'syncErrors', syncErrors);
+ }
- if (withRef) {
- custom.ref = 'renderedComponent';
- }
- if (typeof component === 'string') {
- var input = props.input,
- meta = props.meta; // eslint-disable-line no-unused-vars
- // flatten input into other props
+ var registeredFields = getIn(state, 'registeredFields');
+ if (registeredFields) {
+ result = setIn(result, 'registeredFields', registeredFields);
+ }
+ var newValues = mapData;
+ if (keepDirty && registeredFields) {
+ (function () {
+ //
+ // Keep the value of dirty fields while updating the value of
+ // pristine fields. This way, apps can reinitialize forms while
+ // avoiding stomping on user edits.
+ //
+ // Note 1: The initialize action replaces all initial values
+ // regardless of keepDirty.
+ //
+ // Note 2: When a field is dirty, keepDirty is enabled, and the field
+ // value is the same as the new initial value for the field, the
+ // initialize action causes the field to become pristine. That effect
+ // is what we want.
+ //
+ var previousValues = getIn(state, 'values');
+ var previousInitialValues = getIn(state, 'initial');
+ keys(registeredFields).forEach(function (name) {
+ var previousInitialValue = getIn(previousInitialValues, name);
+ var previousValue = getIn(previousValues, name);
+ if (!deepEqual(previousValue, previousInitialValue)) {
+ // This field was dirty. Restore the dirty value.
+ newValues = setIn(newValues, name, previousValue);
+ }
+ });
+ })();
+ }
+ if (keepSubmitSucceeded && getIn(state, 'submitSucceeded')) {
+ result = setIn(result, 'submitSucceeded', true);
+ }
+ result = setIn(result, 'values', newValues);
+ result = setIn(result, 'initial', mapData);
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], function (state, _ref17) {
+ var _ref17$payload = _ref17.payload,
+ name = _ref17$payload.name,
+ type = _ref17$payload.type;
- return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, input, custom));
- } else {
- return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, props, custom));
- }
- }
- }]);
+ var key = 'registeredFields[\'' + name + '\']';
+ var field = getIn(state, key);
+ if (field) {
+ var count = getIn(field, 'count') + 1;
+ field = setIn(field, 'count', count);
+ } else {
+ field = fromJS({ name: name, type: type, count: 1 });
+ }
+ return setIn(state, key, field);
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["RESET"], function (state) {
+ var result = empty;
+ var registeredFields = getIn(state, 'registeredFields');
+ if (registeredFields) {
+ result = setIn(result, 'registeredFields', registeredFields);
+ }
+ var values = getIn(state, 'initial');
+ if (values) {
+ result = setIn(result, 'values', values);
+ result = setIn(result, 'initial', values);
+ }
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SUBMIT"], function (state) {
+ return setIn(state, 'triggerSubmit', true);
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], function (state, _ref18) {
+ var field = _ref18.meta.field;
- return ConnectedField;
- }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
+ return setIn(state, 'asyncValidating', field || true);
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_SUBMIT"], function (state) {
+ return setIn(state, 'submitting', true);
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_ASYNC_VALIDATION"], function (state, _ref19) {
+ var payload = _ref19.payload;
- ConnectedField.propTypes = {
- component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired,
- props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
- };
+ var result = state;
+ result = deleteIn(result, 'asyncValidating');
+ if (payload && Object.keys(payload).length) {
+ var _error = payload._error,
+ fieldErrors = _objectWithoutProperties(payload, ['_error']);
- var connector = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"])(function (state, ownProps) {
- var name = ownProps.name,
- _ownProps$_reduxForm = ownProps._reduxForm,
- initialValues = _ownProps$_reduxForm.initialValues,
- getFormState = _ownProps$_reduxForm.getFormState;
+ if (_error) {
+ result = setIn(result, 'error', _error);
+ }
+ if (Object.keys(fieldErrors).length) {
+ result = setIn(result, 'asyncErrors', fromJS(fieldErrors));
+ } else {
+ result = deleteIn(result, 'asyncErrors');
+ }
+ } else {
+ result = deleteIn(result, 'error');
+ result = deleteIn(result, 'asyncErrors');
+ }
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_SUBMIT"], function (state, _ref20) {
+ var payload = _ref20.payload;
- var formState = getFormState(state);
- var initialState = getIn(formState, 'initial.' + name);
- var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name);
- var value = getIn(formState, 'values.' + name);
- var submitting = getIn(formState, 'submitting');
- var syncError = getSyncError(getIn(formState, 'syncErrors'), name);
- var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name);
- var pristine = deepEqual(value, initial);
- return {
- asyncError: getIn(formState, 'asyncErrors.' + name),
- asyncValidating: getIn(formState, 'asyncValidating') === name,
- dirty: !pristine,
- pristine: pristine,
- state: getIn(formState, 'fields.' + name),
- submitError: getIn(formState, 'submitErrors.' + name),
- submitFailed: getIn(formState, 'submitFailed'),
- submitting: submitting,
- syncError: syncError,
- syncWarning: syncWarning,
- initial: initial,
- value: value,
- _value: ownProps.value // save value passed in (for checkboxes)
- };
- }, undefined, undefined, { withRef: true });
- return connector(ConnectedField);
-};
+ var result = state;
+ result = deleteIn(result, 'submitting');
+ result = deleteIn(result, 'submitFailed');
+ result = deleteIn(result, 'submitSucceeded');
+ if (payload && Object.keys(payload).length) {
+ var _error = payload._error,
+ fieldErrors = _objectWithoutProperties(payload, ['_error']);
-/* harmony default export */ __webpack_exports__["a"] = (createConnectedField);
+ if (_error) {
+ result = setIn(result, 'error', _error);
+ } else {
+ result = deleteIn(result, 'error');
+ }
+ if (Object.keys(fieldErrors).length) {
+ result = setIn(result, 'submitErrors', fromJS(fieldErrors));
+ } else {
+ result = deleteIn(result, 'submitErrors');
+ }
+ result = setIn(result, 'submitFailed', true);
+ } else {
+ result = setIn(result, 'submitSucceeded', true);
+ result = deleteIn(result, 'error');
+ result = deleteIn(result, 'submitErrors');
+ }
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], function (state, _ref21) {
+ var fields = _ref21.meta.fields;
-/***/ }),
-/* 497 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var result = state;
+ result = setIn(result, 'submitFailed', true);
+ result = deleteIn(result, 'submitSucceeded');
+ result = deleteIn(result, 'submitting');
+ fields.forEach(function (field) {
+ return result = setIn(result, 'fields.' + field + '.touched', true);
+ });
+ if (fields.length) {
+ result = setIn(result, 'anyTouched', true);
+ }
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], function (state) {
+ var result = state;
+ result = deleteIn(result, 'submitFailed');
+ result = setIn(result, 'submitSucceeded', true);
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], function (state, _ref22) {
+ var fields = _ref22.meta.fields;
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(271);
+ var result = state;
+ fields.forEach(function (field) {
+ return result = setIn(result, 'fields.' + field + '.touched', true);
+ });
+ result = setIn(result, 'anyTouched', true);
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], function (state, _ref23) {
+ var _ref23$payload = _ref23.payload,
+ name = _ref23$payload.name,
+ destroyOnUnmount = _ref23$payload.destroyOnUnmount;
+ var result = state;
+ var key = 'registeredFields[\'' + name + '\']';
+ var field = getIn(result, key);
+ if (!field) {
+ return result;
+ }
-var getSelectedValues = function getSelectedValues(options) {
- var result = [];
- if (options) {
- for (var index = 0; index < options.length; index++) {
- var option = options[index];
- if (option.selected) {
- result.push(option.value);
+ var count = getIn(field, 'count') - 1;
+ if (count <= 0 && destroyOnUnmount) {
+ result = deleteIn(result, key);
+ if (deepEqual(getIn(result, 'registeredFields'), empty)) {
+ result = deleteIn(result, 'registeredFields');
}
+ } else {
+ field = setIn(field, 'count', count);
+ result = setIn(result, key, field);
}
- }
- return result;
-};
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], function (state, _ref24) {
+ var fields = _ref24.meta.fields;
-var getValue = function getValue(event, isReactNative) {
- if (Object(__WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */])(event)) {
- if (!isReactNative && event.nativeEvent && event.nativeEvent.text !== undefined) {
- return event.nativeEvent.text;
+ var result = state;
+ fields.forEach(function (field) {
+ return result = deleteIn(result, 'fields.' + field + '.touched');
+ });
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], function (state, _ref25) {
+ var _ref25$payload = _ref25.payload,
+ syncErrors = _ref25$payload.syncErrors,
+ error = _ref25$payload.error;
+
+ var result = state;
+ if (error) {
+ result = setIn(result, 'error', error);
+ result = setIn(result, 'syncError', true);
+ } else {
+ result = deleteIn(result, 'error');
+ result = deleteIn(result, 'syncError');
}
- if (isReactNative && event.nativeEvent !== undefined) {
- return event.nativeEvent.text;
+ if (Object.keys(syncErrors).length) {
+ result = setIn(result, 'syncErrors', syncErrors);
+ } else {
+ result = deleteIn(result, 'syncErrors');
}
- var _event$target = event.target,
- type = _event$target.type,
- value = _event$target.value,
- checked = _event$target.checked,
- files = _event$target.files,
- dataTransfer = event.dataTransfer;
+ return result;
+ }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], function (state, _ref26) {
+ var _ref26$payload = _ref26.payload,
+ syncWarnings = _ref26$payload.syncWarnings,
+ warning = _ref26$payload.warning;
- if (type === 'checkbox') {
- return checked || '';
- }
- if (type === 'file') {
- return files || dataTransfer && dataTransfer.files;
+ var result = state;
+ if (warning) {
+ result = setIn(result, 'warning', warning);
+ } else {
+ result = deleteIn(result, 'warning');
}
- if (type === 'select-multiple') {
- return getSelectedValues(event.target.options);
+ if (Object.keys(syncWarnings).length) {
+ result = setIn(result, 'syncWarnings', syncWarnings);
+ } else {
+ result = deleteIn(result, 'syncWarnings');
}
- return value;
- }
- return event;
-};
-
-/* harmony default export */ __webpack_exports__["a"] = (getValue);
-
-/***/ }),
-/* 498 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var isReactNative = typeof window !== 'undefined' && window.navigator && window.navigator.product && window.navigator.product === 'ReactNative';
+ return result;
+ }), _behaviors);
-/* harmony default export */ __webpack_exports__["a"] = (isReactNative);
+ var reducer = function reducer() {
+ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty;
+ var action = arguments[1];
-/***/ }),
-/* 499 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var behavior = behaviors[action.type];
+ return behavior ? behavior(state, action) : state;
+ };
-"use strict";
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return dataKey; });
-var dataKey = 'text';
+ var byForm = function byForm(reducer) {
+ return function () {
+ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty;
+ var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-/***/ }),
-/* 500 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var form = action && action.meta && action.meta.form;
+ if (!form) {
+ return state;
+ }
+ if (action.type === __WEBPACK_IMPORTED_MODULE_0__actionTypes__["DESTROY"]) {
+ return action.meta.form.reduce(function (result, form) {
+ return deleteInWithCleanUp(result, form);
+ }, state);
+ }
+ var formState = getIn(state, form);
+ var result = reducer(formState, action);
+ return result === formState ? state : setIn(state, form, result);
+ };
+ };
-"use strict";
-function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
+ /**
+ * Adds additional functionality to the reducer
+ */
+ function decorate(target) {
+ target.plugin = function plugin(reducers) {
+ var _this = this;
-var splice = function splice(array, index, removeNum, value) {
- array = array || [];
+ // use 'function' keyword to enable 'this'
+ return decorate(function () {
+ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty;
+ var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+ return Object.keys(reducers).reduce(function (accumulator, key) {
+ var previousState = getIn(accumulator, key);
+ var nextState = reducers[key](previousState, action, getIn(state, key));
+ return nextState === previousState ? accumulator : setIn(accumulator, key, nextState);
+ }, _this(state, action));
+ });
+ };
- if (index < array.length) {
- if (value === undefined && !removeNum) {
- // inserting undefined
- var _copy2 = [].concat(_toConsumableArray(array));
- _copy2.splice(index, 0, null);
- _copy2[index] = undefined;
- return _copy2;
- }
- if (value != null) {
- var _copy3 = [].concat(_toConsumableArray(array));
- _copy3.splice(index, removeNum, value // removing and adding
- );return _copy3;
- }
- var _copy = [].concat(_toConsumableArray(array));
- _copy.splice(index, removeNum // removing
- );return _copy;
- }
- if (removeNum) {
- // trying to remove non-existant item: return original array
- return array;
+ return target;
}
- // trying to add outside of range: just set value
- var copy = [].concat(_toConsumableArray(array));
- copy[index] = value;
- return copy;
+
+ return decorate(byForm(reducer));
};
-/* harmony default export */ __webpack_exports__["a"] = (splice);
+/* harmony default export */ __webpack_exports__["a"] = (createReducer);
/***/ }),
-/* 501 */
+/* 500 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(114);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(117);
-var getIn = function getIn(state, field) {
- if (!state) {
- return state;
- }
+var createDeleteInWithCleanUp = function createDeleteInWithCleanUp(_ref) {
+ var deepEqual = _ref.deepEqual,
+ empty = _ref.empty,
+ getIn = _ref.getIn,
+ deleteIn = _ref.deleteIn,
+ setIn = _ref.setIn;
- var path = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(field);
- var length = path.length;
- if (!length) {
- return undefined;
- }
- var result = state;
- for (var i = 0; i < length && !!result; ++i) {
- result = result[path[i]];
- }
+ var deleteInWithCleanUp = function deleteInWithCleanUp(state, path) {
+ if (path[path.length - 1] === ']') {
+ // array path
+ var pathTokens = __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](path);
+ pathTokens.pop();
+ var parent = getIn(state, pathTokens.join('.'));
+ return parent ? setIn(state, path, undefined) : state;
+ }
+ var result = deleteIn(state, path);
+ var dotIndex = path.lastIndexOf('.');
+ if (dotIndex > 0) {
+ var parentPath = path.substring(0, dotIndex);
+ if (parentPath[parentPath.length - 1] !== ']') {
+ var _parent = getIn(result, parentPath);
+ if (deepEqual(_parent, empty)) {
+ return deleteInWithCleanUp(result, parentPath);
+ }
+ }
+ }
+ return result;
+ };
- return result;
+ return deleteInWithCleanUp;
};
-/* harmony default export */ __webpack_exports__["a"] = (getIn);
+/* harmony default export */ __webpack_exports__["a"] = (createDeleteInWithCleanUp);
/***/ }),
-/* 502 */
+/* 501 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoize_js__ = __webpack_require__(503);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__memoize_js__ = __webpack_require__(502);
/** Used as the maximum memoize cache size. */
@@ -42451,7 +43848,7 @@ var MAX_MEMOIZE_SIZE = 500;
* @returns {Function} Returns the new memoized function.
*/
function memoizeCapped(func) {
- var result = Object(__WEBPACK_IMPORTED_MODULE_0__memoize_js__["a" /* default */])(func, function(key) {
+ var result = __WEBPACK_IMPORTED_MODULE_0__memoize_js__["a" /* default */](func, function(key) {
if (cache.size === MAX_MEMOIZE_SIZE) {
cache.clear();
}
@@ -42466,11 +43863,11 @@ function memoizeCapped(func) {
/***/ }),
-/* 503 */
+/* 502 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(168);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(175);
/** Error message constants. */
@@ -42547,13 +43944,13 @@ memoize.Cache = __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */];
/***/ }),
-/* 504 */
+/* 503 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Hash_js__ = __webpack_require__(505);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ListCache_js__ = __webpack_require__(117);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Map_js__ = __webpack_require__(170);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Hash_js__ = __webpack_require__(504);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ListCache_js__ = __webpack_require__(120);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Map_js__ = __webpack_require__(177);
@@ -42578,15 +43975,15 @@ function mapCacheClear() {
/***/ }),
-/* 505 */
+/* 504 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hashClear_js__ = __webpack_require__(506);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hashDelete_js__ = __webpack_require__(511);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hashGet_js__ = __webpack_require__(512);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__hashHas_js__ = __webpack_require__(513);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__hashSet_js__ = __webpack_require__(514);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__hashClear_js__ = __webpack_require__(505);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hashDelete_js__ = __webpack_require__(510);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hashGet_js__ = __webpack_require__(511);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__hashHas_js__ = __webpack_require__(512);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__hashSet_js__ = __webpack_require__(513);
@@ -42622,11 +44019,11 @@ Hash.prototype.set = __WEBPACK_IMPORTED_MODULE_4__hashSet_js__["a" /* default */
/***/ }),
-/* 506 */
+/* 505 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(116);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(119);
/**
@@ -42637,7 +44034,7 @@ Hash.prototype.set = __WEBPACK_IMPORTED_MODULE_4__hashSet_js__["a" /* default */
* @memberOf Hash
*/
function hashClear() {
- this.__data__ = __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? Object(__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */])(null) : {};
+ this.__data__ = __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */](null) : {};
this.size = 0;
}
@@ -42645,14 +44042,14 @@ function hashClear() {
/***/ }),
-/* 507 */
+/* 506 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(169);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isMasked_js__ = __webpack_require__(508);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObject_js__ = __webpack_require__(48);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toSource_js__ = __webpack_require__(275);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isFunction_js__ = __webpack_require__(176);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isMasked_js__ = __webpack_require__(507);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObject_js__ = __webpack_require__(47);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toSource_js__ = __webpack_require__(274);
@@ -42692,22 +44089,22 @@ var reIsNative = RegExp('^' +
* else `false`.
*/
function baseIsNative(value) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_2__isObject_js__["a" /* default */])(value) || Object(__WEBPACK_IMPORTED_MODULE_1__isMasked_js__["a" /* default */])(value)) {
+ if (!__WEBPACK_IMPORTED_MODULE_2__isObject_js__["a" /* default */](value) || __WEBPACK_IMPORTED_MODULE_1__isMasked_js__["a" /* default */](value)) {
return false;
}
- var pattern = Object(__WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */])(value) ? reIsNative : reIsHostCtor;
- return pattern.test(Object(__WEBPACK_IMPORTED_MODULE_3__toSource_js__["a" /* default */])(value));
+ var pattern = __WEBPACK_IMPORTED_MODULE_0__isFunction_js__["a" /* default */](value) ? reIsNative : reIsHostCtor;
+ return pattern.test(__WEBPACK_IMPORTED_MODULE_3__toSource_js__["a" /* default */](value));
}
/* harmony default export */ __webpack_exports__["a"] = (baseIsNative);
/***/ }),
-/* 508 */
+/* 507 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__ = __webpack_require__(509);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__coreJsData_js__ = __webpack_require__(508);
/** Used to detect methods masquerading as native. */
@@ -42731,11 +44128,11 @@ function isMasked(func) {
/***/ }),
-/* 509 */
+/* 508 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(32);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(29);
/** Used to detect overreaching core-js shims. */
@@ -42745,7 +44142,7 @@ var coreJsData = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */]['__co
/***/ }),
-/* 510 */
+/* 509 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -42765,7 +44162,7 @@ function getValue(object, key) {
/***/ }),
-/* 511 */
+/* 510 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -42789,11 +44186,11 @@ function hashDelete(key) {
/***/ }),
-/* 512 */
+/* 511 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(116);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(119);
/** Used to stand-in for `undefined` hash values. */
@@ -42827,557 +44224,1340 @@ function hashGet(key) {
/***/ }),
-/* 513 */
+/* 512 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(119);
+
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function hashHas(key) {
+ var data = this.__data__;
+ return __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (hashHas);
+
+
+/***/ }),
+/* 513 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(119);
+
+
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
+
+/**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+function hashSet(key, value) {
+ var data = this.__data__;
+ this.size += this.has(key) ? 0 : 1;
+ data[key] = (__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (hashSet);
+
+
+/***/ }),
+/* 514 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+function listCacheClear() {
+ this.__data__ = [];
+ this.size = 0;
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (listCacheClear);
+
+
+/***/ }),
+/* 515 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(121);
+
+
+/** Used for built-in method references. */
+var arrayProto = Array.prototype;
+
+/** Built-in value references. */
+var splice = arrayProto.splice;
+
+/**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function listCacheDelete(key) {
+ var data = this.__data__,
+ index = __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ --this.size;
+ return true;
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (listCacheDelete);
+
+
+/***/ }),
+/* 516 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(121);
+
+
+/**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function listCacheGet(key) {
+ var data = this.__data__,
+ index = __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](data, key);
+
+ return index < 0 ? undefined : data[index][1];
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (listCacheGet);
+
+
+/***/ }),
+/* 517 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(121);
+
+
+/**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function listCacheHas(key) {
+ return __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](this.__data__, key) > -1;
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (listCacheHas);
+
+
+/***/ }),
+/* 518 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(121);
+
+
+/**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */](data, key);
+
+ if (index < 0) {
+ ++this.size;
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (listCacheSet);
+
+
+/***/ }),
+/* 519 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(122);
+
+
+/**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function mapCacheDelete(key) {
+ var result = __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key)['delete'](key);
+ this.size -= result ? 1 : 0;
+ return result;
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (mapCacheDelete);
+
+
+/***/ }),
+/* 520 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (isKeyable);
+
+
+/***/ }),
+/* 521 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(122);
+
+
+/**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function mapCacheGet(key) {
+ return __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key).get(key);
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (mapCacheGet);
+
+
+/***/ }),
+/* 522 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(116);
-
-
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(122);
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * Checks if a hash value for `key` exists.
+ * Checks if a map value for `key` exists.
*
* @private
* @name has
- * @memberOf Hash
+ * @memberOf MapCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
-function hashHas(key) {
- var data = this.__data__;
- return __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
+function mapCacheHas(key) {
+ return __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key).has(key);
}
-/* harmony default export */ __webpack_exports__["a"] = (hashHas);
+/* harmony default export */ __webpack_exports__["a"] = (mapCacheHas);
/***/ }),
-/* 514 */
+/* 523 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__ = __webpack_require__(116);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(122);
-/** Used to stand-in for `undefined` hash values. */
-var HASH_UNDEFINED = '__lodash_hash_undefined__';
-
/**
- * Sets the hash `key` to `value`.
+ * Sets the map `key` to `value`.
*
* @private
* @name set
- * @memberOf Hash
+ * @memberOf MapCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
- * @returns {Object} Returns the hash instance.
+ * @returns {Object} Returns the map cache instance.
*/
-function hashSet(key, value) {
- var data = this.__data__;
- this.size += this.has(key) ? 0 : 1;
- data[key] = (__WEBPACK_IMPORTED_MODULE_0__nativeCreate_js__["a" /* default */] && value === undefined) ? HASH_UNDEFINED : value;
+function mapCacheSet(key, value) {
+ var data = __WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */](this, key),
+ size = data.size;
+
+ data.set(key, value);
+ this.size += data.size == size ? 0 : 1;
return this;
}
-/* harmony default export */ __webpack_exports__["a"] = (hashSet);
+/* harmony default export */ __webpack_exports__["a"] = (mapCacheSet);
/***/ }),
-/* 515 */
+/* 524 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/**
- * Removes all key-value entries from the list cache.
- *
- * @private
- * @name clear
- * @memberOf ListCache
- */
-function listCacheClear() {
- this.__data__ = [];
- this.size = 0;
-}
-
-/* harmony default export */ __webpack_exports__["a"] = (listCacheClear);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(116);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__ = __webpack_require__(271);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(30);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(118);
-/***/ }),
-/* 516 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(118);
-/** Used for built-in method references. */
-var arrayProto = Array.prototype;
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
-/** Built-in value references. */
-var splice = arrayProto.splice;
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined,
+ symbolToString = symbolProto ? symbolProto.toString : undefined;
/**
- * Removes `key` and its value from the list cache.
+ * The base implementation of `_.toString` which doesn't convert nullish
+ * values to empty strings.
*
* @private
- * @name delete
- * @memberOf ListCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
*/
-function listCacheDelete(key) {
- var data = this.__data__,
- index = Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(data, key);
-
- if (index < 0) {
- return false;
+function baseToString(value) {
+ // Exit early for strings to avoid a performance hit in some environments.
+ if (typeof value == 'string') {
+ return value;
}
- var lastIndex = data.length - 1;
- if (index == lastIndex) {
- data.pop();
- } else {
- splice.call(data, index, 1);
+ if (__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](value)) {
+ // Recursively convert values (susceptible to call stack limits).
+ return __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */](value, baseToString) + '';
}
- --this.size;
- return true;
+ if (__WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */](value)) {
+ return symbolToString ? symbolToString.call(value) : '';
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
-/* harmony default export */ __webpack_exports__["a"] = (listCacheDelete);
+/* harmony default export */ __webpack_exports__["a"] = (baseToString);
/***/ }),
-/* 517 */
+/* 525 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(118);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__ = __webpack_require__(526);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__ = __webpack_require__(282);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__ = __webpack_require__(168);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux__ = __webpack_require__(19);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react_redux__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_redux__ = __webpack_require__(115);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_is_promise__ = __webpack_require__(190);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_is_promise__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__util_getDisplayName__ = __webpack_require__(597);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__actions__ = __webpack_require__(288);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__handleSubmit__ = __webpack_require__(598);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__events_silenceEvent__ = __webpack_require__(290);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__events_silenceEvents__ = __webpack_require__(600);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__asyncValidation__ = __webpack_require__(601);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__defaultShouldAsyncValidate__ = __webpack_require__(602);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__defaultShouldValidate__ = __webpack_require__(603);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__structure_plain__ = __webpack_require__(48);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__generateValidator__ = __webpack_require__(609);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__selectors_isValid__ = __webpack_require__(191);
-/**
- * Gets the list cache value for `key`.
- *
- * @private
- * @name get
- * @memberOf ListCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function listCacheGet(key) {
- var data = this.__data__,
- index = Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(data, key);
- return index < 0 ? undefined : data[index][1];
-}
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-/* harmony default export */ __webpack_exports__["a"] = (listCacheGet);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/***/ }),
-/* 518 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(118);
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-/**
- * Checks if a list cache value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf ListCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function listCacheHas(key) {
- return Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(this.__data__, key) > -1;
-}
+function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
-/* harmony default export */ __webpack_exports__["a"] = (listCacheHas);
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-/***/ }),
-/* 519 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__ = __webpack_require__(118);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+var isClassComponent = function isClassComponent(Component) {
+ return Boolean(Component && Component.prototype && _typeof(Component.prototype.isReactComponent) === 'object');
+};
+
+// extract field-specific actions
+
+var arrayInsert = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayInsert"],
+ arrayMove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayMove"],
+ arrayPop = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPop"],
+ arrayPush = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPush"],
+ arrayRemove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemove"],
+ arrayRemoveAll = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemoveAll"],
+ arrayShift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayShift"],
+ arraySplice = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySplice"],
+ arraySwap = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySwap"],
+ arrayUnshift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayUnshift"],
+ blur = __WEBPACK_IMPORTED_MODULE_8__actions__["blur"],
+ change = __WEBPACK_IMPORTED_MODULE_8__actions__["change"],
+ focus = __WEBPACK_IMPORTED_MODULE_8__actions__["focus"],
+ formActions = _objectWithoutProperties(__WEBPACK_IMPORTED_MODULE_8__actions__, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'blur', 'change', 'focus']);
+
+var arrayActions = {
+ arrayInsert: arrayInsert,
+ arrayMove: arrayMove,
+ arrayPop: arrayPop,
+ arrayPush: arrayPush,
+ arrayRemove: arrayRemove,
+ arrayRemoveAll: arrayRemoveAll,
+ arrayShift: arrayShift,
+ arraySplice: arraySplice,
+ arraySwap: arraySwap,
+ arrayUnshift: arrayUnshift
+};
+
+var propsToNotUpdateFor = [].concat(_toConsumableArray(Object.keys(__WEBPACK_IMPORTED_MODULE_8__actions__)), ['array', 'asyncErrors', 'initialized', 'initialValues', 'syncErrors', 'syncWarnings', 'values', 'registeredFields']);
+
+var checkSubmit = function checkSubmit(submit) {
+ if (!submit || typeof submit !== 'function') {
+ throw new Error('You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop');
+ }
+ return submit;
+};
+
/**
- * Sets the list cache `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf ListCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the list cache instance.
+ * The decorator that is the main API to redux-form
*/
-function listCacheSet(key, value) {
- var data = this.__data__,
- index = Object(__WEBPACK_IMPORTED_MODULE_0__assocIndexOf_js__["a" /* default */])(data, key);
+var createReduxForm = function createReduxForm(structure) {
+ var deepEqual = structure.deepEqual,
+ empty = structure.empty,
+ getIn = structure.getIn,
+ setIn = structure.setIn,
+ keys = structure.keys,
+ fromJS = structure.fromJS;
- if (index < 0) {
- ++this.size;
- data.push([key, value]);
- } else {
- data[index][1] = value;
- }
- return this;
-}
+ var isValid = __WEBPACK_IMPORTED_MODULE_17__selectors_isValid__["a" /* default */](structure);
+ return function (initialConfig) {
+ var config = _extends({
+ touchOnBlur: true,
+ touchOnChange: false,
+ persistentSubmitErrors: false,
+ destroyOnUnmount: true,
+ shouldAsyncValidate: __WEBPACK_IMPORTED_MODULE_13__defaultShouldAsyncValidate__["a" /* default */],
+ shouldValidate: __WEBPACK_IMPORTED_MODULE_14__defaultShouldValidate__["a" /* default */],
+ enableReinitialize: false,
+ keepDirtyOnReinitialize: false,
+ getFormState: function getFormState(state) {
+ return getIn(state, 'form');
+ },
+ pure: true,
+ forceUnregisterOnUnmount: false
+ }, initialConfig);
-/* harmony default export */ __webpack_exports__["a"] = (listCacheSet);
+ return function (WrappedComponent) {
+ var Form = function (_Component) {
+ _inherits(Form, _Component);
+
+ function Form(props) {
+ _classCallCheck(this, Form);
+
+ var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props));
+
+ _this.submit = _this.submit.bind(_this);
+ _this.reset = _this.reset.bind(_this);
+ _this.asyncValidate = _this.asyncValidate.bind(_this);
+ _this.getValues = _this.getValues.bind(_this);
+ _this.register = _this.register.bind(_this);
+ _this.unregister = _this.unregister.bind(_this);
+ _this.submitCompleted = _this.submitCompleted.bind(_this);
+ _this.submitFailed = _this.submitFailed.bind(_this);
+ _this.fieldValidators = {};
+ _this.lastFieldValidatorKeys = [];
+ _this.fieldWarners = {};
+ _this.lastFieldWarnerKeys = [];
+ return _this;
+ }
+
+ _createClass(Form, [{
+ key: 'getChildContext',
+ value: function getChildContext() {
+ var _this2 = this;
+
+ return {
+ _reduxForm: _extends({}, this.props, {
+ getFormState: function getFormState(state) {
+ return getIn(_this2.props.getFormState(state), _this2.props.form);
+ },
+ asyncValidate: this.asyncValidate,
+ getValues: this.getValues,
+ sectionPrefix: undefined,
+ register: this.register,
+ unregister: this.unregister,
+ registerInnerOnSubmit: function registerInnerOnSubmit(innerOnSubmit) {
+ return _this2.innerOnSubmit = innerOnSubmit;
+ }
+ })
+ };
+ }
+ }, {
+ key: 'initIfNeeded',
+ value: function initIfNeeded(nextProps) {
+ var enableReinitialize = this.props.enableReinitialize;
+
+ if (nextProps) {
+ if ((enableReinitialize || !nextProps.initialized) && !deepEqual(this.props.initialValues, nextProps.initialValues)) {
+ var keepDirty = nextProps.initialized && this.props.keepDirtyOnReinitialize;
+ this.props.initialize(nextProps.initialValues, keepDirty);
+ }
+ } else if (this.props.initialValues && (!this.props.initialized || enableReinitialize)) {
+ this.props.initialize(this.props.initialValues, this.props.keepDirtyOnReinitialize);
+ }
+ }
+ }, {
+ key: 'updateSyncErrorsIfNeeded',
+ value: function updateSyncErrorsIfNeeded(nextSyncErrors, nextError) {
+ var _props = this.props,
+ error = _props.error,
+ syncErrors = _props.syncErrors,
+ updateSyncErrors = _props.updateSyncErrors;
+
+ var noErrors = (!syncErrors || !Object.keys(syncErrors).length) && !error;
+ var nextNoErrors = (!nextSyncErrors || !Object.keys(nextSyncErrors).length) && !nextError;
+ if (!(noErrors && nextNoErrors) && (!__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(syncErrors, nextSyncErrors) || !__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(error, nextError))) {
+ updateSyncErrors(nextSyncErrors, nextError);
+ }
+ }
+ }, {
+ key: 'submitIfNeeded',
+ value: function submitIfNeeded(nextProps) {
+ var _props2 = this.props,
+ clearSubmit = _props2.clearSubmit,
+ triggerSubmit = _props2.triggerSubmit;
+
+ if (!triggerSubmit && nextProps.triggerSubmit) {
+ clearSubmit();
+ this.submit();
+ }
+ }
+ }, {
+ key: 'validateIfNeeded',
+ value: function validateIfNeeded(nextProps) {
+ var _props3 = this.props,
+ shouldValidate = _props3.shouldValidate,
+ validate = _props3.validate,
+ values = _props3.values;
+
+ var fieldLevelValidate = this.generateValidator();
+ if (validate || fieldLevelValidate) {
+ var initialRender = nextProps === undefined;
+ var fieldValidatorKeys = Object.keys(this.fieldValidators);
+ var shouldValidateResult = shouldValidate({
+ values: values,
+ nextProps: nextProps,
+ props: this.props,
+ initialRender: initialRender,
+ lastFieldValidatorKeys: this.lastFieldValidatorKeys,
+ fieldValidatorKeys: fieldValidatorKeys,
+ structure: structure
+ });
+
+ if (shouldValidateResult) {
+ var propsToValidate = initialRender ? this.props : nextProps;
+
+ var _merge2 = __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */](validate ? validate(propsToValidate.values, propsToValidate) || {} : {}, fieldLevelValidate ? fieldLevelValidate(propsToValidate.values, propsToValidate) || {} : {}),
+ _error = _merge2._error,
+ nextSyncErrors = _objectWithoutProperties(_merge2, ['_error']);
+
+ this.lastFieldValidatorKeys = fieldValidatorKeys;
+ this.updateSyncErrorsIfNeeded(nextSyncErrors, _error);
+ }
+ }
+ }
+ }, {
+ key: 'updateSyncWarningsIfNeeded',
+ value: function updateSyncWarningsIfNeeded(nextSyncWarnings, nextWarning) {
+ var _props4 = this.props,
+ warning = _props4.warning,
+ syncWarnings = _props4.syncWarnings,
+ updateSyncWarnings = _props4.updateSyncWarnings;
+
+ var noWarnings = (!syncWarnings || !Object.keys(syncWarnings).length) && !warning;
+ var nextNoWarnings = (!nextSyncWarnings || !Object.keys(nextSyncWarnings).length) && !nextWarning;
+ if (!(noWarnings && nextNoWarnings) && (!__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(syncWarnings, nextSyncWarnings) || !__WEBPACK_IMPORTED_MODULE_15__structure_plain__["a" /* default */].deepEqual(warning, nextWarning))) {
+ updateSyncWarnings(nextSyncWarnings, nextWarning);
+ }
+ }
+ }, {
+ key: 'warnIfNeeded',
+ value: function warnIfNeeded(nextProps) {
+ var _props5 = this.props,
+ shouldValidate = _props5.shouldValidate,
+ warn = _props5.warn,
+ values = _props5.values;
+
+ var fieldLevelWarn = this.generateWarner();
+ if (warn || fieldLevelWarn) {
+ var initialRender = nextProps === undefined;
+ var fieldWarnerKeys = Object.keys(this.fieldWarners);
+ var shouldWarnResult = shouldValidate({
+ values: values,
+ nextProps: nextProps,
+ props: this.props,
+ initialRender: initialRender,
+ lastFieldValidatorKeys: this.lastFieldWarnerKeys,
+ fieldValidatorKeys: fieldWarnerKeys,
+ structure: structure
+ });
+
+ if (shouldWarnResult) {
+ var propsToWarn = initialRender ? this.props : nextProps;
+
+ var _merge3 = __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */](warn ? warn(propsToWarn.values, propsToWarn) : {}, fieldLevelWarn ? fieldLevelWarn(propsToWarn.values, propsToWarn) : {}),
+ _warning = _merge3._warning,
+ nextSyncWarnings = _objectWithoutProperties(_merge3, ['_warning']);
+
+ this.lastFieldWarnerKeys = fieldWarnerKeys;
+ this.updateSyncWarningsIfNeeded(nextSyncWarnings, _warning);
+ }
+ }
+ }
+ }, {
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ this.initIfNeeded();
+ this.validateIfNeeded();
+ this.warnIfNeeded();
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ this.initIfNeeded(nextProps);
+ this.validateIfNeeded(nextProps);
+ this.warnIfNeeded(nextProps);
+ this.submitIfNeeded(nextProps);
+ }
+ }, {
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps) {
+ var _this3 = this;
+
+ if (!config.pure) return true;
+ return Object.keys(nextProps).some(function (prop) {
+ // useful to debug rerenders
+ // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) {
+ // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ])
+ // }
+ return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]);
+ });
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ var _props6 = this.props,
+ destroyOnUnmount = _props6.destroyOnUnmount,
+ destroy = _props6.destroy;
+
+ if (destroyOnUnmount) {
+ this.destroyed = true;
+ destroy();
+ }
+ }
+ }, {
+ key: 'getValues',
+ value: function getValues() {
+ return this.props.values;
+ }
+ }, {
+ key: 'isValid',
+ value: function isValid() {
+ return this.props.valid;
+ }
+ }, {
+ key: 'isPristine',
+ value: function isPristine() {
+ return this.props.pristine;
+ }
+ }, {
+ key: 'register',
+ value: function register(name, type, getValidator, getWarner) {
+ this.props.registerField(name, type);
+ if (getValidator) {
+ this.fieldValidators[name] = getValidator;
+ }
+ if (getWarner) {
+ this.fieldWarners[name] = getWarner;
+ }
+ }
+ }, {
+ key: 'unregister',
+ value: function unregister(name) {
+ if (!this.destroyed) {
+ if (this.props.destroyOnUnmount || this.props.forceUnregisterOnUnmount) {
+ this.props.unregisterField(name);
+ delete this.fieldValidators[name];
+ delete this.fieldWarners[name];
+ } else {
+ this.props.unregisterField(name, false);
+ }
+ }
+ }
+ }, {
+ key: 'getFieldList',
+ value: function getFieldList(options) {
+ var registeredFields = this.props.registeredFields;
+ var list = [];
+ if (!registeredFields) {
+ return list;
+ }
+ var keySeq = keys(registeredFields);
+ if (options && options.excludeFieldArray) {
+ keySeq = keySeq.filter(function (name) {
+ return getIn(registeredFields, '[\'' + name + '\'].type') !== 'FieldArray';
+ });
+ }
+ return fromJS(keySeq.reduce(function (acc, key) {
+ acc.push(key);
+ return acc;
+ }, list));
+ }
+ }, {
+ key: 'generateValidator',
+ value: function generateValidator() {
+ var _this4 = this;
+
+ var validators = {};
+ Object.keys(this.fieldValidators).forEach(function (name) {
+ var validator = _this4.fieldValidators[name]();
+ if (validator) {
+ validators[name] = validator;
+ }
+ });
+ return Object.keys(validators).length ? __WEBPACK_IMPORTED_MODULE_16__generateValidator__["a" /* default */](validators, structure) : undefined;
+ }
+ }, {
+ key: 'generateWarner',
+ value: function generateWarner() {
+ var _this5 = this;
+ var warners = {};
+ Object.keys(this.fieldWarners).forEach(function (name) {
+ var warner = _this5.fieldWarners[name]();
+ if (warner) {
+ warners[name] = warner;
+ }
+ });
+ return Object.keys(warners).length ? __WEBPACK_IMPORTED_MODULE_16__generateValidator__["a" /* default */](warners, structure) : undefined;
+ }
+ }, {
+ key: 'asyncValidate',
+ value: function asyncValidate(name, value) {
+ var _this6 = this;
-/***/ }),
-/* 520 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var _props7 = this.props,
+ asyncBlurFields = _props7.asyncBlurFields,
+ asyncErrors = _props7.asyncErrors,
+ asyncValidate = _props7.asyncValidate,
+ dispatch = _props7.dispatch,
+ initialized = _props7.initialized,
+ pristine = _props7.pristine,
+ shouldAsyncValidate = _props7.shouldAsyncValidate,
+ startAsyncValidation = _props7.startAsyncValidation,
+ stopAsyncValidation = _props7.stopAsyncValidation,
+ syncErrors = _props7.syncErrors,
+ values = _props7.values;
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(119);
+ var submitting = !name;
+ if (asyncValidate) {
+ var _ret = function () {
+ var valuesToValidate = submitting ? values : setIn(values, name, value);
+ var syncValidationPasses = submitting || !getIn(syncErrors, name);
+ var isBlurredField = !submitting && (!asyncBlurFields || ~asyncBlurFields.indexOf(name.replace(/\[[0-9]+\]/g, '[]')));
+ if ((isBlurredField || submitting) && shouldAsyncValidate({
+ asyncErrors: asyncErrors,
+ initialized: initialized,
+ trigger: submitting ? 'submit' : 'blur',
+ blurredField: name,
+ pristine: pristine,
+ syncValidationPasses: syncValidationPasses
+ })) {
+ return {
+ v: __WEBPACK_IMPORTED_MODULE_12__asyncValidation__["a" /* default */](function () {
+ return asyncValidate(valuesToValidate, dispatch, _this6.props, name);
+ }, startAsyncValidation, stopAsyncValidation, name)
+ };
+ }
+ }();
+ if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
+ }
+ }
+ }, {
+ key: 'submitCompleted',
+ value: function submitCompleted(result) {
+ delete this.submitPromise;
+ return result;
+ }
+ }, {
+ key: 'submitFailed',
+ value: function submitFailed(error) {
+ delete this.submitPromise;
+ throw error;
+ }
+ }, {
+ key: 'listenToSubmit',
+ value: function listenToSubmit(promise) {
+ if (!__WEBPACK_IMPORTED_MODULE_6_is_promise___default.a(promise)) {
+ return promise;
+ }
+ this.submitPromise = promise;
+ return promise.then(this.submitCompleted, this.submitFailed);
+ }
+ }, {
+ key: 'submit',
+ value: function submit(submitOrEvent) {
+ var _this7 = this;
-/**
- * Removes `key` and its value from the map.
- *
- * @private
- * @name delete
- * @memberOf MapCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
-function mapCacheDelete(key) {
- var result = Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key)['delete'](key);
- this.size -= result ? 1 : 0;
- return result;
-}
+ var onSubmit = this.props.onSubmit;
-/* harmony default export */ __webpack_exports__["a"] = (mapCacheDelete);
+ if (!submitOrEvent || __WEBPACK_IMPORTED_MODULE_10__events_silenceEvent__["a" /* default */](submitOrEvent)) {
+ // submitOrEvent is an event: fire submit if not already submitting
+ if (!this.submitPromise) {
+ if (this.innerOnSubmit) {
+ // will call "submitOrEvent is the submit function" block below
+ return this.innerOnSubmit();
+ } else {
+ return this.listenToSubmit(__WEBPACK_IMPORTED_MODULE_9__handleSubmit__["a" /* default */](checkSubmit(onSubmit), this.props, this.props.validExceptSubmit, this.asyncValidate, this.getFieldList({ excludeFieldArray: true })));
+ }
+ }
+ } else {
+ // submitOrEvent is the submit function: return deferred submit thunk
+ return __WEBPACK_IMPORTED_MODULE_11__events_silenceEvents__["a" /* default */](function () {
+ return !_this7.submitPromise && _this7.listenToSubmit(__WEBPACK_IMPORTED_MODULE_9__handleSubmit__["a" /* default */](checkSubmit(submitOrEvent), _this7.props, _this7.props.validExceptSubmit, _this7.asyncValidate, _this7.getFieldList({ excludeFieldArray: true })));
+ });
+ }
+ }
+ }, {
+ key: 'reset',
+ value: function reset() {
+ this.props.reset();
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ // remove some redux-form config-only props
+ /* eslint-disable no-unused-vars */
+ var _props8 = this.props,
+ anyTouched = _props8.anyTouched,
+ arrayInsert = _props8.arrayInsert,
+ arrayMove = _props8.arrayMove,
+ arrayPop = _props8.arrayPop,
+ arrayPush = _props8.arrayPush,
+ arrayRemove = _props8.arrayRemove,
+ arrayRemoveAll = _props8.arrayRemoveAll,
+ arrayShift = _props8.arrayShift,
+ arraySplice = _props8.arraySplice,
+ arraySwap = _props8.arraySwap,
+ arrayUnshift = _props8.arrayUnshift,
+ asyncErrors = _props8.asyncErrors,
+ asyncValidate = _props8.asyncValidate,
+ asyncValidating = _props8.asyncValidating,
+ blur = _props8.blur,
+ change = _props8.change,
+ destroy = _props8.destroy,
+ destroyOnUnmount = _props8.destroyOnUnmount,
+ forceUnregisterOnUnmount = _props8.forceUnregisterOnUnmount,
+ dirty = _props8.dirty,
+ dispatch = _props8.dispatch,
+ enableReinitialize = _props8.enableReinitialize,
+ error = _props8.error,
+ focus = _props8.focus,
+ form = _props8.form,
+ getFormState = _props8.getFormState,
+ initialize = _props8.initialize,
+ initialized = _props8.initialized,
+ initialValues = _props8.initialValues,
+ invalid = _props8.invalid,
+ keepDirtyOnReinitialize = _props8.keepDirtyOnReinitialize,
+ pristine = _props8.pristine,
+ propNamespace = _props8.propNamespace,
+ registeredFields = _props8.registeredFields,
+ registerField = _props8.registerField,
+ reset = _props8.reset,
+ setSubmitFailed = _props8.setSubmitFailed,
+ setSubmitSucceeded = _props8.setSubmitSucceeded,
+ shouldAsyncValidate = _props8.shouldAsyncValidate,
+ shouldValidate = _props8.shouldValidate,
+ startAsyncValidation = _props8.startAsyncValidation,
+ startSubmit = _props8.startSubmit,
+ stopAsyncValidation = _props8.stopAsyncValidation,
+ stopSubmit = _props8.stopSubmit,
+ submitting = _props8.submitting,
+ submitFailed = _props8.submitFailed,
+ submitSucceeded = _props8.submitSucceeded,
+ touch = _props8.touch,
+ touchOnBlur = _props8.touchOnBlur,
+ touchOnChange = _props8.touchOnChange,
+ persistentSubmitErrors = _props8.persistentSubmitErrors,
+ syncErrors = _props8.syncErrors,
+ syncWarnings = _props8.syncWarnings,
+ unregisterField = _props8.unregisterField,
+ untouch = _props8.untouch,
+ updateSyncErrors = _props8.updateSyncErrors,
+ updateSyncWarnings = _props8.updateSyncWarnings,
+ valid = _props8.valid,
+ validExceptSubmit = _props8.validExceptSubmit,
+ values = _props8.values,
+ warning = _props8.warning,
+ rest = _objectWithoutProperties(_props8, ['anyTouched', 'arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncErrors', 'asyncValidate', 'asyncValidating', 'blur', 'change', 'destroy', 'destroyOnUnmount', 'forceUnregisterOnUnmount', 'dirty', 'dispatch', 'enableReinitialize', 'error', 'focus', 'form', 'getFormState', 'initialize', 'initialized', 'initialValues', 'invalid', 'keepDirtyOnReinitialize', 'pristine', 'propNamespace', 'registeredFields', 'registerField', 'reset', 'setSubmitFailed', 'setSubmitSucceeded', 'shouldAsyncValidate', 'shouldValidate', 'startAsyncValidation', 'startSubmit', 'stopAsyncValidation', 'stopSubmit', 'submitting', 'submitFailed', 'submitSucceeded', 'touch', 'touchOnBlur', 'touchOnChange', 'persistentSubmitErrors', 'syncErrors', 'syncWarnings', 'unregisterField', 'untouch', 'updateSyncErrors', 'updateSyncWarnings', 'valid', 'validExceptSubmit', 'values', 'warning']);
+ /* eslint-enable no-unused-vars */
-/***/ }),
-/* 521 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-/**
- * Checks if `value` is suitable for use as unique object key.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
- */
-function isKeyable(value) {
- var type = typeof value;
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
- ? (value !== '__proto__')
- : (value === null);
-}
+ var reduxFormProps = _extends({
+ anyTouched: anyTouched,
+ asyncValidate: this.asyncValidate,
+ asyncValidating: asyncValidating
+ }, __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"]({ blur: blur, change: change }, dispatch), {
+ destroy: destroy,
+ dirty: dirty,
+ dispatch: dispatch,
+ error: error,
+ form: form,
+ handleSubmit: this.submit,
+ initialize: initialize,
+ initialized: initialized,
+ initialValues: initialValues,
+ invalid: invalid,
+ pristine: pristine,
+ reset: reset,
+ submitting: submitting,
+ submitFailed: submitFailed,
+ submitSucceeded: submitSucceeded,
+ touch: touch,
+ untouch: untouch,
+ valid: valid,
+ warning: warning
+ });
+ var propsToPass = _extends({}, propNamespace ? _defineProperty({}, propNamespace, reduxFormProps) : reduxFormProps, rest);
+ if (isClassComponent(WrappedComponent)) {
+ propsToPass.ref = 'wrapped';
+ }
+ return __WEBPACK_IMPORTED_MODULE_2_react__["createElement"](WrappedComponent, propsToPass);
+ }
+ }]);
-/* harmony default export */ __webpack_exports__["a"] = (isKeyable);
+ return Form;
+ }(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]);
+ Form.displayName = 'Form(' + __WEBPACK_IMPORTED_MODULE_7__util_getDisplayName__["a" /* default */](WrappedComponent) + ')';
+ Form.WrappedComponent = WrappedComponent;
+ Form.childContextTypes = {
+ _reduxForm: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].object.isRequired
+ };
+ Form.propTypes = {
+ destroyOnUnmount: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool,
+ forceUnregisterOnUnmount: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool,
+ form: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].string.isRequired,
+ initialValues: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].object,
+ getFormState: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func,
+ onSubmitFail: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func,
+ onSubmitSuccess: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func,
+ propNameSpace: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].string,
+ validate: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func,
+ warn: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].func,
+ touchOnBlur: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool,
+ touchOnChange: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool,
+ triggerSubmit: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool,
+ persistentSubmitErrors: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].bool,
+ registeredFields: __WEBPACK_IMPORTED_MODULE_2_react__["PropTypes"].any
+ };
-/***/ }),
-/* 522 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var connector = __WEBPACK_IMPORTED_MODULE_4_react_redux__["connect"](function (state, props) {
+ var form = props.form,
+ getFormState = props.getFormState,
+ initialValues = props.initialValues,
+ enableReinitialize = props.enableReinitialize,
+ keepDirtyOnReinitialize = props.keepDirtyOnReinitialize;
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(119);
+ var formState = getIn(getFormState(state) || empty, form) || empty;
+ var stateInitial = getIn(formState, 'initial');
+ var initialized = !!stateInitial;
+ var shouldUpdateInitialValues = enableReinitialize && initialized && !deepEqual(initialValues, stateInitial);
+ var shouldResetValues = shouldUpdateInitialValues && !keepDirtyOnReinitialize;
-/**
- * Gets the map value for `key`.
- *
- * @private
- * @name get
- * @memberOf MapCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function mapCacheGet(key) {
- return Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key).get(key);
-}
+ var initial = initialValues || stateInitial || empty;
-/* harmony default export */ __webpack_exports__["a"] = (mapCacheGet);
+ if (shouldUpdateInitialValues) {
+ initial = stateInitial || empty;
+ }
+ var values = getIn(formState, 'values') || initial;
-/***/ }),
-/* 523 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ if (shouldResetValues) {
+ values = initial;
+ }
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(119);
+ var pristine = shouldResetValues || deepEqual(initial, values);
+ var asyncErrors = getIn(formState, 'asyncErrors');
+ var syncErrors = getIn(formState, 'syncErrors') || {};
+ var syncWarnings = getIn(formState, 'syncWarnings') || {};
+ var registeredFields = getIn(formState, 'registeredFields');
+ var valid = isValid(form, getFormState, false)(state);
+ var validExceptSubmit = isValid(form, getFormState, true)(state);
+ var anyTouched = !!getIn(formState, 'anyTouched');
+ var submitting = !!getIn(formState, 'submitting');
+ var submitFailed = !!getIn(formState, 'submitFailed');
+ var submitSucceeded = !!getIn(formState, 'submitSucceeded');
+ var error = getIn(formState, 'error');
+ var warning = getIn(formState, 'warning');
+ var triggerSubmit = getIn(formState, 'triggerSubmit');
+ return {
+ anyTouched: anyTouched,
+ asyncErrors: asyncErrors,
+ asyncValidating: getIn(formState, 'asyncValidating') || false,
+ dirty: !pristine,
+ error: error,
+ initialized: initialized,
+ invalid: !valid,
+ pristine: pristine,
+ registeredFields: registeredFields,
+ submitting: submitting,
+ submitFailed: submitFailed,
+ submitSucceeded: submitSucceeded,
+ syncErrors: syncErrors,
+ syncWarnings: syncWarnings,
+ triggerSubmit: triggerSubmit,
+ values: values,
+ valid: valid,
+ validExceptSubmit: validExceptSubmit,
+ warning: warning
+ };
+ }, function (dispatch, initialProps) {
+ var bindForm = function bindForm(actionCreator) {
+ return actionCreator.bind(null, initialProps.form);
+ };
+ // Bind the first parameter on `props.form`
+ var boundFormACs = __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */](formActions, bindForm);
+ var boundArrayACs = __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */](arrayActions, bindForm);
+ var boundBlur = function boundBlur(field, value) {
+ return blur(initialProps.form, field, value, !!initialProps.touchOnBlur);
+ };
+ var boundChange = function boundChange(field, value) {
+ return change(initialProps.form, field, value, !!initialProps.touchOnChange, !!initialProps.persistentSubmitErrors);
+ };
+ var boundFocus = bindForm(focus);
-/**
- * Checks if a map value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf MapCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function mapCacheHas(key) {
- return Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key).has(key);
-}
+ // Wrap action creators with `dispatch`
+ var connectedFormACs = __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundFormACs, dispatch);
+ var connectedArrayACs = {
+ insert: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayInsert, dispatch),
+ move: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayMove, dispatch),
+ pop: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayPop, dispatch),
+ push: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayPush, dispatch),
+ remove: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayRemove, dispatch),
+ removeAll: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayRemoveAll, dispatch),
+ shift: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayShift, dispatch),
+ splice: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arraySplice, dispatch),
+ swap: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arraySwap, dispatch),
+ unshift: __WEBPACK_IMPORTED_MODULE_5_redux__["bindActionCreators"](boundArrayACs.arrayUnshift, dispatch)
+ };
-/* harmony default export */ __webpack_exports__["a"] = (mapCacheHas);
+ var computedActions = _extends({}, connectedFormACs, boundArrayACs, {
+ blur: boundBlur,
+ change: boundChange,
+ array: connectedArrayACs,
+ focus: boundFocus,
+ dispatch: dispatch
+ });
+ return function () {
+ return computedActions;
+ };
+ }, undefined, { withRef: true });
+ var ConnectedForm = __WEBPACK_IMPORTED_MODULE_3_hoist_non_react_statics___default.a(connector(Form), WrappedComponent);
+ ConnectedForm.defaultProps = config;
-/***/ }),
-/* 524 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ // build outer component to expose instance api
+ return function (_Component2) {
+ _inherits(ReduxForm, _Component2);
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getMapData_js__ = __webpack_require__(119);
+ function ReduxForm() {
+ _classCallCheck(this, ReduxForm);
+ return _possibleConstructorReturn(this, (ReduxForm.__proto__ || Object.getPrototypeOf(ReduxForm)).apply(this, arguments));
+ }
-/**
- * Sets the map `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf MapCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the map cache instance.
- */
-function mapCacheSet(key, value) {
- var data = Object(__WEBPACK_IMPORTED_MODULE_0__getMapData_js__["a" /* default */])(this, key),
- size = data.size;
+ _createClass(ReduxForm, [{
+ key: 'submit',
+ value: function submit() {
+ return this.refs.wrapped.getWrappedInstance().submit();
+ }
+ }, {
+ key: 'reset',
+ value: function reset() {
+ return this.refs.wrapped.getWrappedInstance().reset();
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props9 = this.props,
+ initialValues = _props9.initialValues,
+ rest = _objectWithoutProperties(_props9, ['initialValues']);
- data.set(key, value);
- this.size += data.size == size ? 0 : 1;
- return this;
-}
+ return __WEBPACK_IMPORTED_MODULE_2_react__["createElement"](ConnectedForm, _extends({}, rest, {
+ ref: 'wrapped',
+ // convert initialValues if need to
+ initialValues: fromJS(initialValues)
+ }));
+ }
+ }, {
+ key: 'valid',
+ get: function get() {
+ return this.refs.wrapped.getWrappedInstance().isValid();
+ }
+ }, {
+ key: 'invalid',
+ get: function get() {
+ return !this.valid;
+ }
+ }, {
+ key: 'pristine',
+ get: function get() {
+ return this.refs.wrapped.getWrappedInstance().isPristine();
+ }
+ }, {
+ key: 'dirty',
+ get: function get() {
+ return !this.pristine;
+ }
+ }, {
+ key: 'values',
+ get: function get() {
+ return this.refs.wrapped.getWrappedInstance().getValues();
+ }
+ }, {
+ key: 'fieldList',
+ get: function get() {
+ // mainly provided for testing
+ return this.refs.wrapped.getWrappedInstance().getFieldList();
+ }
+ }, {
+ key: 'wrappedInstance',
+ get: function get() {
+ // for testine
+ return this.refs.wrapped.getWrappedInstance().refs.wrapped;
+ }
+ }]);
-/* harmony default export */ __webpack_exports__["a"] = (mapCacheSet);
+ return ReduxForm;
+ }(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]);
+ };
+ };
+};
+/* harmony default export */ __webpack_exports__["a"] = (createReduxForm);
/***/ }),
-/* 525 */
+/* 526 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__arrayMap_js__ = __webpack_require__(272);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(33);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isSymbol_js__ = __webpack_require__(115);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__ = __webpack_require__(527);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__ = __webpack_require__(552);
-
-
-/** Used as references for various `Number` constants. */
-var INFINITY = 1 / 0;
-
-/** Used to convert symbols to primitives and strings. */
-var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined,
- symbolToString = symbolProto ? symbolProto.toString : undefined;
-
/**
- * The base implementation of `_.toString` which doesn't convert nullish
- * values to empty strings.
+ * This method is like `_.assign` except that it recursively merges own and
+ * inherited enumerable string keyed properties of source objects into the
+ * destination object. Source properties that resolve to `undefined` are
+ * skipped if a destination value exists. Array and plain object properties
+ * are merged recursively. Other objects and value types are overridden by
+ * assignment. Source objects are applied from left to right. Subsequent
+ * sources overwrite property assignments of previous sources.
*
- * @private
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {
+ * 'a': [{ 'b': 2 }, { 'd': 4 }]
+ * };
+ *
+ * var other = {
+ * 'a': [{ 'c': 3 }, { 'e': 5 }]
+ * };
+ *
+ * _.merge(object, other);
+ * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
-function baseToString(value) {
- // Exit early for strings to avoid a performance hit in some environments.
- if (typeof value == 'string') {
- return value;
- }
- if (Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(value)) {
- // Recursively convert values (susceptible to call stack limits).
- return Object(__WEBPACK_IMPORTED_MODULE_1__arrayMap_js__["a" /* default */])(value, baseToString) + '';
- }
- if (Object(__WEBPACK_IMPORTED_MODULE_3__isSymbol_js__["a" /* default */])(value)) {
- return symbolToString ? symbolToString.call(value) : '';
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
-}
-
-/* harmony default export */ __webpack_exports__["a"] = (baseToString);
-
-
-/***/ }),
-/* 526 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(114);
-
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-
-var setInWithPath = function setInWithPath(state, value, path, pathIndex) {
- if (pathIndex >= path.length) {
- return value;
- }
-
- var first = path[pathIndex];
- var next = setInWithPath(state && state[first], value, path, pathIndex + 1);
-
- if (!state) {
- var initialized = isNaN(first) ? {} : [];
- initialized[first] = next;
- return initialized;
- }
-
- if (Array.isArray(state)) {
- var copy = [].concat(state);
- copy[first] = next;
- return copy;
- }
-
- return _extends({}, state, _defineProperty({}, first, next));
-};
+var merge = __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__["a" /* default */](function(object, source, srcIndex) {
+ __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__["a" /* default */](object, source, srcIndex);
+});
-var setIn = function setIn(state, field, value) {
- return setInWithPath(state, value, Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(field), 0);
-};
+/* harmony default export */ __webpack_exports__["a"] = (merge);
-/* harmony default export */ __webpack_exports__["a"] = (setIn);
/***/ }),
/* 527 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(277);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(178);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__ = __webpack_require__(276);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseFor_js__ = __webpack_require__(278);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__ = __webpack_require__(534);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isObject_js__ = __webpack_require__(47);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keysIn_js__ = __webpack_require__(280);
+
+
-var customizer = function customizer(obj, other) {
- if (obj === other) return true;
- if ((obj == null || obj === '' || obj === false) && (other == null || other === '' || other === false)) return true;
-
- if (obj && other && obj._error !== other._error) return false;
- if (obj && other && obj._warning !== other._warning) return false;
-};
-
-var deepEqual = function deepEqual(a, b) {
- return Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */])(a, b, customizer);
-};
-
-/* harmony default export */ __webpack_exports__["a"] = (deepEqual);
-
-/***/ }),
-/* 528 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(172);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__equalArrays_js__ = __webpack_require__(278);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__equalByTag_js__ = __webpack_require__(539);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalObjects_js__ = __webpack_require__(542);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getTag_js__ = __webpack_require__(557);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArray_js__ = __webpack_require__(33);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isBuffer_js__ = __webpack_require__(175);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__ = __webpack_require__(178);
-
-
-
-
-
-
-
-
-
-/** Used to compose bitmasks for value comparisons. */
-var COMPARE_PARTIAL_FLAG = 1;
-
-/** `Object#toString` result references. */
-var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- objectTag = '[object Object]';
-
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * A specialized version of `baseIsEqual` for arrays and objects which performs
- * deep comparisons and tracks traversed objects enabling objects with circular
- * references to be compared.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
-function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
- var objIsArr = Object(__WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */])(object),
- othIsArr = Object(__WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */])(other),
- objTag = objIsArr ? arrayTag : Object(__WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */])(object),
- othTag = othIsArr ? arrayTag : Object(__WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */])(other);
-
- objTag = objTag == argsTag ? objectTag : objTag;
- othTag = othTag == argsTag ? objectTag : othTag;
-
- var objIsObj = objTag == objectTag,
- othIsObj = othTag == objectTag,
- isSameTag = objTag == othTag;
-
- if (isSameTag && Object(__WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */])(object)) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */])(other)) {
- return false;
- }
- objIsArr = true;
- objIsObj = false;
- }
- if (isSameTag && !objIsObj) {
- stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]);
- return (objIsArr || Object(__WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__["a" /* default */])(object))
- ? Object(__WEBPACK_IMPORTED_MODULE_1__equalArrays_js__["a" /* default */])(object, other, bitmask, customizer, equalFunc, stack)
- : Object(__WEBPACK_IMPORTED_MODULE_2__equalByTag_js__["a" /* default */])(object, other, objTag, bitmask, customizer, equalFunc, stack);
- }
- if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
- othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
- if (objIsWrapped || othIsWrapped) {
- var objUnwrapped = objIsWrapped ? object.value() : object,
- othUnwrapped = othIsWrapped ? other.value() : other;
+/**
+ * The base implementation of `_.merge` without support for multiple sources.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+function baseMerge(object, source, srcIndex, customizer, stack) {
+ if (object === source) {
+ return;
+ }
+ __WEBPACK_IMPORTED_MODULE_2__baseFor_js__["a" /* default */](source, function(srcValue, key) {
+ if (__WEBPACK_IMPORTED_MODULE_4__isObject_js__["a" /* default */](srcValue)) {
stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]);
- return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ __WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__["a" /* default */](object, source, key, srcIndex, baseMerge, customizer, stack);
}
- }
- if (!isSameTag) {
- return false;
- }
- stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]);
- return Object(__WEBPACK_IMPORTED_MODULE_3__equalObjects_js__["a" /* default */])(object, other, bitmask, customizer, equalFunc, stack);
+ else {
+ var newValue = customizer
+ ? customizer(object[key], srcValue, (key + ''), object, source, stack)
+ : undefined;
+
+ if (newValue === undefined) {
+ newValue = srcValue;
+ }
+ __WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__["a" /* default */](object, key, newValue);
+ }
+ }, __WEBPACK_IMPORTED_MODULE_5__keysIn_js__["a" /* default */]);
}
-/* harmony default export */ __webpack_exports__["a"] = (baseIsEqualDeep);
+/* harmony default export */ __webpack_exports__["a"] = (baseMerge);
/***/ }),
-/* 529 */
+/* 528 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(117);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(120);
/**
@@ -43396,7 +45576,7 @@ function stackClear() {
/***/ }),
-/* 530 */
+/* 529 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -43421,7 +45601,7 @@ function stackDelete(key) {
/***/ }),
-/* 531 */
+/* 530 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -43442,7 +45622,7 @@ function stackGet(key) {
/***/ }),
-/* 532 */
+/* 531 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -43463,13 +45643,13 @@ function stackHas(key) {
/***/ }),
-/* 533 */
+/* 532 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(117);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(170);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MapCache_js__ = __webpack_require__(168);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ListCache_js__ = __webpack_require__(120);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(177);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MapCache_js__ = __webpack_require__(175);
@@ -43506,41 +45686,150 @@ function stackSet(key, value) {
/* harmony default export */ __webpack_exports__["a"] = (stackSet);
+/***/ }),
+/* 533 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/**
+ * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var index = -1,
+ iterable = Object(object),
+ props = keysFunc(object),
+ length = props.length;
+
+ while (length--) {
+ var key = props[fromRight ? length : ++index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (createBaseFor);
+
+
/***/ }),
/* 534 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(168);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__ = __webpack_require__(535);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__ = __webpack_require__(536);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__ = __webpack_require__(276);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__ = __webpack_require__(535);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__ = __webpack_require__(536);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__copyArray_js__ = __webpack_require__(272);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__ = __webpack_require__(538);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArguments_js__ = __webpack_require__(181);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isArray_js__ = __webpack_require__(30);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__ = __webpack_require__(541);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__isBuffer_js__ = __webpack_require__(183);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__isFunction_js__ = __webpack_require__(176);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__isObject_js__ = __webpack_require__(47);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__ = __webpack_require__(173);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__ = __webpack_require__(184);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__ = __webpack_require__(546);
+
+
+
+
+
+
+
+
+
+
+
/**
- *
- * Creates an array cache object to store unique values.
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
*
* @private
- * @constructor
- * @param {Array} [values] The values to cache.
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
*/
-function SetCache(values) {
- var index = -1,
- length = values == null ? 0 : values.length;
+function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+ var objValue = object[key],
+ srcValue = source[key],
+ stacked = stack.get(srcValue);
- this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */];
- while (++index < length) {
- this.add(values[index]);
+ if (stacked) {
+ __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */](object, key, stacked);
+ return;
}
-}
+ var newValue = customizer
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined;
-// Add methods to `SetCache`.
-SetCache.prototype.add = SetCache.prototype.push = __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__["a" /* default */];
-SetCache.prototype.has = __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__["a" /* default */];
+ var isCommon = newValue === undefined;
-/* harmony default export */ __webpack_exports__["a"] = (SetCache);
+ if (isCommon) {
+ var isArr = __WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */](srcValue),
+ isBuff = !isArr && __WEBPACK_IMPORTED_MODULE_8__isBuffer_js__["a" /* default */](srcValue),
+ isTyped = !isArr && !isBuff && __WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__["a" /* default */](srcValue);
+
+ newValue = srcValue;
+ if (isArr || isBuff || isTyped) {
+ if (__WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */](objValue)) {
+ newValue = objValue;
+ }
+ else if (__WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__["a" /* default */](objValue)) {
+ newValue = __WEBPACK_IMPORTED_MODULE_3__copyArray_js__["a" /* default */](objValue);
+ }
+ else if (isBuff) {
+ isCommon = false;
+ newValue = __WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__["a" /* default */](srcValue, true);
+ }
+ else if (isTyped) {
+ isCommon = false;
+ newValue = __WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__["a" /* default */](srcValue, true);
+ }
+ else {
+ newValue = [];
+ }
+ }
+ else if (__WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__["a" /* default */](srcValue) || __WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */](srcValue)) {
+ newValue = objValue;
+ if (__WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */](objValue)) {
+ newValue = __WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__["a" /* default */](objValue);
+ }
+ else if (!__WEBPACK_IMPORTED_MODULE_10__isObject_js__["a" /* default */](objValue) || (srcIndex && __WEBPACK_IMPORTED_MODULE_9__isFunction_js__["a" /* default */](objValue))) {
+ newValue = __WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__["a" /* default */](srcValue);
+ }
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, newValue);
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ stack['delete'](srcValue);
+ }
+ __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */](object, key, newValue);
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (baseMergeDeep);
/***/ }),
@@ -43548,46 +45837,67 @@ SetCache.prototype.has = __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__["a" /* de
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/** Used to stand-in for `undefined` hash values. */
-var HASH_UNDEFINED = '__lodash_hash_undefined__';
+/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(29);
+
+
+/** Detect free variable `exports`. */
+var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+/** Detect free variable `module`. */
+var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = freeModule && freeModule.exports === freeExports;
+
+/** Built-in value references. */
+var Buffer = moduleExports ? __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Buffer : undefined,
+ allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
/**
- * Adds `value` to the array cache.
+ * Creates a clone of `buffer`.
*
* @private
- * @name add
- * @memberOf SetCache
- * @alias push
- * @param {*} value The value to cache.
- * @returns {Object} Returns the cache instance.
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
*/
-function setCacheAdd(value) {
- this.__data__.set(value, HASH_UNDEFINED);
- return this;
+function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
+ }
+ var length = buffer.length,
+ result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
+
+ buffer.copy(result);
+ return result;
}
-/* harmony default export */ __webpack_exports__["a"] = (setCacheAdd);
+/* harmony default export */ __webpack_exports__["a"] = (cloneBuffer);
+/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(179)(module)))
/***/ }),
/* 536 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__ = __webpack_require__(537);
+
+
/**
- * Checks if `value` is in the array cache.
+ * Creates a clone of `typedArray`.
*
* @private
- * @name has
- * @memberOf SetCache
- * @param {*} value The value to search for.
- * @returns {number} Returns `true` if `value` is found, else `false`.
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
*/
-function setCacheHas(value) {
- return this.__data__.has(value);
+function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? __WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__["a" /* default */](typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
-/* harmony default export */ __webpack_exports__["a"] = (setCacheHas);
+/* harmony default export */ __webpack_exports__["a"] = (cloneTypedArray);
/***/ }),
@@ -43595,236 +45905,472 @@ function setCacheHas(value) {
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__ = __webpack_require__(279);
+
+
/**
- * A specialized version of `_.some` for arrays without support for iteratee
- * shorthands.
+ * Creates a clone of `arrayBuffer`.
*
* @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
*/
-function arraySome(array, predicate) {
- var index = -1,
- length = array == null ? 0 : array.length;
+function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](result).set(new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](arrayBuffer));
+ return result;
+}
- while (++index < length) {
- if (predicate(array[index], index, array)) {
- return true;
+/* harmony default export */ __webpack_exports__["a"] = (cloneArrayBuffer);
+
+
+/***/ }),
+/* 538 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(539);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(260);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isPrototype_js__ = __webpack_require__(180);
+
+
+
+
+/**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !__WEBPACK_IMPORTED_MODULE_2__isPrototype_js__["a" /* default */](object))
+ ? __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */](object))
+ : {};
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (initCloneObject);
+
+
+/***/ }),
+/* 539 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(47);
+
+
+/** Built-in value references. */
+var objectCreate = Object.create;
+
+/**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} proto The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+var baseCreate = (function() {
+ function object() {}
+ return function(proto) {
+ if (!__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */](proto)) {
+ return {};
}
- }
+ if (objectCreate) {
+ return objectCreate(proto);
+ }
+ object.prototype = proto;
+ var result = new object;
+ object.prototype = undefined;
+ return result;
+ };
+}());
+
+/* harmony default export */ __webpack_exports__["a"] = (baseCreate);
+
+
+/***/ }),
+/* 540 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(81);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(59);
+
+
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]';
+
+/**
+ * The base implementation of `_.isArguments`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ */
+function baseIsArguments(value) {
+ return __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value) == argsTag;
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (baseIsArguments);
+
+
+/***/ }),
+/* 541 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(124);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(59);
+
+
+
+/**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+function isArrayLikeObject(value) {
+ return __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */](value) && __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */](value);
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (isArrayLikeObject);
+
+
+/***/ }),
+/* 542 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/**
+ * This method returns `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `false`.
+ * @example
+ *
+ * _.times(2, _.stubFalse);
+ * // => [false, false]
+ */
+function stubFalse() {
return false;
}
-/* harmony default export */ __webpack_exports__["a"] = (arraySome);
+/* harmony default export */ __webpack_exports__["a"] = (stubFalse);
+
+
+/***/ }),
+/* 543 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(81);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(182);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(59);
+
+
+
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ weakMapTag = '[object WeakMap]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+/** Used to identify `toStringTag` values of typed arrays. */
+var typedArrayTags = {};
+typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+typedArrayTags[uint32Tag] = true;
+typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+typedArrayTags[setTag] = typedArrayTags[stringTag] =
+typedArrayTags[weakMapTag] = false;
+
+/**
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ */
+function baseIsTypedArray(value) {
+ return __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */](value) &&
+ __WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */](value.length) && !!typedArrayTags[__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */](value)];
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (baseIsTypedArray);
+
+
+/***/ }),
+/* 544 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/**
+ * The base implementation of `_.unary` without support for storing metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ */
+function baseUnary(func) {
+ return function(value) {
+ return func(value);
+ };
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (baseUnary);
+
+
+/***/ }),
+/* 545 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(259);
+
+
+/** Detect free variable `exports`. */
+var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+
+/** Detect free variable `module`. */
+var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = freeModule && freeModule.exports === freeExports;
+
+/** Detect free variable `process` from Node.js. */
+var freeProcess = moduleExports && __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */].process;
+
+/** Used to access faster Node.js helpers. */
+var nodeUtil = (function() {
+ try {
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
+ } catch (e) {}
+}());
+
+/* harmony default export */ __webpack_exports__["a"] = (nodeUtil);
+/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(179)(module)))
/***/ }),
-/* 538 */
+/* 546 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__copyObject_js__ = __webpack_require__(547);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keysIn_js__ = __webpack_require__(280);
+
+
+
/**
- * Checks if a `cache` value for `key` exists.
+ * Converts `value` to a plain object flattening inherited enumerable string
+ * keyed properties of `value` to own properties of the plain object.
*
- * @private
- * @param {Object} cache The cache to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
*/
-function cacheHas(cache, key) {
- return cache.has(key);
+function toPlainObject(value) {
+ return __WEBPACK_IMPORTED_MODULE_0__copyObject_js__["a" /* default */](value, __WEBPACK_IMPORTED_MODULE_1__keysIn_js__["a" /* default */](value));
}
-/* harmony default export */ __webpack_exports__["a"] = (cacheHas);
+/* harmony default export */ __webpack_exports__["a"] = (toPlainObject);
/***/ }),
-/* 539 */
+/* 547 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(112);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__ = __webpack_require__(279);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__eq_js__ = __webpack_require__(90);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalArrays_js__ = __webpack_require__(278);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__ = __webpack_require__(540);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__setToArray_js__ = __webpack_require__(541);
-
-
-
-
-
-
-
-/** Used to compose bitmasks for value comparisons. */
-var COMPARE_PARTIAL_FLAG = 1,
- COMPARE_UNORDERED_FLAG = 2;
-
-/** `Object#toString` result references. */
-var boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- symbolTag = '[object Symbol]';
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignValue_js__ = __webpack_require__(548);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__ = __webpack_require__(123);
-var arrayBufferTag = '[object ArrayBuffer]',
- dataViewTag = '[object DataView]';
-/** Used to convert symbols to primitives and strings. */
-var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined,
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
/**
- * A specialized version of `baseIsEqualDeep` for comparing objects of
- * the same `toStringTag`.
- *
- * **Note:** This function only supports comparing values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ * Copies properties of `source` to `object`.
*
* @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {string} tag The `toStringTag` of the objects to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
*/
-function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
- switch (tag) {
- case dataViewTag:
- if ((object.byteLength != other.byteLength) ||
- (object.byteOffset != other.byteOffset)) {
- return false;
- }
- object = object.buffer;
- other = other.buffer;
-
- case arrayBufferTag:
- if ((object.byteLength != other.byteLength) ||
- !equalFunc(new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](object), new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](other))) {
- return false;
- }
- return true;
-
- case boolTag:
- case dateTag:
- case numberTag:
- // Coerce booleans to `1` or `0` and dates to milliseconds.
- // Invalid dates are coerced to `NaN`.
- return Object(__WEBPACK_IMPORTED_MODULE_2__eq_js__["a" /* default */])(+object, +other);
-
- case errorTag:
- return object.name == other.name && object.message == other.message;
-
- case regexpTag:
- case stringTag:
- // Coerce regexes to strings and treat strings, primitives and objects,
- // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
- // for more details.
- return object == (other + '');
-
- case mapTag:
- var convert = __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__["a" /* default */];
+function copyObject(source, props, object, customizer) {
+ var isNew = !object;
+ object || (object = {});
- case setTag:
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
- convert || (convert = __WEBPACK_IMPORTED_MODULE_5__setToArray_js__["a" /* default */]);
+ var index = -1,
+ length = props.length;
- if (object.size != other.size && !isPartial) {
- return false;
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(object);
- if (stacked) {
- return stacked == other;
- }
- bitmask |= COMPARE_UNORDERED_FLAG;
+ while (++index < length) {
+ var key = props[index];
- // Recursively compare objects (susceptible to call stack limits).
- stack.set(object, other);
- var result = Object(__WEBPACK_IMPORTED_MODULE_3__equalArrays_js__["a" /* default */])(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
- stack['delete'](object);
- return result;
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
- case symbolTag:
- if (symbolValueOf) {
- return symbolValueOf.call(object) == symbolValueOf.call(other);
- }
+ if (newValue === undefined) {
+ newValue = source[key];
+ }
+ if (isNew) {
+ __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__["a" /* default */](object, key, newValue);
+ } else {
+ __WEBPACK_IMPORTED_MODULE_0__assignValue_js__["a" /* default */](object, key, newValue);
+ }
}
- return false;
+ return object;
}
-/* harmony default export */ __webpack_exports__["a"] = (equalByTag);
+/* harmony default export */ __webpack_exports__["a"] = (copyObject);
/***/ }),
-/* 540 */
+/* 548 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(123);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(92);
+
+
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
/**
- * Converts `map` to its key-value pairs.
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
*
* @private
- * @param {Object} map The map to convert.
- * @returns {Array} Returns the key-value pairs.
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
*/
-function mapToArray(map) {
- var index = -1,
- result = Array(map.size);
-
- map.forEach(function(value, key) {
- result[++index] = [key, value];
- });
- return result;
+function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && __WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */](objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */](object, key, value);
+ }
}
-/* harmony default export */ __webpack_exports__["a"] = (mapToArray);
+/* harmony default export */ __webpack_exports__["a"] = (assignValue);
/***/ }),
-/* 541 */
+/* 549 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/**
- * Converts `set` to an array of its values.
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
*
* @private
- * @param {Object} set The set to convert.
- * @returns {Array} Returns the values.
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
*/
-function setToArray(set) {
+function baseTimes(n, iteratee) {
var index = -1,
- result = Array(set.size);
+ result = Array(n);
- set.forEach(function(value) {
- result[++index] = value;
- });
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
return result;
}
-/* harmony default export */ __webpack_exports__["a"] = (setToArray);
+/* harmony default export */ __webpack_exports__["a"] = (baseTimes);
/***/ }),
-/* 542 */
+/* 550 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__ = __webpack_require__(543);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(47);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isPrototype_js__ = __webpack_require__(180);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__ = __webpack_require__(551);
+
-/** Used to compose bitmasks for value comparisons. */
-var COMPARE_PARTIAL_FLAG = 1;
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -43833,476 +46379,407 @@ var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * A specialized version of `baseIsEqualDeep` for objects with support for
- * partial deep comparisons.
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
*
* @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
*/
-function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- objProps = Object(__WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */])(object),
- objLength = objProps.length,
- othProps = Object(__WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */])(other),
- othLength = othProps.length;
-
- if (objLength != othLength && !isPartial) {
- return false;
- }
- var index = objLength;
- while (index--) {
- var key = objProps[index];
- if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
- return false;
- }
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(object);
- if (stacked && stack.get(other)) {
- return stacked == other;
- }
- var result = true;
- stack.set(object, other);
- stack.set(other, object);
-
- var skipCtor = isPartial;
- while (++index < objLength) {
- key = objProps[index];
- var objValue = object[key],
- othValue = other[key];
-
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, objValue, key, other, object, stack)
- : customizer(objValue, othValue, key, object, other, stack);
- }
- // Recursively compare objects (susceptible to call stack limits).
- if (!(compared === undefined
- ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
- : compared
- )) {
- result = false;
- break;
- }
- skipCtor || (skipCtor = key == 'constructor');
+function baseKeysIn(object) {
+ if (!__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */](object)) {
+ return __WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__["a" /* default */](object);
}
- if (result && !skipCtor) {
- var objCtor = object.constructor,
- othCtor = other.constructor;
+ var isProto = __WEBPACK_IMPORTED_MODULE_1__isPrototype_js__["a" /* default */](object),
+ result = [];
- // Non `Object` object instances with different constructors are not equal.
- if (objCtor != othCtor &&
- ('constructor' in object && 'constructor' in other) &&
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
- result = false;
+ for (var key in object) {
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
}
}
- stack['delete'](object);
- stack['delete'](other);
return result;
}
-/* harmony default export */ __webpack_exports__["a"] = (equalObjects);
+/* harmony default export */ __webpack_exports__["a"] = (baseKeysIn);
/***/ }),
-/* 543 */
+/* 551 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__ = __webpack_require__(544);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__ = __webpack_require__(546);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(173);
-
-
-
-
/**
- * Creates an array of own enumerable property names and symbols of `object`.
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
*
* @private
* @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names and symbols.
+ * @returns {Array} Returns the array of property names.
*/
-function getAllKeys(object) {
- return Object(__WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__["a" /* default */])(object, __WEBPACK_IMPORTED_MODULE_2__keys_js__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__["a" /* default */]);
+function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
+ }
+ }
+ return result;
}
-/* harmony default export */ __webpack_exports__["a"] = (getAllKeys);
+/* harmony default export */ __webpack_exports__["a"] = (nativeKeysIn);
/***/ }),
-/* 544 */
+/* 552 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__ = __webpack_require__(545);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(33);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(553);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__ = __webpack_require__(560);
/**
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
- * symbols of `object`.
+ * Creates a function like `_.assign`.
*
* @private
- * @param {Object} object The object to query.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
- * @returns {Array} Returns the array of property names and symbols.
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
*/
-function baseGetAllKeys(object, keysFunc, symbolsFunc) {
- var result = keysFunc(object);
- return Object(__WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" /* default */])(object) ? result : Object(__WEBPACK_IMPORTED_MODULE_0__arrayPush_js__["a" /* default */])(result, symbolsFunc(object));
+function createAssigner(assigner) {
+ return __WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */](function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
+
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
+
+ if (guard && __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__["a" /* default */](sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
}
-/* harmony default export */ __webpack_exports__["a"] = (baseGetAllKeys);
+/* harmony default export */ __webpack_exports__["a"] = (createAssigner);
/***/ }),
-/* 545 */
+/* 553 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__identity_js__ = __webpack_require__(186);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__overRest_js__ = __webpack_require__(554);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setToString_js__ = __webpack_require__(556);
+
+
+
+
/**
- * Appends the elements of `values` to `array`.
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
*
* @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to append.
- * @returns {Array} Returns `array`.
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
*/
-function arrayPush(array, values) {
- var index = -1,
- length = values.length,
- offset = array.length;
-
- while (++index < length) {
- array[offset + index] = values[index];
- }
- return array;
+function baseRest(func, start) {
+ return __WEBPACK_IMPORTED_MODULE_2__setToString_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__overRest_js__["a" /* default */](func, start, __WEBPACK_IMPORTED_MODULE_0__identity_js__["a" /* default */]), func + '');
}
-/* harmony default export */ __webpack_exports__["a"] = (arrayPush);
+/* harmony default export */ __webpack_exports__["a"] = (baseRest);
/***/ }),
-/* 546 */
+/* 554 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__ = __webpack_require__(547);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubArray_js__ = __webpack_require__(548);
-
-
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(555);
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
-
-/** Built-in value references. */
-var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeGetSymbols = Object.getOwnPropertySymbols;
+var nativeMax = Math.max;
/**
- * Creates an array of the own enumerable symbols of `object`.
+ * A specialized version of `baseRest` which transforms the rest array.
*
* @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of symbols.
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @param {Function} transform The rest array transform.
+ * @returns {Function} Returns the new function.
*/
-var getSymbols = !nativeGetSymbols ? __WEBPACK_IMPORTED_MODULE_1__stubArray_js__["a" /* default */] : function(object) {
- if (object == null) {
- return [];
- }
- object = Object(object);
- return Object(__WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__["a" /* default */])(nativeGetSymbols(object), function(symbol) {
- return propertyIsEnumerable.call(object, symbol);
- });
-};
+function overRest(func, start, transform) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
-/* harmony default export */ __webpack_exports__["a"] = (getSymbols);
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = transform(array);
+ return __WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */](func, this, otherArgs);
+ };
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (overRest);
/***/ }),
-/* 547 */
+/* 555 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/**
- * A specialized version of `_.filter` for arrays without support for
- * iteratee shorthands.
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
*
* @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
*/
-function arrayFilter(array, predicate) {
- var index = -1,
- length = array == null ? 0 : array.length,
- resIndex = 0,
- result = [];
-
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result[resIndex++] = value;
- }
+function apply(func, thisArg, args) {
+ switch (args.length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
}
- return result;
+ return func.apply(thisArg, args);
}
-/* harmony default export */ __webpack_exports__["a"] = (arrayFilter);
+/* harmony default export */ __webpack_exports__["a"] = (apply);
/***/ }),
-/* 548 */
+/* 556 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/**
- * This method returns a new empty array.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {Array} Returns the new empty array.
- * @example
- *
- * var arrays = _.times(2, _.stubArray);
- *
- * console.log(arrays);
- * // => [[], []]
- *
- * console.log(arrays[0] === arrays[1]);
- * // => false
- */
-function stubArray() {
- return [];
-}
-
-/* harmony default export */ __webpack_exports__["a"] = (stubArray);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__ = __webpack_require__(557);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shortOut_js__ = __webpack_require__(559);
-/***/ }),
-/* 549 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
/**
- * The base implementation of `_.times` without support for iteratee shorthands
- * or max array length checks.
+ * Sets the `toString` method of `func` to return `string`.
*
- * @private
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the array of results.
- */
-function baseTimes(n, iteratee) {
- var index = -1,
- result = Array(n);
-
- while (++index < n) {
- result[index] = iteratee(index);
- }
- return result;
-}
+ * @private
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
+ */
+var setToString = __WEBPACK_IMPORTED_MODULE_1__shortOut_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__["a" /* default */]);
-/* harmony default export */ __webpack_exports__["a"] = (baseTimes);
+/* harmony default export */ __webpack_exports__["a"] = (setToString);
/***/ }),
-/* 550 */
+/* 557 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(76);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(54);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant_js__ = __webpack_require__(558);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__defineProperty_js__ = __webpack_require__(277);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(186);
-/** `Object#toString` result references. */
-var argsTag = '[object Arguments]';
/**
- * The base implementation of `_.isArguments`.
+ * The base implementation of `setToString` without support for hot loop shorting.
*
* @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * @param {Function} func The function to modify.
+ * @param {Function} string The `toString` result.
+ * @returns {Function} Returns `func`.
*/
-function baseIsArguments(value) {
- return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) == argsTag;
-}
+var baseSetToString = !__WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */] : function(func, string) {
+ return __WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */](func, 'toString', {
+ 'configurable': true,
+ 'enumerable': false,
+ 'value': __WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */](string),
+ 'writable': true
+ });
+};
-/* harmony default export */ __webpack_exports__["a"] = (baseIsArguments);
+/* harmony default export */ __webpack_exports__["a"] = (baseSetToString);
/***/ }),
-/* 551 */
+/* 558 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/**
- * This method returns `false`.
+ * Creates a function that returns `value`.
*
* @static
* @memberOf _
- * @since 4.13.0
+ * @since 2.4.0
* @category Util
- * @returns {boolean} Returns `false`.
+ * @param {*} value The value to return from the new function.
+ * @returns {Function} Returns the new constant function.
* @example
*
- * _.times(2, _.stubFalse);
- * // => [false, false]
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
+ *
+ * console.log(objects);
+ * // => [{ 'a': 1 }, { 'a': 1 }]
+ *
+ * console.log(objects[0] === objects[1]);
+ * // => true
*/
-function stubFalse() {
- return false;
+function constant(value) {
+ return function() {
+ return value;
+ };
}
-/* harmony default export */ __webpack_exports__["a"] = (stubFalse);
+/* harmony default export */ __webpack_exports__["a"] = (constant);
/***/ }),
-/* 552 */
+/* 559 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(76);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isLength_js__ = __webpack_require__(179);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(54);
-
-
-
-
-/** `Object#toString` result references. */
-var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- objectTag = '[object Object]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- weakMapTag = '[object WeakMap]';
-
-var arrayBufferTag = '[object ArrayBuffer]',
- dataViewTag = '[object DataView]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
+/** Used to detect hot functions by number of calls within a span of milliseconds. */
+var HOT_COUNT = 800,
+ HOT_SPAN = 16;
-/** Used to identify `toStringTag` values of typed arrays. */
-var typedArrayTags = {};
-typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
-typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
-typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
-typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
-typedArrayTags[uint32Tag] = true;
-typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
-typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
-typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
-typedArrayTags[errorTag] = typedArrayTags[funcTag] =
-typedArrayTags[mapTag] = typedArrayTags[numberTag] =
-typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
-typedArrayTags[setTag] = typedArrayTags[stringTag] =
-typedArrayTags[weakMapTag] = false;
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeNow = Date.now;
/**
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
+ * Creates a function that'll short out and invoke `identity` instead
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
+ * milliseconds.
*
* @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @param {Function} func The function to restrict.
+ * @returns {Function} Returns the new shortable function.
*/
-function baseIsTypedArray(value) {
- return Object(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) &&
- Object(__WEBPACK_IMPORTED_MODULE_1__isLength_js__["a" /* default */])(value.length) && !!typedArrayTags[Object(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value)];
+function shortOut(func) {
+ var count = 0,
+ lastCalled = 0;
+
+ return function() {
+ var stamp = nativeNow(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return arguments[0];
+ }
+ } else {
+ count = 0;
+ }
+ return func.apply(undefined, arguments);
+ };
}
-/* harmony default export */ __webpack_exports__["a"] = (baseIsTypedArray);
+/* harmony default export */ __webpack_exports__["a"] = (shortOut);
/***/ }),
-/* 553 */
+/* 560 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(92);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(124);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isIndex_js__ = __webpack_require__(185);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isObject_js__ = __webpack_require__(47);
+
+
+
+
+
/**
- * The base implementation of `_.unary` without support for storing metadata.
+ * Checks if the given arguments are from an iteratee call.
*
* @private
- * @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new capped function.
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
*/
-function baseUnary(func) {
- return function(value) {
- return func(value);
- };
+function isIterateeCall(value, index, object) {
+ if (!__WEBPACK_IMPORTED_MODULE_3__isObject_js__["a" /* default */](object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */](object) && __WEBPACK_IMPORTED_MODULE_2__isIndex_js__["a" /* default */](index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return __WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */](object[index], value);
+ }
+ return false;
}
-/* harmony default export */ __webpack_exports__["a"] = (baseUnary);
+/* harmony default export */ __webpack_exports__["a"] = (isIterateeCall);
/***/ }),
-/* 554 */
+/* 561 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(253);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFor_js__ = __webpack_require__(278);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(187);
-/** Detect free variable `exports`. */
-var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
-
-/** Detect free variable `module`. */
-var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
-
-/** Detect the popular CommonJS extension `module.exports`. */
-var moduleExports = freeModule && freeModule.exports === freeExports;
-
-/** Detect free variable `process` from Node.js. */
-var freeProcess = moduleExports && __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */].process;
-/** Used to access faster Node.js helpers. */
-var nodeUtil = (function() {
- try {
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
- } catch (e) {}
-}());
+/**
+ * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+function baseForOwn(object, iteratee) {
+ return object && __WEBPACK_IMPORTED_MODULE_0__baseFor_js__["a" /* default */](object, iteratee, __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */]);
+}
-/* harmony default export */ __webpack_exports__["a"] = (nodeUtil);
+/* harmony default export */ __webpack_exports__["a"] = (baseForOwn);
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(176)(module)))
/***/ }),
-/* 555 */
+/* 562 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPrototype_js__ = __webpack_require__(180);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__ = __webpack_require__(556);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__ = __webpack_require__(563);
@@ -44320,8 +46797,8 @@ var hasOwnProperty = objectProto.hasOwnProperty;
* @returns {Array} Returns the array of property names.
*/
function baseKeys(object) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_0__isPrototype_js__["a" /* default */])(object)) {
- return Object(__WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__["a" /* default */])(object);
+ if (!__WEBPACK_IMPORTED_MODULE_0__isPrototype_js__["a" /* default */](object)) {
+ return __WEBPACK_IMPORTED_MODULE_1__nativeKeys_js__["a" /* default */](object);
}
var result = [];
for (var key in Object(object)) {
@@ -44336,758 +46813,865 @@ function baseKeys(object) {
/***/ }),
-/* 556 */
+/* 563 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(255);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(261);
/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeKeys = Object(__WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */])(Object.keys, Object);
+var nativeKeys = __WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */](Object.keys, Object);
/* harmony default export */ __webpack_exports__["a"] = (nativeKeys);
/***/ }),
-/* 557 */
+/* 564 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DataView_js__ = __webpack_require__(558);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(170);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Promise_js__ = __webpack_require__(559);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Set_js__ = __webpack_require__(560);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__ = __webpack_require__(561);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__ = __webpack_require__(76);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toSource_js__ = __webpack_require__(275);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMatches_js__ = __webpack_require__(565);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__ = __webpack_require__(589);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(186);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(30);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__property_js__ = __webpack_require__(594);
+/**
+ * The base implementation of `_.iteratee`.
+ *
+ * @private
+ * @param {*} [value=_.identity] The value to convert to an iteratee.
+ * @returns {Function} Returns the iteratee.
+ */
+function baseIteratee(value) {
+ // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
+ // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
+ if (typeof value == 'function') {
+ return value;
+ }
+ if (value == null) {
+ return __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */];
+ }
+ if (typeof value == 'object') {
+ return __WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */](value)
+ ? __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__["a" /* default */](value[0], value[1])
+ : __WEBPACK_IMPORTED_MODULE_0__baseMatches_js__["a" /* default */](value);
+ }
+ return __WEBPACK_IMPORTED_MODULE_4__property_js__["a" /* default */](value);
+}
+/* harmony default export */ __webpack_exports__["a"] = (baseIteratee);
+
+
+/***/ }),
+/* 565 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__ = __webpack_require__(566);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__ = __webpack_require__(588);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__ = __webpack_require__(285);
-/** `Object#toString` result references. */
-var mapTag = '[object Map]',
- objectTag = '[object Object]',
- promiseTag = '[object Promise]',
- setTag = '[object Set]',
- weakMapTag = '[object WeakMap]';
-var dataViewTag = '[object DataView]';
-/** Used to detect maps, sets, and weakmaps. */
-var dataViewCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */]),
- mapCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]),
- promiseCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */]),
- setCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]),
- weakMapCtorString = Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]);
/**
- * Gets the `toStringTag` of `value`.
+ * The base implementation of `_.matches` which doesn't clone `source`.
*
* @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new spec function.
*/
-var getTag = __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */];
-
-// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
-if ((__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */](new ArrayBuffer(1))) != dataViewTag) ||
- (__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]) != mapTag) ||
- (__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */] && getTag(__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */].resolve()) != promiseTag) ||
- (__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]) != setTag) ||
- (__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]) != weakMapTag)) {
- getTag = function(value) {
- var result = Object(__WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */])(value),
- Ctor = result == objectTag ? value.constructor : undefined,
- ctorString = Ctor ? Object(__WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */])(Ctor) : '';
-
- if (ctorString) {
- switch (ctorString) {
- case dataViewCtorString: return dataViewTag;
- case mapCtorString: return mapTag;
- case promiseCtorString: return promiseTag;
- case setCtorString: return setTag;
- case weakMapCtorString: return weakMapTag;
- }
- }
- return result;
+function baseMatches(source) {
+ var matchData = __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__["a" /* default */](source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ return __WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__["a" /* default */](matchData[0][0], matchData[0][1]);
+ }
+ return function(object) {
+ return object === source || __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__["a" /* default */](object, source, matchData);
};
}
-/* harmony default export */ __webpack_exports__["a"] = (getTag);
+/* harmony default export */ __webpack_exports__["a"] = (baseMatches);
/***/ }),
-/* 558 */
+/* 566 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(32);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(178);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__ = __webpack_require__(188);
-/* Built-in method references that are verified to be native. */
-var DataView = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'DataView');
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
-/* harmony default export */ __webpack_exports__["a"] = (DataView);
+/**
+ * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Object} source The object of property values to match.
+ * @param {Array} matchData The property names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparisons.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+function baseIsMatch(object, source, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = Object(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */];
+ if (customizer) {
+ var result = customizer(objValue, srcValue, key, object, source, stack);
+ }
+ if (!(result === undefined
+ ? __WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__["a" /* default */](srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
+ : result
+ )) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (baseIsMatch);
/***/ }),
-/* 559 */
+/* 567 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(32);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(178);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__equalArrays_js__ = __webpack_require__(283);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__equalByTag_js__ = __webpack_require__(573);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalObjects_js__ = __webpack_require__(576);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getTag_js__ = __webpack_require__(583);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArray_js__ = __webpack_require__(30);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isBuffer_js__ = __webpack_require__(183);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__ = __webpack_require__(184);
-/* Built-in method references that are verified to be native. */
-var Promise = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Promise');
-/* harmony default export */ __webpack_exports__["a"] = (Promise);
-/***/ }),
-/* 560 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(32);
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1;
-/* Built-in method references that are verified to be native. */
-var Set = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Set');
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ objectTag = '[object Object]';
-/* harmony default export */ __webpack_exports__["a"] = (Set);
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
+ var objIsArr = __WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */](object),
+ othIsArr = __WEBPACK_IMPORTED_MODULE_5__isArray_js__["a" /* default */](other),
+ objTag = objIsArr ? arrayTag : __WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */](object),
+ othTag = othIsArr ? arrayTag : __WEBPACK_IMPORTED_MODULE_4__getTag_js__["a" /* default */](other);
+
+ objTag = objTag == argsTag ? objectTag : objTag;
+ othTag = othTag == argsTag ? objectTag : othTag;
+
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && __WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */](object)) {
+ if (!__WEBPACK_IMPORTED_MODULE_6__isBuffer_js__["a" /* default */](other)) {
+ return false;
+ }
+ objIsArr = true;
+ objIsObj = false;
+ }
+ if (isSameTag && !objIsObj) {
+ stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]);
+ return (objIsArr || __WEBPACK_IMPORTED_MODULE_7__isTypedArray_js__["a" /* default */](object))
+ ? __WEBPACK_IMPORTED_MODULE_1__equalArrays_js__["a" /* default */](object, other, bitmask, customizer, equalFunc, stack)
+ : __WEBPACK_IMPORTED_MODULE_2__equalByTag_js__["a" /* default */](object, other, objTag, bitmask, customizer, equalFunc, stack);
+ }
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ var objUnwrapped = objIsWrapped ? object.value() : object,
+ othUnwrapped = othIsWrapped ? other.value() : other;
+
+ stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]);
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]);
+ return __WEBPACK_IMPORTED_MODULE_3__equalObjects_js__["a" /* default */](object, other, bitmask, customizer, equalFunc, stack);
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (baseIsEqualDeep);
/***/ }),
-/* 561 */
+/* 568 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(55);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(32);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MapCache_js__ = __webpack_require__(175);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__ = __webpack_require__(569);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__ = __webpack_require__(570);
-/* Built-in method references that are verified to be native. */
-var WeakMap = Object(__WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'WeakMap');
-/* harmony default export */ __webpack_exports__["a"] = (WeakMap);
+/**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+function SetCache(values) {
+ var index = -1,
+ length = values == null ? 0 : values.length;
+
+ this.__data__ = new __WEBPACK_IMPORTED_MODULE_0__MapCache_js__["a" /* default */];
+ while (++index < length) {
+ this.add(values[index]);
+ }
+}
+
+// Add methods to `SetCache`.
+SetCache.prototype.add = SetCache.prototype.push = __WEBPACK_IMPORTED_MODULE_1__setCacheAdd_js__["a" /* default */];
+SetCache.prototype.has = __WEBPACK_IMPORTED_MODULE_2__setCacheHas_js__["a" /* default */];
+
+/* harmony default export */ __webpack_exports__["a"] = (SetCache);
/***/ }),
-/* 562 */
+/* 569 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(114);
-
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+/**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+}
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+/* harmony default export */ __webpack_exports__["a"] = (setCacheAdd);
-function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
-var deleteInWithPath = function deleteInWithPath(state, first) {
- for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
- rest[_key - 2] = arguments[_key];
- }
+/***/ }),
+/* 570 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- if (state === undefined || first === undefined) {
- return state;
- }
- if (rest.length) {
- if (Array.isArray(state)) {
- if (first < state.length) {
- var result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest));
- if (result !== state[first]) {
- var copy = [].concat(_toConsumableArray(state));
- copy[first] = result;
- return copy;
- }
- }
- return state;
- }
- if (first in state) {
- var _result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest));
- return state[first] === _result ? state : _extends({}, state, _defineProperty({}, first, _result));
- }
- return state;
- }
- if (Array.isArray(state)) {
- if (isNaN(first)) {
- throw new Error('Cannot delete non-numerical index from an array');
- }
- if (first < state.length) {
- var _copy = [].concat(_toConsumableArray(state));
- _copy.splice(first, 1);
- return _copy;
- }
- return state;
- }
- if (first in state) {
- var _copy2 = _extends({}, state);
- delete _copy2[first];
- return _copy2;
- }
- return state;
-};
+"use strict";
+/**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
+ * @param {*} value The value to search for.
+ * @returns {number} Returns `true` if `value` is found, else `false`.
+ */
+function setCacheHas(value) {
+ return this.__data__.has(value);
+}
-var deleteIn = function deleteIn(state, field) {
- return deleteInWithPath.apply(undefined, [state].concat(_toConsumableArray(Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(field))));
-};
+/* harmony default export */ __webpack_exports__["a"] = (setCacheHas);
-/* harmony default export */ __webpack_exports__["a"] = (deleteIn);
/***/ }),
-/* 563 */
+/* 571 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-var keys = function keys(value) {
- if (!value) {
- return [];
- }
+/**
+ * A specialized version of `_.some` for arrays without support for iteratee
+ * shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+function arraySome(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length;
- if (Array.isArray(value)) {
- return value.map(function (i) {
- return i.name;
- });
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
}
+ return false;
+}
- return Object.keys(value);
-};
+/* harmony default export */ __webpack_exports__["a"] = (arraySome);
-/* harmony default export */ __webpack_exports__["a"] = (keys);
/***/ }),
-/* 564 */
+/* 572 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFields__ = __webpack_require__(565);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
-
+/**
+ * Checks if a `cache` value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function cacheHas(cache, key) {
+ return cache.has(key);
+}
+/* harmony default export */ __webpack_exports__["a"] = (cacheHas);
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFields__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
/***/ }),
-/* 565 */
+/* 573 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ConnectedFields__ = __webpack_require__(566);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__ = __webpack_require__(281);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__structure_plain__ = __webpack_require__(11);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__util_prefixName__ = __webpack_require__(89);
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-
-
-
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(116);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__ = __webpack_require__(279);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__eq_js__ = __webpack_require__(92);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__equalArrays_js__ = __webpack_require__(283);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__ = __webpack_require__(574);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__setToArray_js__ = __webpack_require__(575);
-var validateNameProp = function validateNameProp(prop) {
- if (!prop) {
- return new Error('No "names" prop was specified ');
- }
- if (!Array.isArray(prop) && !prop._isFieldArray) {
- return new Error('Invalid prop "names" supplied to . Must be either an array of strings or the fields array generated by FieldArray.');
- }
-};
-var createFields = function createFields(_ref) {
- var deepEqual = _ref.deepEqual,
- getIn = _ref.getIn,
- toJS = _ref.toJS,
- size = _ref.size;
- var ConnectedFields = Object(__WEBPACK_IMPORTED_MODULE_3__ConnectedFields__["a" /* default */])({
- deepEqual: deepEqual,
- getIn: getIn,
- toJS: toJS,
- size: size
- });
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
- var Fields = function (_Component) {
- _inherits(Fields, _Component);
+/** `Object#toString` result references. */
+var boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]';
- function Fields(props, context) {
- _classCallCheck(this, Fields);
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]';
- var _this = _possibleConstructorReturn(this, (Fields.__proto__ || Object.getPrototypeOf(Fields)).call(this, props, context));
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
- if (!context._reduxForm) {
- throw new Error('Fields must be inside a component decorated with reduxForm()');
+/**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
+ switch (tag) {
+ case dataViewTag:
+ if ((object.byteLength != other.byteLength) ||
+ (object.byteOffset != other.byteOffset)) {
+ return false;
}
- return _this;
- }
+ object = object.buffer;
+ other = other.buffer;
- _createClass(Fields, [{
- key: 'shouldComponentUpdate',
- value: function shouldComponentUpdate(nextProps, nextState) {
- return Object(__WEBPACK_IMPORTED_MODULE_4__util_shallowCompare__["a" /* default */])(this, nextProps, nextState);
+ case arrayBufferTag:
+ if ((object.byteLength != other.byteLength) ||
+ !equalFunc(new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](object), new __WEBPACK_IMPORTED_MODULE_1__Uint8Array_js__["a" /* default */](other))) {
+ return false;
}
- }, {
- key: 'componentWillMount',
- value: function componentWillMount() {
- var error = validateNameProp(this.props.names);
- if (error) {
- throw error;
- }
- var context = this.context;
- var register = context._reduxForm.register;
+ return true;
- this.names.forEach(function (name) {
- return register(name, 'Field');
- });
- }
- }, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- if (!__WEBPACK_IMPORTED_MODULE_5__structure_plain__["a" /* default */].deepEqual(this.props.names, nextProps.names)) {
- var context = this.context;
- var _context$_reduxForm = context._reduxForm,
- register = _context$_reduxForm.register,
- unregister = _context$_reduxForm.unregister;
- // unregister old name
+ case boolTag:
+ case dateTag:
+ case numberTag:
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
+ // Invalid dates are coerced to `NaN`.
+ return __WEBPACK_IMPORTED_MODULE_2__eq_js__["a" /* default */](+object, +other);
- this.props.names.forEach(function (name) {
- return unregister(Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name));
- }
- // register new name
- );nextProps.names.forEach(function (name) {
- return register(Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name), 'Field');
- });
- }
- }
- }, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- var context = this.context;
- var unregister = context._reduxForm.unregister;
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
- this.props.names.forEach(function (name) {
- return unregister(Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name));
- });
- }
- }, {
- key: 'getRenderedComponent',
- value: function getRenderedComponent() {
- __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Fields');
- return this.refs.connected.getWrappedInstance().getRenderedComponent();
- }
- }, {
- key: 'render',
- value: function render() {
- var context = this.context;
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings, primitives and objects,
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
+ // for more details.
+ return object == (other + '');
- return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(ConnectedFields, _extends({}, this.props, {
- names: this.props.names.map(function (name) {
- return Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name);
- }),
- _reduxForm: this.context._reduxForm,
- ref: 'connected'
- }));
- }
- }, {
- key: 'names',
- get: function get() {
- var context = this.context;
+ case mapTag:
+ var convert = __WEBPACK_IMPORTED_MODULE_4__mapToArray_js__["a" /* default */];
- return this.props.names.map(function (name) {
- return Object(__WEBPACK_IMPORTED_MODULE_6__util_prefixName__["a" /* default */])(context, name);
- });
- }
- }, {
- key: 'dirty',
- get: function get() {
- return this.refs.connected.getWrappedInstance().isDirty();
- }
- }, {
- key: 'pristine',
- get: function get() {
- return !this.dirty;
+ case setTag:
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
+ convert || (convert = __WEBPACK_IMPORTED_MODULE_5__setToArray_js__["a" /* default */]);
+
+ if (object.size != other.size && !isPartial) {
+ return false;
}
- }, {
- key: 'values',
- get: function get() {
- return this.refs.connected && this.refs.connected.getWrappedInstance().getValues();
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked) {
+ return stacked == other;
}
- }]);
+ bitmask |= COMPARE_UNORDERED_FLAG;
- return Fields;
- }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
+ // Recursively compare objects (susceptible to call stack limits).
+ stack.set(object, other);
+ var result = __WEBPACK_IMPORTED_MODULE_3__equalArrays_js__["a" /* default */](convert(object), convert(other), bitmask, customizer, equalFunc, stack);
+ stack['delete'](object);
+ return result;
- Fields.propTypes = {
- names: function names(props, propName) {
- return validateNameProp(props[propName]);
- },
- component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired,
- format: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
- parse: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func,
- props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
- withRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool
- };
- Fields.contextTypes = {
- _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
- };
+ case symbolTag:
+ if (symbolValueOf) {
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
+ }
+ }
+ return false;
+}
- return Fields;
-};
+/* harmony default export */ __webpack_exports__["a"] = (equalByTag);
-/* harmony default export */ __webpack_exports__["a"] = (createFields);
/***/ }),
-/* 566 */
+/* 574 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(27);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__createFieldProps__ = __webpack_require__(269);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__structure_plain__ = __webpack_require__(11);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__events_onChangeValue__ = __webpack_require__(270);
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+/**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+}
+/* harmony default export */ __webpack_exports__["a"] = (mapToArray);
+/***/ }),
+/* 575 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+"use strict";
+/**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+}
+/* harmony default export */ __webpack_exports__["a"] = (setToArray);
-var propsToNotUpdateFor = ['_reduxForm'];
+/***/ }),
+/* 576 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-var createConnectedFields = function createConnectedFields(_ref) {
- var deepEqual = _ref.deepEqual,
- getIn = _ref.getIn,
- toJS = _ref.toJS,
- size = _ref.size;
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__ = __webpack_require__(577);
- var getSyncError = function getSyncError(syncErrors, name) {
- // Because the error for this field might not be at a level in the error structure where
- // it can be set directly, it might need to be unwrapped from the _error property
- return __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].getIn(syncErrors, name + '._error') || __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].getIn(syncErrors, name);
- };
- var getSyncWarning = function getSyncWarning(syncWarnings, name) {
- var warning = getIn(syncWarnings, name
- // Because the warning for this field might not be at a level in the warning structure where
- // it can be set directly, it might need to be unwrapped from the _warning property
- );return warning && warning._warning ? warning._warning : warning;
- };
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1;
- var ConnectedFields = function (_Component) {
- _inherits(ConnectedFields, _Component);
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
- function ConnectedFields(props) {
- _classCallCheck(this, ConnectedFields);
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
- var _this = _possibleConstructorReturn(this, (ConnectedFields.__proto__ || Object.getPrototypeOf(ConnectedFields)).call(this, props));
+/**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
+ * @param {Function} customizer The function to customize comparisons.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
+ objProps = __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */](object),
+ objLength = objProps.length,
+ othProps = __WEBPACK_IMPORTED_MODULE_0__getAllKeys_js__["a" /* default */](other),
+ othLength = othProps.length;
- _this.handleChange = _this.handleChange.bind(_this);
- _this.handleFocus = _this.handleFocus.bind(_this);
- _this.handleBlur = _this.handleBlur.bind(_this);
+ if (objLength != othLength && !isPartial) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ // Assume cyclic values are equal.
+ var stacked = stack.get(object);
+ if (stacked && stack.get(other)) {
+ return stacked == other;
+ }
+ var result = true;
+ stack.set(object, other);
+ stack.set(other, object);
- _this.onChangeFns = props.names.reduce(function (acc, name) {
- acc[name] = function (event) {
- return _this.handleChange(name, event);
- };
- return acc;
- }, {});
+ var skipCtor = isPartial;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key];
- _this.onFocusFns = props.names.reduce(function (acc, name) {
- acc[name] = function () {
- return _this.handleFocus(name);
- };
- return acc;
- }, {});
+ if (customizer) {
+ var compared = isPartial
+ ? customizer(othValue, objValue, key, other, object, stack)
+ : customizer(objValue, othValue, key, object, other, stack);
+ }
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(compared === undefined
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
+ : compared
+ )) {
+ result = false;
+ break;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (result && !skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
- _this.onBlurFns = props.names.reduce(function (acc, name) {
- acc[name] = function (event) {
- return _this.handleBlur(name, event);
- };
- return acc;
- }, {});
- return _this;
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ result = false;
}
+ }
+ stack['delete'](object);
+ stack['delete'](other);
+ return result;
+}
- _createClass(ConnectedFields, [{
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- var _this2 = this;
+/* harmony default export */ __webpack_exports__["a"] = (equalObjects);
- if (this.props.names !== nextProps.names && (size(this.props.names) !== size(nextProps.names) || nextProps.names.some(function (nextName) {
- return !_this2.props._fields[nextName];
- }))) {
- // names is changed. The cached event handlers need to be updated
- this.onChangeFns = nextProps.names.reduce(function (acc, name) {
- acc[name] = function (event) {
- return _this2.handleChange(name, event);
- };
- return acc;
- }, {});
- this.onFocusFns = nextProps.names.reduce(function (acc, name) {
- acc[name] = function () {
- return _this2.handleFocus(name);
- };
- return acc;
- }, {});
+/***/ }),
+/* 577 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- this.onBlurFns = nextProps.names.reduce(function (acc, name) {
- acc[name] = function (event) {
- return _this2.handleBlur(name, event);
- };
- return acc;
- }, {});
- }
- }
- }, {
- key: 'shouldComponentUpdate',
- value: function shouldComponentUpdate(nextProps) {
- var _this3 = this;
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__ = __webpack_require__(578);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__ = __webpack_require__(580);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__keys_js__ = __webpack_require__(187);
- var nextPropsKeys = Object.keys(nextProps);
- var thisPropsKeys = Object.keys(this.props);
- return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) {
- return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]);
- });
- }
- }, {
- key: 'isDirty',
- value: function isDirty() {
- var _fields = this.props._fields;
- return Object.keys(_fields).some(function (name) {
- return _fields[name].dirty;
- });
- }
- }, {
- key: 'getValues',
- value: function getValues() {
- var _fields = this.props._fields;
- return Object.keys(_fields).reduce(function (accumulator, name) {
- return __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].setIn(accumulator, name, _fields[name].value);
- }, {});
- }
- }, {
- key: 'getRenderedComponent',
- value: function getRenderedComponent() {
- return this.refs.renderedComponent;
- }
- }, {
- key: 'handleChange',
- value: function handleChange(name, event) {
- var _props = this.props,
- dispatch = _props.dispatch,
- parse = _props.parse,
- normalize = _props.normalize,
- _reduxForm = _props._reduxForm;
- var value = Object(__WEBPACK_IMPORTED_MODULE_5__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize });
+/**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function getAllKeys(object) {
+ return __WEBPACK_IMPORTED_MODULE_0__baseGetAllKeys_js__["a" /* default */](object, __WEBPACK_IMPORTED_MODULE_2__keys_js__["a" /* default */], __WEBPACK_IMPORTED_MODULE_1__getSymbols_js__["a" /* default */]);
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (getAllKeys);
- dispatch(_reduxForm.change(name, value));
- }
- }, {
- key: 'handleFocus',
- value: function handleFocus(name) {
- var _props2 = this.props,
- dispatch = _props2.dispatch,
- _reduxForm = _props2._reduxForm;
- dispatch(_reduxForm.focus(name));
- }
- }, {
- key: 'handleBlur',
- value: function handleBlur(name, event) {
- var _props3 = this.props,
- dispatch = _props3.dispatch,
- parse = _props3.parse,
- normalize = _props3.normalize,
- _reduxForm = _props3._reduxForm;
+/***/ }),
+/* 578 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- var value = Object(__WEBPACK_IMPORTED_MODULE_5__events_onChangeValue__["a" /* default */])(event, { name: name, parse: parse, normalize: normalize }
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__ = __webpack_require__(579);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArray_js__ = __webpack_require__(30);
- // dispatch blur action
- );dispatch(_reduxForm.blur(name, value)
- // call post-blur callback
- );if (_reduxForm.asyncValidate) {
- _reduxForm.asyncValidate(name, value);
- }
- }
- }, {
- key: 'render',
- value: function render() {
- var _this4 = this;
- var _props4 = this.props,
- component = _props4.component,
- withRef = _props4.withRef,
- _fields = _props4._fields,
- _reduxForm = _props4._reduxForm,
- rest = _objectWithoutProperties(_props4, ['component', 'withRef', '_fields', '_reduxForm']);
+/**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return __WEBPACK_IMPORTED_MODULE_1__isArray_js__["a" /* default */](object) ? result : __WEBPACK_IMPORTED_MODULE_0__arrayPush_js__["a" /* default */](result, symbolsFunc(object));
+}
- var sectionPrefix = _reduxForm.sectionPrefix,
- form = _reduxForm.form;
+/* harmony default export */ __webpack_exports__["a"] = (baseGetAllKeys);
- var _Object$keys$reduce = Object.keys(_fields).reduce(function (accumulator, name) {
- var connectedProps = _fields[name];
- var _createFieldProps = Object(__WEBPACK_IMPORTED_MODULE_3__createFieldProps__["a" /* default */])({ getIn: getIn, toJS: toJS }, name, _extends({}, connectedProps, rest, {
- form: form,
- onBlur: _this4.onBlurFns[name],
- onChange: _this4.onChangeFns[name],
- onFocus: _this4.onFocusFns[name]
- })),
- custom = _createFieldProps.custom,
- fieldProps = _objectWithoutProperties(_createFieldProps, ['custom']);
+/***/ }),
+/* 579 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- accumulator.custom = custom;
- var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name;
- return __WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].setIn(accumulator, fieldName, fieldProps);
- }, {}),
- custom = _Object$keys$reduce.custom,
- props = _objectWithoutProperties(_Object$keys$reduce, ['custom']);
+"use strict";
+/**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
- if (withRef) {
- props.ref = 'renderedComponent';
- }
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+}
- return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(component, _extends({}, props, custom));
- }
- }]);
+/* harmony default export */ __webpack_exports__["a"] = (arrayPush);
- return ConnectedFields;
- }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
- ConnectedFields.propTypes = {
- component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string]).isRequired,
- _fields: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object.isRequired,
- props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
- };
+/***/ }),
+/* 580 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- var connector = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"])(function (state, ownProps) {
- var names = ownProps.names,
- _ownProps$_reduxForm = ownProps._reduxForm,
- initialValues = _ownProps$_reduxForm.initialValues,
- getFormState = _ownProps$_reduxForm.getFormState;
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__ = __webpack_require__(581);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__stubArray_js__ = __webpack_require__(582);
- var formState = getFormState(state);
- return {
- _fields: names.reduce(function (accumulator, name) {
- var initialState = getIn(formState, 'initial.' + name);
- var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name);
- var value = getIn(formState, 'values.' + name);
- var syncError = getSyncError(getIn(formState, 'syncErrors'), name);
- var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name);
- var submitting = getIn(formState, 'submitting');
- var pristine = value === initial;
- accumulator[name] = {
- asyncError: getIn(formState, 'asyncErrors.' + name),
- asyncValidating: getIn(formState, 'asyncValidating') === name,
- dirty: !pristine,
- pristine: pristine,
- state: getIn(formState, 'fields.' + name),
- submitError: getIn(formState, 'submitErrors.' + name),
- submitFailed: getIn(formState, 'submitFailed'),
- submitting: submitting,
- syncError: syncError,
- syncWarning: syncWarning,
- value: value,
- _value: ownProps.value // save value passed in (for checkboxes)
- };
- return accumulator;
- }, {})
- };
- }, undefined, undefined, { withRef: true });
- return connector(ConnectedFields);
+
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/** Built-in value references. */
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeGetSymbols = Object.getOwnPropertySymbols;
+
+/**
+ * Creates an array of the own enumerable symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbols = !nativeGetSymbols ? __WEBPACK_IMPORTED_MODULE_1__stubArray_js__["a" /* default */] : function(object) {
+ if (object == null) {
+ return [];
+ }
+ object = Object(object);
+ return __WEBPACK_IMPORTED_MODULE_0__arrayFilter_js__["a" /* default */](nativeGetSymbols(object), function(symbol) {
+ return propertyIsEnumerable.call(object, symbol);
+ });
};
-/* harmony default export */ __webpack_exports__["a"] = (createConnectedFields);
+/* harmony default export */ __webpack_exports__["a"] = (getSymbols);
+
/***/ }),
-/* 567 */
+/* 581 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFieldArray__ = __webpack_require__(568);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+/**
+ * A specialized version of `_.filter` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {Array} Returns the new filtered array.
+ */
+function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array == null ? 0 : array.length,
+ resIndex = 0,
+ result = [];
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[resIndex++] = value;
+ }
+ }
+ return result;
+}
+/* harmony default export */ __webpack_exports__["a"] = (arrayFilter);
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFieldArray__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
/***/ }),
-/* 568 */
+/* 582 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ConnectedFieldArray__ = __webpack_require__(569);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_prefixName__ = __webpack_require__(89);
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+/**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+function stubArray() {
+ return [];
+}
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+/* harmony default export */ __webpack_exports__["a"] = (stubArray);
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+/***/ }),
+/* 583 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DataView_js__ = __webpack_require__(584);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Map_js__ = __webpack_require__(177);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Promise_js__ = __webpack_require__(585);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Set_js__ = __webpack_require__(586);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__ = __webpack_require__(587);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__ = __webpack_require__(81);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toSource_js__ = __webpack_require__(274);
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -45095,419 +47679,318 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
-var toArray = function toArray(value) {
- return Array.isArray(value) ? value : [value];
-};
+/** `Object#toString` result references. */
+var mapTag = '[object Map]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ setTag = '[object Set]',
+ weakMapTag = '[object WeakMap]';
-var wrapError = function wrapError(fn, key) {
- return fn && function () {
- var validators = toArray(fn);
- for (var i = 0; i < validators.length; i++) {
- var result = validators[i].apply(validators, arguments);
- if (result) {
- return _defineProperty({}, key, result);
+var dataViewTag = '[object DataView]';
+
+/** Used to detect maps, sets, and weakmaps. */
+var dataViewCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */]),
+ mapCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]),
+ promiseCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */]),
+ setCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]),
+ weakMapCtorString = __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]);
+
+/**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+var getTag = __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */];
+
+// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
+if ((__WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_0__DataView_js__["a" /* default */](new ArrayBuffer(1))) != dataViewTag) ||
+ (__WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_1__Map_js__["a" /* default */]) != mapTag) ||
+ (__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */] && getTag(__WEBPACK_IMPORTED_MODULE_2__Promise_js__["a" /* default */].resolve()) != promiseTag) ||
+ (__WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_3__Set_js__["a" /* default */]) != setTag) ||
+ (__WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */] && getTag(new __WEBPACK_IMPORTED_MODULE_4__WeakMap_js__["a" /* default */]) != weakMapTag)) {
+ getTag = function(value) {
+ var result = __WEBPACK_IMPORTED_MODULE_5__baseGetTag_js__["a" /* default */](value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? __WEBPACK_IMPORTED_MODULE_6__toSource_js__["a" /* default */](Ctor) : '';
+
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
}
}
+ return result;
};
-};
+}
-var createFieldArray = function createFieldArray(_ref2) {
- var deepEqual = _ref2.deepEqual,
- getIn = _ref2.getIn,
- size = _ref2.size;
+/* harmony default export */ __webpack_exports__["a"] = (getTag);
- var ConnectedFieldArray = Object(__WEBPACK_IMPORTED_MODULE_3__ConnectedFieldArray__["a" /* default */])({
- deepEqual: deepEqual,
- getIn: getIn,
- size: size
- });
- var FieldArray = function (_Component) {
- _inherits(FieldArray, _Component);
+/***/ }),
+/* 584 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- function FieldArray(props, context) {
- _classCallCheck(this, FieldArray);
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(29);
- var _this = _possibleConstructorReturn(this, (FieldArray.__proto__ || Object.getPrototypeOf(FieldArray)).call(this, props, context));
- if (!context._reduxForm) {
- throw new Error('FieldArray must be inside a component decorated with reduxForm()');
- }
- return _this;
- }
- _createClass(FieldArray, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
- var _this2 = this;
+/* Built-in method references that are verified to be native. */
+var DataView = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'DataView');
- this.context._reduxForm.register(this.name, 'FieldArray', function () {
- return wrapError(_this2.props.validate, '_error');
- }, function () {
- return wrapError(_this2.props.warn, '_warning');
- });
- }
- }, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- if (this.props.name !== nextProps.name) {
- // unregister old name
- this.context._reduxForm.unregister(this.name
- // register new name
- );this.context._reduxForm.register(Object(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */])(this.context, nextProps.name), 'FieldArray');
- }
- }
- }, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- this.context._reduxForm.unregister(this.name);
- }
- }, {
- key: 'getRenderedComponent',
- value: function getRenderedComponent() {
- __WEBPACK_IMPORTED_MODULE_2_invariant___default()(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to FieldArray');
- return this.refs.connected.getWrappedInstance().getRenderedComponent();
- }
- }, {
- key: 'render',
- value: function render() {
- return Object(__WEBPACK_IMPORTED_MODULE_0_react__["createElement"])(ConnectedFieldArray, _extends({}, this.props, {
- name: this.name,
- syncError: this.syncError,
- syncWarning: this.syncWarning,
- _reduxForm: this.context._reduxForm,
- ref: 'connected'
- }));
- }
- }, {
- key: 'name',
- get: function get() {
- return Object(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */])(this.context, this.props.name);
- }
- }, {
- key: 'dirty',
- get: function get() {
- return this.refs.connected.getWrappedInstance().dirty;
- }
- }, {
- key: 'pristine',
- get: function get() {
- return this.refs.connected.getWrappedInstance().pristine;
- }
- }, {
- key: 'value',
- get: function get() {
- return this.refs.connected.getWrappedInstance().value;
- }
- }]);
+/* harmony default export */ __webpack_exports__["a"] = (DataView);
- return FieldArray;
- }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
- FieldArray.propTypes = {
- name: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.string.isRequired,
- component: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func.isRequired,
- props: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object,
- validate: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]),
- warn: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.func)]),
- withRef: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.bool
- };
- FieldArray.contextTypes = {
- _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
- };
+/***/ }),
+/* 585 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- return FieldArray;
-};
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(29);
+
+
+
+/* Built-in method references that are verified to be native. */
+var Promise = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Promise');
+
+/* harmony default export */ __webpack_exports__["a"] = (Promise);
-/* harmony default export */ __webpack_exports__["a"] = (createFieldArray);
/***/ }),
-/* 569 */
+/* 586 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__ = __webpack_require__(282);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_redux__ = __webpack_require__(27);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_react_redux__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_redux__ = __webpack_require__(111);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__createFieldArrayProps__ = __webpack_require__(584);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__structure_plain__ = __webpack_require__(11);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(29);
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+/* Built-in method references that are verified to be native. */
+var Set = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'Set');
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+/* harmony default export */ __webpack_exports__["a"] = (Set);
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+/***/ }),
+/* 587 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__getNative_js__ = __webpack_require__(60);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__root_js__ = __webpack_require__(29);
+/* Built-in method references that are verified to be native. */
+var WeakMap = __WEBPACK_IMPORTED_MODULE_0__getNative_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_1__root_js__["a" /* default */], 'WeakMap');
+/* harmony default export */ __webpack_exports__["a"] = (WeakMap);
+/***/ }),
+/* 588 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__ = __webpack_require__(284);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(187);
-var propsToNotUpdateFor = ['_reduxForm', 'value'];
-var createConnectedFieldArray = function createConnectedFieldArray(_ref) {
- var deepEqual = _ref.deepEqual,
- getIn = _ref.getIn,
- size = _ref.size;
- var getSyncError = function getSyncError(syncErrors, name) {
- // For an array, the error can _ONLY_ be under _error.
- // This is why this getSyncError is not the same as the
- // one in Field.
- return __WEBPACK_IMPORTED_MODULE_6__structure_plain__["a" /* default */].getIn(syncErrors, name + '._error');
- };
+/**
+ * Gets the property names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+function getMatchData(object) {
+ var result = __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */](object),
+ length = result.length;
- var getSyncWarning = function getSyncWarning(syncWarnings, name) {
- // For an array, the warning can _ONLY_ be under _warning.
- // This is why this getSyncError is not the same as the
- // one in Field.
- return getIn(syncWarnings, name + '._warning');
- };
+ while (length--) {
+ var key = result[length],
+ value = object[key];
- var ConnectedFieldArray = function (_Component) {
- _inherits(ConnectedFieldArray, _Component);
+ result[length] = [key, value, __WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__["a" /* default */](value)];
+ }
+ return result;
+}
- function ConnectedFieldArray() {
- _classCallCheck(this, ConnectedFieldArray);
+/* harmony default export */ __webpack_exports__["a"] = (getMatchData);
- var _this = _possibleConstructorReturn(this, (ConnectedFieldArray.__proto__ || Object.getPrototypeOf(ConnectedFieldArray)).call(this));
- _this.getValue = _this.getValue.bind(_this);
- return _this;
- }
+/***/ }),
+/* 589 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- _createClass(ConnectedFieldArray, [{
- key: 'shouldComponentUpdate',
- value: function shouldComponentUpdate(nextProps) {
- var _this2 = this;
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(188);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__get_js__ = __webpack_require__(590);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hasIn_js__ = __webpack_require__(591);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isKey_js__ = __webpack_require__(189);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__ = __webpack_require__(284);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__ = __webpack_require__(285);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toKey_js__ = __webpack_require__(93);
- // Update if the elements of the value array was updated.
- var thisValue = this.props.value;
- var nextValue = nextProps.value;
- if (thisValue && nextValue) {
- if (thisValue.length !== nextValue.length || nextProps.rerenderOnEveryChange && thisValue.some(function (val) {
- return nextValue.every(function (next) {
- return !deepEqual(val, next);
- });
- })) {
- return true;
- }
- }
- var nextPropsKeys = Object.keys(nextProps);
- var thisPropsKeys = Object.keys(this.props);
- return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) {
- // useful to debug rerenders
- // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) {
- // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ])
- // }
- return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]);
- });
- }
- }, {
- key: 'getRenderedComponent',
- value: function getRenderedComponent() {
- return this.refs.renderedComponent;
- }
- }, {
- key: 'getValue',
- value: function getValue(index) {
- return this.props.value && getIn(this.props.value, index);
- }
- }, {
- key: 'render',
- value: function render() {
- var _props = this.props,
- component = _props.component,
- withRef = _props.withRef,
- name = _props.name,
- _reduxForm = _props._reduxForm,
- validate = _props.validate,
- warn = _props.warn,
- rerenderOnEveryChange = _props.rerenderOnEveryChange,
- rest = _objectWithoutProperties(_props, ['component', 'withRef', 'name', '_reduxForm', 'validate', 'warn', 'rerenderOnEveryChange']);
- var props = Object(__WEBPACK_IMPORTED_MODULE_5__createFieldArrayProps__["a" /* default */])(getIn, name, _reduxForm.form, _reduxForm.sectionPrefix, this.getValue, rest);
- if (withRef) {
- props.ref = 'renderedComponent';
- }
- return Object(__WEBPACK_IMPORTED_MODULE_1_react__["createElement"])(component, props);
- }
- }, {
- key: 'dirty',
- get: function get() {
- return this.props.dirty;
- }
- }, {
- key: 'pristine',
- get: function get() {
- return this.props.pristine;
- }
- }, {
- key: 'value',
- get: function get() {
- return this.props.value;
- }
- }]);
- return ConnectedFieldArray;
- }(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]);
- ConnectedFieldArray.propTypes = {
- component: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.string]).isRequired,
- props: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object,
- rerenderOnEveryChange: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.bool
- };
- ConnectedFieldArray.defaultProps = {
- rerenderOnEveryChange: false
- };
- ConnectedFieldArray.contextTypes = {
- _reduxForm: __WEBPACK_IMPORTED_MODULE_2_prop_types___default.a.object
- };
+/** Used to compose bitmasks for value comparisons. */
+var COMPARE_PARTIAL_FLAG = 1,
+ COMPARE_UNORDERED_FLAG = 2;
+
+/**
+ * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to match.
+ * @returns {Function} Returns the new spec function.
+ */
+function baseMatchesProperty(path, srcValue) {
+ if (__WEBPACK_IMPORTED_MODULE_3__isKey_js__["a" /* default */](path) && __WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__["a" /* default */](srcValue)) {
+ return __WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_6__toKey_js__["a" /* default */](path), srcValue);
+ }
+ return function(object) {
+ var objValue = __WEBPACK_IMPORTED_MODULE_1__get_js__["a" /* default */](object, path);
+ return (objValue === undefined && objValue === srcValue)
+ ? __WEBPACK_IMPORTED_MODULE_2__hasIn_js__["a" /* default */](object, path)
+ : __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */](srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
+ };
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (baseMatchesProperty);
+
+
+/***/ }),
+/* 590 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(286);
- var connector = Object(__WEBPACK_IMPORTED_MODULE_3_react_redux__["connect"])(function (state, ownProps) {
- var name = ownProps.name,
- _ownProps$_reduxForm = ownProps._reduxForm,
- initialValues = _ownProps$_reduxForm.initialValues,
- getFormState = _ownProps$_reduxForm.getFormState;
- var formState = getFormState(state);
- var initial = getIn(formState, 'initial.' + name) || initialValues && getIn(initialValues, name);
- var value = getIn(formState, 'values.' + name);
- var submitting = getIn(formState, 'submitting');
- var syncError = getSyncError(getIn(formState, 'syncErrors'), name);
- var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name);
- var pristine = deepEqual(value, initial);
- return {
- asyncError: getIn(formState, 'asyncErrors.' + name + '._error'),
- dirty: !pristine,
- pristine: pristine,
- state: getIn(formState, 'fields.' + name),
- submitError: getIn(formState, 'submitErrors.' + name + '._error'),
- submitFailed: getIn(formState, 'submitFailed'),
- submitting: submitting,
- syncError: syncError,
- syncWarning: syncWarning,
- value: value,
- length: size(value)
- };
- }, function (dispatch, ownProps) {
- var name = ownProps.name,
- _reduxForm = ownProps._reduxForm;
- var arrayInsert = _reduxForm.arrayInsert,
- arrayMove = _reduxForm.arrayMove,
- arrayPop = _reduxForm.arrayPop,
- arrayPush = _reduxForm.arrayPush,
- arrayRemove = _reduxForm.arrayRemove,
- arrayRemoveAll = _reduxForm.arrayRemoveAll,
- arrayShift = _reduxForm.arrayShift,
- arraySplice = _reduxForm.arraySplice,
- arraySwap = _reduxForm.arraySwap,
- arrayUnshift = _reduxForm.arrayUnshift;
+/**
+ * Gets the value at `path` of `object`. If the resolved value is
+ * `undefined`, the `defaultValue` is returned in its place.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path of the property to get.
+ * @param {*} [defaultValue] The value returned for `undefined` resolved values.
+ * @returns {*} Returns the resolved value.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.get(object, 'a[0].b.c');
+ * // => 3
+ *
+ * _.get(object, ['a', '0', 'b', 'c']);
+ * // => 3
+ *
+ * _.get(object, 'a.b.c', 'default');
+ * // => 'default'
+ */
+function get(object, path, defaultValue) {
+ var result = object == null ? undefined : __WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */](object, path);
+ return result === undefined ? defaultValue : result;
+}
- return Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__["a" /* default */])({
- arrayInsert: arrayInsert,
- arrayMove: arrayMove,
- arrayPop: arrayPop,
- arrayPush: arrayPush,
- arrayRemove: arrayRemove,
- arrayRemoveAll: arrayRemoveAll,
- arrayShift: arrayShift,
- arraySplice: arraySplice,
- arraySwap: arraySwap,
- arrayUnshift: arrayUnshift
- }, function (actionCreator) {
- return Object(__WEBPACK_IMPORTED_MODULE_4_redux__["bindActionCreators"])(actionCreator.bind(null, name), dispatch);
- });
- }, undefined, { withRef: true });
- return connector(ConnectedFieldArray);
-};
+/* harmony default export */ __webpack_exports__["a"] = (get);
-/* harmony default export */ __webpack_exports__["a"] = (createConnectedFieldArray);
/***/ }),
-/* 570 */
+/* 591 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseFor_js__ = __webpack_require__(284);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(173);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__ = __webpack_require__(592);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hasPath_js__ = __webpack_require__(593);
/**
- * The base implementation of `_.forOwn` without support for iteratee shorthands.
+ * Checks if `path` is a direct or inherited property of `object`.
*
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
+ * @example
+ *
+ * var object = _.create({ 'a': _.create({ 'b': 2 }) });
+ *
+ * _.hasIn(object, 'a');
+ * // => true
+ *
+ * _.hasIn(object, 'a.b');
+ * // => true
+ *
+ * _.hasIn(object, ['a', 'b']);
+ * // => true
+ *
+ * _.hasIn(object, 'b');
+ * // => false
*/
-function baseForOwn(object, iteratee) {
- return object && Object(__WEBPACK_IMPORTED_MODULE_0__baseFor_js__["a" /* default */])(object, iteratee, __WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */]);
+function hasIn(object, path) {
+ return object != null && __WEBPACK_IMPORTED_MODULE_1__hasPath_js__["a" /* default */](object, path, __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__["a" /* default */]);
}
-/* harmony default export */ __webpack_exports__["a"] = (baseForOwn);
+/* harmony default export */ __webpack_exports__["a"] = (hasIn);
/***/ }),
-/* 571 */
+/* 592 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/**
- * Creates a base function for methods like `_.forIn` and `_.forOwn`.
+ * The base implementation of `_.hasIn` without support for deep paths.
*
* @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
+ * @param {Object} [object] The object to query.
+ * @param {Array|string} key The key to check.
+ * @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
-function createBaseFor(fromRight) {
- return function(object, iteratee, keysFunc) {
- var index = -1,
- iterable = Object(object),
- props = keysFunc(object),
- length = props.length;
-
- while (length--) {
- var key = props[fromRight ? length : ++index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
- }
- return object;
- };
+function baseHasIn(object, key) {
+ return object != null && key in Object(object);
}
-/* harmony default export */ __webpack_exports__["a"] = (createBaseFor);
+/* harmony default export */ __webpack_exports__["a"] = (baseHasIn);
/***/ }),
-/* 572 */
+/* 593 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMatches_js__ = __webpack_require__(573);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__ = __webpack_require__(576);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(182);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isArray_js__ = __webpack_require__(33);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__property_js__ = __webpack_require__(581);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(287);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(181);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(30);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isIndex_js__ = __webpack_require__(185);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isLength_js__ = __webpack_require__(182);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(93);
+
@@ -45515,628 +47998,902 @@ function createBaseFor(fromRight) {
/**
- * The base implementation of `_.iteratee`.
+ * Checks if `path` exists on `object`.
*
* @private
- * @param {*} [value=_.identity] The value to convert to an iteratee.
- * @returns {Function} Returns the iteratee.
+ * @param {Object} object The object to query.
+ * @param {Array|string} path The path to check.
+ * @param {Function} hasFunc The function to check properties.
+ * @returns {boolean} Returns `true` if `path` exists, else `false`.
*/
-function baseIteratee(value) {
- // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
- // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
- if (typeof value == 'function') {
- return value;
- }
- if (value == null) {
- return __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */];
+function hasPath(object, path, hasFunc) {
+ path = __WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */](path, object);
+
+ var index = -1,
+ length = path.length,
+ result = false;
+
+ while (++index < length) {
+ var key = __WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */](path[index]);
+ if (!(result = object != null && hasFunc(object, key))) {
+ break;
+ }
+ object = object[key];
}
- if (typeof value == 'object') {
- return Object(__WEBPACK_IMPORTED_MODULE_3__isArray_js__["a" /* default */])(value)
- ? Object(__WEBPACK_IMPORTED_MODULE_1__baseMatchesProperty_js__["a" /* default */])(value[0], value[1])
- : Object(__WEBPACK_IMPORTED_MODULE_0__baseMatches_js__["a" /* default */])(value);
+ if (result || ++index != length) {
+ return result;
}
- return Object(__WEBPACK_IMPORTED_MODULE_4__property_js__["a" /* default */])(value);
+ length = object == null ? 0 : object.length;
+ return !!length && __WEBPACK_IMPORTED_MODULE_4__isLength_js__["a" /* default */](length) && __WEBPACK_IMPORTED_MODULE_3__isIndex_js__["a" /* default */](key, length) &&
+ (__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */](object) || __WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */](object));
}
-/* harmony default export */ __webpack_exports__["a"] = (baseIteratee);
+/* harmony default export */ __webpack_exports__["a"] = (hasPath);
/***/ }),
-/* 573 */
+/* 594 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__ = __webpack_require__(574);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getMatchData_js__ = __webpack_require__(575);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__ = __webpack_require__(286);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseProperty_js__ = __webpack_require__(595);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__ = __webpack_require__(596);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isKey_js__ = __webpack_require__(189);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toKey_js__ = __webpack_require__(93);
+
/**
- * The base implementation of `_.matches` which doesn't clone `source`.
+ * Creates a function that returns the value at `path` of a given object.
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Util
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': 2 } },
+ * { 'a': { 'b': 1 } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b'));
+ * // => [2, 1]
+ *
+ * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
+ * // => [1, 2]
+ */
+function property(path) {
+ return __WEBPACK_IMPORTED_MODULE_2__isKey_js__["a" /* default */](path) ? __WEBPACK_IMPORTED_MODULE_0__baseProperty_js__["a" /* default */](__WEBPACK_IMPORTED_MODULE_3__toKey_js__["a" /* default */](path)) : __WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__["a" /* default */](path);
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (property);
+
+
+/***/ }),
+/* 595 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/**
+ * The base implementation of `_.property` without support for deep paths.
*
* @private
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new spec function.
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new accessor function.
*/
-function baseMatches(source) {
- var matchData = Object(__WEBPACK_IMPORTED_MODULE_1__getMatchData_js__["a" /* default */])(source);
- if (matchData.length == 1 && matchData[0][2]) {
- return Object(__WEBPACK_IMPORTED_MODULE_2__matchesStrictComparable_js__["a" /* default */])(matchData[0][0], matchData[0][1]);
- }
+function baseProperty(key) {
return function(object) {
- return object === source || Object(__WEBPACK_IMPORTED_MODULE_0__baseIsMatch_js__["a" /* default */])(object, source, matchData);
+ return object == null ? undefined : object[key];
};
}
-/* harmony default export */ __webpack_exports__["a"] = (baseMatches);
+/* harmony default export */ __webpack_exports__["a"] = (baseProperty);
/***/ }),
-/* 574 */
+/* 596 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(172);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__ = __webpack_require__(171);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(286);
-
-/** Used to compose bitmasks for value comparisons. */
-var COMPARE_PARTIAL_FLAG = 1,
- COMPARE_UNORDERED_FLAG = 2;
-
/**
- * The base implementation of `_.isMatch` without support for iteratee shorthands.
+ * A specialized version of `baseProperty` which supports deep paths.
*
* @private
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property values to match.
- * @param {Array} matchData The property names, values, and compare flags to match.
- * @param {Function} [customizer] The function to customize comparisons.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new accessor function.
*/
-function baseIsMatch(object, source, matchData, customizer) {
- var index = matchData.length,
- length = index,
- noCustomizer = !customizer;
+function basePropertyDeep(path) {
+ return function(object) {
+ return __WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */](object, path);
+ };
+}
- if (object == null) {
- return !length;
- }
- object = Object(object);
- while (index--) {
- var data = matchData[index];
- if ((noCustomizer && data[2])
- ? data[1] !== object[data[0]]
- : !(data[0] in object)
- ) {
- return false;
+/* harmony default export */ __webpack_exports__["a"] = (basePropertyDeep);
+
+
+/***/ }),
+/* 597 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+var getDisplayName = function getDisplayName(Comp) {
+ return Comp.displayName || Comp.name || 'Component';
+};
+
+/* harmony default export */ __webpack_exports__["a"] = (getDisplayName);
+
+/***/ }),
+/* 598 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(190);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SubmissionError__ = __webpack_require__(289);
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
+
+
+
+
+var handleSubmit = function handleSubmit(submit, props, valid, asyncValidate, fields) {
+ var dispatch = props.dispatch,
+ onSubmitFail = props.onSubmitFail,
+ onSubmitSuccess = props.onSubmitSuccess,
+ startSubmit = props.startSubmit,
+ stopSubmit = props.stopSubmit,
+ setSubmitFailed = props.setSubmitFailed,
+ setSubmitSucceeded = props.setSubmitSucceeded,
+ syncErrors = props.syncErrors,
+ touch = props.touch,
+ values = props.values,
+ persistentSubmitErrors = props.persistentSubmitErrors;
+
+
+ touch.apply(undefined, _toConsumableArray(fields)); // mark all fields as touched
+
+ if (valid || persistentSubmitErrors) {
+ var _ret = function () {
+ var doSubmit = function doSubmit() {
+ var result = void 0;
+ try {
+ result = submit(values, dispatch, props);
+ } catch (submitError) {
+ var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined;
+ stopSubmit(error);
+ setSubmitFailed.apply(undefined, _toConsumableArray(fields));
+ if (onSubmitFail) {
+ onSubmitFail(error, dispatch, submitError, props);
+ }
+ if (error || onSubmitFail) {
+ // if you've provided an onSubmitFail callback, don't re-throw the error
+ return error;
+ } else {
+ throw submitError;
+ }
+ }
+ if (__WEBPACK_IMPORTED_MODULE_0_is_promise___default.a(result)) {
+ startSubmit();
+ return result.then(function (submitResult) {
+ stopSubmit();
+ setSubmitSucceeded();
+ if (onSubmitSuccess) {
+ onSubmitSuccess(submitResult, dispatch, props);
+ }
+ return submitResult;
+ }, function (submitError) {
+ var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined;
+ stopSubmit(error);
+ setSubmitFailed.apply(undefined, _toConsumableArray(fields));
+ if (onSubmitFail) {
+ onSubmitFail(error, dispatch, submitError, props);
+ }
+ if (error || onSubmitFail) {
+ // if you've provided an onSubmitFail callback, don't re-throw the error
+ return error;
+ } else {
+ throw submitError;
+ }
+ });
+ } else {
+ setSubmitSucceeded();
+ if (onSubmitSuccess) {
+ onSubmitSuccess(result, dispatch, props);
+ }
+ }
+ return result;
+ };
+
+ var asyncValidateResult = asyncValidate && asyncValidate();
+ if (asyncValidateResult) {
+ return {
+ v: asyncValidateResult.then(function (asyncErrors) {
+ if (asyncErrors) {
+ throw asyncErrors;
+ }
+ return doSubmit();
+ }).catch(function (asyncErrors) {
+ setSubmitFailed.apply(undefined, _toConsumableArray(fields));
+ if (onSubmitFail) {
+ onSubmitFail(asyncErrors, dispatch, null, props);
+ }
+ return Promise.reject(asyncErrors);
+ })
+ };
+ } else {
+ return {
+ v: doSubmit()
+ };
+ }
+ }();
+
+ if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
+ } else {
+ setSubmitFailed.apply(undefined, _toConsumableArray(fields));
+ if (onSubmitFail) {
+ onSubmitFail(syncErrors, dispatch, null, props);
}
+ return syncErrors;
}
- while (++index < length) {
- data = matchData[index];
- var key = data[0],
- objValue = object[key],
- srcValue = data[1];
+};
- if (noCustomizer && data[2]) {
- if (objValue === undefined && !(key in object)) {
- return false;
- }
- } else {
- var stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */];
- if (customizer) {
- var result = customizer(objValue, srcValue, key, object, source, stack);
- }
- if (!(result === undefined
- ? Object(__WEBPACK_IMPORTED_MODULE_1__baseIsEqual_js__["a" /* default */])(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
- : result
- )) {
- return false;
- }
+/* harmony default export */ __webpack_exports__["a"] = (handleSubmit);
+
+/***/ }),
+/* 599 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+function _extendableBuiltin(cls) {
+ function ExtendableBuiltin() {
+ cls.apply(this, arguments);
+ }
+
+ ExtendableBuiltin.prototype = Object.create(cls.prototype, {
+ constructor: {
+ value: cls,
+ enumerable: false,
+ writable: true,
+ configurable: true
}
+ });
+
+ if (Object.setPrototypeOf) {
+ Object.setPrototypeOf(ExtendableBuiltin, cls);
+ } else {
+ ExtendableBuiltin.__proto__ = cls;
}
- return true;
+
+ return ExtendableBuiltin;
}
-/* harmony default export */ __webpack_exports__["a"] = (baseIsMatch);
+var ExtendableError = function (_extendableBuiltin2) {
+ _inherits(ExtendableError, _extendableBuiltin2);
+
+ function ExtendableError() {
+ var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
+
+ _classCallCheck(this, ExtendableError);
+
+ // extending Error is weird and does not propagate `message`
+ var _this = _possibleConstructorReturn(this, (ExtendableError.__proto__ || Object.getPrototypeOf(ExtendableError)).call(this, message));
+
+ Object.defineProperty(_this, 'message', {
+ configurable: true,
+ enumerable: false,
+ value: message,
+ writable: true
+ });
+
+ Object.defineProperty(_this, 'name', {
+ configurable: true,
+ enumerable: false,
+ value: _this.constructor.name,
+ writable: true
+ });
+
+ if (Error.hasOwnProperty('captureStackTrace')) {
+ Error.captureStackTrace(_this, _this.constructor);
+ return _possibleConstructorReturn(_this);
+ }
+
+ Object.defineProperty(_this, 'stack', {
+ configurable: true,
+ enumerable: false,
+ value: new Error(message).stack,
+ writable: true
+ });
+ return _this;
+ }
+
+ return ExtendableError;
+}(_extendableBuiltin(Error));
+
+exports.default = ExtendableError;
+module.exports = exports['default'];
+
+
+/***/ }),
+/* 600 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__silenceEvent__ = __webpack_require__(290);
+
+
+var silenceEvents = function silenceEvents(fn) {
+ return function (event) {
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+
+ return __WEBPACK_IMPORTED_MODULE_0__silenceEvent__["a" /* default */](event) ? fn.apply(undefined, args) : fn.apply(undefined, [event].concat(args));
+ };
+};
+
+/* harmony default export */ __webpack_exports__["a"] = (silenceEvents);
+
+/***/ }),
+/* 601 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(190);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__);
+
+
+var asyncValidation = function asyncValidation(fn, start, stop, field) {
+ start(field);
+ var promise = fn();
+ if (!__WEBPACK_IMPORTED_MODULE_0_is_promise___default.a(promise)) {
+ throw new Error('asyncValidate function passed to reduxForm must return a promise');
+ }
+ var handleErrors = function handleErrors(rejected) {
+ return function (errors) {
+ if (errors && Object.keys(errors).length) {
+ stop(errors);
+ return errors;
+ } else if (rejected) {
+ stop();
+ throw new Error('Asynchronous validation promise was rejected without errors.');
+ }
+ stop();
+ return Promise.resolve();
+ };
+ };
+ return promise.then(handleErrors(false), handleErrors(true));
+};
+/* harmony default export */ __webpack_exports__["a"] = (asyncValidation);
/***/ }),
-/* 575 */
+/* 602 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__ = __webpack_require__(285);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keys_js__ = __webpack_require__(173);
+var defaultShouldAsyncValidate = function defaultShouldAsyncValidate(_ref) {
+ var initialized = _ref.initialized,
+ trigger = _ref.trigger,
+ pristine = _ref.pristine,
+ syncValidationPasses = _ref.syncValidationPasses;
+ if (!syncValidationPasses) {
+ return false;
+ }
+ switch (trigger) {
+ case 'blur':
+ // blurring
+ return true;
+ case 'submit':
+ // submitting, so only async validate if form is dirty or was never initialized
+ // conversely, DON'T async validate if the form is pristine just as it was initialized
+ return !pristine || !initialized;
+ default:
+ return false;
+ }
+};
+/* harmony default export */ __webpack_exports__["a"] = (defaultShouldAsyncValidate);
-/**
- * Gets the property names, values, and compare flags of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the match data of `object`.
- */
-function getMatchData(object) {
- var result = Object(__WEBPACK_IMPORTED_MODULE_1__keys_js__["a" /* default */])(object),
- length = result.length;
+/***/ }),
+/* 603 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- while (length--) {
- var key = result[length],
- value = object[key];
+"use strict";
+var defaultShouldValidate = function defaultShouldValidate(_ref) {
+ var values = _ref.values,
+ nextProps = _ref.nextProps,
+ initialRender = _ref.initialRender,
+ lastFieldValidatorKeys = _ref.lastFieldValidatorKeys,
+ fieldValidatorKeys = _ref.fieldValidatorKeys,
+ structure = _ref.structure;
- result[length] = [key, value, Object(__WEBPACK_IMPORTED_MODULE_0__isStrictComparable_js__["a" /* default */])(value)];
+ if (initialRender) {
+ return true;
}
- return result;
-}
-
-/* harmony default export */ __webpack_exports__["a"] = (getMatchData);
+ return !structure.deepEqual(values, nextProps.values) || !structure.deepEqual(lastFieldValidatorKeys, fieldValidatorKeys);
+};
+/* harmony default export */ __webpack_exports__["a"] = (defaultShouldValidate);
/***/ }),
-/* 576 */
+/* 604 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__ = __webpack_require__(171);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__get_js__ = __webpack_require__(577);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__hasIn_js__ = __webpack_require__(578);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isKey_js__ = __webpack_require__(181);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__ = __webpack_require__(285);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__ = __webpack_require__(286);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__toKey_js__ = __webpack_require__(91);
+function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
+var splice = function splice(array, index, removeNum, value) {
+ array = array || [];
+ if (index < array.length) {
+ if (value === undefined && !removeNum) {
+ // inserting undefined
+ var _copy2 = [].concat(_toConsumableArray(array));
+ _copy2.splice(index, 0, null);
+ _copy2[index] = undefined;
+ return _copy2;
+ }
+ if (value != null) {
+ var _copy3 = [].concat(_toConsumableArray(array));
+ _copy3.splice(index, removeNum, value); // removing and adding
+ return _copy3;
+ }
+ var _copy = [].concat(_toConsumableArray(array));
+ _copy.splice(index, removeNum); // removing
+ return _copy;
+ }
+ if (removeNum) {
+ // trying to remove non-existant item: return original array
+ return array;
+ }
+ // trying to add outside of range: just set value
+ var copy = [].concat(_toConsumableArray(array));
+ copy[index] = value;
+ return copy;
+};
+/* harmony default export */ __webpack_exports__["a"] = (splice);
+/***/ }),
+/* 605 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(117);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-/** Used to compose bitmasks for value comparisons. */
-var COMPARE_PARTIAL_FLAG = 1,
- COMPARE_UNORDERED_FLAG = 2;
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-/**
- * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
- *
- * @private
- * @param {string} path The path of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new spec function.
- */
-function baseMatchesProperty(path, srcValue) {
- if (Object(__WEBPACK_IMPORTED_MODULE_3__isKey_js__["a" /* default */])(path) && Object(__WEBPACK_IMPORTED_MODULE_4__isStrictComparable_js__["a" /* default */])(srcValue)) {
- return Object(__WEBPACK_IMPORTED_MODULE_5__matchesStrictComparable_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_6__toKey_js__["a" /* default */])(path), srcValue);
+var setInWithPath = function setInWithPath(state, value, path, pathIndex) {
+ if (pathIndex >= path.length) {
+ return value;
}
- return function(object) {
- var objValue = Object(__WEBPACK_IMPORTED_MODULE_1__get_js__["a" /* default */])(object, path);
- return (objValue === undefined && objValue === srcValue)
- ? Object(__WEBPACK_IMPORTED_MODULE_2__hasIn_js__["a" /* default */])(object, path)
- : Object(__WEBPACK_IMPORTED_MODULE_0__baseIsEqual_js__["a" /* default */])(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
- };
-}
-
-/* harmony default export */ __webpack_exports__["a"] = (baseMatchesProperty);
-
-/***/ }),
-/* 577 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var first = path[pathIndex];
+ var next = setInWithPath(state && state[first], value, path, pathIndex + 1);
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(287);
+ if (!state) {
+ var initialized = isNaN(first) ? {} : [];
+ initialized[first] = next;
+ return initialized;
+ }
+ if (Array.isArray(state)) {
+ var copy = [].concat(state);
+ copy[first] = next;
+ return copy;
+ }
-/**
- * Gets the value at `path` of `object`. If the resolved value is
- * `undefined`, the `defaultValue` is returned in its place.
- *
- * @static
- * @memberOf _
- * @since 3.7.0
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.get(object, 'a[0].b.c');
- * // => 3
- *
- * _.get(object, ['a', '0', 'b', 'c']);
- * // => 3
- *
- * _.get(object, 'a.b.c', 'default');
- * // => 'default'
- */
-function get(object, path, defaultValue) {
- var result = object == null ? undefined : Object(__WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */])(object, path);
- return result === undefined ? defaultValue : result;
-}
+ return _extends({}, state, _defineProperty({}, first, next));
+};
-/* harmony default export */ __webpack_exports__["a"] = (get);
+var setIn = function setIn(state, field, value) {
+ return setInWithPath(state, value, __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](field), 0);
+};
+/* harmony default export */ __webpack_exports__["a"] = (setIn);
/***/ }),
-/* 578 */
+/* 606 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__ = __webpack_require__(579);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__hasPath_js__ = __webpack_require__(580);
-
-
-
-/**
- * Checks if `path` is a direct or inherited property of `object`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- * @example
- *
- * var object = _.create({ 'a': _.create({ 'b': 2 }) });
- *
- * _.hasIn(object, 'a');
- * // => true
- *
- * _.hasIn(object, 'a.b');
- * // => true
- *
- * _.hasIn(object, ['a', 'b']);
- * // => true
- *
- * _.hasIn(object, 'b');
- * // => false
- */
-function hasIn(object, path) {
- return object != null && Object(__WEBPACK_IMPORTED_MODULE_1__hasPath_js__["a" /* default */])(object, path, __WEBPACK_IMPORTED_MODULE_0__baseHasIn_js__["a" /* default */]);
-}
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__ = __webpack_require__(293);
-/* harmony default export */ __webpack_exports__["a"] = (hasIn);
-/***/ }),
-/* 579 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var customizer = function customizer(obj, other) {
+ if (obj === other) return true;
+ if ((obj == null || obj === '' || obj === false) && (other == null || other === '' || other === false)) return true;
-"use strict";
-/**
- * The base implementation of `_.hasIn` without support for deep paths.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {Array|string} key The key to check.
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
- */
-function baseHasIn(object, key) {
- return object != null && key in Object(object);
-}
+ if (obj && other && obj._error !== other._error) return false;
+ if (obj && other && obj._warning !== other._warning) return false;
+};
-/* harmony default export */ __webpack_exports__["a"] = (baseHasIn);
+var deepEqual = function deepEqual(a, b) {
+ return __WEBPACK_IMPORTED_MODULE_0_lodash_es_isEqualWith__["a" /* default */](a, b, customizer);
+};
+/* harmony default export */ __webpack_exports__["a"] = (deepEqual);
/***/ }),
-/* 580 */
+/* 607 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__castPath_js__ = __webpack_require__(288);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArguments_js__ = __webpack_require__(174);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isArray_js__ = __webpack_require__(33);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isIndex_js__ = __webpack_require__(177);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isLength_js__ = __webpack_require__(179);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__toKey_js__ = __webpack_require__(91);
-
-
-
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(117);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-/**
- * Checks if `path` exists on `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @param {Function} hasFunc The function to check properties.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- */
-function hasPath(object, path, hasFunc) {
- path = Object(__WEBPACK_IMPORTED_MODULE_0__castPath_js__["a" /* default */])(path, object);
+function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
- var index = -1,
- length = path.length,
- result = false;
+var deleteInWithPath = function deleteInWithPath(state, first) {
+ for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
+ rest[_key - 2] = arguments[_key];
+ }
- while (++index < length) {
- var key = Object(__WEBPACK_IMPORTED_MODULE_5__toKey_js__["a" /* default */])(path[index]);
- if (!(result = object != null && hasFunc(object, key))) {
- break;
+ if (state === undefined || first === undefined) {
+ return state;
+ }
+ if (rest.length) {
+ if (Array.isArray(state)) {
+ if (first < state.length) {
+ var result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest));
+ if (result !== state[first]) {
+ var copy = [].concat(_toConsumableArray(state));
+ copy[first] = result;
+ return copy;
+ }
+ }
+ return state;
}
- object = object[key];
+ if (first in state) {
+ var _result = deleteInWithPath.apply(undefined, [state && state[first]].concat(rest));
+ return state[first] === _result ? state : _extends({}, state, _defineProperty({}, first, _result));
+ }
+ return state;
}
- if (result || ++index != length) {
- return result;
+ if (Array.isArray(state)) {
+ if (isNaN(first)) {
+ throw new Error('Cannot delete non-numerical index from an array');
+ }
+ if (first < state.length) {
+ var _copy = [].concat(_toConsumableArray(state));
+ _copy.splice(first, 1);
+ return _copy;
+ }
+ return state;
}
- length = object == null ? 0 : object.length;
- return !!length && Object(__WEBPACK_IMPORTED_MODULE_4__isLength_js__["a" /* default */])(length) && Object(__WEBPACK_IMPORTED_MODULE_3__isIndex_js__["a" /* default */])(key, length) &&
- (Object(__WEBPACK_IMPORTED_MODULE_2__isArray_js__["a" /* default */])(object) || Object(__WEBPACK_IMPORTED_MODULE_1__isArguments_js__["a" /* default */])(object));
-}
+ if (first in state) {
+ var _copy2 = _extends({}, state);
+ delete _copy2[first];
+ return _copy2;
+ }
+ return state;
+};
-/* harmony default export */ __webpack_exports__["a"] = (hasPath);
+var deleteIn = function deleteIn(state, field) {
+ return deleteInWithPath.apply(undefined, [state].concat(_toConsumableArray(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */](field))));
+};
+/* harmony default export */ __webpack_exports__["a"] = (deleteIn);
/***/ }),
-/* 581 */
+/* 608 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseProperty_js__ = __webpack_require__(582);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__ = __webpack_require__(583);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isKey_js__ = __webpack_require__(181);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__toKey_js__ = __webpack_require__(91);
+var keys = function keys(value) {
+ return value ? Object.keys(value) : [];
+};
+/* harmony default export */ __webpack_exports__["a"] = (keys);
+/***/ }),
+/* 609 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__structure_plain__ = __webpack_require__(48);
-/**
- * Creates a function that returns the value at `path` of a given object.
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Util
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new accessor function.
- * @example
- *
- * var objects = [
- * { 'a': { 'b': 2 } },
- * { 'a': { 'b': 1 } }
- * ];
- *
- * _.map(objects, _.property('a.b'));
- * // => [2, 1]
- *
- * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
- * // => [1, 2]
- */
-function property(path) {
- return Object(__WEBPACK_IMPORTED_MODULE_2__isKey_js__["a" /* default */])(path) ? Object(__WEBPACK_IMPORTED_MODULE_0__baseProperty_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_3__toKey_js__["a" /* default */])(path)) : Object(__WEBPACK_IMPORTED_MODULE_1__basePropertyDeep_js__["a" /* default */])(path);
-}
+var toArray = function toArray(value) {
+ return Array.isArray(value) ? value : [value];
+};
-/* harmony default export */ __webpack_exports__["a"] = (property);
+var getError = function getError(value, values, props, validators) {
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+ try {
+ for (var _iterator = toArray(validators)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var validator = _step.value;
-/***/ }),
-/* 582 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var error = validator(value, values, props);
+ if (error) {
+ return error;
+ }
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
+};
-"use strict";
-/**
- * The base implementation of `_.property` without support for deep paths.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new accessor function.
- */
-function baseProperty(key) {
- return function(object) {
- return object == null ? undefined : object[key];
+var generateValidator = function generateValidator(validators, _ref) {
+ var getIn = _ref.getIn;
+ return function (values, props) {
+ var errors = {};
+ Object.keys(validators).forEach(function (name) {
+ var value = getIn(values, name);
+ var error = getError(value, values, props, validators[name]);
+ if (error) {
+ errors = __WEBPACK_IMPORTED_MODULE_0__structure_plain__["a" /* default */].setIn(errors, name, error);
+ }
+ });
+ return errors;
};
-}
-
-/* harmony default export */ __webpack_exports__["a"] = (baseProperty);
+};
+/* harmony default export */ __webpack_exports__["a"] = (generateValidator);
/***/ }),
-/* 583 */
+/* 610 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGet_js__ = __webpack_require__(287);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__structure_plain_getIn__ = __webpack_require__(292);
-/**
- * A specialized version of `baseProperty` which supports deep paths.
- *
- * @private
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new accessor function.
- */
-function basePropertyDeep(path) {
- return function(object) {
- return Object(__WEBPACK_IMPORTED_MODULE_0__baseGet_js__["a" /* default */])(object, path);
- };
-}
+var getErrorKeys = function getErrorKeys(name, type) {
+ switch (type) {
+ case 'Field':
+ return [name, name + '._error'];
+ case 'FieldArray':
+ return [name + '._error'];
+ }
+};
-/* harmony default export */ __webpack_exports__["a"] = (basePropertyDeep);
+var createHasError = function createHasError(_ref) {
+ var getIn = _ref.getIn;
+
+ var hasError = function hasError(field, syncErrors, asyncErrors, submitErrors) {
+ if (!syncErrors && !asyncErrors && !submitErrors) {
+ return false;
+ }
+
+ var name = getIn(field, 'name');
+ var type = getIn(field, 'type');
+ return getErrorKeys(name, type).some(function (key) {
+ return __WEBPACK_IMPORTED_MODULE_0__structure_plain_getIn__["a" /* default */](syncErrors, key) || getIn(asyncErrors, key) || getIn(submitErrors, key);
+ });
+ };
+ return hasError;
+};
+/* harmony default export */ __webpack_exports__["a"] = (createHasError);
/***/ }),
-/* 584 */
+/* 611 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ConnectedField__ = __webpack_require__(612);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__ = __webpack_require__(192);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_prefixName__ = __webpack_require__(125);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
-var createFieldArrayProps = function createFieldArrayProps(getIn, name, form, sectionPrefix, getValue, _ref) {
- var arrayInsert = _ref.arrayInsert,
- arrayMove = _ref.arrayMove,
- arrayPop = _ref.arrayPop,
- arrayPush = _ref.arrayPush,
- arrayRemove = _ref.arrayRemove,
- arrayRemoveAll = _ref.arrayRemoveAll,
- arrayShift = _ref.arrayShift,
- arraySplice = _ref.arraySplice,
- arraySwap = _ref.arraySwap,
- arrayUnshift = _ref.arrayUnshift,
- asyncError = _ref.asyncError,
- dirty = _ref.dirty,
- length = _ref.length,
- pristine = _ref.pristine,
- submitError = _ref.submitError,
- state = _ref.state,
- submitFailed = _ref.submitFailed,
- submitting = _ref.submitting,
- syncError = _ref.syncError,
- syncWarning = _ref.syncWarning,
- value = _ref.value,
- props = _ref.props,
- rest = _objectWithoutProperties(_ref, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncError', 'dirty', 'length', 'pristine', 'submitError', 'state', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'value', 'props']);
-
- var error = syncError || asyncError || submitError;
- var warning = syncWarning;
- var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name;
- var finalProps = _extends({
- fields: {
- _isFieldArray: true,
- forEach: function forEach(callback) {
- return (value || []).forEach(function (item, index) {
- return callback(fieldName + '[' + index + ']', index, finalProps.fields);
- });
- },
- get: getValue,
- getAll: function getAll() {
- return value;
- },
- insert: arrayInsert,
- length: length,
- map: function map(callback) {
- return (value || []).map(function (item, index) {
- return callback(fieldName + '[' + index + ']', index, finalProps.fields);
- });
- },
- move: arrayMove,
- name: name,
- pop: function pop() {
- arrayPop();
- return getIn(value, length - 1);
- },
- push: arrayPush,
- reduce: function reduce(callback, initial) {
- return (value || []).reduce(function (accumulator, item, index) {
- return callback(accumulator, fieldName + '[' + index + ']', index, finalProps.fields);
- }, initial);
- },
- remove: arrayRemove,
- removeAll: arrayRemoveAll,
- shift: function shift() {
- arrayShift();
- return getIn(value, 0);
- },
- swap: arraySwap,
- unshift: arrayUnshift
- },
- meta: {
- dirty: dirty,
- error: error,
- form: form,
- warning: warning,
- invalid: !!error,
- pristine: pristine,
- submitting: submitting,
- submitFailed: submitFailed,
- valid: !error
- }
- }, props, rest);
- return finalProps;
-};
-
-/* harmony default export */ __webpack_exports__["a"] = (createFieldArrayProps);
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-/***/ }),
-/* 585 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFormValueSelector__ = __webpack_require__(586);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFormValueSelector__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
-/***/ }),
-/* 586 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(20);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
-var createFormValueSelector = function createFormValueSelector(_ref) {
- var getIn = _ref.getIn;
- return function (form) {
- var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
- return getIn(state, 'form');
- };
+var createField = function createField(_ref) {
+ var deepEqual = _ref.deepEqual,
+ getIn = _ref.getIn,
+ setIn = _ref.setIn,
+ toJS = _ref.toJS;
- __WEBPACK_IMPORTED_MODULE_0_invariant___default()(form, 'Form value must be specified');
- return function (state) {
- for (var _len = arguments.length, fields = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- fields[_key - 1] = arguments[_key];
+
+ var ConnectedField = __WEBPACK_IMPORTED_MODULE_2__ConnectedField__["a" /* default */]({
+ deepEqual: deepEqual,
+ getIn: getIn,
+ toJS: toJS
+ });
+
+ var Field = function (_Component) {
+ _inherits(Field, _Component);
+
+ function Field(props, context) {
+ _classCallCheck(this, Field);
+
+ var _this = _possibleConstructorReturn(this, (Field.__proto__ || Object.getPrototypeOf(Field)).call(this, props, context));
+
+ if (!context._reduxForm) {
+ throw new Error('Field must be inside a component decorated with reduxForm()');
}
- __WEBPACK_IMPORTED_MODULE_0_invariant___default()(fields.length, 'No fields specified');
- return fields.length === 1 ? // only selecting one field, so return its value
- getIn(getFormState(state), form + '.values.' + fields[0]) : // selecting many fields, so return an object of field values
- fields.reduce(function (accumulator, field) {
- var value = getIn(getFormState(state), form + '.values.' + field);
- return value === undefined ? accumulator : __WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */].setIn(accumulator, field, value);
- }, {});
- };
- };
-};
+ _this.normalize = _this.normalize.bind(_this);
+ return _this;
+ }
-/* harmony default export */ __webpack_exports__["a"] = (createFormValueSelector);
+ _createClass(Field, [{
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps, nextState) {
+ return __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__["a" /* default */](this, nextProps, nextState);
+ }
+ }, {
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ var _this2 = this;
-/***/ }),
-/* 587 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ this.context._reduxForm.register(this.name, 'Field', function () {
+ return _this2.props.validate;
+ }, function () {
+ return _this2.props.warn;
+ });
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ if (this.props.name !== nextProps.name) {
+ // unregister old name
+ this.context._reduxForm.unregister(this.name);
+ // register new name
+ this.context._reduxForm.register(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, nextProps.name), 'Field');
+ }
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ this.context._reduxForm.unregister(this.name);
+ }
+ }, {
+ key: 'getRenderedComponent',
+ value: function getRenderedComponent() {
+ __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Field');
+ return this.refs.connected.getWrappedInstance().getRenderedComponent();
+ }
+ }, {
+ key: 'normalize',
+ value: function normalize(name, value) {
+ var normalize = this.props.normalize;
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createFormValues__ = __webpack_require__(588);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+ if (!normalize) {
+ return value;
+ }
+ var previousValues = this.context._reduxForm.getValues();
+ var previousValue = this.value;
+ var nextValues = setIn(previousValues, name, value);
+ return normalize(value, previousValue, nextValues, previousValues);
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ConnectedField, _extends({}, this.props, {
+ name: this.name,
+ normalize: this.normalize,
+ _reduxForm: this.context._reduxForm,
+ ref: 'connected'
+ }));
+ }
+ }, {
+ key: 'name',
+ get: function get() {
+ return __WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, this.props.name);
+ }
+ }, {
+ key: 'dirty',
+ get: function get() {
+ return !this.pristine;
+ }
+ }, {
+ key: 'pristine',
+ get: function get() {
+ return this.refs.connected.getWrappedInstance().isPristine();
+ }
+ }, {
+ key: 'value',
+ get: function get() {
+ return this.refs.connected && this.refs.connected.getWrappedInstance().getValue();
+ }
+ }]);
+ return Field;
+ }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
+
+ Field.propTypes = {
+ name: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string.isRequired,
+ component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired,
+ format: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func,
+ normalize: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func,
+ onBlur: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func,
+ onChange: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func,
+ onFocus: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func,
+ onDragStart: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func,
+ onDrop: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func,
+ parse: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func,
+ props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object
+ };
+ Field.contextTypes = {
+ _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object
+ };
+ return Field;
+};
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createFormValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+/* harmony default export */ __webpack_exports__["a"] = (createField);
/***/ }),
-/* 588 */
+/* 612 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(27);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_prefixName__ = __webpack_require__(89);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(19);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createFieldProps__ = __webpack_require__(294);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__structure_plain__ = __webpack_require__(48);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__ = __webpack_require__(295);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_eventConsts__ = __webpack_require__(615);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
@@ -46148,603 +48905,1021 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
-var createValues = function createValues(_ref) {
- var getIn = _ref.getIn;
- return function () {
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- var valuesMap = void 0;
- if (typeof args[0] === 'string') {
- valuesMap = args.map(function (k) {
- return { prop: k, path: k };
- });
- } else {
- var config = args[0];
- valuesMap = Object.keys(config).map(function (k) {
- return {
- prop: k,
- path: config[k]
- };
- });
- }
- if (!valuesMap.length) {
- throw new Error('formValues(): You must specify values to get as formValues(name1, name2, ...) or formValues({propName1: propPath1, ...})');
- }
+var propsToNotUpdateFor = ['_reduxForm'];
- // create a class that reads current form name and creates a selector
- // return
- return function (Component) {
- var FormValues = function (_React$Component) {
- _inherits(FormValues, _React$Component);
+var createConnectedField = function createConnectedField(_ref) {
+ var deepEqual = _ref.deepEqual,
+ getIn = _ref.getIn,
+ toJS = _ref.toJS;
- function FormValues(props, context) {
- _classCallCheck(this, FormValues);
- var _this = _possibleConstructorReturn(this, (FormValues.__proto__ || Object.getPrototypeOf(FormValues)).call(this, props, context));
+ var getSyncError = function getSyncError(syncErrors, name) {
+ var error = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncErrors, name);
+ // Because the error for this field might not be at a level in the error structure where
+ // it can be set directly, it might need to be unwrapped from the _error property
+ return error && error._error ? error._error : error;
+ };
- if (!context._reduxForm) {
- throw new Error('formValues() must be used inside a React tree decorated with reduxForm()');
- }
- var getValues = context._reduxForm.getValues;
-
- var formValuesSelector = function formValuesSelector(_) {
- // Yes, we're only using connect() for listening to updates
- var props = {};
- var values = getValues();
- valuesMap.forEach(function (_ref2) {
- var prop = _ref2.prop,
- path = _ref2.path;
- return props[prop] = getIn(values, Object(__WEBPACK_IMPORTED_MODULE_3__util_prefixName__["a" /* default */])(context, path));
- });
- return props;
- };
- _this.Component = Object(__WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"])(formValuesSelector, function () {
- return {};
- } // ignore dispatch
- )(Component);
- return _this;
- }
+ var getSyncWarning = function getSyncWarning(syncWarnings, name) {
+ var warning = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncWarnings, name);
+ // Because the warning for this field might not be at a level in the warning structure where
+ // it can be set directly, it might need to be unwrapped from the _warning property
+ return warning && warning._warning ? warning._warning : warning;
+ };
- _createClass(FormValues, [{
- key: 'render',
- value: function render() {
- return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(this.Component, this.props);
- }
- }]);
+ var ConnectedField = function (_Component) {
+ _inherits(ConnectedField, _Component);
- return FormValues;
- }(__WEBPACK_IMPORTED_MODULE_0_react___default.a.Component);
+ function ConnectedField(props) {
+ _classCallCheck(this, ConnectedField);
- FormValues.contextTypes = {
- _reduxForm: __WEBPACK_IMPORTED_MODULE_1_prop_types___default.a.object
- };
- return FormValues;
- };
- };
-};
+ var _this = _possibleConstructorReturn(this, (ConnectedField.__proto__ || Object.getPrototypeOf(ConnectedField)).call(this, props));
-/* harmony default export */ __webpack_exports__["a"] = (createValues);
+ _this.handleChange = _this.handleChange.bind(_this);
+ _this.handleFocus = _this.handleFocus.bind(_this);
+ _this.handleBlur = _this.handleBlur.bind(_this);
+ _this.handleDragStart = _this.handleDragStart.bind(_this);
+ _this.handleDrop = _this.handleDrop.bind(_this);
+ return _this;
+ }
-/***/ }),
-/* 589 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ _createClass(ConnectedField, [{
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps) {
+ var _this2 = this;
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormNames__ = __webpack_require__(590);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+ var nextPropsKeys = Object.keys(nextProps);
+ var thisPropsKeys = Object.keys(this.props);
+ return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) {
+ return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]);
+ });
+ }
+ }, {
+ key: 'isPristine',
+ value: function isPristine() {
+ return this.props.pristine;
+ }
+ }, {
+ key: 'getValue',
+ value: function getValue() {
+ return this.props.value;
+ }
+ }, {
+ key: 'getRenderedComponent',
+ value: function getRenderedComponent() {
+ return this.refs.renderedComponent;
+ }
+ }, {
+ key: 'handleChange',
+ value: function handleChange(event) {
+ var _props = this.props,
+ name = _props.name,
+ dispatch = _props.dispatch,
+ parse = _props.parse,
+ normalize = _props.normalize,
+ onChange = _props.onChange,
+ _reduxForm = _props._reduxForm,
+ previousValue = _props.value;
+
+ var newValue = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize });
+ var defaultPrevented = false;
+ if (onChange) {
+ onChange(_extends({}, event, {
+ preventDefault: function preventDefault() {
+ defaultPrevented = true;
+ return event.preventDefault();
+ }
+ }), newValue, previousValue);
+ }
+ if (!defaultPrevented) {
+ // dispatch change action
+ dispatch(_reduxForm.change(name, newValue));
+ }
+ }
+ }, {
+ key: 'handleFocus',
+ value: function handleFocus(event) {
+ var _props2 = this.props,
+ name = _props2.name,
+ dispatch = _props2.dispatch,
+ onFocus = _props2.onFocus,
+ _reduxForm = _props2._reduxForm;
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormNames__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+ var defaultPrevented = false;
+ if (onFocus) {
+ onFocus(_extends({}, event, {
+ preventDefault: function preventDefault() {
+ defaultPrevented = true;
+ return event.preventDefault();
+ }
+ }));
+ }
-/***/ }),
-/* 590 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ if (!defaultPrevented) {
+ dispatch(_reduxForm.focus(name));
+ }
+ }
+ }, {
+ key: 'handleBlur',
+ value: function handleBlur(event) {
+ var _props3 = this.props,
+ name = _props3.name,
+ dispatch = _props3.dispatch,
+ parse = _props3.parse,
+ normalize = _props3.normalize,
+ onBlur = _props3.onBlur,
+ _reduxForm = _props3._reduxForm,
+ _value = _props3._value,
+ previousValue = _props3.value;
-"use strict";
-var createGetFormNames = function createGetFormNames(_ref) {
- var getIn = _ref.getIn,
- keys = _ref.keys;
- return function () {
- var getFormState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (state) {
- return getIn(state, 'form');
- };
- return function (state) {
- return keys(getFormState(state));
- };
- };
-};
+ var newValue = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize });
-/* harmony default export */ __webpack_exports__["a"] = (createGetFormNames);
+ // for checkbox and radio, if the value property of checkbox or radio equals
+ // the value passed by blur event, then fire blur action with previousValue.
+ if (newValue === _value && _value !== undefined) {
+ newValue = previousValue;
+ }
-/***/ }),
-/* 591 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var defaultPrevented = false;
+ if (onBlur) {
+ onBlur(_extends({}, event, {
+ preventDefault: function preventDefault() {
+ defaultPrevented = true;
+ return event.preventDefault();
+ }
+ }), newValue, previousValue);
+ }
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormValues__ = __webpack_require__(592);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+ if (!defaultPrevented) {
+ // dispatch blur action
+ dispatch(_reduxForm.blur(name, newValue));
+ // call post-blur callback
+ if (_reduxForm.asyncValidate) {
+ _reduxForm.asyncValidate(name, newValue);
+ }
+ }
+ }
+ }, {
+ key: 'handleDragStart',
+ value: function handleDragStart(event) {
+ var _props4 = this.props,
+ onDragStart = _props4.onDragStart,
+ value = _props4.value;
+ event.dataTransfer.setData(__WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */], value == null ? '' : value);
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+ if (onDragStart) {
+ onDragStart(event);
+ }
+ }
+ }, {
+ key: 'handleDrop',
+ value: function handleDrop(event) {
+ var _props5 = this.props,
+ name = _props5.name,
+ dispatch = _props5.dispatch,
+ onDrop = _props5.onDrop,
+ _reduxForm = _props5._reduxForm,
+ previousValue = _props5.value;
-/***/ }),
-/* 592 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var newValue = event.dataTransfer.getData(__WEBPACK_IMPORTED_MODULE_5__util_eventConsts__["a" /* dataKey */]);
-"use strict";
-var createGetFormValues = function createGetFormValues(_ref) {
- var getIn = _ref.getIn;
- return function (form) {
- var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
- return getIn(state, 'form');
- };
- return function (state) {
- return getIn(getFormState(state), form + '.values');
- };
- };
-};
+ var defaultPrevented = false;
+ if (onDrop) {
+ onDrop(_extends({}, event, {
+ preventDefault: function preventDefault() {
+ defaultPrevented = true;
+ return event.preventDefault();
+ }
+ }), newValue, previousValue);
+ }
-/* harmony default export */ __webpack_exports__["a"] = (createGetFormValues);
+ if (!defaultPrevented) {
+ // dispatch change action
+ dispatch(_reduxForm.change(name, newValue));
+ event.preventDefault();
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props6 = this.props,
+ component = _props6.component,
+ withRef = _props6.withRef,
+ name = _props6.name,
+ _reduxForm = _props6._reduxForm,
+ normalize = _props6.normalize,
+ onBlur = _props6.onBlur,
+ onChange = _props6.onChange,
+ onFocus = _props6.onFocus,
+ onDragStart = _props6.onDragStart,
+ onDrop = _props6.onDrop,
+ rest = _objectWithoutProperties(_props6, ['component', 'withRef', 'name', '_reduxForm', 'normalize', 'onBlur', 'onChange', 'onFocus', 'onDragStart', 'onDrop']);
-/***/ }),
-/* 593 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var _createFieldProps = __WEBPACK_IMPORTED_MODULE_2__createFieldProps__["a" /* default */]({ getIn: getIn, toJS: toJS }, name, _extends({}, rest, {
+ form: _reduxForm.form,
+ onBlur: this.handleBlur,
+ onChange: this.handleChange,
+ onDrop: this.handleDrop,
+ onDragStart: this.handleDragStart,
+ onFocus: this.handleFocus
+ })),
+ custom = _createFieldProps.custom,
+ props = _objectWithoutProperties(_createFieldProps, ['custom']);
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormInitialValues__ = __webpack_require__(594);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+ if (withRef) {
+ custom.ref = 'renderedComponent';
+ }
+ if (typeof component === 'string') {
+ var input = props.input,
+ meta = props.meta; // eslint-disable-line no-unused-vars
+ // flatten input into other props
+ return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, input, custom));
+ } else {
+ return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, props, custom));
+ }
+ }
+ }]);
+ return ConnectedField;
+ }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormInitialValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+ ConnectedField.propTypes = {
+ component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired,
+ props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object
+ };
-/***/ }),
-/* 594 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var connector = __WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"](function (state, ownProps) {
+ var name = ownProps.name,
+ _ownProps$_reduxForm = ownProps._reduxForm,
+ initialValues = _ownProps$_reduxForm.initialValues,
+ getFormState = _ownProps$_reduxForm.getFormState;
-"use strict";
-var createGetFormInitialValues = function createGetFormInitialValues(_ref) {
- var getIn = _ref.getIn;
- return function (form) {
- var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
- return getIn(state, 'form');
- };
- return function (state) {
- return getIn(getFormState(state), form + '.initial');
+ var formState = getFormState(state);
+ var initialState = getIn(formState, 'initial.' + name);
+ var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name);
+ var value = getIn(formState, 'values.' + name);
+ var submitting = getIn(formState, 'submitting');
+ var syncError = getSyncError(getIn(formState, 'syncErrors'), name);
+ var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name);
+ var pristine = value === initial;
+ return {
+ asyncError: getIn(formState, 'asyncErrors.' + name),
+ asyncValidating: getIn(formState, 'asyncValidating') === name,
+ dirty: !pristine,
+ pristine: pristine,
+ state: getIn(formState, 'fields.' + name),
+ submitError: getIn(formState, 'submitErrors.' + name),
+ submitFailed: getIn(formState, 'submitFailed'),
+ submitting: submitting,
+ syncError: syncError,
+ syncWarning: syncWarning,
+ value: value,
+ _value: ownProps.value // save value passed in (for checkboxes)
};
- };
+ }, undefined, undefined, { withRef: true });
+ return connector(ConnectedField);
};
-/* harmony default export */ __webpack_exports__["a"] = (createGetFormInitialValues);
+/* harmony default export */ __webpack_exports__["a"] = (createConnectedField);
/***/ }),
-/* 595 */
+/* 613 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncErrors__ = __webpack_require__(596);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isEvent__ = __webpack_require__(291);
+
+
+var getSelectedValues = function getSelectedValues(options) {
+ var result = [];
+ if (options) {
+ for (var index = 0; index < options.length; index++) {
+ var option = options[index];
+ if (option.selected) {
+ result.push(option.value);
+ }
+ }
+ }
+ return result;
+};
+var getValue = function getValue(event, isReactNative) {
+ if (__WEBPACK_IMPORTED_MODULE_0__isEvent__["a" /* default */](event)) {
+ if (!isReactNative && event.nativeEvent && event.nativeEvent.text !== undefined) {
+ return event.nativeEvent.text;
+ }
+ if (isReactNative && event.nativeEvent !== undefined) {
+ return event.nativeEvent.text;
+ }
+ var _event$target = event.target,
+ type = _event$target.type,
+ value = _event$target.value,
+ checked = _event$target.checked,
+ files = _event$target.files,
+ dataTransfer = event.dataTransfer;
+ if (type === 'checkbox') {
+ return checked;
+ }
+ if (type === 'file') {
+ return files || dataTransfer && dataTransfer.files;
+ }
+ if (type === 'select-multiple') {
+ return getSelectedValues(event.target.options);
+ }
+ return value;
+ }
+ return event;
+};
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncErrors__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+/* harmony default export */ __webpack_exports__["a"] = (getValue);
/***/ }),
-/* 596 */
+/* 614 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-var createGetFormSyncErrors = function createGetFormSyncErrors(_ref) {
- var getIn = _ref.getIn;
- return function (form) {
- var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
- return getIn(state, 'form');
- };
- return function (state) {
- return getIn(getFormState(state), form + '.syncErrors');
- };
- };
-};
+var isReactNative = typeof window !== 'undefined' && window.navigator && window.navigator.product && window.navigator.product === 'ReactNative';
-/* harmony default export */ __webpack_exports__["a"] = (createGetFormSyncErrors);
+/* harmony default export */ __webpack_exports__["a"] = (isReactNative);
/***/ }),
-/* 597 */
+/* 615 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormMeta__ = __webpack_require__(598);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
-
-
-
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormMeta__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return dataKey; });
+var dataKey = 'text';
/***/ }),
-/* 598 */
+/* 616 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-var createGetFormMeta = function createGetFormMeta(_ref) {
- var getIn = _ref.getIn;
- return function (form) {
- var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
- return getIn(state, 'form');
- };
- return function (state) {
- return getIn(getFormState(state), form + '.fields');
- };
- };
-};
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ConnectedFields__ = __webpack_require__(617);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__ = __webpack_require__(192);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__structure_plain__ = __webpack_require__(48);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__util_prefixName__ = __webpack_require__(125);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-/* harmony default export */ __webpack_exports__["a"] = (createGetFormMeta);
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-/***/ }),
-/* 599 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormAsyncErrors__ = __webpack_require__(600);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormAsyncErrors__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
-/***/ }),
-/* 600 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-var createGetFormAsyncErrors = function createGetFormAsyncErrors(_ref) {
- var getIn = _ref.getIn;
- return function (form) {
- var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
- return getIn(state, 'form');
- };
- return function (state) {
- return getIn(getFormState(state), form + '.asyncErrors');
- };
- };
+
+
+
+
+var validateNameProp = function validateNameProp(prop) {
+ if (!prop) {
+ return new Error('No "names" prop was specified ');
+ }
+ if (!Array.isArray(prop) && !prop._isFieldArray) {
+ return new Error('Invalid prop "names" supplied to . Must be either an array of strings or the fields array generated by FieldArray.');
+ }
};
-/* harmony default export */ __webpack_exports__["a"] = (createGetFormAsyncErrors);
+var createFields = function createFields(_ref) {
+ var deepEqual = _ref.deepEqual,
+ getIn = _ref.getIn,
+ toJS = _ref.toJS,
+ size = _ref.size;
-/***/ }),
-/* 601 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncWarnings__ = __webpack_require__(602);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+ var ConnectedFields = __WEBPACK_IMPORTED_MODULE_2__ConnectedFields__["a" /* default */]({
+ deepEqual: deepEqual,
+ getIn: getIn,
+ toJS: toJS,
+ size: size
+ });
+ var Fields = function (_Component) {
+ _inherits(Fields, _Component);
+ function Fields(props, context) {
+ _classCallCheck(this, Fields);
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormSyncWarnings__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+ var _this = _possibleConstructorReturn(this, (Fields.__proto__ || Object.getPrototypeOf(Fields)).call(this, props, context));
-/***/ }),
-/* 602 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ if (!context._reduxForm) {
+ throw new Error('Fields must be inside a component decorated with reduxForm()');
+ }
+ return _this;
+ }
-"use strict";
-var createGetFormSyncWarnings = function createGetFormSyncWarnings(_ref) {
- var getIn = _ref.getIn;
- return function (form) {
- var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
- return getIn(state, 'form');
- };
- return function (state) {
- return getIn(getFormState(state), form + '.syncWarnings');
- };
- };
-};
+ _createClass(Fields, [{
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps, nextState) {
+ return __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__["a" /* default */](this, nextProps, nextState);
+ }
+ }, {
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ var error = validateNameProp(this.props.names);
+ if (error) {
+ throw error;
+ }
+ var context = this.context;
+ var register = context._reduxForm.register;
-/* harmony default export */ __webpack_exports__["a"] = (createGetFormSyncWarnings);
+ this.names.forEach(function (name) {
+ return register(name, 'Field');
+ });
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ var _this2 = this;
-/***/ }),
-/* 603 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ if (!__WEBPACK_IMPORTED_MODULE_4__structure_plain__["a" /* default */].deepEqual(this.props.names, nextProps.names)) {
+ (function () {
+ var context = _this2.context;
+ var _context$_reduxForm = context._reduxForm,
+ register = _context$_reduxForm.register,
+ unregister = _context$_reduxForm.unregister;
+ // unregister old name
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_getFormSubmitErrors__ = __webpack_require__(604);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+ _this2.props.names.forEach(function (name) {
+ return unregister(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name));
+ });
+ // register new name
+ nextProps.names.forEach(function (name) {
+ return register(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name), 'Field');
+ });
+ })();
+ }
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ var context = this.context;
+ var unregister = context._reduxForm.unregister;
+ this.props.names.forEach(function (name) {
+ return unregister(__WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name));
+ });
+ }
+ }, {
+ key: 'getRenderedComponent',
+ value: function getRenderedComponent() {
+ __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to Fields');
+ return this.refs.connected.getWrappedInstance().getRenderedComponent();
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var context = this.context;
+ return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ConnectedFields, _extends({}, this.props, {
+ names: this.props.names.map(function (name) {
+ return __WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name);
+ }),
+ _reduxForm: this.context._reduxForm,
+ ref: 'connected'
+ }));
+ }
+ }, {
+ key: 'names',
+ get: function get() {
+ var context = this.context;
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_getFormSubmitErrors__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+ return this.props.names.map(function (name) {
+ return __WEBPACK_IMPORTED_MODULE_5__util_prefixName__["a" /* default */](context, name);
+ });
+ }
+ }, {
+ key: 'dirty',
+ get: function get() {
+ return this.refs.connected.getWrappedInstance().isDirty();
+ }
+ }, {
+ key: 'pristine',
+ get: function get() {
+ return !this.dirty;
+ }
+ }, {
+ key: 'values',
+ get: function get() {
+ return this.refs.connected && this.refs.connected.getWrappedInstance().getValues();
+ }
+ }]);
-/***/ }),
-/* 604 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ return Fields;
+ }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
-"use strict";
-var createGetFormSubmitErrors = function createGetFormSubmitErrors(_ref) {
- var getIn = _ref.getIn;
- return function (form) {
- var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
- return getIn(state, 'form');
- };
- return function (state) {
- return getIn(getFormState(state), form + '.submitErrors');
- };
+ Fields.propTypes = {
+ names: function names(props, propName) {
+ return validateNameProp(props[propName]);
+ },
+ component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired,
+ format: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func,
+ parse: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func,
+ props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object
+ };
+ Fields.contextTypes = {
+ _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object
};
+
+ return Fields;
};
-/* harmony default export */ __webpack_exports__["a"] = (createGetFormSubmitErrors);
+/* harmony default export */ __webpack_exports__["a"] = (createFields);
/***/ }),
-/* 605 */
+/* 617 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isDirty__ = __webpack_require__(606);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
-
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux__ = __webpack_require__(19);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_redux__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__createFieldProps__ = __webpack_require__(294);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__structure_plain__ = __webpack_require__(48);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__ = __webpack_require__(295);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isDirty__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-/***/ }),
-/* 606 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPristine__ = __webpack_require__(289);
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-var createIsDirty = function createIsDirty(structure) {
- return function (form, getFormState) {
- var isPristine = Object(__WEBPACK_IMPORTED_MODULE_0__isPristine__["a" /* default */])(structure)(form, getFormState);
- return function (state) {
- return !isPristine(state);
- };
- };
-};
-/* harmony default export */ __webpack_exports__["a"] = (createIsDirty);
-/***/ }),
-/* 607 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isInvalid__ = __webpack_require__(608);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isInvalid__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+var propsToNotUpdateFor = ['_reduxForm'];
-/***/ }),
-/* 608 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var createConnectedFields = function createConnectedFields(_ref) {
+ var deepEqual = _ref.deepEqual,
+ getIn = _ref.getIn,
+ toJS = _ref.toJS,
+ size = _ref.size;
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isValid__ = __webpack_require__(183);
+ var getSyncError = function getSyncError(syncErrors, name) {
+ var error = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncErrors, name);
+ // Because the error for this field might not be at a level in the error structure where
+ // it can be set directly, it might need to be unwrapped from the _error property
+ return error && error._error ? error._error : error;
+ };
-var createIsInvalid = function createIsInvalid(structure) {
- return function (form, getFormState) {
- var isValid = Object(__WEBPACK_IMPORTED_MODULE_0__isValid__["a" /* default */])(structure)(form, getFormState);
- return function (state) {
- return !isValid(state);
- };
+ var getSyncWarning = function getSyncWarning(syncWarnings, name) {
+ var warning = __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].getIn(syncWarnings, name);
+ // Because the warning for this field might not be at a level in the warning structure where
+ // it can be set directly, it might need to be unwrapped from the _warning property
+ return warning && warning._warning ? warning._warning : warning;
};
-};
-/* harmony default export */ __webpack_exports__["a"] = (createIsInvalid);
+ var ConnectedFields = function (_Component) {
+ _inherits(ConnectedFields, _Component);
-/***/ }),
-/* 609 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ function ConnectedFields(props) {
+ _classCallCheck(this, ConnectedFields);
-"use strict";
-var getErrorKeys = function getErrorKeys(name, type) {
- switch (type) {
- case 'Field':
- return [name, name + '._error'];
- case 'FieldArray':
- return [name + '._error'];
- default:
- throw new Error('Unknown field type');
- }
-};
+ var _this = _possibleConstructorReturn(this, (ConnectedFields.__proto__ || Object.getPrototypeOf(ConnectedFields)).call(this, props));
-var createHasError = function createHasError(_ref) {
- var getIn = _ref.getIn;
+ _this.handleChange = _this.handleChange.bind(_this);
+ _this.handleFocus = _this.handleFocus.bind(_this);
+ _this.handleBlur = _this.handleBlur.bind(_this);
- var hasError = function hasError(field, syncErrors, asyncErrors, submitErrors) {
- if (!syncErrors && !asyncErrors && !submitErrors) {
- return false;
+ _this.onChangeFns = props.names.reduce(function (acc, name) {
+ acc[name] = function (event) {
+ return _this.handleChange(name, event);
+ };
+ return acc;
+ }, {});
+
+ _this.onFocusFns = props.names.reduce(function (acc, name) {
+ acc[name] = function () {
+ return _this.handleFocus(name);
+ };
+ return acc;
+ }, {});
+
+ _this.onBlurFns = props.names.reduce(function (acc, name) {
+ acc[name] = function (event) {
+ return _this.handleBlur(name, event);
+ };
+ return acc;
+ }, {});
+ return _this;
}
- var name = getIn(field, 'name');
- var type = getIn(field, 'type');
- return getErrorKeys(name, type).some(function (key) {
- return getIn(syncErrors, key) || getIn(asyncErrors, key) || getIn(submitErrors, key);
- });
- };
- return hasError;
-};
+ _createClass(ConnectedFields, [{
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ var _this2 = this;
-/* harmony default export */ __webpack_exports__["a"] = (createHasError);
+ if (this.props.names !== nextProps.names && (size(this.props.names) !== size(nextProps.names) || nextProps.names.some(function (nextName) {
+ return !_this2.props._fields[nextName];
+ }))) {
-/***/ }),
-/* 610 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ // names is changed. The cached event handlers need to be updated
+ this.onChangeFns = nextProps.names.reduce(function (acc, name) {
+ acc[name] = function (event) {
+ return _this2.handleChange(name, event);
+ };
+ return acc;
+ }, {});
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isPristine__ = __webpack_require__(289);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+ this.onFocusFns = nextProps.names.reduce(function (acc, name) {
+ acc[name] = function () {
+ return _this2.handleFocus(name);
+ };
+ return acc;
+ }, {});
+
+ this.onBlurFns = nextProps.names.reduce(function (acc, name) {
+ acc[name] = function (event) {
+ return _this2.handleBlur(name, event);
+ };
+ return acc;
+ }, {});
+ }
+ }
+ }, {
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps) {
+ var _this3 = this;
+ var nextPropsKeys = Object.keys(nextProps);
+ var thisPropsKeys = Object.keys(this.props);
+ return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) {
+ return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]);
+ });
+ }
+ }, {
+ key: 'isDirty',
+ value: function isDirty() {
+ var _fields = this.props._fields;
+
+ return Object.keys(_fields).some(function (name) {
+ return _fields[name].dirty;
+ });
+ }
+ }, {
+ key: 'getValues',
+ value: function getValues() {
+ var _fields = this.props._fields;
+ return Object.keys(_fields).reduce(function (accumulator, name) {
+ return __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].setIn(accumulator, name, _fields[name].value);
+ }, {});
+ }
+ }, {
+ key: 'getRenderedComponent',
+ value: function getRenderedComponent() {
+ return this.refs.renderedComponent;
+ }
+ }, {
+ key: 'handleChange',
+ value: function handleChange(name, event) {
+ var _props = this.props,
+ dispatch = _props.dispatch,
+ parse = _props.parse,
+ normalize = _props.normalize,
+ _reduxForm = _props._reduxForm;
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isPristine__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+ var value = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize });
-/***/ }),
-/* 611 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ dispatch(_reduxForm.change(name, value));
+ }
+ }, {
+ key: 'handleFocus',
+ value: function handleFocus(name) {
+ var _props2 = this.props,
+ dispatch = _props2.dispatch,
+ _reduxForm = _props2._reduxForm;
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isValid__ = __webpack_require__(183);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+ dispatch(_reduxForm.focus(name));
+ }
+ }, {
+ key: 'handleBlur',
+ value: function handleBlur(name, event) {
+ var _props3 = this.props,
+ dispatch = _props3.dispatch,
+ parse = _props3.parse,
+ normalize = _props3.normalize,
+ _reduxForm = _props3._reduxForm;
+
+ var value = __WEBPACK_IMPORTED_MODULE_4__events_onChangeValue__["a" /* default */](event, { name: name, parse: parse, normalize: normalize });
+
+ // dispatch blur action
+ dispatch(_reduxForm.blur(name, value));
+ // call post-blur callback
+ if (_reduxForm.asyncValidate) {
+ _reduxForm.asyncValidate(name, value);
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _this4 = this;
+ var _props4 = this.props,
+ component = _props4.component,
+ withRef = _props4.withRef,
+ _fields = _props4._fields,
+ _reduxForm = _props4._reduxForm,
+ rest = _objectWithoutProperties(_props4, ['component', 'withRef', '_fields', '_reduxForm']);
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isValid__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+ var sectionPrefix = _reduxForm.sectionPrefix;
-/***/ }),
-/* 612 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ var _Object$keys$reduce = Object.keys(_fields).reduce(function (accumulator, name) {
+ var connectedProps = _fields[name];
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_isSubmitting__ = __webpack_require__(613);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+ var _createFieldProps = __WEBPACK_IMPORTED_MODULE_2__createFieldProps__["a" /* default */]({ getIn: getIn, toJS: toJS }, name, _extends({}, connectedProps, rest, {
+ onBlur: _this4.onBlurFns[name],
+ onChange: _this4.onChangeFns[name],
+ onFocus: _this4.onFocusFns[name]
+ })),
+ custom = _createFieldProps.custom,
+ fieldProps = _objectWithoutProperties(_createFieldProps, ['custom']);
+ accumulator.custom = custom;
+ var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name;
+ return __WEBPACK_IMPORTED_MODULE_3__structure_plain__["a" /* default */].setIn(accumulator, fieldName, fieldProps);
+ }, {}),
+ custom = _Object$keys$reduce.custom,
+ props = _objectWithoutProperties(_Object$keys$reduce, ['custom']);
+ if (withRef) {
+ props.ref = 'renderedComponent';
+ }
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_isSubmitting__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+ return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, props, custom));
+ }
+ }]);
-/***/ }),
-/* 613 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ return ConnectedFields;
+ }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
-"use strict";
-var createIsSubmitting = function createIsSubmitting(_ref) {
- var getIn = _ref.getIn;
- return function (form) {
- var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
- return getIn(state, 'form');
- };
- return function (state) {
- var formState = getFormState(state);
- return getIn(formState, form + '.submitting') || false;
- };
+ ConnectedFields.propTypes = {
+ component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string]).isRequired,
+ _fields: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object.isRequired,
+ props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object
};
+
+ var connector = __WEBPACK_IMPORTED_MODULE_1_react_redux__["connect"](function (state, ownProps) {
+ var names = ownProps.names,
+ _ownProps$_reduxForm = ownProps._reduxForm,
+ initialValues = _ownProps$_reduxForm.initialValues,
+ getFormState = _ownProps$_reduxForm.getFormState;
+
+ var formState = getFormState(state);
+ return {
+ _fields: names.reduce(function (accumulator, name) {
+ var initialState = getIn(formState, 'initial.' + name);
+ var initial = initialState !== undefined ? initialState : initialValues && getIn(initialValues, name);
+ var value = getIn(formState, 'values.' + name);
+ var syncError = getSyncError(getIn(formState, 'syncErrors'), name);
+ var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name);
+ var submitting = getIn(formState, 'submitting');
+ var pristine = value === initial;
+ accumulator[name] = {
+ asyncError: getIn(formState, 'asyncErrors.' + name),
+ asyncValidating: getIn(formState, 'asyncValidating') === name,
+ dirty: !pristine,
+ pristine: pristine,
+ state: getIn(formState, 'fields.' + name),
+ submitError: getIn(formState, 'submitErrors.' + name),
+ submitFailed: getIn(formState, 'submitFailed'),
+ submitting: submitting,
+ syncError: syncError,
+ syncWarning: syncWarning,
+ value: value,
+ _value: ownProps.value // save value passed in (for checkboxes)
+ };
+ return accumulator;
+ }, {})
+ };
+ }, undefined, undefined, { withRef: true });
+ return connector(ConnectedFields);
};
-/* harmony default export */ __webpack_exports__["a"] = (createIsSubmitting);
+/* harmony default export */ __webpack_exports__["a"] = (createConnectedFields);
/***/ }),
-/* 614 */
+/* 618 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitSucceeded__ = __webpack_require__(615);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(17);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ConnectedFieldArray__ = __webpack_require__(619);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__ = __webpack_require__(192);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__util_prefixName__ = __webpack_require__(125);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitSucceeded__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-/***/ }),
-/* 615 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-"use strict";
-var createHasSubmitSucceeded = function createHasSubmitSucceeded(_ref) {
- var getIn = _ref.getIn;
- return function (form) {
- var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
- return getIn(state, 'form');
- };
- return function (state) {
- var formState = getFormState(state);
- return getIn(formState, form + '.submitSucceeded') || false;
- };
- };
-};
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitSucceeded);
-/***/ }),
-/* 616 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitFailed__ = __webpack_require__(617);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__selectors_hasSubmitFailed__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
-/***/ }),
-/* 617 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var toArray = function toArray(value) {
+ return Array.isArray(value) ? value : [value];
+};
-"use strict";
-var createHasSubmitFailed = function createHasSubmitFailed(_ref) {
- var getIn = _ref.getIn;
- return function (form) {
- var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
- return getIn(state, 'form');
- };
- return function (state) {
- var formState = getFormState(state);
- return getIn(formState, form + '.submitFailed') || false;
- };
+var wrapError = function wrapError(fn, key) {
+ return fn && function () {
+ var validators = toArray(fn);
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
+
+ try {
+ for (var _iterator = validators[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var validator = _step.value;
+
+ var result = validator.apply(undefined, arguments);
+ if (result) {
+ return _defineProperty({}, key, result);
+ }
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
+ }
};
};
-/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitFailed);
+var createFieldArray = function createFieldArray(_ref2) {
+ var deepEqual = _ref2.deepEqual,
+ getIn = _ref2.getIn,
+ size = _ref2.size;
-/***/ }),
-/* 618 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createReduxForm__ = __webpack_require__(619);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+ var ConnectedFieldArray = __WEBPACK_IMPORTED_MODULE_2__ConnectedFieldArray__["a" /* default */]({ deepEqual: deepEqual, getIn: getIn, size: size });
+
+ var FieldArray = function (_Component) {
+ _inherits(FieldArray, _Component);
+
+ function FieldArray(props, context) {
+ _classCallCheck(this, FieldArray);
+
+ var _this = _possibleConstructorReturn(this, (FieldArray.__proto__ || Object.getPrototypeOf(FieldArray)).call(this, props, context));
+
+ if (!context._reduxForm) {
+ throw new Error('FieldArray must be inside a component decorated with reduxForm()');
+ }
+ return _this;
+ }
+
+ _createClass(FieldArray, [{
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps, nextState) {
+ return __WEBPACK_IMPORTED_MODULE_3__util_shallowCompare__["a" /* default */](this, nextProps, nextState);
+ }
+ }, {
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ var _this2 = this;
+
+ this.context._reduxForm.register(this.name, 'FieldArray', function () {
+ return wrapError(_this2.props.validate, '_error');
+ }, function () {
+ return wrapError(_this2.props.warn, '_warning');
+ });
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ if (this.props.name !== nextProps.name) {
+ // unregister old name
+ this.context._reduxForm.unregister(this.name);
+ // register new name
+ this.context._reduxForm.register(__WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, nextProps.name), 'FieldArray');
+ }
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ this.context._reduxForm.unregister(this.name);
+ }
+ }, {
+ key: 'getRenderedComponent',
+ value: function getRenderedComponent() {
+ __WEBPACK_IMPORTED_MODULE_1_invariant___default.a(this.props.withRef, 'If you want to access getRenderedComponent(), ' + 'you must specify a withRef prop to FieldArray');
+ return this.refs.connected.getWrappedInstance().getRenderedComponent();
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](ConnectedFieldArray, _extends({}, this.props, {
+ name: this.name,
+ syncError: this.syncError,
+ syncWarning: this.syncWarning,
+ _reduxForm: this.context._reduxForm,
+ ref: 'connected'
+ }));
+ }
+ }, {
+ key: 'name',
+ get: function get() {
+ return __WEBPACK_IMPORTED_MODULE_4__util_prefixName__["a" /* default */](this.context, this.props.name);
+ }
+ }, {
+ key: 'dirty',
+ get: function get() {
+ return this.refs.connected.getWrappedInstance().dirty;
+ }
+ }, {
+ key: 'pristine',
+ get: function get() {
+ return this.refs.connected.getWrappedInstance().pristine;
+ }
+ }, {
+ key: 'value',
+ get: function get() {
+ return this.refs.connected.getWrappedInstance().value;
+ }
+ }]);
+
+ return FieldArray;
+ }(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
+ FieldArray.propTypes = {
+ name: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string.isRequired,
+ component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func.isRequired,
+ props: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object
+ };
+ FieldArray.contextTypes = {
+ _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object
+ };
+ return FieldArray;
+};
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createReduxForm__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+/* harmony default export */ __webpack_exports__["a"] = (createFieldArray);
/***/ }),
/* 619 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__ = __webpack_require__(620);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__ = __webpack_require__(282);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(161);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_is_promise__ = __webpack_require__(184);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_is_promise__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types__ = __webpack_require__(14);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_prop_types__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_redux__ = __webpack_require__(27);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_redux__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_redux__ = __webpack_require__(111);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__actions__ = __webpack_require__(265);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__asyncValidation__ = __webpack_require__(643);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__defaultShouldAsyncValidate__ = __webpack_require__(266);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__defaultShouldValidate__ = __webpack_require__(267);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__events_silenceEvent__ = __webpack_require__(292);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__events_silenceEvents__ = __webpack_require__(644);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__generateValidator__ = __webpack_require__(645);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__handleSubmit__ = __webpack_require__(646);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__selectors_isValid__ = __webpack_require__(183);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__structure_plain__ = __webpack_require__(11);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__util_getDisplayName__ = __webpack_require__(647);
-
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__ = __webpack_require__(282);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux__ = __webpack_require__(19);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_redux__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_redux__ = __webpack_require__(115);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__createFieldArrayProps__ = __webpack_require__(620);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__structure_plain__ = __webpack_require__(48);
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -46752,9 +49927,6 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
-
-function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
@@ -46762,5883 +49934,5825 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
+var propsToNotUpdateFor = ['_reduxForm', 'value'];
+var createConnectedFieldArray = function createConnectedFieldArray(_ref) {
+ var deepEqual = _ref.deepEqual,
+ getIn = _ref.getIn,
+ size = _ref.size;
+ var getSyncError = function getSyncError(syncErrors, name) {
+ // For an array, the error can _ONLY_ be under _error.
+ // This is why this getSyncError is not the same as the
+ // one in Field.
+ return __WEBPACK_IMPORTED_MODULE_5__structure_plain__["a" /* default */].getIn(syncErrors, name + '._error');
+ };
+ var getSyncWarning = function getSyncWarning(syncWarnings, name) {
+ // For an array, the warning can _ONLY_ be under _warning.
+ // This is why this getSyncError is not the same as the
+ // one in Field.
+ return __WEBPACK_IMPORTED_MODULE_5__structure_plain__["a" /* default */].getIn(syncWarnings, name + '._warning');
+ };
+ var ConnectedFieldArray = function (_Component) {
+ _inherits(ConnectedFieldArray, _Component);
+ function ConnectedFieldArray() {
+ _classCallCheck(this, ConnectedFieldArray);
+ var _this = _possibleConstructorReturn(this, (ConnectedFieldArray.__proto__ || Object.getPrototypeOf(ConnectedFieldArray)).call(this));
+ _this.getValue = _this.getValue.bind(_this);
+ return _this;
+ }
+ _createClass(ConnectedFieldArray, [{
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps) {
+ var _this2 = this;
+ var nextPropsKeys = Object.keys(nextProps);
+ var thisPropsKeys = Object.keys(this.props);
+ return nextPropsKeys.length !== thisPropsKeys.length || nextPropsKeys.some(function (prop) {
+ // useful to debug rerenders
+ // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) {
+ // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ])
+ // }
+ return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this2.props[prop], nextProps[prop]);
+ });
+ }
+ }, {
+ key: 'getRenderedComponent',
+ value: function getRenderedComponent() {
+ return this.refs.renderedComponent;
+ }
+ }, {
+ key: 'getValue',
+ value: function getValue(index) {
+ return this.props.value && getIn(this.props.value, index);
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ component = _props.component,
+ withRef = _props.withRef,
+ name = _props.name,
+ _reduxForm = _props._reduxForm,
+ validate = _props.validate,
+ warn = _props.warn,
+ rest = _objectWithoutProperties(_props, ['component', 'withRef', 'name', '_reduxForm', 'validate', 'warn']);
+ var props = __WEBPACK_IMPORTED_MODULE_4__createFieldArrayProps__["a" /* default */](getIn, name, _reduxForm.sectionPrefix, this.getValue, rest);
+ if (withRef) {
+ props.ref = 'renderedComponent';
+ }
+ return __WEBPACK_IMPORTED_MODULE_1_react__["createElement"](component, props);
+ }
+ }, {
+ key: 'dirty',
+ get: function get() {
+ return this.props.dirty;
+ }
+ }, {
+ key: 'pristine',
+ get: function get() {
+ return this.props.pristine;
+ }
+ }, {
+ key: 'value',
+ get: function get() {
+ return this.props.value;
+ }
+ }]);
+ return ConnectedFieldArray;
+ }(__WEBPACK_IMPORTED_MODULE_1_react__["Component"]);
-var isClassComponent = function isClassComponent(Component) {
- return Boolean(Component && Component.prototype && _typeof(Component.prototype.isReactComponent) === 'object'
+ ConnectedFieldArray.propTypes = {
+ component: __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].string]).isRequired,
+ props: __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].object
+ };
- // extract field-specific actions
- );
-};
-var arrayInsert = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayInsert"],
- arrayMove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayMove"],
- arrayPop = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPop"],
- arrayPush = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayPush"],
- arrayRemove = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemove"],
- arrayRemoveAll = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayRemoveAll"],
- arrayShift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayShift"],
- arraySplice = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySplice"],
- arraySwap = __WEBPACK_IMPORTED_MODULE_8__actions__["arraySwap"],
- arrayUnshift = __WEBPACK_IMPORTED_MODULE_8__actions__["arrayUnshift"],
- blur = __WEBPACK_IMPORTED_MODULE_8__actions__["blur"],
- change = __WEBPACK_IMPORTED_MODULE_8__actions__["change"],
- focus = __WEBPACK_IMPORTED_MODULE_8__actions__["focus"],
- formActions = _objectWithoutProperties(__WEBPACK_IMPORTED_MODULE_8__actions__, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'blur', 'change', 'focus']);
+ ConnectedFieldArray.contextTypes = {
+ _reduxForm: __WEBPACK_IMPORTED_MODULE_1_react__["PropTypes"].object
+ };
-var arrayActions = {
- arrayInsert: arrayInsert,
- arrayMove: arrayMove,
- arrayPop: arrayPop,
- arrayPush: arrayPush,
- arrayRemove: arrayRemove,
- arrayRemoveAll: arrayRemoveAll,
- arrayShift: arrayShift,
- arraySplice: arraySplice,
- arraySwap: arraySwap,
- arrayUnshift: arrayUnshift
-};
+ var connector = __WEBPACK_IMPORTED_MODULE_2_react_redux__["connect"](function (state, ownProps) {
+ var name = ownProps.name,
+ _ownProps$_reduxForm = ownProps._reduxForm,
+ initialValues = _ownProps$_reduxForm.initialValues,
+ getFormState = _ownProps$_reduxForm.getFormState;
-var propsToNotUpdateFor = [].concat(_toConsumableArray(Object.keys(__WEBPACK_IMPORTED_MODULE_8__actions__)), ['array', 'asyncErrors', 'initialValues', 'syncErrors', 'syncWarnings', 'values', 'registeredFields']);
+ var formState = getFormState(state);
+ var initial = getIn(formState, 'initial.' + name) || initialValues && getIn(initialValues, name);
+ var value = getIn(formState, 'values.' + name);
+ var submitting = getIn(formState, 'submitting');
+ var syncError = getSyncError(getIn(formState, 'syncErrors'), name);
+ var syncWarning = getSyncWarning(getIn(formState, 'syncWarnings'), name);
+ var pristine = deepEqual(value, initial);
+ return {
+ asyncError: getIn(formState, 'asyncErrors.' + name + '._error'),
+ dirty: !pristine,
+ pristine: pristine,
+ state: getIn(formState, 'fields.' + name),
+ submitError: getIn(formState, 'submitErrors.' + name + '._error'),
+ submitting: submitting,
+ syncError: syncError,
+ syncWarning: syncWarning,
+ value: value,
+ length: size(value)
+ };
+ }, function (dispatch, ownProps) {
+ var name = ownProps.name,
+ _reduxForm = ownProps._reduxForm;
+ var arrayInsert = _reduxForm.arrayInsert,
+ arrayMove = _reduxForm.arrayMove,
+ arrayPop = _reduxForm.arrayPop,
+ arrayPush = _reduxForm.arrayPush,
+ arrayRemove = _reduxForm.arrayRemove,
+ arrayRemoveAll = _reduxForm.arrayRemoveAll,
+ arrayShift = _reduxForm.arrayShift,
+ arraySplice = _reduxForm.arraySplice,
+ arraySwap = _reduxForm.arraySwap,
+ arrayUnshift = _reduxForm.arrayUnshift;
-var checkSubmit = function checkSubmit(submit) {
- if (!submit || typeof submit !== 'function') {
- throw new Error('You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop');
- }
- return submit;
+ return __WEBPACK_IMPORTED_MODULE_0_lodash_es_mapValues__["a" /* default */]({
+ arrayInsert: arrayInsert,
+ arrayMove: arrayMove,
+ arrayPop: arrayPop,
+ arrayPush: arrayPush,
+ arrayRemove: arrayRemove,
+ arrayRemoveAll: arrayRemoveAll,
+ arrayShift: arrayShift,
+ arraySplice: arraySplice,
+ arraySwap: arraySwap,
+ arrayUnshift: arrayUnshift
+ }, function (actionCreator) {
+ return __WEBPACK_IMPORTED_MODULE_3_redux__["bindActionCreators"](actionCreator.bind(null, name), dispatch);
+ });
+ }, undefined, { withRef: true });
+ return connector(ConnectedFieldArray);
};
-/**
- * The decorator that is the main API to redux-form
- */
-var createReduxForm = function createReduxForm(structure) {
- var deepEqual = structure.deepEqual,
- empty = structure.empty,
- getIn = structure.getIn,
- setIn = structure.setIn,
- keys = structure.keys,
- fromJS = structure.fromJS;
-
- var isValid = Object(__WEBPACK_IMPORTED_MODULE_16__selectors_isValid__["a" /* default */])(structure);
- return function (initialConfig) {
- var config = _extends({
- touchOnBlur: true,
- touchOnChange: false,
- persistentSubmitErrors: false,
- destroyOnUnmount: true,
- shouldAsyncValidate: __WEBPACK_IMPORTED_MODULE_10__defaultShouldAsyncValidate__["a" /* default */],
- shouldValidate: __WEBPACK_IMPORTED_MODULE_11__defaultShouldValidate__["a" /* default */],
- enableReinitialize: false,
- keepDirtyOnReinitialize: false,
- getFormState: function getFormState(state) {
- return getIn(state, 'form');
- },
- pure: true,
- forceUnregisterOnUnmount: false
- }, initialConfig);
-
- return function (WrappedComponent) {
- var Form = function (_Component) {
- _inherits(Form, _Component);
-
- function Form(props) {
- _classCallCheck(this, Form);
-
- var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props));
-
- _this.submit = _this.submit.bind(_this);
- _this.reset = _this.reset.bind(_this);
- _this.asyncValidate = _this.asyncValidate.bind(_this);
- _this.getValues = _this.getValues.bind(_this);
- _this.register = _this.register.bind(_this);
- _this.unregister = _this.unregister.bind(_this);
- _this.submitCompleted = _this.submitCompleted.bind(_this);
- _this.submitFailed = _this.submitFailed.bind(_this);
- _this.fieldValidators = {};
- _this.lastFieldValidatorKeys = [];
- _this.fieldWarners = {};
- _this.lastFieldWarnerKeys = [];
- return _this;
- }
-
- _createClass(Form, [{
- key: 'getChildContext',
- value: function getChildContext() {
- var _this2 = this;
+/* harmony default export */ __webpack_exports__["a"] = (createConnectedFieldArray);
- return {
- _reduxForm: _extends({}, this.props, {
- getFormState: function getFormState(state) {
- return getIn(_this2.props.getFormState(state), _this2.props.form);
- },
- asyncValidate: this.asyncValidate,
- getValues: this.getValues,
- sectionPrefix: undefined,
- register: this.register,
- unregister: this.unregister,
- registerInnerOnSubmit: function registerInnerOnSubmit(innerOnSubmit) {
- return _this2.innerOnSubmit = innerOnSubmit;
- }
- })
- };
- }
- }, {
- key: 'initIfNeeded',
- value: function initIfNeeded(nextProps) {
- var enableReinitialize = this.props.enableReinitialize;
+/***/ }),
+/* 620 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- if (nextProps) {
- if ((enableReinitialize || !nextProps.initialized) && !deepEqual(this.props.initialValues, nextProps.initialValues)) {
- var keepDirty = nextProps.initialized && this.props.keepDirtyOnReinitialize;
- this.props.initialize(nextProps.initialValues, keepDirty, {
- lastInitialValues: this.props.initialValues
- });
- }
- } else if (this.props.initialValues && (!this.props.initialized || enableReinitialize)) {
- this.props.initialize(this.props.initialValues, this.props.keepDirtyOnReinitialize);
- }
- }
- }, {
- key: 'updateSyncErrorsIfNeeded',
- value: function updateSyncErrorsIfNeeded(nextSyncErrors, nextError, lastSyncErrors) {
- var _props = this.props,
- error = _props.error,
- updateSyncErrors = _props.updateSyncErrors;
+"use strict";
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- var noErrors = (!lastSyncErrors || !Object.keys(lastSyncErrors).length) && !error;
- var nextNoErrors = (!nextSyncErrors || !Object.keys(nextSyncErrors).length) && !nextError;
- if (!(noErrors && nextNoErrors) && (!__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(lastSyncErrors, nextSyncErrors) || !__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(error, nextError))) {
- updateSyncErrors(nextSyncErrors, nextError);
- }
- }
- }, {
- key: 'clearSubmitPromiseIfNeeded',
- value: function clearSubmitPromiseIfNeeded(nextProps) {
- var submitting = this.props.submitting;
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
- if (this.submitPromise && submitting && !nextProps.submitting) {
- delete this.submitPromise;
- }
- }
- }, {
- key: 'submitIfNeeded',
- value: function submitIfNeeded(nextProps) {
- var _props2 = this.props,
- clearSubmit = _props2.clearSubmit,
- triggerSubmit = _props2.triggerSubmit;
+var createFieldArrayProps = function createFieldArrayProps(getIn, name, sectionPrefix, getValue, _ref) {
+ var arrayInsert = _ref.arrayInsert,
+ arrayMove = _ref.arrayMove,
+ arrayPop = _ref.arrayPop,
+ arrayPush = _ref.arrayPush,
+ arrayRemove = _ref.arrayRemove,
+ arrayRemoveAll = _ref.arrayRemoveAll,
+ arrayShift = _ref.arrayShift,
+ arraySplice = _ref.arraySplice,
+ arraySwap = _ref.arraySwap,
+ arrayUnshift = _ref.arrayUnshift,
+ asyncError = _ref.asyncError,
+ dirty = _ref.dirty,
+ length = _ref.length,
+ pristine = _ref.pristine,
+ submitError = _ref.submitError,
+ state = _ref.state,
+ submitFailed = _ref.submitFailed,
+ submitting = _ref.submitting,
+ syncError = _ref.syncError,
+ syncWarning = _ref.syncWarning,
+ value = _ref.value,
+ props = _ref.props,
+ rest = _objectWithoutProperties(_ref, ['arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncError', 'dirty', 'length', 'pristine', 'submitError', 'state', 'submitFailed', 'submitting', 'syncError', 'syncWarning', 'value', 'props']);
- if (!triggerSubmit && nextProps.triggerSubmit) {
- clearSubmit();
- this.submit();
- }
- }
- }, {
- key: 'validateIfNeeded',
- value: function validateIfNeeded(nextProps) {
- var _props3 = this.props,
- shouldValidate = _props3.shouldValidate,
- validate = _props3.validate,
- values = _props3.values;
+ var error = syncError || asyncError || submitError;
+ var warning = syncWarning;
+ var fieldName = sectionPrefix ? name.replace(sectionPrefix + '.', '') : name;
+ var finalProps = _extends({
+ fields: {
+ _isFieldArray: true,
+ forEach: function forEach(callback) {
+ return (value || []).forEach(function (item, index) {
+ return callback(fieldName + '[' + index + ']', index, finalProps.fields);
+ });
+ },
+ get: getValue,
+ getAll: function getAll() {
+ return value;
+ },
+ insert: arrayInsert,
+ length: length,
+ map: function map(callback) {
+ return (value || []).map(function (item, index) {
+ return callback(fieldName + '[' + index + ']', index, finalProps.fields);
+ });
+ },
+ move: arrayMove,
+ name: name,
+ pop: function pop() {
+ arrayPop();
+ return getIn(value, length - 1);
+ },
+ push: arrayPush,
+ reduce: function reduce(callback, initial) {
+ return (value || []).reduce(function (accumulator, item, index) {
+ return callback(accumulator, fieldName + '[' + index + ']', index, finalProps.fields);
+ }, initial);
+ },
+ remove: arrayRemove,
+ removeAll: arrayRemoveAll,
+ shift: function shift() {
+ arrayShift();
+ return getIn(value, 0);
+ },
+ swap: arraySwap,
+ unshift: arrayUnshift
+ },
+ meta: {
+ dirty: dirty,
+ error: error,
+ warning: warning,
+ invalid: !!error,
+ pristine: pristine,
+ submitting: submitting,
+ touched: !!(state && getIn(state, 'touched')),
+ valid: !error
+ }
+ }, props, rest);
+ return finalProps;
+};
- var fieldLevelValidate = this.generateValidator();
- if (validate || fieldLevelValidate) {
- var initialRender = nextProps === undefined;
- var fieldValidatorKeys = Object.keys(this.getValidators());
- var shouldValidateResult = shouldValidate({
- values: values,
- nextProps: nextProps,
- props: this.props,
- initialRender: initialRender,
- lastFieldValidatorKeys: this.lastFieldValidatorKeys,
- fieldValidatorKeys: fieldValidatorKeys,
- structure: structure
- });
+/* harmony default export */ __webpack_exports__["a"] = (createFieldArrayProps);
- if (shouldValidateResult) {
- var propsToValidate = initialRender ? this.props : nextProps;
+/***/ }),
+/* 621 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- var _merge2 = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */])(validate ? validate(propsToValidate.values, propsToValidate) || {} : {}, fieldLevelValidate ? fieldLevelValidate(propsToValidate.values, propsToValidate) || {} : {}),
- _error = _merge2._error,
- nextSyncErrors = _objectWithoutProperties(_merge2, ['_error']);
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant__ = __webpack_require__(17);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_invariant__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(48);
- this.lastFieldValidatorKeys = fieldValidatorKeys;
- this.updateSyncErrorsIfNeeded(nextSyncErrors, _error, propsToValidate.syncErrors);
- }
- }
- }
- }, {
- key: 'updateSyncWarningsIfNeeded',
- value: function updateSyncWarningsIfNeeded(nextSyncWarnings, nextWarning, lastSyncWarnings) {
- var _props4 = this.props,
- warning = _props4.warning,
- syncWarnings = _props4.syncWarnings,
- updateSyncWarnings = _props4.updateSyncWarnings;
- var noWarnings = (!syncWarnings || !Object.keys(syncWarnings).length) && !warning;
- var nextNoWarnings = (!nextSyncWarnings || !Object.keys(nextSyncWarnings).length) && !nextWarning;
- if (!(noWarnings && nextNoWarnings) && (!__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(lastSyncWarnings, nextSyncWarnings) || !__WEBPACK_IMPORTED_MODULE_17__structure_plain__["a" /* default */].deepEqual(warning, nextWarning))) {
- updateSyncWarnings(nextSyncWarnings, nextWarning);
- }
- }
- }, {
- key: 'warnIfNeeded',
- value: function warnIfNeeded(nextProps) {
- var _props5 = this.props,
- shouldValidate = _props5.shouldValidate,
- warn = _props5.warn,
- values = _props5.values;
- var fieldLevelWarn = this.generateWarner();
- if (warn || fieldLevelWarn) {
- var initialRender = nextProps === undefined;
- var fieldWarnerKeys = Object.keys(this.getWarners());
- var shouldWarnResult = shouldValidate({
- values: values,
- nextProps: nextProps,
- props: this.props,
- initialRender: initialRender,
- lastFieldValidatorKeys: this.lastFieldWarnerKeys,
- fieldValidatorKeys: fieldWarnerKeys,
- structure: structure
- });
+var createFormValueSelector = function createFormValueSelector(_ref) {
+ var getIn = _ref.getIn;
+ return function (form) {
+ var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
+ return getIn(state, 'form');
+ };
- if (shouldWarnResult) {
- var propsToWarn = initialRender ? this.props : nextProps;
+ __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(form, 'Form value must be specified');
+ return function (state) {
+ for (var _len = arguments.length, fields = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ fields[_key - 1] = arguments[_key];
+ }
- var _merge3 = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_merge__["a" /* default */])(warn ? warn(propsToWarn.values, propsToWarn) : {}, fieldLevelWarn ? fieldLevelWarn(propsToWarn.values, propsToWarn) : {}),
- _warning = _merge3._warning,
- nextSyncWarnings = _objectWithoutProperties(_merge3, ['_warning']);
+ __WEBPACK_IMPORTED_MODULE_0_invariant___default.a(fields.length, 'No fields specified');
+ return fields.length === 1 ?
+ // only selecting one field, so return its value
+ getIn(getFormState(state), form + '.values.' + fields[0]) :
+ // selecting many fields, so return an object of field values
+ fields.reduce(function (accumulator, field) {
+ var value = getIn(getFormState(state), form + '.values.' + field);
+ return value === undefined ? accumulator : __WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */].setIn(accumulator, field, value);
+ }, {});
+ };
+ };
+};
- this.lastFieldWarnerKeys = fieldWarnerKeys;
- this.updateSyncWarningsIfNeeded(nextSyncWarnings, _warning, propsToWarn.syncWarnings);
- }
- }
- }
- }, {
- key: 'componentWillMount',
- value: function componentWillMount() {
- this.initIfNeeded();
- this.validateIfNeeded();
- this.warnIfNeeded();
- }
- }, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- this.initIfNeeded(nextProps);
- this.validateIfNeeded(nextProps);
- this.warnIfNeeded(nextProps);
- this.clearSubmitPromiseIfNeeded(nextProps);
- this.submitIfNeeded(nextProps);
- if (nextProps.onChange) {
- if (!deepEqual(nextProps.values, this.props.values)) {
- nextProps.onChange(nextProps.values, nextProps.dispatch, nextProps);
- }
- }
- }
- }, {
- key: 'shouldComponentUpdate',
- value: function shouldComponentUpdate(nextProps) {
- var _this3 = this;
+/* harmony default export */ __webpack_exports__["a"] = (createFormValueSelector);
- if (!this.props.pure) return true;
- var _initialConfig$immuta = initialConfig.immutableProps,
- immutableProps = _initialConfig$immuta === undefined ? [] : _initialConfig$immuta;
+/***/ }),
+/* 622 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- return Object.keys(nextProps).some(function (prop) {
- // useful to debug rerenders
- // if (!plain.deepEqual(this.props[ prop ], nextProps[ prop ])) {
- // console.info(prop, 'changed', this.props[ prop ], '==>', nextProps[ prop ])
- // }
- if (~immutableProps.indexOf(prop)) {
- return _this3.props[prop] !== nextProps[prop];
- }
- return !~propsToNotUpdateFor.indexOf(prop) && !deepEqual(_this3.props[prop], nextProps[prop]);
- });
- }
- }, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- var _props6 = this.props,
- destroyOnUnmount = _props6.destroyOnUnmount,
- destroy = _props6.destroy;
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(19);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_redux__);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- if (destroyOnUnmount) {
- this.destroyed = true;
- destroy();
- }
- }
- }, {
- key: 'getValues',
- value: function getValues() {
- return this.props.values;
- }
- }, {
- key: 'isValid',
- value: function isValid() {
- return this.props.valid;
- }
- }, {
- key: 'isPristine',
- value: function isPristine() {
- return this.props.pristine;
- }
- }, {
- key: 'register',
- value: function register(name, type, getValidator, getWarner) {
- this.props.registerField(name, type);
- if (getValidator) {
- this.fieldValidators[name] = getValidator;
- }
- if (getWarner) {
- this.fieldWarners[name] = getWarner;
- }
- }
- }, {
- key: 'unregister',
- value: function unregister(name) {
- if (!this.destroyed) {
- if (this.props.destroyOnUnmount || this.props.forceUnregisterOnUnmount) {
- this.props.unregisterField(name);
- delete this.fieldValidators[name];
- delete this.fieldWarners[name];
- } else {
- this.props.unregisterField(name, false);
- }
- }
- }
- }, {
- key: 'getFieldList',
- value: function getFieldList(options) {
- var registeredFields = this.props.registeredFields;
- var list = [];
- if (!registeredFields) {
- return list;
- }
- var keySeq = keys(registeredFields);
- if (options && options.excludeFieldArray) {
- keySeq = keySeq.filter(function (name) {
- return getIn(registeredFields, '[\'' + name + '\'].type') !== 'FieldArray';
- });
- }
- return fromJS(keySeq.reduce(function (acc, key) {
- acc.push(key);
- return acc;
- }, list));
- }
- }, {
- key: 'getValidators',
- value: function getValidators() {
- var _this4 = this;
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
- var validators = {};
- Object.keys(this.fieldValidators).forEach(function (name) {
- var validator = _this4.fieldValidators[name]();
- if (validator) {
- validators[name] = validator;
- }
- });
- return validators;
- }
- }, {
- key: 'generateValidator',
- value: function generateValidator() {
- var validators = this.getValidators();
- return Object.keys(validators).length ? Object(__WEBPACK_IMPORTED_MODULE_14__generateValidator__["a" /* default */])(validators, structure) : undefined;
- }
- }, {
- key: 'getWarners',
- value: function getWarners() {
- var _this5 = this;
- var warners = {};
- Object.keys(this.fieldWarners).forEach(function (name) {
- var warner = _this5.fieldWarners[name]();
- if (warner) {
- warners[name] = warner;
- }
- });
- return warners;
- }
- }, {
- key: 'generateWarner',
- value: function generateWarner() {
- var warners = this.getWarners();
- return Object.keys(warners).length ? Object(__WEBPACK_IMPORTED_MODULE_14__generateValidator__["a" /* default */])(warners, structure) : undefined;
- }
- }, {
- key: 'asyncValidate',
- value: function asyncValidate(name, value) {
- var _this6 = this;
- var _props7 = this.props,
- asyncBlurFields = _props7.asyncBlurFields,
- asyncErrors = _props7.asyncErrors,
- asyncValidate = _props7.asyncValidate,
- dispatch = _props7.dispatch,
- initialized = _props7.initialized,
- pristine = _props7.pristine,
- shouldAsyncValidate = _props7.shouldAsyncValidate,
- startAsyncValidation = _props7.startAsyncValidation,
- stopAsyncValidation = _props7.stopAsyncValidation,
- syncErrors = _props7.syncErrors,
- values = _props7.values;
+var createValues = function createValues(_ref) {
+ var getIn = _ref.getIn;
+ return function (config) {
+ var _prop$getFormState$co = _extends({
+ prop: 'values',
+ getFormState: function getFormState(state) {
+ return getIn(state, 'form');
+ }
+ }, config),
+ form = _prop$getFormState$co.form,
+ prop = _prop$getFormState$co.prop,
+ getFormState = _prop$getFormState$co.getFormState;
- var submitting = !name;
- if (asyncValidate) {
- var valuesToValidate = submitting ? values : setIn(values, name, value);
- var syncValidationPasses = submitting || !getIn(syncErrors, name);
- var isBlurredField = !submitting && (!asyncBlurFields || ~asyncBlurFields.indexOf(name.replace(/\[[0-9]+\]/g, '[]')));
- if ((isBlurredField || submitting) && shouldAsyncValidate({
- asyncErrors: asyncErrors,
- initialized: initialized,
- trigger: submitting ? 'submit' : 'blur',
- blurredField: name,
- pristine: pristine,
- syncValidationPasses: syncValidationPasses
- })) {
- return Object(__WEBPACK_IMPORTED_MODULE_9__asyncValidation__["a" /* default */])(function () {
- return asyncValidate(valuesToValidate, dispatch, _this6.props, name);
- }, startAsyncValidation, stopAsyncValidation, name);
- }
- }
- }
- }, {
- key: 'submitCompleted',
- value: function submitCompleted(result) {
- delete this.submitPromise;
- return result;
- }
- }, {
- key: 'submitFailed',
- value: function submitFailed(error) {
- delete this.submitPromise;
- throw error;
- }
- }, {
- key: 'listenToSubmit',
- value: function listenToSubmit(promise) {
- if (!__WEBPACK_IMPORTED_MODULE_3_is_promise___default()(promise)) {
- return promise;
- }
- this.submitPromise = promise;
- return promise.then(this.submitCompleted, this.submitFailed);
- }
- }, {
- key: 'submit',
- value: function submit(submitOrEvent) {
- var _this7 = this;
+ return __WEBPACK_IMPORTED_MODULE_0_react_redux__["connect"](function (state) {
+ return _defineProperty({}, prop, getIn(getFormState(state), form + '.values'));
+ }, function () {
+ return {};
+ } // ignore dispatch
+ );
+ };
+};
- var _props8 = this.props,
- onSubmit = _props8.onSubmit,
- blur = _props8.blur,
- change = _props8.change,
- dispatch = _props8.dispatch;
+/* harmony default export */ __webpack_exports__["a"] = (createValues);
+/***/ }),
+/* 623 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- if (!submitOrEvent || Object(__WEBPACK_IMPORTED_MODULE_12__events_silenceEvent__["a" /* default */])(submitOrEvent)) {
- // submitOrEvent is an event: fire submit if not already submitting
- if (!this.submitPromise) {
- // avoid recursive stack trace if use Form with onSubmit as handleSubmit
- if (this.innerOnSubmit && this.innerOnSubmit !== this.submit) {
- // will call "submitOrEvent is the submit function" block below
- return this.innerOnSubmit();
- } else {
- return this.listenToSubmit(Object(__WEBPACK_IMPORTED_MODULE_15__handleSubmit__["a" /* default */])(checkSubmit(onSubmit), _extends({}, this.props, Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])({ blur: blur, change: change }, dispatch)), this.props.validExceptSubmit, this.asyncValidate, this.getFieldList({ excludeFieldArray: true })));
- }
- }
- } else {
- // submitOrEvent is the submit function: return deferred submit thunk
- return Object(__WEBPACK_IMPORTED_MODULE_13__events_silenceEvents__["a" /* default */])(function () {
- return !_this7.submitPromise && _this7.listenToSubmit(Object(__WEBPACK_IMPORTED_MODULE_15__handleSubmit__["a" /* default */])(checkSubmit(submitOrEvent), _extends({}, _this7.props, Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])({ blur: blur, change: change }, dispatch)), _this7.props.validExceptSubmit, _this7.asyncValidate, _this7.getFieldList({ excludeFieldArray: true })));
- });
- }
- }
- }, {
- key: 'reset',
- value: function reset() {
- this.props.reset();
- }
- }, {
- key: 'render',
- value: function render() {
- // remove some redux-form config-only props
- /* eslint-disable no-unused-vars */
- var _props9 = this.props,
- anyTouched = _props9.anyTouched,
- arrayInsert = _props9.arrayInsert,
- arrayMove = _props9.arrayMove,
- arrayPop = _props9.arrayPop,
- arrayPush = _props9.arrayPush,
- arrayRemove = _props9.arrayRemove,
- arrayRemoveAll = _props9.arrayRemoveAll,
- arrayShift = _props9.arrayShift,
- arraySplice = _props9.arraySplice,
- arraySwap = _props9.arraySwap,
- arrayUnshift = _props9.arrayUnshift,
- asyncErrors = _props9.asyncErrors,
- asyncValidate = _props9.asyncValidate,
- asyncValidating = _props9.asyncValidating,
- blur = _props9.blur,
- change = _props9.change,
- destroy = _props9.destroy,
- destroyOnUnmount = _props9.destroyOnUnmount,
- forceUnregisterOnUnmount = _props9.forceUnregisterOnUnmount,
- dirty = _props9.dirty,
- dispatch = _props9.dispatch,
- enableReinitialize = _props9.enableReinitialize,
- error = _props9.error,
- focus = _props9.focus,
- form = _props9.form,
- getFormState = _props9.getFormState,
- initialize = _props9.initialize,
- initialized = _props9.initialized,
- initialValues = _props9.initialValues,
- invalid = _props9.invalid,
- keepDirtyOnReinitialize = _props9.keepDirtyOnReinitialize,
- pristine = _props9.pristine,
- propNamespace = _props9.propNamespace,
- registeredFields = _props9.registeredFields,
- registerField = _props9.registerField,
- reset = _props9.reset,
- setSubmitFailed = _props9.setSubmitFailed,
- setSubmitSucceeded = _props9.setSubmitSucceeded,
- shouldAsyncValidate = _props9.shouldAsyncValidate,
- shouldValidate = _props9.shouldValidate,
- startAsyncValidation = _props9.startAsyncValidation,
- startSubmit = _props9.startSubmit,
- stopAsyncValidation = _props9.stopAsyncValidation,
- stopSubmit = _props9.stopSubmit,
- submitting = _props9.submitting,
- submitFailed = _props9.submitFailed,
- submitSucceeded = _props9.submitSucceeded,
- touch = _props9.touch,
- touchOnBlur = _props9.touchOnBlur,
- touchOnChange = _props9.touchOnChange,
- persistentSubmitErrors = _props9.persistentSubmitErrors,
- syncErrors = _props9.syncErrors,
- syncWarnings = _props9.syncWarnings,
- unregisterField = _props9.unregisterField,
- untouch = _props9.untouch,
- updateSyncErrors = _props9.updateSyncErrors,
- updateSyncWarnings = _props9.updateSyncWarnings,
- valid = _props9.valid,
- validExceptSubmit = _props9.validExceptSubmit,
- values = _props9.values,
- warning = _props9.warning,
- rest = _objectWithoutProperties(_props9, ['anyTouched', 'arrayInsert', 'arrayMove', 'arrayPop', 'arrayPush', 'arrayRemove', 'arrayRemoveAll', 'arrayShift', 'arraySplice', 'arraySwap', 'arrayUnshift', 'asyncErrors', 'asyncValidate', 'asyncValidating', 'blur', 'change', 'destroy', 'destroyOnUnmount', 'forceUnregisterOnUnmount', 'dirty', 'dispatch', 'enableReinitialize', 'error', 'focus', 'form', 'getFormState', 'initialize', 'initialized', 'initialValues', 'invalid', 'keepDirtyOnReinitialize', 'pristine', 'propNamespace', 'registeredFields', 'registerField', 'reset', 'setSubmitFailed', 'setSubmitSucceeded', 'shouldAsyncValidate', 'shouldValidate', 'startAsyncValidation', 'startSubmit', 'stopAsyncValidation', 'stopSubmit', 'submitting', 'submitFailed', 'submitSucceeded', 'touch', 'touchOnBlur', 'touchOnChange', 'persistentSubmitErrors', 'syncErrors', 'syncWarnings', 'unregisterField', 'untouch', 'updateSyncErrors', 'updateSyncWarnings', 'valid', 'validExceptSubmit', 'values', 'warning']);
- /* eslint-enable no-unused-vars */
+"use strict";
+var createGetFormValues = function createGetFormValues(_ref) {
+ var getIn = _ref.getIn;
+ return function (form) {
+ var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
+ return getIn(state, 'form');
+ };
+ return function (state) {
+ return getIn(getFormState(state), form + '.values');
+ };
+ };
+};
+/* harmony default export */ __webpack_exports__["a"] = (createGetFormValues);
- var reduxFormProps = _extends({
- anyTouched: anyTouched,
- asyncValidate: this.asyncValidate,
- asyncValidating: asyncValidating
- }, Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])({ blur: blur, change: change }, dispatch), {
- destroy: destroy,
- dirty: dirty,
- dispatch: dispatch,
- error: error,
- form: form,
- handleSubmit: this.submit,
- initialize: initialize,
- initialized: initialized,
- initialValues: initialValues,
- invalid: invalid,
- pristine: pristine,
- reset: reset,
- submitting: submitting,
- submitFailed: submitFailed,
- submitSucceeded: submitSucceeded,
- touch: touch,
- untouch: untouch,
- valid: valid,
- warning: warning
- });
- var propsToPass = _extends({}, propNamespace ? _defineProperty({}, propNamespace, reduxFormProps) : reduxFormProps, rest);
- if (isClassComponent(WrappedComponent)) {
- propsToPass.ref = 'wrapped';
- }
- return Object(__WEBPACK_IMPORTED_MODULE_5_react__["createElement"])(WrappedComponent, propsToPass);
- }
- }]);
+/***/ }),
+/* 624 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- return Form;
- }(__WEBPACK_IMPORTED_MODULE_5_react__["Component"]);
+"use strict";
+var createGetFormInitialValues = function createGetFormInitialValues(_ref) {
+ var getIn = _ref.getIn;
+ return function (form) {
+ var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
+ return getIn(state, 'form');
+ };
+ return function (state) {
+ return getIn(getFormState(state), form + '.initial');
+ };
+ };
+};
- Form.displayName = 'Form(' + Object(__WEBPACK_IMPORTED_MODULE_18__util_getDisplayName__["a" /* default */])(WrappedComponent) + ')';
- Form.WrappedComponent = WrappedComponent;
- Form.childContextTypes = {
- _reduxForm: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object.isRequired
- };
- Form.propTypes = {
- destroyOnUnmount: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool,
- forceUnregisterOnUnmount: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool,
- form: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string.isRequired,
- initialValues: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.array, __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.object]),
- getFormState: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
- onSubmitFail: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
- onSubmitSuccess: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
- propNameSpace: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.string,
- validate: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
- warn: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.func,
- touchOnBlur: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool,
- touchOnChange: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool,
- triggerSubmit: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool,
- persistentSubmitErrors: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.bool,
- registeredFields: __WEBPACK_IMPORTED_MODULE_4_prop_types___default.a.any
- };
+/* harmony default export */ __webpack_exports__["a"] = (createGetFormInitialValues);
- var connector = Object(__WEBPACK_IMPORTED_MODULE_6_react_redux__["connect"])(function (state, props) {
- var form = props.form,
- getFormState = props.getFormState,
- initialValues = props.initialValues,
- enableReinitialize = props.enableReinitialize,
- keepDirtyOnReinitialize = props.keepDirtyOnReinitialize;
+/***/ }),
+/* 625 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- var formState = getIn(getFormState(state) || empty, form) || empty;
- var stateInitial = getIn(formState, 'initial');
- var initialized = !!stateInitial;
+"use strict";
+var createGetFormSyncErrors = function createGetFormSyncErrors(_ref) {
+ var getIn = _ref.getIn;
+ return function (form) {
+ var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
+ return getIn(state, 'form');
+ };
+ return function (state) {
+ return getIn(getFormState(state), form + '.syncErrors');
+ };
+ };
+};
- var shouldUpdateInitialValues = enableReinitialize && initialized && !deepEqual(initialValues, stateInitial);
- var shouldResetValues = shouldUpdateInitialValues && !keepDirtyOnReinitialize;
+/* harmony default export */ __webpack_exports__["a"] = (createGetFormSyncErrors);
- var initial = initialValues || stateInitial || empty;
+/***/ }),
+/* 626 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- if (shouldUpdateInitialValues) {
- initial = stateInitial || empty;
- }
+"use strict";
+var createGetFormAsyncErrors = function createGetFormAsyncErrors(_ref) {
+ var getIn = _ref.getIn;
+ return function (form) {
+ var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
+ return getIn(state, 'form');
+ };
+ return function (state) {
+ return getIn(getFormState(state), form + '.asyncErrors');
+ };
+ };
+};
- var values = getIn(formState, 'values') || initial;
+/* harmony default export */ __webpack_exports__["a"] = (createGetFormAsyncErrors);
- if (shouldResetValues) {
- values = initial;
- }
+/***/ }),
+/* 627 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- var pristine = shouldResetValues || deepEqual(initial, values);
- var asyncErrors = getIn(formState, 'asyncErrors');
- var syncErrors = getIn(formState, 'syncErrors') || {};
- var syncWarnings = getIn(formState, 'syncWarnings') || {};
- var registeredFields = getIn(formState, 'registeredFields');
- var valid = isValid(form, getFormState, false)(state);
- var validExceptSubmit = isValid(form, getFormState, true)(state);
- var anyTouched = !!getIn(formState, 'anyTouched');
- var submitting = !!getIn(formState, 'submitting');
- var submitFailed = !!getIn(formState, 'submitFailed');
- var submitSucceeded = !!getIn(formState, 'submitSucceeded');
- var error = getIn(formState, 'error');
- var warning = getIn(formState, 'warning');
- var triggerSubmit = getIn(formState, 'triggerSubmit');
- return {
- anyTouched: anyTouched,
- asyncErrors: asyncErrors,
- asyncValidating: getIn(formState, 'asyncValidating') || false,
- dirty: !pristine,
- error: error,
- initialized: initialized,
- invalid: !valid,
- pristine: pristine,
- registeredFields: registeredFields,
- submitting: submitting,
- submitFailed: submitFailed,
- submitSucceeded: submitSucceeded,
- syncErrors: syncErrors,
- syncWarnings: syncWarnings,
- triggerSubmit: triggerSubmit,
- values: values,
- valid: valid,
- validExceptSubmit: validExceptSubmit,
- warning: warning
- };
- }, function (dispatch, initialProps) {
- var bindForm = function bindForm(actionCreator) {
- return actionCreator.bind(null, initialProps.form
+"use strict";
+var createGetFormSubmitErrors = function createGetFormSubmitErrors(_ref) {
+ var getIn = _ref.getIn;
+ return function (form) {
+ var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
+ return getIn(state, 'form');
+ };
+ return function (state) {
+ return getIn(getFormState(state), form + '.submitErrors');
+ };
+ };
+};
- // Bind the first parameter on `props.form`
- );
- };var boundFormACs = Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */])(formActions, bindForm);
- var boundArrayACs = Object(__WEBPACK_IMPORTED_MODULE_1_lodash_es_mapValues__["a" /* default */])(arrayActions, bindForm);
- var boundBlur = function boundBlur(field, value) {
- return blur(initialProps.form, field, value, !!initialProps.touchOnBlur);
- };
- var boundChange = function boundChange(field, value) {
- return change(initialProps.form, field, value, !!initialProps.touchOnChange, !!initialProps.persistentSubmitErrors);
- };
- var boundFocus = bindForm(focus
+/* harmony default export */ __webpack_exports__["a"] = (createGetFormSubmitErrors);
- // Wrap action creators with `dispatch`
- );var connectedFormACs = Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundFormACs, dispatch);
- var connectedArrayACs = {
- insert: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayInsert, dispatch),
- move: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayMove, dispatch),
- pop: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayPop, dispatch),
- push: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayPush, dispatch),
- remove: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayRemove, dispatch),
- removeAll: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayRemoveAll, dispatch),
- shift: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayShift, dispatch),
- splice: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arraySplice, dispatch),
- swap: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arraySwap, dispatch),
- unshift: Object(__WEBPACK_IMPORTED_MODULE_7_redux__["bindActionCreators"])(boundArrayACs.arrayUnshift, dispatch)
- };
+/***/ }),
+/* 628 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- var computedActions = _extends({}, connectedFormACs, boundArrayACs, {
- blur: boundBlur,
- change: boundChange,
- array: connectedArrayACs,
- focus: boundFocus,
- dispatch: dispatch
- });
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPristine__ = __webpack_require__(296);
- return function () {
- return computedActions;
- };
- }, undefined, { withRef: true });
- var ConnectedForm = __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default()(connector(Form), WrappedComponent);
- ConnectedForm.defaultProps = config;
- // build outer component to expose instance api
- return function (_Component2) {
- _inherits(ReduxForm, _Component2);
+var createIsDirty = function createIsDirty(structure) {
+ return function (form, getFormState) {
+ var isPristine = __WEBPACK_IMPORTED_MODULE_0__isPristine__["a" /* default */](structure)(form, getFormState);
+ return function (state) {
+ return !isPristine(state);
+ };
+ };
+};
- function ReduxForm() {
- _classCallCheck(this, ReduxForm);
+/* harmony default export */ __webpack_exports__["a"] = (createIsDirty);
- return _possibleConstructorReturn(this, (ReduxForm.__proto__ || Object.getPrototypeOf(ReduxForm)).apply(this, arguments));
- }
+/***/ }),
+/* 629 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
- _createClass(ReduxForm, [{
- key: 'submit',
- value: function submit() {
- return this.refs.wrapped.getWrappedInstance().submit();
- }
- }, {
- key: 'reset',
- value: function reset() {
- return this.refs.wrapped.getWrappedInstance().reset();
- }
- }, {
- key: 'render',
- value: function render() {
- var _props10 = this.props,
- initialValues = _props10.initialValues,
- rest = _objectWithoutProperties(_props10, ['initialValues']);
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isValid__ = __webpack_require__(191);
- return Object(__WEBPACK_IMPORTED_MODULE_5_react__["createElement"])(ConnectedForm, _extends({}, rest, {
- ref: 'wrapped',
- // convert initialValues if need to
- initialValues: fromJS(initialValues)
- }));
- }
- }, {
- key: 'valid',
- get: function get() {
- return this.refs.wrapped.getWrappedInstance().isValid();
- }
- }, {
- key: 'invalid',
- get: function get() {
- return !this.valid;
- }
- }, {
- key: 'pristine',
- get: function get() {
- return this.refs.wrapped.getWrappedInstance().isPristine();
- }
- }, {
- key: 'dirty',
- get: function get() {
- return !this.pristine;
- }
- }, {
- key: 'values',
- get: function get() {
- return this.refs.wrapped.getWrappedInstance().getValues();
- }
- }, {
- key: 'fieldList',
- get: function get() {
- // mainly provided for testing
- return this.refs.wrapped.getWrappedInstance().getFieldList();
- }
- }, {
- key: 'wrappedInstance',
- get: function get() {
- // for testing
- return this.refs.wrapped.getWrappedInstance().refs.wrapped;
- }
- }]);
- return ReduxForm;
- }(__WEBPACK_IMPORTED_MODULE_5_react__["Component"]);
+var createIsInvalid = function createIsInvalid(structure) {
+ return function (form, getFormState) {
+ var isValid = __WEBPACK_IMPORTED_MODULE_0__isValid__["a" /* default */](structure)(form, getFormState);
+ return function (state) {
+ return !isValid(state);
};
};
};
-/* harmony default export */ __webpack_exports__["a"] = (createReduxForm);
+/* harmony default export */ __webpack_exports__["a"] = (createIsInvalid);
/***/ }),
-/* 620 */
+/* 630 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseMerge_js__ = __webpack_require__(621);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createAssigner_js__ = __webpack_require__(634);
+var createIsSubmitting = function createIsSubmitting(_ref) {
+ var getIn = _ref.getIn;
+ return function (form) {
+ var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
+ return getIn(state, 'form');
+ };
+ return function (state) {
+ var formState = getFormState(state);
+ return getIn(formState, form + '.submitting') || false;
+ };
+ };
+};
+/* harmony default export */ __webpack_exports__["a"] = (createIsSubmitting);
+/***/ }),
+/* 631 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-/**
- * This method is like `_.assign` except that it recursively merges own and
- * inherited enumerable string keyed properties of source objects into the
- * destination object. Source properties that resolve to `undefined` are
- * skipped if a destination value exists. Array and plain object properties
- * are merged recursively. Other objects and value types are overridden by
- * assignment. Source objects are applied from left to right. Subsequent
- * sources overwrite property assignments of previous sources.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 0.5.0
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = {
- * 'a': [{ 'b': 2 }, { 'd': 4 }]
- * };
- *
- * var other = {
- * 'a': [{ 'c': 3 }, { 'e': 5 }]
- * };
- *
- * _.merge(object, other);
- * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
- */
-var merge = Object(__WEBPACK_IMPORTED_MODULE_1__createAssigner_js__["a" /* default */])(function(object, source, srcIndex) {
- Object(__WEBPACK_IMPORTED_MODULE_0__baseMerge_js__["a" /* default */])(object, source, srcIndex);
-});
+"use strict";
+var createHasSubmitSucceeded = function createHasSubmitSucceeded(_ref) {
+ var getIn = _ref.getIn;
+ return function (form) {
+ var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
+ return getIn(state, 'form');
+ };
+ return function (state) {
+ var formState = getFormState(state);
+ return getIn(formState, form + '.submitSucceeded') || false;
+ };
+ };
+};
-/* harmony default export */ __webpack_exports__["a"] = (merge);
+/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitSucceeded);
+
+/***/ }),
+/* 632 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+var createHasSubmitFailed = function createHasSubmitFailed(_ref) {
+ var getIn = _ref.getIn;
+ return function (form) {
+ var getFormState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (state) {
+ return getIn(state, 'form');
+ };
+ return function (state) {
+ var formState = getFormState(state);
+ return getIn(formState, form + '.submitFailed') || false;
+ };
+ };
+};
+/* harmony default export */ __webpack_exports__["a"] = (createHasSubmitFailed);
/***/ }),
-/* 621 */
+/* 633 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Stack_js__ = __webpack_require__(172);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__ = __webpack_require__(290);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__baseFor_js__ = __webpack_require__(284);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__ = __webpack_require__(622);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__isObject_js__ = __webpack_require__(48);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keysIn_js__ = __webpack_require__(291);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+var Form = function (_Component) {
+ _inherits(Form, _Component);
-/**
- * The base implementation of `_.merge` without support for multiple sources.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {number} srcIndex The index of `source`.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
- */
-function baseMerge(object, source, srcIndex, customizer, stack) {
- if (object === source) {
- return;
- }
- Object(__WEBPACK_IMPORTED_MODULE_2__baseFor_js__["a" /* default */])(source, function(srcValue, key) {
- if (Object(__WEBPACK_IMPORTED_MODULE_4__isObject_js__["a" /* default */])(srcValue)) {
- stack || (stack = new __WEBPACK_IMPORTED_MODULE_0__Stack_js__["a" /* default */]);
- Object(__WEBPACK_IMPORTED_MODULE_3__baseMergeDeep_js__["a" /* default */])(object, source, key, srcIndex, baseMerge, customizer, stack);
+ function Form(props, context) {
+ _classCallCheck(this, Form);
+
+ var _this = _possibleConstructorReturn(this, (Form.__proto__ || Object.getPrototypeOf(Form)).call(this, props, context));
+
+ if (!context._reduxForm) {
+ throw new Error('Form must be inside a component decorated with reduxForm()');
}
- else {
- var newValue = customizer
- ? customizer(object[key], srcValue, (key + ''), object, source, stack)
- : undefined;
+ return _this;
+ }
- if (newValue === undefined) {
- newValue = srcValue;
- }
- Object(__WEBPACK_IMPORTED_MODULE_1__assignMergeValue_js__["a" /* default */])(object, key, newValue);
+ _createClass(Form, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ this.context._reduxForm.registerInnerOnSubmit(this.props.onSubmit);
}
- }, __WEBPACK_IMPORTED_MODULE_5__keysIn_js__["a" /* default */]);
-}
+ }, {
+ key: 'render',
+ value: function render() {
+ return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('form', this.props);
+ }
+ }]);
-/* harmony default export */ __webpack_exports__["a"] = (baseMerge);
+ return Form;
+}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
+
+Form.propTypes = {
+ onSubmit: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func.isRequired
+};
+Form.contextTypes = {
+ _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object
+};
+/* harmony default export */ __webpack_exports__["a"] = (Form);
/***/ }),
-/* 622 */
+/* 634 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__ = __webpack_require__(290);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__ = __webpack_require__(623);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__ = __webpack_require__(624);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__copyArray_js__ = __webpack_require__(273);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__ = __webpack_require__(626);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__isArguments_js__ = __webpack_require__(174);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__isArray_js__ = __webpack_require__(33);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__ = __webpack_require__(628);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__isBuffer_js__ = __webpack_require__(175);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__isFunction_js__ = __webpack_require__(169);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__isObject_js__ = __webpack_require__(48);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__ = __webpack_require__(166);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__ = __webpack_require__(178);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__ = __webpack_require__(629);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util_prefixName__ = __webpack_require__(125);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+var FormSection = function (_Component) {
+ _inherits(FormSection, _Component);
+ function FormSection(props, context) {
+ _classCallCheck(this, FormSection);
+ var _this = _possibleConstructorReturn(this, (FormSection.__proto__ || Object.getPrototypeOf(FormSection)).call(this, props, context));
+ if (!context._reduxForm) {
+ throw new Error('FormSection must be inside a component decorated with reduxForm()');
+ }
+ return _this;
+ }
+ _createClass(FormSection, [{
+ key: 'getChildContext',
+ value: function getChildContext() {
+ var context = this.context,
+ name = this.props.name;
+ return {
+ _reduxForm: _extends({}, context._reduxForm, {
+ sectionPrefix: __WEBPACK_IMPORTED_MODULE_1__util_prefixName__["a" /* default */](context, name)
+ })
+ };
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ children = _props.children,
+ name = _props.name,
+ component = _props.component,
+ rest = _objectWithoutProperties(_props, ['children', 'name', 'component']);
+ if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(children)) {
+ return children;
+ }
-/**
- * A specialized version of `baseMerge` for arrays and objects which performs
- * deep merges and tracks traversed objects enabling objects with circular
- * references to be merged.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {string} key The key of the value to merge.
- * @param {number} srcIndex The index of `source`.
- * @param {Function} mergeFunc The function to merge values.
- * @param {Function} [customizer] The function to customize assigned values.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
- */
-function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
- var objValue = object[key],
- srcValue = source[key],
- stacked = stack.get(srcValue);
+ return __WEBPACK_IMPORTED_MODULE_0_react__["createElement"](component, _extends({}, rest, {
+ children: children
+ }));
+ }
+ }]);
- if (stacked) {
- Object(__WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */])(object, key, stacked);
- return;
- }
- var newValue = customizer
- ? customizer(objValue, srcValue, (key + ''), object, source, stack)
- : undefined;
+ return FormSection;
+}(__WEBPACK_IMPORTED_MODULE_0_react__["Component"]);
- var isCommon = newValue === undefined;
+FormSection.propTypes = {
+ name: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string.isRequired,
+ component: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].oneOfType([__WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func, __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].string])
+};
- if (isCommon) {
- var isArr = Object(__WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */])(srcValue),
- isBuff = !isArr && Object(__WEBPACK_IMPORTED_MODULE_8__isBuffer_js__["a" /* default */])(srcValue),
- isTyped = !isArr && !isBuff && Object(__WEBPACK_IMPORTED_MODULE_12__isTypedArray_js__["a" /* default */])(srcValue);
+FormSection.defaultProps = {
+ component: 'div'
+};
- newValue = srcValue;
- if (isArr || isBuff || isTyped) {
- if (Object(__WEBPACK_IMPORTED_MODULE_6__isArray_js__["a" /* default */])(objValue)) {
- newValue = objValue;
- }
- else if (Object(__WEBPACK_IMPORTED_MODULE_7__isArrayLikeObject_js__["a" /* default */])(objValue)) {
- newValue = Object(__WEBPACK_IMPORTED_MODULE_3__copyArray_js__["a" /* default */])(objValue);
- }
- else if (isBuff) {
- isCommon = false;
- newValue = Object(__WEBPACK_IMPORTED_MODULE_1__cloneBuffer_js__["a" /* default */])(srcValue, true);
- }
- else if (isTyped) {
- isCommon = false;
- newValue = Object(__WEBPACK_IMPORTED_MODULE_2__cloneTypedArray_js__["a" /* default */])(srcValue, true);
- }
- else {
- newValue = [];
- }
- }
- else if (Object(__WEBPACK_IMPORTED_MODULE_11__isPlainObject_js__["a" /* default */])(srcValue) || Object(__WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */])(srcValue)) {
- newValue = objValue;
- if (Object(__WEBPACK_IMPORTED_MODULE_5__isArguments_js__["a" /* default */])(objValue)) {
- newValue = Object(__WEBPACK_IMPORTED_MODULE_13__toPlainObject_js__["a" /* default */])(objValue);
- }
- else if (!Object(__WEBPACK_IMPORTED_MODULE_10__isObject_js__["a" /* default */])(objValue) || (srcIndex && Object(__WEBPACK_IMPORTED_MODULE_9__isFunction_js__["a" /* default */])(objValue))) {
- newValue = Object(__WEBPACK_IMPORTED_MODULE_4__initCloneObject_js__["a" /* default */])(srcValue);
- }
- }
- else {
- isCommon = false;
- }
- }
- if (isCommon) {
- // Recursively merge objects and arrays (susceptible to call stack limits).
- stack.set(srcValue, newValue);
- mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
- stack['delete'](srcValue);
- }
- Object(__WEBPACK_IMPORTED_MODULE_0__assignMergeValue_js__["a" /* default */])(object, key, newValue);
-}
+FormSection.childContextTypes = {
+ _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object.isRequired
+};
-/* harmony default export */ __webpack_exports__["a"] = (baseMergeDeep);
+FormSection.contextTypes = {
+ _reduxForm: __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].object
+};
+/* harmony default export */ __webpack_exports__["a"] = (FormSection);
/***/ }),
-/* 623 */
+/* 635 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-/* WEBPACK VAR INJECTION */(function(module) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(32);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+var any = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].any,
+ bool = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].bool,
+ func = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].func,
+ shape = __WEBPACK_IMPORTED_MODULE_0_react__["PropTypes"].shape;
-/** Detect free variable `exports`. */
-var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
-/** Detect free variable `module`. */
-var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+var propTypes = {
+ // State:
+ asyncValidating: bool.isRequired, // true if async validation is running
+ dirty: bool.isRequired, // true if any values are different from initialValues
+ error: any, // form-wide error from '_error' key in validation result
+ warning: any, // form-wide warning from '_warning' key in validation result
+ invalid: bool.isRequired, // true if there are any validation errors
+ initialized: bool.isRequired, // true if the form has been initialized
+ pristine: bool.isRequired, // true if the values are the same as initialValues
+ submitting: bool.isRequired, // true if the form is in the process of being submitted
+ submitFailed: bool.isRequired, // true if the form was submitted and failed for any reason
+ submitSucceeded: bool.isRequired, // true if the form was successfully submitted
+ valid: bool.isRequired, // true if there are no validation errors
+ // Actions:
+ array: shape({
+ insert: func.isRequired, // function to insert a value into an array field
+ move: func.isRequired, // function to move a value within an array field
+ pop: func.isRequired, // function to pop a value off of an array field
+ push: func.isRequired, // function to push a value onto an array field
+ remove: func.isRequired, // function to remove a value from an array field
+ removeAll: func.isRequired, // function to remove all the values from an array field
+ shift: func.isRequired, // function to shift a value out of an array field
+ splice: func.isRequired, // function to splice a value into an array field
+ swap: func.isRequired, // function to swap values in an array field
+ unshift: func.isRequired // function to unshift a value into an array field
+ }),
+ asyncValidate: func.isRequired, // function to trigger async validation
+ blur: func.isRequired, // action to mark a field as blurred
+ change: func.isRequired, // action to change the value of a field
+ destroy: func.isRequired, // action to destroy the form's data in Redux
+ dispatch: func.isRequired, // the Redux dispatch action
+ handleSubmit: func.isRequired, // function to submit the form
+ initialize: func.isRequired, // action to initialize form data
+ reset: func.isRequired, // action to reset the form data to previously initialized values
+ touch: func.isRequired, // action to mark fields as touched
+ untouch: func.isRequired // action to mark fields as untouched
+};
-/** Detect the popular CommonJS extension `module.exports`. */
-var moduleExports = freeModule && freeModule.exports === freeExports;
+/* harmony default export */ __webpack_exports__["a"] = (propTypes);
-/** Built-in value references. */
-var Buffer = moduleExports ? __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Buffer : undefined,
- allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
+/***/ }),
+/* 636 */
+/***/ (function(module, exports, __webpack_require__) {
-/**
- * Creates a clone of `buffer`.
- *
- * @private
- * @param {Buffer} buffer The buffer to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Buffer} Returns the cloned buffer.
- */
-function cloneBuffer(buffer, isDeep) {
- if (isDeep) {
- return buffer.slice();
- }
- var length = buffer.length,
- result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
+"use strict";
- buffer.copy(result);
- return result;
+
+exports.__esModule = true;
+function createThunkMiddleware(extraArgument) {
+ return function (_ref) {
+ var dispatch = _ref.dispatch,
+ getState = _ref.getState;
+ return function (next) {
+ return function (action) {
+ if (typeof action === 'function') {
+ return action(dispatch, getState, extraArgument);
+ }
+
+ return next(action);
+ };
+ };
+ };
}
-/* harmony default export */ __webpack_exports__["a"] = (cloneBuffer);
+var thunk = createThunkMiddleware();
+thunk.withExtraArgument = createThunkMiddleware;
-/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(176)(module)))
+exports['default'] = thunk;
/***/ }),
-/* 624 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 637 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__ = __webpack_require__(625);
-/**
- * Creates a clone of `typedArray`.
- *
- * @private
- * @param {Object} typedArray The typed array to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned typed array.
- */
-function cloneTypedArray(typedArray, isDeep) {
- var buffer = isDeep ? Object(__WEBPACK_IMPORTED_MODULE_0__cloneArrayBuffer_js__["a" /* default */])(typedArray.buffer) : typedArray.buffer;
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
-}
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-/* harmony default export */ __webpack_exports__["a"] = (cloneTypedArray);
+var _menu = __webpack_require__(638);
+Object.defineProperty(exports, 'menu', {
+ enumerable: true,
+ get: function get() {
+ return _interopRequireDefault(_menu).default;
+ }
+});
-/***/ }),
-/* 625 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var _notification = __webpack_require__(639);
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__ = __webpack_require__(279);
+Object.defineProperty(exports, 'notification', {
+ enumerable: true,
+ get: function get() {
+ return _interopRequireDefault(_notification).default;
+ }
+});
+var _profiles = __webpack_require__(640);
-/**
- * Creates a clone of `arrayBuffer`.
- *
- * @private
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
- * @returns {ArrayBuffer} Returns the cloned array buffer.
- */
-function cloneArrayBuffer(arrayBuffer) {
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
- new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](result).set(new __WEBPACK_IMPORTED_MODULE_0__Uint8Array_js__["a" /* default */](arrayBuffer));
- return result;
-}
+Object.defineProperty(exports, 'profiles', {
+ enumerable: true,
+ get: function get() {
+ return _interopRequireDefault(_profiles).default;
+ }
+});
-/* harmony default export */ __webpack_exports__["a"] = (cloneArrayBuffer);
+var _atc = __webpack_require__(659);
+
+Object.defineProperty(exports, 'atc', {
+ enumerable: true,
+ get: function get() {
+ return _interopRequireDefault(_atc).default;
+ }
+});
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/***/ }),
-/* 626 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 638 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseCreate_js__ = __webpack_require__(627);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(254);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isPrototype_js__ = __webpack_require__(180);
-
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-/**
- * Initializes an object clone.
- *
- * @private
- * @param {Object} object The object to clone.
- * @returns {Object} Returns the initialized clone.
- */
-function initCloneObject(object) {
- return (typeof object.constructor == 'function' && !Object(__WEBPACK_IMPORTED_MODULE_2__isPrototype_js__["a" /* default */])(object))
- ? Object(__WEBPACK_IMPORTED_MODULE_0__baseCreate_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */])(object))
- : {};
-}
+var _assign = __webpack_require__(42);
-/* harmony default export */ __webpack_exports__["a"] = (initCloneObject);
+var _assign2 = _interopRequireDefault(_assign);
+exports.default = menu;
-/***/ }),
-/* 627 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var _ActionTypes = __webpack_require__(49);
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(48);
+var types = _interopRequireWildcard(_ActionTypes);
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-/** Built-in value references. */
-var objectCreate = Object.create;
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-/**
- * The base implementation of `_.create` without support for assigning
- * properties to the created object.
- *
- * @private
- * @param {Object} proto The object to inherit from.
- * @returns {Object} Returns the new object.
- */
-var baseCreate = (function() {
- function object() {}
- return function(proto) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(proto)) {
- return {};
- }
- if (objectCreate) {
- return objectCreate(proto);
- }
- object.prototype = proto;
- var result = new object;
- object.prototype = undefined;
- return result;
+function menu() {
+ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
+ currentMenu: null
};
-}());
-
-/* harmony default export */ __webpack_exports__["a"] = (baseCreate);
+ var action = arguments[1];
+ switch (action.type) {
+ case types.CHANGE_MENU:
+ return (0, _assign2.default)({}, state, {
+ currentMenu: action.menu
+ });
+ default:
+ return state;
+ }
+}
/***/ }),
-/* 628 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 639 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__ = __webpack_require__(120);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__ = __webpack_require__(54);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = notification;
-/**
- * This method is like `_.isArrayLike` except that it also checks if `value`
- * is an object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array-like object,
- * else `false`.
- * @example
- *
- * _.isArrayLikeObject([1, 2, 3]);
- * // => true
- *
- * _.isArrayLikeObject(document.body.children);
- * // => true
- *
- * _.isArrayLikeObject('abc');
- * // => false
- *
- * _.isArrayLikeObject(_.noop);
- * // => false
- */
-function isArrayLikeObject(value) {
- return Object(__WEBPACK_IMPORTED_MODULE_1__isObjectLike_js__["a" /* default */])(value) && Object(__WEBPACK_IMPORTED_MODULE_0__isArrayLike_js__["a" /* default */])(value);
-}
+var _ActionTypes = __webpack_require__(49);
-/* harmony default export */ __webpack_exports__["a"] = (isArrayLikeObject);
+var types = _interopRequireWildcard(_ActionTypes);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function notification() {
+ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
+ message: null
+ };
+ var action = arguments[1];
+ switch (action.type) {
+ case types.NOTIFICATION_ADD:
+ return { message: action.message };
+ default:
+ return state;
+ }
+}
/***/ }),
-/* 629 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 640 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__copyObject_js__ = __webpack_require__(630);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__keysIn_js__ = __webpack_require__(291);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-/**
- * Converts `value` to a plain object flattening inherited enumerable string
- * keyed properties of `value` to own properties of the plain object.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Object} Returns the converted plain object.
- * @example
- *
- * function Foo() {
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.assign({ 'a': 1 }, new Foo);
- * // => { 'a': 1, 'b': 2 }
- *
- * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
- * // => { 'a': 1, 'b': 2, 'c': 3 }
- */
-function toPlainObject(value) {
- return Object(__WEBPACK_IMPORTED_MODULE_0__copyObject_js__["a" /* default */])(value, Object(__WEBPACK_IMPORTED_MODULE_1__keysIn_js__["a" /* default */])(value));
-}
-
-/* harmony default export */ __webpack_exports__["a"] = (toPlainObject);
+var _typeof2 = __webpack_require__(61);
+var _typeof3 = _interopRequireDefault(_typeof2);
-/***/ }),
-/* 630 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var _assign = __webpack_require__(42);
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assignValue_js__ = __webpack_require__(631);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__ = __webpack_require__(121);
+var _assign2 = _interopRequireDefault(_assign);
+exports.default = profiles;
+var _ActionTypes = __webpack_require__(49);
-/**
- * Copies properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property identifiers to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @param {Function} [customizer] The function to customize copied values.
- * @returns {Object} Returns `object`.
- */
-function copyObject(source, props, object, customizer) {
- var isNew = !object;
- object || (object = {});
+var types = _interopRequireWildcard(_ActionTypes);
- var index = -1,
- length = props.length;
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
- while (++index < length) {
- var key = props[index];
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var newValue = customizer
- ? customizer(object[key], source[key], key, object, source)
- : undefined;
+function profiles() {
+ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
+ currentProfile: 'default',
+ profiles: [{
+ name: 'default',
+ description: 'Default profile',
+ settings: {}
+ }]
+ };
+ var action = arguments[1];
- if (newValue === undefined) {
- newValue = source[key];
+ if (action.type === types.PROFILE_CREATE) {
+ var list = state.profiles.map(function (x) {
+ return (0, _assign2.default)({}, x);
+ });
+ list.push({
+ name: action.name,
+ description: action.description,
+ settings: {}
+ });
+ return (0, _assign2.default)({}, state, { profiles: list });
+ } else if (action.type === types.PROFILE_SET_ENABLED) {
+ if (!state.profiles.filter(function (x) {
+ return x.name === action.name;
+ })) {
+ return state;
}
- if (isNew) {
- Object(__WEBPACK_IMPORTED_MODULE_1__baseAssignValue_js__["a" /* default */])(object, key, newValue);
- } else {
- Object(__WEBPACK_IMPORTED_MODULE_0__assignValue_js__["a" /* default */])(object, key, newValue);
+ return (0, _assign2.default)({}, state, { currentProfile: action.name });
+ } else if (action.type === types.PROFILE_REMOVE) {
+ if (action.name === 'default') {
+ return state;
}
+ return (0, _assign2.default)({}, state, {
+ profiles: state.profiles.filter(function (x) {
+ return x.name !== action.name;
+ }),
+ currentProfile: state.currentProfile === action.name ? 'default' : state.currentProfile
+ });
+ } else if (action.type === types.PROFILE_UPDATE_SETTINGS) {
+ var _ret = function () {
+ var profile = state.profiles.filter(function (x) {
+ return x.name === action.name;
+ })[0];
+ if (!profile) {
+ return {
+ v: state
+ };
+ }
+
+ var settingsObj = (0, _assign2.default)({}, profile.settings);
+ settingsObj[action.shop] = (0, _assign2.default)({}, profile.settings[action.shop], action.value);
+ var profileList = state.profiles.map(function (x) {
+ if (x.name === action.name) {
+ return (0, _assign2.default)({}, x, { settings: settingsObj });
+ }
+ return x;
+ });
+ return {
+ v: (0, _assign2.default)({}, state, { profiles: profileList })
+ };
+ }();
+
+ if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v;
}
- return object;
+ return state;
}
-/* harmony default export */ __webpack_exports__["a"] = (copyObject);
+/***/ }),
+/* 641 */
+/***/ (function(module, exports, __webpack_require__) {
+module.exports = { "default": __webpack_require__(642), __esModule: true };
/***/ }),
-/* 631 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 642 */
+/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__ = __webpack_require__(121);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__eq_js__ = __webpack_require__(90);
+__webpack_require__(94);
+__webpack_require__(128);
+module.exports = __webpack_require__(194).f('iterator');
+/***/ }),
+/* 643 */
+/***/ (function(module, exports, __webpack_require__) {
+var toInteger = __webpack_require__(141)
+ , defined = __webpack_require__(139);
+// true -> String#at
+// false -> String#codePointAt
+module.exports = function(TO_STRING){
+ return function(that, pos){
+ var s = String(defined(that))
+ , i = toInteger(pos)
+ , l = s.length
+ , a, b;
+ if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
+ a = s.charCodeAt(i);
+ return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
+ ? TO_STRING ? s.charAt(i) : a
+ : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
+ };
+};
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
+/***/ }),
+/* 644 */
+/***/ (function(module, exports, __webpack_require__) {
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
+"use strict";
-/**
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
-function assignValue(object, key, value) {
- var objValue = object[key];
- if (!(hasOwnProperty.call(object, key) && Object(__WEBPACK_IMPORTED_MODULE_1__eq_js__["a" /* default */])(objValue, value)) ||
- (value === undefined && !(key in object))) {
- Object(__WEBPACK_IMPORTED_MODULE_0__baseAssignValue_js__["a" /* default */])(object, key, value);
- }
-}
+var create = __webpack_require__(193)
+ , descriptor = __webpack_require__(86)
+ , setToStringTag = __webpack_require__(127)
+ , IteratorPrototype = {};
-/* harmony default export */ __webpack_exports__["a"] = (assignValue);
+// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
+__webpack_require__(53)(IteratorPrototype, __webpack_require__(24)('iterator'), function(){ return this; });
+module.exports = function(Constructor, NAME, next){
+ Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
+ setToStringTag(Constructor, NAME + ' Iterator');
+};
/***/ }),
-/* 632 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isObject_js__ = __webpack_require__(48);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isPrototype_js__ = __webpack_require__(180);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__ = __webpack_require__(633);
+/* 645 */
+/***/ (function(module, exports, __webpack_require__) {
+var dP = __webpack_require__(34)
+ , anObject = __webpack_require__(35)
+ , getKeys = __webpack_require__(70);
+module.exports = __webpack_require__(43) ? Object.defineProperties : function defineProperties(O, Properties){
+ anObject(O);
+ var keys = getKeys(Properties)
+ , length = keys.length
+ , i = 0
+ , P;
+ while(length > i)dP.f(O, P = keys[i++], Properties[P]);
+ return O;
+};
+/***/ }),
+/* 646 */
+/***/ (function(module, exports, __webpack_require__) {
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
+"use strict";
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
+var addToUnscopables = __webpack_require__(647)
+ , step = __webpack_require__(648)
+ , Iterators = __webpack_require__(83)
+ , toIObject = __webpack_require__(55);
-/**
- * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
-function baseKeysIn(object) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_0__isObject_js__["a" /* default */])(object)) {
- return Object(__WEBPACK_IMPORTED_MODULE_2__nativeKeysIn_js__["a" /* default */])(object);
+// 22.1.3.4 Array.prototype.entries()
+// 22.1.3.13 Array.prototype.keys()
+// 22.1.3.29 Array.prototype.values()
+// 22.1.3.30 Array.prototype[@@iterator]()
+module.exports = __webpack_require__(297)(Array, 'Array', function(iterated, kind){
+ this._t = toIObject(iterated); // target
+ this._i = 0; // next index
+ this._k = kind; // kind
+// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
+}, function(){
+ var O = this._t
+ , kind = this._k
+ , index = this._i++;
+ if(!O || index >= O.length){
+ this._t = undefined;
+ return step(1);
}
- var isProto = Object(__WEBPACK_IMPORTED_MODULE_1__isPrototype_js__["a" /* default */])(object),
- result = [];
+ if(kind == 'keys' )return step(0, index);
+ if(kind == 'values')return step(0, O[index]);
+ return step(0, [index, O[index]]);
+}, 'values');
- for (var key in object) {
- if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
- result.push(key);
- }
- }
- return result;
-}
+// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
+Iterators.Arguments = Iterators.Array;
-/* harmony default export */ __webpack_exports__["a"] = (baseKeysIn);
+addToUnscopables('keys');
+addToUnscopables('values');
+addToUnscopables('entries');
+
+/***/ }),
+/* 647 */
+/***/ (function(module, exports) {
+module.exports = function(){ /* empty */ };
/***/ }),
-/* 633 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 648 */
+/***/ (function(module, exports) {
-"use strict";
-/**
- * This function is like
- * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * except that it includes inherited enumerable properties.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
-function nativeKeysIn(object) {
- var result = [];
- if (object != null) {
- for (var key in Object(object)) {
- result.push(key);
- }
- }
- return result;
-}
+module.exports = function(done, value){
+ return {value: value, done: !!done};
+};
-/* harmony default export */ __webpack_exports__["a"] = (nativeKeysIn);
+/***/ }),
+/* 649 */
+/***/ (function(module, exports, __webpack_require__) {
+module.exports = { "default": __webpack_require__(650), __esModule: true };
/***/ }),
-/* 634 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 650 */
+/***/ (function(module, exports, __webpack_require__) {
+
+__webpack_require__(651);
+__webpack_require__(303);
+__webpack_require__(657);
+__webpack_require__(658);
+module.exports = __webpack_require__(18).Symbol;
+
+/***/ }),
+/* 651 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseRest_js__ = __webpack_require__(635);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__ = __webpack_require__(642);
+// ECMAScript 6 symbols shim
+var global = __webpack_require__(25)
+ , has = __webpack_require__(54)
+ , DESCRIPTORS = __webpack_require__(43)
+ , $export = __webpack_require__(33)
+ , redefine = __webpack_require__(298)
+ , META = __webpack_require__(652).KEY
+ , $fails = __webpack_require__(69)
+ , shared = __webpack_require__(143)
+ , setToStringTag = __webpack_require__(127)
+ , uid = __webpack_require__(103)
+ , wks = __webpack_require__(24)
+ , wksExt = __webpack_require__(194)
+ , wksDefine = __webpack_require__(195)
+ , keyOf = __webpack_require__(653)
+ , enumKeys = __webpack_require__(654)
+ , isArray = __webpack_require__(655)
+ , anObject = __webpack_require__(35)
+ , toIObject = __webpack_require__(55)
+ , toPrimitive = __webpack_require__(138)
+ , createDesc = __webpack_require__(86)
+ , _create = __webpack_require__(193)
+ , gOPNExt = __webpack_require__(656)
+ , $GOPD = __webpack_require__(302)
+ , $DP = __webpack_require__(34)
+ , $keys = __webpack_require__(70)
+ , gOPD = $GOPD.f
+ , dP = $DP.f
+ , gOPN = gOPNExt.f
+ , $Symbol = global.Symbol
+ , $JSON = global.JSON
+ , _stringify = $JSON && $JSON.stringify
+ , PROTOTYPE = 'prototype'
+ , HIDDEN = wks('_hidden')
+ , TO_PRIMITIVE = wks('toPrimitive')
+ , isEnum = {}.propertyIsEnumerable
+ , SymbolRegistry = shared('symbol-registry')
+ , AllSymbols = shared('symbols')
+ , OPSymbols = shared('op-symbols')
+ , ObjectProto = Object[PROTOTYPE]
+ , USE_NATIVE = typeof $Symbol == 'function'
+ , QObject = global.QObject;
+// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
+var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
+// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
+var setSymbolDesc = DESCRIPTORS && $fails(function(){
+ return _create(dP({}, 'a', {
+ get: function(){ return dP(this, 'a', {value: 7}).a; }
+ })).a != 7;
+}) ? function(it, key, D){
+ var protoDesc = gOPD(ObjectProto, key);
+ if(protoDesc)delete ObjectProto[key];
+ dP(it, key, D);
+ if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
+} : dP;
-/**
- * Creates a function like `_.assign`.
- *
- * @private
- * @param {Function} assigner The function to assign values.
- * @returns {Function} Returns the new assigner function.
- */
-function createAssigner(assigner) {
- return Object(__WEBPACK_IMPORTED_MODULE_0__baseRest_js__["a" /* default */])(function(object, sources) {
- var index = -1,
- length = sources.length,
- customizer = length > 1 ? sources[length - 1] : undefined,
- guard = length > 2 ? sources[2] : undefined;
+var wrap = function(tag){
+ var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
+ sym._k = tag;
+ return sym;
+};
- customizer = (assigner.length > 3 && typeof customizer == 'function')
- ? (length--, customizer)
- : undefined;
+var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){
+ return typeof it == 'symbol';
+} : function(it){
+ return it instanceof $Symbol;
+};
- if (guard && Object(__WEBPACK_IMPORTED_MODULE_1__isIterateeCall_js__["a" /* default */])(sources[0], sources[1], guard)) {
- customizer = length < 3 ? undefined : customizer;
- length = 1;
- }
- object = Object(object);
- while (++index < length) {
- var source = sources[index];
- if (source) {
- assigner(object, source, index, customizer);
- }
- }
- return object;
+var $defineProperty = function defineProperty(it, key, D){
+ if(it === ObjectProto)$defineProperty(OPSymbols, key, D);
+ anObject(it);
+ key = toPrimitive(key, true);
+ anObject(D);
+ if(has(AllSymbols, key)){
+ if(!D.enumerable){
+ if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
+ it[HIDDEN][key] = true;
+ } else {
+ if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
+ D = _create(D, {enumerable: createDesc(0, false)});
+ } return setSymbolDesc(it, key, D);
+ } return dP(it, key, D);
+};
+var $defineProperties = function defineProperties(it, P){
+ anObject(it);
+ var keys = enumKeys(P = toIObject(P))
+ , i = 0
+ , l = keys.length
+ , key;
+ while(l > i)$defineProperty(it, key = keys[i++], P[key]);
+ return it;
+};
+var $create = function create(it, P){
+ return P === undefined ? _create(it) : $defineProperties(_create(it), P);
+};
+var $propertyIsEnumerable = function propertyIsEnumerable(key){
+ var E = isEnum.call(this, key = toPrimitive(key, true));
+ if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;
+ return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
+};
+var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
+ it = toIObject(it);
+ key = toPrimitive(key, true);
+ if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;
+ var D = gOPD(it, key);
+ if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
+ return D;
+};
+var $getOwnPropertyNames = function getOwnPropertyNames(it){
+ var names = gOPN(toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i){
+ if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
+ } return result;
+};
+var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
+ var IS_OP = it === ObjectProto
+ , names = gOPN(IS_OP ? OPSymbols : toIObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i){
+ if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);
+ } return result;
+};
+
+// 19.4.1.1 Symbol([description])
+if(!USE_NATIVE){
+ $Symbol = function Symbol(){
+ if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');
+ var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
+ var $set = function(value){
+ if(this === ObjectProto)$set.call(OPSymbols, value);
+ if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
+ setSymbolDesc(this, tag, createDesc(1, value));
+ };
+ if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});
+ return wrap(tag);
+ };
+ redefine($Symbol[PROTOTYPE], 'toString', function toString(){
+ return this._k;
});
-}
-/* harmony default export */ __webpack_exports__["a"] = (createAssigner);
+ $GOPD.f = $getOwnPropertyDescriptor;
+ $DP.f = $defineProperty;
+ __webpack_require__(301).f = gOPNExt.f = $getOwnPropertyNames;
+ __webpack_require__(104).f = $propertyIsEnumerable;
+ __webpack_require__(145).f = $getOwnPropertySymbols;
+ if(DESCRIPTORS && !__webpack_require__(126)){
+ redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
+ }
-/***/ }),
-/* 635 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+ wksExt.f = function(name){
+ return wrap(wks(name));
+ }
+}
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__identity_js__ = __webpack_require__(182);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__overRest_js__ = __webpack_require__(636);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setToString_js__ = __webpack_require__(638);
+$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
+for(var symbols = (
+ // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
+ 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
+).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);
+for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);
+$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
+ // 19.4.2.1 Symbol.for(key)
+ 'for': function(key){
+ return has(SymbolRegistry, key += '')
+ ? SymbolRegistry[key]
+ : SymbolRegistry[key] = $Symbol(key);
+ },
+ // 19.4.2.5 Symbol.keyFor(sym)
+ keyFor: function keyFor(key){
+ if(isSymbol(key))return keyOf(SymbolRegistry, key);
+ throw TypeError(key + ' is not a symbol!');
+ },
+ useSetter: function(){ setter = true; },
+ useSimple: function(){ setter = false; }
+});
-/**
- * The base implementation of `_.rest` which doesn't validate or coerce arguments.
- *
- * @private
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @returns {Function} Returns the new function.
- */
-function baseRest(func, start) {
- return Object(__WEBPACK_IMPORTED_MODULE_2__setToString_js__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__overRest_js__["a" /* default */])(func, start, __WEBPACK_IMPORTED_MODULE_0__identity_js__["a" /* default */]), func + '');
-}
+$export($export.S + $export.F * !USE_NATIVE, 'Object', {
+ // 19.1.2.2 Object.create(O [, Properties])
+ create: $create,
+ // 19.1.2.4 Object.defineProperty(O, P, Attributes)
+ defineProperty: $defineProperty,
+ // 19.1.2.3 Object.defineProperties(O, Properties)
+ defineProperties: $defineProperties,
+ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
+ // 19.1.2.7 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: $getOwnPropertyNames,
+ // 19.1.2.8 Object.getOwnPropertySymbols(O)
+ getOwnPropertySymbols: $getOwnPropertySymbols
+});
-/* harmony default export */ __webpack_exports__["a"] = (baseRest);
+// 24.3.2 JSON.stringify(value [, replacer [, space]])
+$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){
+ var S = $Symbol();
+ // MS Edge converts symbol values to JSON as {}
+ // WebKit converts symbol values to JSON as null
+ // V8 throws on boxed symbols
+ return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
+})), 'JSON', {
+ stringify: function stringify(it){
+ if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
+ var args = [it]
+ , i = 1
+ , replacer, $replacer;
+ while(arguments.length > i)args.push(arguments[i++]);
+ replacer = args[1];
+ if(typeof replacer == 'function')$replacer = replacer;
+ if($replacer || !isArray(replacer))replacer = function(key, value){
+ if($replacer)value = $replacer.call(this, key, value);
+ if(!isSymbol(value))return value;
+ };
+ args[1] = replacer;
+ return _stringify.apply($JSON, args);
+ }
+});
+// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
+$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(53)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
+// 19.4.3.5 Symbol.prototype[@@toStringTag]
+setToStringTag($Symbol, 'Symbol');
+// 20.2.1.9 Math[@@toStringTag]
+setToStringTag(Math, 'Math', true);
+// 24.3.3 JSON[@@toStringTag]
+setToStringTag(global.JSON, 'JSON', true);
/***/ }),
-/* 636 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 652 */
+/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__apply_js__ = __webpack_require__(637);
+var META = __webpack_require__(103)('meta')
+ , isObject = __webpack_require__(68)
+ , has = __webpack_require__(54)
+ , setDesc = __webpack_require__(34).f
+ , id = 0;
+var isExtensible = Object.isExtensible || function(){
+ return true;
+};
+var FREEZE = !__webpack_require__(69)(function(){
+ return isExtensible(Object.preventExtensions({}));
+});
+var setMeta = function(it){
+ setDesc(it, META, {value: {
+ i: 'O' + ++id, // object ID
+ w: {} // weak collections IDs
+ }});
+};
+var fastKey = function(it, create){
+ // return primitive with prefix
+ if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
+ if(!has(it, META)){
+ // can't set metadata to uncaught frozen object
+ if(!isExtensible(it))return 'F';
+ // not necessary to add metadata
+ if(!create)return 'E';
+ // add missing metadata
+ setMeta(it);
+ // return object ID
+ } return it[META].i;
+};
+var getWeak = function(it, create){
+ if(!has(it, META)){
+ // can't set metadata to uncaught frozen object
+ if(!isExtensible(it))return true;
+ // not necessary to add metadata
+ if(!create)return false;
+ // add missing metadata
+ setMeta(it);
+ // return hash weak collections IDs
+ } return it[META].w;
+};
+// add metadata on freeze-family methods calling
+var onFreeze = function(it){
+ if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
+ return it;
+};
+var meta = module.exports = {
+ KEY: META,
+ NEED: false,
+ fastKey: fastKey,
+ getWeak: getWeak,
+ onFreeze: onFreeze
+};
+
+/***/ }),
+/* 653 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var getKeys = __webpack_require__(70)
+ , toIObject = __webpack_require__(55);
+module.exports = function(object, el){
+ var O = toIObject(object)
+ , keys = getKeys(O)
+ , length = keys.length
+ , index = 0
+ , key;
+ while(length > index)if(O[key = keys[index++]] === el)return key;
+};
+/***/ }),
+/* 654 */
+/***/ (function(module, exports, __webpack_require__) {
-/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max;
+// all enumerable object keys, includes symbols
+var getKeys = __webpack_require__(70)
+ , gOPS = __webpack_require__(145)
+ , pIE = __webpack_require__(104);
+module.exports = function(it){
+ var result = getKeys(it)
+ , getSymbols = gOPS.f;
+ if(getSymbols){
+ var symbols = getSymbols(it)
+ , isEnum = pIE.f
+ , i = 0
+ , key;
+ while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);
+ } return result;
+};
-/**
- * A specialized version of `baseRest` which transforms the rest array.
- *
- * @private
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @param {Function} transform The rest array transform.
- * @returns {Function} Returns the new function.
- */
-function overRest(func, start, transform) {
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- array = Array(length);
+/***/ }),
+/* 655 */
+/***/ (function(module, exports, __webpack_require__) {
- while (++index < length) {
- array[index] = args[start + index];
- }
- index = -1;
- var otherArgs = Array(start + 1);
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = transform(array);
- return Object(__WEBPACK_IMPORTED_MODULE_0__apply_js__["a" /* default */])(func, this, otherArgs);
- };
-}
+// 7.2.2 IsArray(argument)
+var cof = __webpack_require__(87);
+module.exports = Array.isArray || function isArray(arg){
+ return cof(arg) == 'Array';
+};
-/* harmony default export */ __webpack_exports__["a"] = (overRest);
+/***/ }),
+/* 656 */
+/***/ (function(module, exports, __webpack_require__) {
+// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
+var toIObject = __webpack_require__(55)
+ , gOPN = __webpack_require__(301).f
+ , toString = {}.toString;
-/***/ }),
-/* 637 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
+ ? Object.getOwnPropertyNames(window) : [];
-"use strict";
-/**
- * A faster alternative to `Function#apply`, this function invokes `func`
- * with the `this` binding of `thisArg` and the arguments of `args`.
- *
- * @private
- * @param {Function} func The function to invoke.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {Array} args The arguments to invoke `func` with.
- * @returns {*} Returns the result of `func`.
- */
-function apply(func, thisArg, args) {
- switch (args.length) {
- case 0: return func.call(thisArg);
- case 1: return func.call(thisArg, args[0]);
- case 2: return func.call(thisArg, args[0], args[1]);
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
+var getWindowNames = function(it){
+ try {
+ return gOPN(it);
+ } catch(e){
+ return windowNames.slice();
}
- return func.apply(thisArg, args);
-}
+};
-/* harmony default export */ __webpack_exports__["a"] = (apply);
+module.exports.f = function getOwnPropertyNames(it){
+ return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
+};
/***/ }),
-/* 638 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__ = __webpack_require__(639);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shortOut_js__ = __webpack_require__(641);
-
-
+/* 657 */
+/***/ (function(module, exports, __webpack_require__) {
-/**
- * Sets the `toString` method of `func` to return `string`.
- *
- * @private
- * @param {Function} func The function to modify.
- * @param {Function} string The `toString` result.
- * @returns {Function} Returns `func`.
- */
-var setToString = Object(__WEBPACK_IMPORTED_MODULE_1__shortOut_js__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_0__baseSetToString_js__["a" /* default */]);
+__webpack_require__(195)('asyncIterator');
-/* harmony default export */ __webpack_exports__["a"] = (setToString);
+/***/ }),
+/* 658 */
+/***/ (function(module, exports, __webpack_require__) {
+__webpack_require__(195)('observable');
/***/ }),
-/* 639 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 659 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__constant_js__ = __webpack_require__(640);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__defineProperty_js__ = __webpack_require__(283);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__identity_js__ = __webpack_require__(182);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+var _assign = __webpack_require__(42);
-/**
- * The base implementation of `setToString` without support for hot loop shorting.
- *
- * @private
- * @param {Function} func The function to modify.
- * @param {Function} string The `toString` result.
- * @returns {Function} Returns `func`.
- */
-var baseSetToString = !__WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_2__identity_js__["a" /* default */] : function(func, string) {
- return Object(__WEBPACK_IMPORTED_MODULE_1__defineProperty_js__["a" /* default */])(func, 'toString', {
- 'configurable': true,
- 'enumerable': false,
- 'value': Object(__WEBPACK_IMPORTED_MODULE_0__constant_js__["a" /* default */])(string),
- 'writable': true
- });
-};
+var _assign2 = _interopRequireDefault(_assign);
-/* harmony default export */ __webpack_exports__["a"] = (baseSetToString);
+exports.default = atc;
+var _ActionTypes = __webpack_require__(49);
-/***/ }),
-/* 640 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var types = _interopRequireWildcard(_ActionTypes);
-"use strict";
-/**
- * Creates a function that returns `value`.
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Util
- * @param {*} value The value to return from the new function.
- * @returns {Function} Returns the new constant function.
- * @example
- *
- * var objects = _.times(2, _.constant({ 'a': 1 }));
- *
- * console.log(objects);
- * // => [{ 'a': 1 }, { 'a': 1 }]
- *
- * console.log(objects[0] === objects[1]);
- * // => true
- */
-function constant(value) {
- return function() {
- return value;
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function atc() {
+ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
+ atcProducts: []
};
-}
+ var action = arguments[1];
-/* harmony default export */ __webpack_exports__["a"] = (constant);
+ if (action.type === types.ATC_PRODUCT_ADD) {
+ if (!action.data.name || state.atcProducts.filter(function (x) {
+ return x.name === action.data.name;
+ }).length) {
+ return state;
+ }
+ var atcList = state.atcProducts.map(function (x) {
+ return (0, _assign2.default)({}, x);
+ });
+ atcList.push(action.data);
+ return { atcProducts: atcList };
+ } else if (action.type === types.ATC_PRODUCT_REMOVE) {
+ if (!action.name) {
+ return state;
+ }
+ return {
+ atcProducts: state.atcProducts.map(function (x) {
+ return (0, _assign2.default)({}, x);
+ }).filter(function (x) {
+ return x.name !== action.name;
+ })
+ };
+ } else if (action.type === types.ATC_SET_PRODUCT_ENABLED) {
+ var atcProduct = state.atcProducts.filter(function (x) {
+ return x.name === action.name;
+ })[0];
+ if (!atcProduct) return state;
+ var newList = state.atcProducts.map(function (x) {
+ if (x.name === action.name) {
+ return (0, _assign2.default)({}, x, { enabled: action.enabled });
+ }
+ return (0, _assign2.default)({}, x);
+ });
+ return {
+ atcProducts: newList
+ };
+ }
+ return state;
+}
/***/ }),
-/* 641 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 660 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/** Used to detect hot functions by number of calls within a span of milliseconds. */
-var HOT_COUNT = 800,
- HOT_SPAN = 16;
-
-/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeNow = Date.now;
-
-/**
- * Creates a function that'll short out and invoke `identity` instead
- * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
- * milliseconds.
- *
- * @private
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new shortable function.
- */
-function shortOut(func) {
- var count = 0,
- lastCalled = 0;
- return function() {
- var stamp = nativeNow(),
- remaining = HOT_SPAN - (stamp - lastCalled);
- lastCalled = stamp;
- if (remaining > 0) {
- if (++count >= HOT_COUNT) {
- return arguments[0];
- }
- } else {
- count = 0;
- }
- return func.apply(undefined, arguments);
- };
-}
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-/* harmony default export */ __webpack_exports__["a"] = (shortOut);
+var _react = __webpack_require__(0);
+var _react2 = _interopRequireDefault(_react);
-/***/ }),
-/* 642 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var _reactRouter = __webpack_require__(163);
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__eq_js__ = __webpack_require__(90);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__ = __webpack_require__(120);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isIndex_js__ = __webpack_require__(177);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__isObject_js__ = __webpack_require__(48);
+var _App = __webpack_require__(661);
+var _App2 = _interopRequireDefault(_App);
+var _Supreme = __webpack_require__(325);
+var _Supreme2 = _interopRequireDefault(_Supreme);
+var _Profile = __webpack_require__(850);
-/**
- * Checks if the given arguments are from an iteratee call.
- *
- * @private
- * @param {*} value The potential iteratee value argument.
- * @param {*} index The potential iteratee index or key argument.
- * @param {*} object The potential iteratee object argument.
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
- * else `false`.
- */
-function isIterateeCall(value, index, object) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_3__isObject_js__["a" /* default */])(object)) {
- return false;
- }
- var type = typeof index;
- if (type == 'number'
- ? (Object(__WEBPACK_IMPORTED_MODULE_1__isArrayLike_js__["a" /* default */])(object) && Object(__WEBPACK_IMPORTED_MODULE_2__isIndex_js__["a" /* default */])(index, object.length))
- : (type == 'string' && index in object)
- ) {
- return Object(__WEBPACK_IMPORTED_MODULE_0__eq_js__["a" /* default */])(object[index], value);
- }
- return false;
-}
+var _Profile2 = _interopRequireDefault(_Profile);
-/* harmony default export */ __webpack_exports__["a"] = (isIterateeCall);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+exports.default = function () {
+ return _react2.default.createElement(
+ _reactRouter.Route,
+ { component: _App2.default },
+ _react2.default.createElement(_reactRouter.Route, { path: 'supreme/', component: _Supreme2.default }),
+ _react2.default.createElement(_reactRouter.Route, { path: 'profiles/', component: _Profile2.default }),
+ _react2.default.createElement(_reactRouter.Redirect, { from: '/', to: 'supreme/' })
+ );
+};
/***/ }),
-/* 643 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 661 */
+/***/ (function(module, exports, __webpack_require__) {
"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(184);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__);
-var asyncValidation = function asyncValidation(fn, start, stop, field) {
- start(field);
- var promise = fn();
- if (!__WEBPACK_IMPORTED_MODULE_0_is_promise___default()(promise)) {
- throw new Error('asyncValidate function passed to reduxForm must return a promise');
- }
- var handleErrors = function handleErrors(rejected) {
- return function (errors) {
- if (errors && Object.keys(errors).length) {
- stop(errors);
- return errors;
- } else if (rejected) {
- stop();
- throw new Error('Asynchronous validation promise was rejected without errors.');
- }
- stop();
- return Promise.resolve();
- };
- };
- return promise.then(handleErrors(false), handleErrors(true));
-};
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-/* harmony default export */ __webpack_exports__["a"] = (asyncValidation);
+var _getPrototypeOf = __webpack_require__(3);
-/***/ }),
-/* 644 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__silenceEvent__ = __webpack_require__(292);
+var _classCallCheck2 = __webpack_require__(1);
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-var silenceEvents = function silenceEvents(fn) {
- return function (event) {
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
+var _createClass2 = __webpack_require__(2);
- return Object(__WEBPACK_IMPORTED_MODULE_0__silenceEvent__["a" /* default */])(event) ? fn.apply(undefined, args) : fn.apply(undefined, [event].concat(args));
- };
-};
+var _createClass3 = _interopRequireDefault(_createClass2);
-/* harmony default export */ __webpack_exports__["a"] = (silenceEvents);
+var _possibleConstructorReturn2 = __webpack_require__(4);
-/***/ }),
-/* 645 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__structure_plain__ = __webpack_require__(11);
+var _inherits2 = __webpack_require__(5);
+var _inherits3 = _interopRequireDefault(_inherits2);
-var toArray = function toArray(value) {
- return Array.isArray(value) ? value : [value];
-};
+var _react = __webpack_require__(0);
-var getError = function getError(value, values, props, validators) {
- var array = toArray(validators);
- for (var i = 0; i < array.length; i++) {
- var error = array[i](value, values, props);
- if (error) {
- return error;
- }
- }
-};
+var _react2 = _interopRequireDefault(_react);
-var generateValidator = function generateValidator(validators, _ref) {
- var getIn = _ref.getIn;
- return function (values, props) {
- var errors = {};
- Object.keys(validators).forEach(function (name) {
- var value = getIn(values, name);
- var error = getError(value, values, props, validators[name]);
- if (error) {
- errors = __WEBPACK_IMPORTED_MODULE_0__structure_plain__["a" /* default */].setIn(errors, name, error);
- }
- });
- return errors;
- };
-};
+var _MuiThemeProvider = __webpack_require__(305);
-/* harmony default export */ __webpack_exports__["a"] = (generateValidator);
+var _MuiThemeProvider2 = _interopRequireDefault(_MuiThemeProvider);
-/***/ }),
-/* 646 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+var _AppDrawer = __webpack_require__(711);
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise__ = __webpack_require__(184);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_is_promise___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_is_promise__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SubmissionError__ = __webpack_require__(268);
-function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
+var _AppDrawer2 = _interopRequireDefault(_AppDrawer);
+var _NotificationBar = __webpack_require__(845);
+var _NotificationBar2 = _interopRequireDefault(_NotificationBar);
+var _Styles = __webpack_require__(52);
-var handleSubmit = function handleSubmit(submit, props, valid, asyncValidate, fields) {
- var dispatch = props.dispatch,
- onSubmitFail = props.onSubmitFail,
- onSubmitSuccess = props.onSubmitSuccess,
- startSubmit = props.startSubmit,
- stopSubmit = props.stopSubmit,
- setSubmitFailed = props.setSubmitFailed,
- setSubmitSucceeded = props.setSubmitSucceeded,
- syncErrors = props.syncErrors,
- touch = props.touch,
- values = props.values,
- persistentSubmitErrors = props.persistentSubmitErrors;
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var App = function (_Component) {
+ (0, _inherits3.default)(App, _Component);
- touch.apply(undefined, _toConsumableArray(fields)); // mark all fields as touched
+ function App() {
+ (0, _classCallCheck3.default)(this, App);
+ return (0, _possibleConstructorReturn3.default)(this, (App.__proto__ || (0, _getPrototypeOf2.default)(App)).apply(this, arguments));
+ }
- if (valid || persistentSubmitErrors) {
- var doSubmit = function doSubmit() {
- var result = void 0;
- try {
- result = submit(values, dispatch, props);
- } catch (submitError) {
- var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined;
- stopSubmit(error);
- setSubmitFailed.apply(undefined, _toConsumableArray(fields));
- if (onSubmitFail) {
- onSubmitFail(error, dispatch, submitError, props);
- }
- if (error || onSubmitFail) {
- // if you've provided an onSubmitFail callback, don't re-throw the error
- return error;
- } else {
- throw submitError;
- }
- }
- if (__WEBPACK_IMPORTED_MODULE_0_is_promise___default()(result)) {
- startSubmit();
- return result.then(function (submitResult) {
- stopSubmit();
- setSubmitSucceeded();
- if (onSubmitSuccess) {
- onSubmitSuccess(submitResult, dispatch, props);
- }
- return submitResult;
- }, function (submitError) {
- var error = submitError instanceof __WEBPACK_IMPORTED_MODULE_1__SubmissionError__["a" /* default */] ? submitError.errors : undefined;
- stopSubmit(error);
- setSubmitFailed.apply(undefined, _toConsumableArray(fields));
- if (onSubmitFail) {
- onSubmitFail(error, dispatch, submitError, props);
- }
- if (error || onSubmitFail) {
- // if you've provided an onSubmitFail callback, don't re-throw the error
- return error;
- } else {
- throw submitError;
- }
- });
- } else {
- setSubmitSucceeded();
- if (onSubmitSuccess) {
- onSubmitSuccess(result, dispatch, props);
- }
- }
- return result;
- };
+ (0, _createClass3.default)(App, [{
+ key: 'render',
+ value: function render() {
+ var children = this.props.children;
- var asyncValidateResult = asyncValidate && asyncValidate();
- if (asyncValidateResult) {
- return asyncValidateResult.then(function (asyncErrors) {
- if (asyncErrors) {
- throw asyncErrors;
- }
- return doSubmit();
- }).catch(function (asyncErrors) {
- setSubmitFailed.apply(undefined, _toConsumableArray(fields));
- if (onSubmitFail) {
- onSubmitFail(asyncErrors, dispatch, null, props);
- }
- return Promise.reject(asyncErrors);
- });
- } else {
- return doSubmit();
- }
- } else {
- setSubmitFailed.apply(undefined, _toConsumableArray(fields));
- if (onSubmitFail) {
- onSubmitFail(syncErrors, dispatch, null, props);
+ return _react2.default.createElement(
+ _MuiThemeProvider2.default,
+ { muiTheme: (0, _Styles.getTheme)() },
+ _react2.default.createElement(
+ 'div',
+ { style: { height: '100%' } },
+ _react2.default.createElement(_AppDrawer2.default, this.props),
+ _react2.default.createElement(
+ 'div',
+ { style: { paddingLeft: 256, height: '100%' } },
+ children
+ ),
+ _react2.default.createElement(_NotificationBar2.default, null)
+ )
+ );
}
- return syncErrors;
- }
+ }]);
+ return App;
+}(_react.Component);
+
+App.propTypes = {
+ children: _react.PropTypes.element
};
-/* harmony default export */ __webpack_exports__["a"] = (handleSubmit);
+exports.default = App;
/***/ }),
-/* 647 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-var getDisplayName = function getDisplayName(Comp) {
- return Comp.displayName || Comp.name || 'Component';
-};
+/* 662 */
+/***/ (function(module, exports, __webpack_require__) {
-/* harmony default export */ __webpack_exports__["a"] = (getDisplayName);
+__webpack_require__(663);
+module.exports = __webpack_require__(18).Object.getPrototypeOf;
/***/ }),
-/* 648 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/* 663 */
+/***/ (function(module, exports, __webpack_require__) {
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createReducer__ = __webpack_require__(649);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+// 19.1.2.9 Object.getPrototypeOf(O)
+var toObject = __webpack_require__(88)
+ , $getPrototypeOf = __webpack_require__(300);
+__webpack_require__(304)('getPrototypeOf', function(){
+ return function getPrototypeOf(it){
+ return $getPrototypeOf(toObject(it));
+ };
+});
+/***/ }),
+/* 664 */
+/***/ (function(module, exports, __webpack_require__) {
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createReducer__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+__webpack_require__(665);
+var $Object = __webpack_require__(18).Object;
+module.exports = function defineProperty(it, key, desc){
+ return $Object.defineProperty(it, key, desc);
+};
/***/ }),
-/* 649 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__actionTypes__ = __webpack_require__(167);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__ = __webpack_require__(650);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__structure_plain__ = __webpack_require__(11);
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+/* 665 */
+/***/ (function(module, exports, __webpack_require__) {
-function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+var $export = __webpack_require__(33);
+// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
+$export($export.S + $export.F * !__webpack_require__(43), 'Object', {defineProperty: __webpack_require__(34).f});
+/***/ }),
+/* 666 */
+/***/ (function(module, exports, __webpack_require__) {
+module.exports = { "default": __webpack_require__(667), __esModule: true };
+/***/ }),
+/* 667 */
+/***/ (function(module, exports, __webpack_require__) {
+__webpack_require__(668);
+module.exports = __webpack_require__(18).Object.setPrototypeOf;
-var isReduxFormAction = function isReduxFormAction(action) {
- return action && action.type && action.type.length > __WEBPACK_IMPORTED_MODULE_0__actionTypes__["prefix"].length && action.type.substring(0, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["prefix"].length) === __WEBPACK_IMPORTED_MODULE_0__actionTypes__["prefix"];
-};
+/***/ }),
+/* 668 */
+/***/ (function(module, exports, __webpack_require__) {
-var createReducer = function createReducer(structure) {
- var _behaviors;
+// 19.1.3.19 Object.setPrototypeOf(O, proto)
+var $export = __webpack_require__(33);
+$export($export.S, 'Object', {setPrototypeOf: __webpack_require__(669).set});
- var deepEqual = structure.deepEqual,
- empty = structure.empty,
- getIn = structure.getIn,
- setIn = structure.setIn,
- deleteIn = structure.deleteIn,
- fromJS = structure.fromJS,
- keys = structure.keys,
- size = structure.size,
- splice = structure.splice;
+/***/ }),
+/* 669 */
+/***/ (function(module, exports, __webpack_require__) {
- var deleteInWithCleanUp = Object(__WEBPACK_IMPORTED_MODULE_1__deleteInWithCleanUp__["a" /* default */])(structure);
- var doSplice = function doSplice(state, key, field, index, removeNum, value, force) {
- var existing = getIn(state, key + '.' + field);
- return existing || force ? setIn(state, key + '.' + field, splice(existing, index, removeNum, value)) : state;
- };
- var doPlainSplice = function doPlainSplice(state, key, field, index, removeNum, value, force) {
- var slice = getIn(state, key);
- var existing = __WEBPACK_IMPORTED_MODULE_2__structure_plain__["a" /* default */].getIn(slice, field);
- return existing || force ? setIn(state, key, __WEBPACK_IMPORTED_MODULE_2__structure_plain__["a" /* default */].setIn(slice, field, __WEBPACK_IMPORTED_MODULE_2__structure_plain__["a" /* default */].splice(existing, index, removeNum, value))) : state;
- };
- var rootKeys = ['values', 'fields', 'submitErrors', 'asyncErrors'];
- var arraySplice = function arraySplice(state, field, index, removeNum, value) {
- var result = state;
- var nonValuesValue = value != null ? empty : undefined;
- result = doSplice(result, 'values', field, index, removeNum, value, true);
- result = doSplice(result, 'fields', field, index, removeNum, nonValuesValue);
- result = doPlainSplice(result, 'syncErrors', field, index, removeNum, undefined);
- result = doPlainSplice(result, 'syncWarnings', field, index, removeNum, undefined);
- result = doSplice(result, 'submitErrors', field, index, removeNum, undefined);
- result = doSplice(result, 'asyncErrors', field, index, removeNum, undefined);
- return result;
- };
+// Works with __proto__ only. Old v8 can't work with null proto objects.
+/* eslint-disable no-proto */
+var isObject = __webpack_require__(68)
+ , anObject = __webpack_require__(35);
+var check = function(O, proto){
+ anObject(O);
+ if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
+};
+module.exports = {
+ set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
+ function(test, buggy, set){
+ try {
+ set = __webpack_require__(67)(Function.call, __webpack_require__(302).f(Object.prototype, '__proto__').set, 2);
+ set(test, []);
+ buggy = !(test instanceof Array);
+ } catch(e){ buggy = true; }
+ return function setPrototypeOf(O, proto){
+ check(O, proto);
+ if(buggy)O.__proto__ = proto;
+ else set(O, proto);
+ return O;
+ };
+ }({}, false) : undefined),
+ check: check
+};
- var behaviors = (_behaviors = {}, _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_INSERT"], function (state, _ref) {
- var _ref$meta = _ref.meta,
- field = _ref$meta.field,
- index = _ref$meta.index,
- payload = _ref.payload;
+/***/ }),
+/* 670 */
+/***/ (function(module, exports, __webpack_require__) {
- return arraySplice(state, field, index, 0, payload);
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_MOVE"], function (state, _ref2) {
- var _ref2$meta = _ref2.meta,
- field = _ref2$meta.field,
- from = _ref2$meta.from,
- to = _ref2$meta.to;
+module.exports = { "default": __webpack_require__(671), __esModule: true };
- var array = getIn(state, 'values.' + field);
- var length = array ? size(array) : 0;
- var result = state;
- if (length) {
- rootKeys.forEach(function (key) {
- var path = key + '.' + field;
- if (getIn(result, path)) {
- var value = getIn(result, path + '[' + from + ']');
- result = setIn(result, path, splice(getIn(result, path), from, 1) // remove
- );result = setIn(result, path, splice(getIn(result, path), to, 0, value) // insert
- );
- }
- });
- }
- return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_POP"], function (state, _ref3) {
- var field = _ref3.meta.field;
+/***/ }),
+/* 671 */
+/***/ (function(module, exports, __webpack_require__) {
- var array = getIn(state, 'values.' + field);
- var length = array ? size(array) : 0;
- return length ? arraySplice(state, field, length - 1, 1) : state;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_PUSH"], function (state, _ref4) {
- var field = _ref4.meta.field,
- payload = _ref4.payload;
+__webpack_require__(672);
+var $Object = __webpack_require__(18).Object;
+module.exports = function create(P, D){
+ return $Object.create(P, D);
+};
- var array = getIn(state, 'values.' + field);
- var length = array ? size(array) : 0;
- return arraySplice(state, field, length, 0, payload);
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE"], function (state, _ref5) {
- var _ref5$meta = _ref5.meta,
- field = _ref5$meta.field,
- index = _ref5$meta.index;
+/***/ }),
+/* 672 */
+/***/ (function(module, exports, __webpack_require__) {
- return arraySplice(state, field, index, 1);
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_REMOVE_ALL"], function (state, _ref6) {
- var field = _ref6.meta.field;
+var $export = __webpack_require__(33)
+// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+$export($export.S, 'Object', {create: __webpack_require__(193)});
- var array = getIn(state, 'values.' + field);
- var length = array ? size(array) : 0;
- return length ? arraySplice(state, field, 0, length) : state;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SHIFT"], function (state, _ref7) {
- var field = _ref7.meta.field;
+/***/ }),
+/* 673 */
+/***/ (function(module, exports, __webpack_require__) {
- return arraySplice(state, field, 0, 1);
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SPLICE"], function (state, _ref8) {
- var _ref8$meta = _ref8.meta,
- field = _ref8$meta.field,
- index = _ref8$meta.index,
- removeNum = _ref8$meta.removeNum,
- payload = _ref8.payload;
+__webpack_require__(94);
+__webpack_require__(674);
+module.exports = __webpack_require__(18).Array.from;
- return arraySplice(state, field, index, removeNum, payload);
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_SWAP"], function (state, _ref9) {
- var _ref9$meta = _ref9.meta,
- field = _ref9$meta.field,
- indexA = _ref9$meta.indexA,
- indexB = _ref9$meta.indexB;
+/***/ }),
+/* 674 */
+/***/ (function(module, exports, __webpack_require__) {
- var result = state;
- rootKeys.forEach(function (key) {
- var valueA = getIn(result, key + '.' + field + '[' + indexA + ']');
- var valueB = getIn(result, key + '.' + field + '[' + indexB + ']');
- if (valueA !== undefined || valueB !== undefined) {
- result = setIn(result, key + '.' + field + '[' + indexA + ']', valueB);
- result = setIn(result, key + '.' + field + '[' + indexB + ']', valueA);
+"use strict";
+
+var ctx = __webpack_require__(67)
+ , $export = __webpack_require__(33)
+ , toObject = __webpack_require__(88)
+ , call = __webpack_require__(307)
+ , isArrayIter = __webpack_require__(308)
+ , toLength = __webpack_require__(140)
+ , createProperty = __webpack_require__(675)
+ , getIterFn = __webpack_require__(197);
+
+$export($export.S + $export.F * !__webpack_require__(309)(function(iter){ Array.from(iter); }), 'Array', {
+ // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
+ from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
+ var O = toObject(arrayLike)
+ , C = typeof this == 'function' ? this : Array
+ , aLen = arguments.length
+ , mapfn = aLen > 1 ? arguments[1] : undefined
+ , mapping = mapfn !== undefined
+ , index = 0
+ , iterFn = getIterFn(O)
+ , length, result, step, iterator;
+ if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
+ // if object isn't iterable or it's array with default iterator - use simple case
+ if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
+ for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
+ createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
}
- });
+ } else {
+ length = toLength(O.length);
+ for(result = new C(length); length > index; index++){
+ createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
+ }
+ }
+ result.length = index;
return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["ARRAY_UNSHIFT"], function (state, _ref10) {
- var field = _ref10.meta.field,
- payload = _ref10.payload;
+ }
+});
- return arraySplice(state, field, 0, 0, payload);
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["AUTOFILL"], function (state, _ref11) {
- var field = _ref11.meta.field,
- payload = _ref11.payload;
- var result = state;
- result = deleteInWithCleanUp(result, 'asyncErrors.' + field);
- result = deleteInWithCleanUp(result, 'submitErrors.' + field);
- result = setIn(result, 'fields.' + field + '.autofilled', true);
- result = setIn(result, 'values.' + field, payload);
- return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["BLUR"], function (state, _ref12) {
- var _ref12$meta = _ref12.meta,
- field = _ref12$meta.field,
- touch = _ref12$meta.touch,
- payload = _ref12.payload;
+/***/ }),
+/* 675 */
+/***/ (function(module, exports, __webpack_require__) {
- var result = state;
- var initial = getIn(result, 'initial.' + field);
- if (initial === undefined && payload === '') {
- result = deleteInWithCleanUp(result, 'values.' + field);
- } else if (payload !== undefined) {
- result = setIn(result, 'values.' + field, payload);
- }
- if (field === getIn(result, 'active')) {
- result = deleteIn(result, 'active');
- }
- result = deleteIn(result, 'fields.' + field + '.active');
- if (touch) {
- result = setIn(result, 'fields.' + field + '.touched', true);
- result = setIn(result, 'anyTouched', true);
- }
- return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CHANGE"], function (state, _ref13) {
- var _ref13$meta = _ref13.meta,
- field = _ref13$meta.field,
- touch = _ref13$meta.touch,
- persistentSubmitErrors = _ref13$meta.persistentSubmitErrors,
- payload = _ref13.payload;
+"use strict";
- var result = state;
- var initial = getIn(result, 'initial.' + field);
- if (initial === undefined && payload === '') {
- result = deleteInWithCleanUp(result, 'values.' + field);
- } else if (payload !== undefined) {
- result = setIn(result, 'values.' + field, payload);
- }
- result = deleteInWithCleanUp(result, 'asyncErrors.' + field);
- if (!persistentSubmitErrors) {
- result = deleteInWithCleanUp(result, 'submitErrors.' + field);
- }
- result = deleteInWithCleanUp(result, 'fields.' + field + '.autofilled');
- if (touch) {
- result = setIn(result, 'fields.' + field + '.touched', true);
- result = setIn(result, 'anyTouched', true);
- }
- return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT"], function (state) {
- return deleteIn(state, 'triggerSubmit');
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_SUBMIT_ERRORS"], function (state) {
- return deleteInWithCleanUp(state, 'submitErrors');
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["CLEAR_ASYNC_ERROR"], function (state, _ref14) {
- var field = _ref14.meta.field;
+var $defineProperty = __webpack_require__(34)
+ , createDesc = __webpack_require__(86);
- return deleteIn(state, 'asyncErrors.' + field);
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["FOCUS"], function (state, _ref15) {
- var field = _ref15.meta.field;
+module.exports = function(object, index, value){
+ if(index in object)$defineProperty.f(object, index, createDesc(0, value));
+ else object[index] = value;
+};
- var result = state;
- var previouslyActive = getIn(state, 'active');
- result = deleteIn(result, 'fields.' + previouslyActive + '.active');
- result = setIn(result, 'fields.' + field + '.visited', true);
- result = setIn(result, 'fields.' + field + '.active', true);
- result = setIn(result, 'active', field);
- return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["INITIALIZE"], function (state, _ref16) {
- var payload = _ref16.payload,
- _ref16$meta = _ref16.meta,
- keepDirty = _ref16$meta.keepDirty,
- keepSubmitSucceeded = _ref16$meta.keepSubmitSucceeded;
+/***/ }),
+/* 676 */
+/***/ (function(module, exports, __webpack_require__) {
- var mapData = fromJS(payload);
- var result = empty; // clean all field state
+/* WEBPACK VAR INJECTION */(function(global, module) {/**
+ * lodash (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
- // persist old warnings, they will get recalculated if the new form values are different from the old values
- var warning = getIn(state, 'warning');
- if (warning) {
- result = setIn(result, 'warning', warning);
- }
- var syncWarnings = getIn(state, 'syncWarnings');
- if (syncWarnings) {
- result = setIn(result, 'syncWarnings', syncWarnings);
- }
+/** Used as the size to enable large array optimizations. */
+var LARGE_ARRAY_SIZE = 200;
- // persist old errors, they will get recalculated if the new form values are different from the old values
- var error = getIn(state, 'error');
- if (error) {
- result = setIn(result, 'error', error);
- }
- var syncErrors = getIn(state, 'syncErrors');
- if (syncErrors) {
- result = setIn(result, 'syncErrors', syncErrors);
- }
+/** Used to stand-in for `undefined` hash values. */
+var HASH_UNDEFINED = '__lodash_hash_undefined__';
- var registeredFields = getIn(state, 'registeredFields');
- if (registeredFields) {
- result = setIn(result, 'registeredFields', registeredFields);
- }
+/** Used as references for various `Number` constants. */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ promiseTag = '[object Promise]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ symbolTag = '[object Symbol]',
+ weakMapTag = '[object WeakMap]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ dataViewTag = '[object DataView]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
- var previousValues = getIn(state, 'values');
- var previousInitialValues = getIn(state, 'initial');
- var newInitialValues = mapData;
+/**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
+ */
+var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
- var newValues = previousValues;
+/** Used to match `RegExp` flags from their coerced string values. */
+var reFlags = /\w*$/;
- if (keepDirty && registeredFields) {
- if (!deepEqual(newInitialValues, previousInitialValues)) {
- //
- // Keep the value of dirty fields while updating the value of
- // pristine fields. This way, apps can reinitialize forms while
- // avoiding stomping on user edits.
- //
- // Note 1: The initialize action replaces all initial values
- // regardless of keepDirty.
- //
- // Note 2: When a field is dirty, keepDirty is enabled, and the field
- // value is the same as the new initial value for the field, the
- // initialize action causes the field to become pristine. That effect
- // is what we want.
- //
- keys(registeredFields).forEach(function (name) {
- var previousInitialValue = getIn(previousInitialValues, name);
- var previousValue = getIn(previousValues, name);
+/** Used to detect host constructors (Safari). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
- if (deepEqual(previousValue, previousInitialValue)) {
- // Overwrite the old pristine value with the new pristine value
- var newInitialValue = getIn(newInitialValues, name);
- newValues = setIn(newValues, name, newInitialValue);
- }
- });
+/** Used to detect unsigned integer values. */
+var reIsUint = /^(?:0|[1-9]\d*)$/;
- keys(newInitialValues).forEach(function (name) {
- var previousInitialValue = getIn(previousInitialValues, name);
- if (typeof previousInitialValue === 'undefined') {
- // Add new values at the root level.
- var newInitialValue = getIn(newInitialValues, name);
- newValues = setIn(newValues, name, newInitialValue);
- }
- });
- }
- } else {
- newValues = newInitialValues;
- }
+/** Used to identify `toStringTag` values of typed arrays. */
+var typedArrayTags = {};
+typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+typedArrayTags[uint32Tag] = true;
+typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
+typedArrayTags[errorTag] = typedArrayTags[funcTag] =
+typedArrayTags[mapTag] = typedArrayTags[numberTag] =
+typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
+typedArrayTags[setTag] = typedArrayTags[stringTag] =
+typedArrayTags[weakMapTag] = false;
- if (keepSubmitSucceeded && getIn(state, 'submitSucceeded')) {
- result = setIn(result, 'submitSucceeded', true);
- }
- result = setIn(result, 'values', newValues);
- result = setIn(result, 'initial', newInitialValues);
- return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["REGISTER_FIELD"], function (state, _ref17) {
- var _ref17$payload = _ref17.payload,
- name = _ref17$payload.name,
- type = _ref17$payload.type;
+/** Used to identify `toStringTag` values supported by `_.clone`. */
+var cloneableTags = {};
+cloneableTags[argsTag] = cloneableTags[arrayTag] =
+cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
+cloneableTags[boolTag] = cloneableTags[dateTag] =
+cloneableTags[float32Tag] = cloneableTags[float64Tag] =
+cloneableTags[int8Tag] = cloneableTags[int16Tag] =
+cloneableTags[int32Tag] = cloneableTags[mapTag] =
+cloneableTags[numberTag] = cloneableTags[objectTag] =
+cloneableTags[regexpTag] = cloneableTags[setTag] =
+cloneableTags[stringTag] = cloneableTags[symbolTag] =
+cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+cloneableTags[errorTag] = cloneableTags[funcTag] =
+cloneableTags[weakMapTag] = false;
- var key = 'registeredFields[\'' + name + '\']';
- var field = getIn(state, key);
- if (field) {
- var count = getIn(field, 'count') + 1;
- field = setIn(field, 'count', count);
- } else {
- field = fromJS({ name: name, type: type, count: 1 });
- }
- return setIn(state, key, field);
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["RESET"], function (state) {
- var result = empty;
- var registeredFields = getIn(state, 'registeredFields');
- if (registeredFields) {
- result = setIn(result, 'registeredFields', registeredFields);
- }
- var values = getIn(state, 'initial');
- if (values) {
- result = setIn(result, 'values', values);
- result = setIn(result, 'initial', values);
- }
- return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SUBMIT"], function (state) {
- return setIn(state, 'triggerSubmit', true);
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_ASYNC_VALIDATION"], function (state, _ref18) {
- var field = _ref18.meta.field;
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
- return setIn(state, 'asyncValidating', field || true);
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["START_SUBMIT"], function (state) {
- return setIn(state, 'submitting', true);
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_ASYNC_VALIDATION"], function (state, _ref19) {
- var payload = _ref19.payload;
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
- var result = state;
- result = deleteIn(result, 'asyncValidating');
- if (payload && Object.keys(payload).length) {
- var _error = payload._error,
- fieldErrors = _objectWithoutProperties(payload, ['_error']);
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
- if (_error) {
- result = setIn(result, 'error', _error);
- }
- if (Object.keys(fieldErrors).length) {
- result = setIn(result, 'asyncErrors', fromJS(fieldErrors));
- } else {
- result = deleteIn(result, 'asyncErrors');
- }
- } else {
- result = deleteIn(result, 'error');
- result = deleteIn(result, 'asyncErrors');
- }
- return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["STOP_SUBMIT"], function (state, _ref20) {
- var payload = _ref20.payload;
+/** Detect free variable `exports`. */
+var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
- var result = state;
- result = deleteIn(result, 'submitting');
- result = deleteIn(result, 'submitFailed');
- result = deleteIn(result, 'submitSucceeded');
- if (payload && Object.keys(payload).length) {
- var _error = payload._error,
- fieldErrors = _objectWithoutProperties(payload, ['_error']);
+/** Detect free variable `module`. */
+var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
- if (_error) {
- result = setIn(result, 'error', _error);
- } else {
- result = deleteIn(result, 'error');
- }
- if (Object.keys(fieldErrors).length) {
- result = setIn(result, 'submitErrors', fromJS(fieldErrors));
- } else {
- result = deleteIn(result, 'submitErrors');
- }
- result = setIn(result, 'submitFailed', true);
- } else {
- result = setIn(result, 'submitSucceeded', true);
- result = deleteIn(result, 'error');
- result = deleteIn(result, 'submitErrors');
- }
- return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_FAILED"], function (state, _ref21) {
- var fields = _ref21.meta.fields;
+/** Detect the popular CommonJS extension `module.exports`. */
+var moduleExports = freeModule && freeModule.exports === freeExports;
- var result = state;
- result = setIn(result, 'submitFailed', true);
- result = deleteIn(result, 'submitSucceeded');
- result = deleteIn(result, 'submitting');
- fields.forEach(function (field) {
- return result = setIn(result, 'fields.' + field + '.touched', true);
- });
- if (fields.length) {
- result = setIn(result, 'anyTouched', true);
- }
- return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["SET_SUBMIT_SUCCEEDED"], function (state) {
- var result = state;
- result = deleteIn(result, 'submitFailed');
- result = setIn(result, 'submitSucceeded', true);
- return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["TOUCH"], function (state, _ref22) {
- var fields = _ref22.meta.fields;
+/** Detect free variable `process` from Node.js. */
+var freeProcess = moduleExports && freeGlobal.process;
- var result = state;
- fields.forEach(function (field) {
- return result = setIn(result, 'fields.' + field + '.touched', true);
- });
- result = setIn(result, 'anyTouched', true);
- return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNREGISTER_FIELD"], function (state, _ref23) {
- var _ref23$payload = _ref23.payload,
- name = _ref23$payload.name,
- destroyOnUnmount = _ref23$payload.destroyOnUnmount;
+/** Used to access faster Node.js helpers. */
+var nodeUtil = (function() {
+ try {
+ return freeProcess && freeProcess.binding('util');
+ } catch (e) {}
+}());
- var result = state;
- var key = 'registeredFields[\'' + name + '\']';
- var field = getIn(result, key);
- if (!field) {
- return result;
- }
+/* Node.js helper references. */
+var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+
+/**
+ * Adds the key-value `pair` to `map`.
+ *
+ * @private
+ * @param {Object} map The map to modify.
+ * @param {Array} pair The key-value pair to add.
+ * @returns {Object} Returns `map`.
+ */
+function addMapEntry(map, pair) {
+ // Don't return `map.set` because it's not chainable in IE 11.
+ map.set(pair[0], pair[1]);
+ return map;
+}
+
+/**
+ * Adds `value` to `set`.
+ *
+ * @private
+ * @param {Object} set The set to modify.
+ * @param {*} value The value to add.
+ * @returns {Object} Returns `set`.
+ */
+function addSetEntry(set, value) {
+ // Don't return `set.add` because it's not chainable in IE 11.
+ set.add(value);
+ return set;
+}
+
+/**
+ * A faster alternative to `Function#apply`, this function invokes `func`
+ * with the `this` binding of `thisArg` and the arguments of `args`.
+ *
+ * @private
+ * @param {Function} func The function to invoke.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {Array} args The arguments to invoke `func` with.
+ * @returns {*} Returns the result of `func`.
+ */
+function apply(func, thisArg, args) {
+ switch (args.length) {
+ case 0: return func.call(thisArg);
+ case 1: return func.call(thisArg, args[0]);
+ case 2: return func.call(thisArg, args[0], args[1]);
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
+ }
+ return func.apply(thisArg, args);
+}
- var count = getIn(field, 'count') - 1;
- if (count <= 0 && destroyOnUnmount) {
- // Note: Cannot use deleteWithCleanUp here because of the flat nature of registeredFields
- result = deleteIn(result, key);
- if (deepEqual(getIn(result, 'registeredFields'), empty)) {
- result = deleteIn(result, 'registeredFields');
- }
- } else {
- field = setIn(field, 'count', count);
- result = setIn(result, key, field);
- }
- if (destroyOnUnmount) {
- result = deleteInWithCleanUp(result, 'syncErrors.' + name);
- result = deleteInWithCleanUp(result, 'submitErrors.' + name);
- result = deleteInWithCleanUp(result, 'asyncErrors.' + name);
- result = deleteInWithCleanUp(result, 'syncWarnings.' + name);
+/**
+ * A specialized version of `_.forEach` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array ? array.length : 0;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
}
- return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UNTOUCH"], function (state, _ref24) {
- var fields = _ref24.meta.fields;
+ }
+ return array;
+}
- var result = state;
- fields.forEach(function (field) {
- return result = deleteIn(result, 'fields.' + field + '.touched');
- });
- var anyTouched = keys(getIn(result, 'registeredFields')).some(function (key) {
- return getIn(result, 'fields.' + key + '.touched');
- });
- result = anyTouched ? setIn(result, 'anyTouched', true) : deleteIn(result, 'anyTouched');
- return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_ERRORS"], function (state, _ref25) {
- var _ref25$payload = _ref25.payload,
- syncErrors = _ref25$payload.syncErrors,
- error = _ref25$payload.error;
+/**
+ * Appends the elements of `values` to `array`.
+ *
+ * @private
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to append.
+ * @returns {Array} Returns `array`.
+ */
+function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
- var result = state;
- if (error) {
- result = setIn(result, 'error', error);
- result = setIn(result, 'syncError', true);
- } else {
- result = deleteIn(result, 'error');
- result = deleteIn(result, 'syncError');
- }
- if (Object.keys(syncErrors).length) {
- result = setIn(result, 'syncErrors', syncErrors);
- } else {
- result = deleteIn(result, 'syncErrors');
- }
- return result;
- }), _defineProperty(_behaviors, __WEBPACK_IMPORTED_MODULE_0__actionTypes__["UPDATE_SYNC_WARNINGS"], function (state, _ref26) {
- var _ref26$payload = _ref26.payload,
- syncWarnings = _ref26$payload.syncWarnings,
- warning = _ref26$payload.warning;
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+}
- var result = state;
- if (warning) {
- result = setIn(result, 'warning', warning);
- } else {
- result = deleteIn(result, 'warning');
- }
- if (Object.keys(syncWarnings).length) {
- result = setIn(result, 'syncWarnings', syncWarnings);
- } else {
- result = deleteIn(result, 'syncWarnings');
- }
- return result;
- }), _behaviors);
+/**
+ * A specialized version of `_.reduce` for arrays without support for
+ * iteratee shorthands.
+ *
+ * @private
+ * @param {Array} [array] The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {*} [accumulator] The initial value.
+ * @param {boolean} [initAccum] Specify using the first element of `array` as
+ * the initial value.
+ * @returns {*} Returns the accumulated value.
+ */
+function arrayReduce(array, iteratee, accumulator, initAccum) {
+ var index = -1,
+ length = array ? array.length : 0;
- var reducer = function reducer() {
- var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty;
- var action = arguments[1];
+ if (initAccum && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+}
- var behavior = behaviors[action.type];
- return behavior ? behavior(state, action) : state;
- };
+/**
+ * The base implementation of `_.times` without support for iteratee shorthands
+ * or max array length checks.
+ *
+ * @private
+ * @param {number} n The number of times to invoke `iteratee`.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the array of results.
+ */
+function baseTimes(n, iteratee) {
+ var index = -1,
+ result = Array(n);
- var byForm = function byForm(reducer) {
- return function () {
- var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty;
- var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+ while (++index < n) {
+ result[index] = iteratee(index);
+ }
+ return result;
+}
- var form = action && action.meta && action.meta.form;
- if (!form || !isReduxFormAction(action)) {
- return state;
- }
- if (action.type === __WEBPACK_IMPORTED_MODULE_0__actionTypes__["DESTROY"]) {
- return action.meta.form.reduce(function (result, form) {
- return deleteInWithCleanUp(result, form);
- }, state);
- }
- var formState = getIn(state, form);
- var result = reducer(formState, action);
- return result === formState ? state : setIn(state, form, result);
- };
+/**
+ * The base implementation of `_.unary` without support for storing metadata.
+ *
+ * @private
+ * @param {Function} func The function to cap arguments for.
+ * @returns {Function} Returns the new capped function.
+ */
+function baseUnary(func) {
+ return function(value) {
+ return func(value);
};
+}
- /**
- * Adds additional functionality to the reducer
- */
- function decorate(target) {
- target.plugin = function plugin(reducers) {
- var _this = this;
-
- // use 'function' keyword to enable 'this'
- return decorate(function () {
- var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : empty;
- var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
- return Object.keys(reducers).reduce(function (accumulator, key) {
- var previousState = getIn(accumulator, key);
- var nextState = reducers[key](previousState, action, getIn(state, key));
- return nextState === previousState ? accumulator : setIn(accumulator, key, nextState);
- }, _this(state, action));
- });
- };
+/**
+ * Gets the value at `key` of `object`.
+ *
+ * @private
+ * @param {Object} [object] The object to query.
+ * @param {string} key The key of the property to get.
+ * @returns {*} Returns the property value.
+ */
+function getValue(object, key) {
+ return object == null ? undefined : object[key];
+}
- return target;
+/**
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
}
+ return result;
+}
- return decorate(byForm(reducer));
-};
+/**
+ * Converts `map` to its key-value pairs.
+ *
+ * @private
+ * @param {Object} map The map to convert.
+ * @returns {Array} Returns the key-value pairs.
+ */
+function mapToArray(map) {
+ var index = -1,
+ result = Array(map.size);
-/* harmony default export */ __webpack_exports__["a"] = (createReducer);
+ map.forEach(function(value, key) {
+ result[++index] = [key, value];
+ });
+ return result;
+}
-/***/ }),
-/* 650 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/**
+ * Creates a unary function that invokes `func` with its argument transformed.
+ *
+ * @private
+ * @param {Function} func The function to wrap.
+ * @param {Function} transform The argument transform.
+ * @returns {Function} Returns the new function.
+ */
+function overArg(func, transform) {
+ return function(arg) {
+ return func(transform(arg));
+ };
+}
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__ = __webpack_require__(114);
+/**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+}
+/** Used for built-in method references. */
+var arrayProto = Array.prototype,
+ funcProto = Function.prototype,
+ objectProto = Object.prototype;
-var createDeleteInWithCleanUp = function createDeleteInWithCleanUp(_ref) {
- var deepEqual = _ref.deepEqual,
- empty = _ref.empty,
- getIn = _ref.getIn,
- deleteIn = _ref.deleteIn,
- setIn = _ref.setIn;
+/** Used to detect overreaching core-js shims. */
+var coreJsData = root['__core-js_shared__'];
- var deleteInWithCleanUp = function deleteInWithCleanUp(state, path) {
- if (path[path.length - 1] === ']') {
- // array path
- var pathTokens = Object(__WEBPACK_IMPORTED_MODULE_0_lodash_es_toPath__["a" /* default */])(path);
- pathTokens.pop();
- var parent = getIn(state, pathTokens.join('.'));
- return parent ? setIn(state, path, undefined) : state;
- }
+/** Used to detect methods masquerading as native. */
+var maskSrcKey = (function() {
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
+ return uid ? ('Symbol(src)_1.' + uid) : '';
+}());
- var result = state;
- if (getIn(state, path) !== undefined) {
- result = deleteIn(state, path);
- }
+/** Used to resolve the decompiled source of functions. */
+var funcToString = funcProto.toString;
- var dotIndex = path.lastIndexOf('.');
- if (dotIndex > 0) {
- var parentPath = path.substring(0, dotIndex);
- if (parentPath[parentPath.length - 1] !== ']') {
- var _parent = getIn(result, parentPath);
- if (deepEqual(_parent, empty)) {
- return deleteInWithCleanUp(result, parentPath);
- }
- }
- }
- return result;
- };
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
- return deleteInWithCleanUp;
-};
+/** Used to infer the `Object` constructor. */
+var objectCtorString = funcToString.call(Object);
-/* harmony default export */ __webpack_exports__["a"] = (createDeleteInWithCleanUp);
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
-/***/ }),
-/* 651 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createValues__ = __webpack_require__(652);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__structure_plain__ = __webpack_require__(11);
+/** Built-in value references. */
+var Buffer = moduleExports ? root.Buffer : undefined,
+ Symbol = root.Symbol,
+ Uint8Array = root.Uint8Array,
+ getPrototype = overArg(Object.getPrototypeOf, Object),
+ objectCreate = Object.create,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ splice = arrayProto.splice;
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeGetSymbols = Object.getOwnPropertySymbols,
+ nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
+ nativeKeys = overArg(Object.keys, Object),
+ nativeMax = Math.max;
+/* Built-in method references that are verified to be native. */
+var DataView = getNative(root, 'DataView'),
+ Map = getNative(root, 'Map'),
+ Promise = getNative(root, 'Promise'),
+ Set = getNative(root, 'Set'),
+ WeakMap = getNative(root, 'WeakMap'),
+ nativeCreate = getNative(Object, 'create');
-/* harmony default export */ __webpack_exports__["a"] = (Object(__WEBPACK_IMPORTED_MODULE_0__createValues__["a" /* default */])(__WEBPACK_IMPORTED_MODULE_1__structure_plain__["a" /* default */]));
+/** Used to detect maps, sets, and weakmaps. */
+var dataViewCtorString = toSource(DataView),
+ mapCtorString = toSource(Map),
+ promiseCtorString = toSource(Promise),
+ setCtorString = toSource(Set),
+ weakMapCtorString = toSource(WeakMap);
-/***/ }),
-/* 652 */
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
+/** Used to convert symbols to primitives and strings. */
+var symbolProto = Symbol ? Symbol.prototype : undefined,
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
-"use strict";
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux__ = __webpack_require__(27);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_redux___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react_redux__);
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+/**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function Hash(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+/**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+}
+/**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function hashDelete(key) {
+ return this.has(key) && delete this.__data__[key];
+}
-var createValues = function createValues(_ref) {
- var getIn = _ref.getIn;
- return function (config) {
- var _prop$getFormState$co = _extends({
- prop: 'values',
- getFormState: function getFormState(state) {
- return getIn(state, 'form');
- }
- }, config),
- form = _prop$getFormState$co.form,
- prop = _prop$getFormState$co.prop,
- getFormState = _prop$getFormState$co.getFormState;
+/**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+}
- return Object(__WEBPACK_IMPORTED_MODULE_0_react_redux__["connect"])(function (state) {
- return _defineProperty({}, prop, getIn(getFormState(state), form + '.values'));
- }, function () {
- return {};
- } // ignore dispatch
- );
- };
-};
+/**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
+}
-/* harmony default export */ __webpack_exports__["a"] = (createValues);
+/**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+function hashSet(key, value) {
+ var data = this.__data__;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+}
-/***/ }),
-/* 653 */
-/***/ (function(module, exports, __webpack_require__) {
+// Add methods to `Hash`.
+Hash.prototype.clear = hashClear;
+Hash.prototype['delete'] = hashDelete;
+Hash.prototype.get = hashGet;
+Hash.prototype.has = hashHas;
+Hash.prototype.set = hashSet;
-"use strict";
+/**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function ListCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
-exports.__esModule = true;
-function createThunkMiddleware(extraArgument) {
- return function (_ref) {
- var dispatch = _ref.dispatch,
- getState = _ref.getState;
- return function (next) {
- return function (action) {
- if (typeof action === 'function') {
- return action(dispatch, getState, extraArgument);
- }
+/**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+function listCacheClear() {
+ this.__data__ = [];
+}
- return next(action);
- };
- };
- };
+/**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ return true;
}
-var thunk = createThunkMiddleware();
-thunk.withExtraArgument = createThunkMiddleware;
+/**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
-exports['default'] = thunk;
+ return index < 0 ? undefined : data[index][1];
+}
-/***/ }),
-/* 654 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+}
-"use strict";
+/**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+ if (index < 0) {
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+}
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
+// Add methods to `ListCache`.
+ListCache.prototype.clear = listCacheClear;
+ListCache.prototype['delete'] = listCacheDelete;
+ListCache.prototype.get = listCacheGet;
+ListCache.prototype.has = listCacheHas;
+ListCache.prototype.set = listCacheSet;
-var _menu = __webpack_require__(655);
+/**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function MapCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
-Object.defineProperty(exports, 'menu', {
- enumerable: true,
- get: function get() {
- return _interopRequireDefault(_menu).default;
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
}
-});
+}
-var _settings = __webpack_require__(656);
+/**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+function mapCacheClear() {
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+}
-Object.defineProperty(exports, 'settings', {
- enumerable: true,
- get: function get() {
- return _interopRequireDefault(_settings).default;
- }
-});
+/**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function mapCacheDelete(key) {
+ return getMapData(this, key)['delete'](key);
+}
-var _notification = __webpack_require__(657);
+/**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+}
-Object.defineProperty(exports, 'notification', {
- enumerable: true,
- get: function get() {
- return _interopRequireDefault(_notification).default;
- }
-});
+/**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+}
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+function mapCacheSet(key, value) {
+ getMapData(this, key).set(key, value);
+ return this;
+}
-/***/ }),
-/* 655 */
-/***/ (function(module, exports, __webpack_require__) {
+// Add methods to `MapCache`.
+MapCache.prototype.clear = mapCacheClear;
+MapCache.prototype['delete'] = mapCacheDelete;
+MapCache.prototype.get = mapCacheGet;
+MapCache.prototype.has = mapCacheHas;
+MapCache.prototype.set = mapCacheSet;
-"use strict";
+/**
+ * Creates a stack cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function Stack(entries) {
+ this.__data__ = new ListCache(entries);
+}
+/**
+ * Removes all key-value entries from the stack.
+ *
+ * @private
+ * @name clear
+ * @memberOf Stack
+ */
+function stackClear() {
+ this.__data__ = new ListCache;
+}
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
+/**
+ * Removes `key` and its value from the stack.
+ *
+ * @private
+ * @name delete
+ * @memberOf Stack
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function stackDelete(key) {
+ return this.__data__['delete'](key);
+}
-var _assign = __webpack_require__(49);
+/**
+ * Gets the stack value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Stack
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function stackGet(key) {
+ return this.__data__.get(key);
+}
-var _assign2 = _interopRequireDefault(_assign);
+/**
+ * Checks if a stack value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Stack
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function stackHas(key) {
+ return this.__data__.has(key);
+}
-exports.default = menu;
+/**
+ * Sets the stack `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Stack
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the stack cache instance.
+ */
+function stackSet(key, value) {
+ var cache = this.__data__;
+ if (cache instanceof ListCache) {
+ var pairs = cache.__data__;
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
+ pairs.push([key, value]);
+ return this;
+ }
+ cache = this.__data__ = new MapCache(pairs);
+ }
+ cache.set(key, value);
+ return this;
+}
-var _ActionTypes = __webpack_require__(77);
+// Add methods to `Stack`.
+Stack.prototype.clear = stackClear;
+Stack.prototype['delete'] = stackDelete;
+Stack.prototype.get = stackGet;
+Stack.prototype.has = stackHas;
+Stack.prototype.set = stackSet;
-var types = _interopRequireWildcard(_ActionTypes);
+/**
+ * Creates an array of the enumerable property names of the array-like `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @param {boolean} inherited Specify returning inherited property names.
+ * @returns {Array} Returns the array of property names.
+ */
+function arrayLikeKeys(value, inherited) {
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
+ // Safari 9 makes `arguments.length` enumerable in strict mode.
+ var result = (isArray(value) || isArguments(value))
+ ? baseTimes(value.length, String)
+ : [];
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+ var length = result.length,
+ skipIndexes = !!length;
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ for (var key in value) {
+ if ((inherited || hasOwnProperty.call(value, key)) &&
+ !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
+ result.push(key);
+ }
+ }
+ return result;
+}
-function menu() {
- var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
- currentMenu: null
- };
- var action = arguments[1];
+/**
+ * This function is like `assignValue` except that it doesn't assign
+ * `undefined` values.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function assignMergeValue(object, key, value) {
+ if ((value !== undefined && !eq(object[key], value)) ||
+ (typeof key == 'number' && value === undefined && !(key in object))) {
+ object[key] = value;
+ }
+}
- switch (action.type) {
- case types.CHANGE_MENU:
- return (0, _assign2.default)({}, state, {
- currentMenu: action.menu
- });
- default:
- return state;
+/**
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * for equality comparisons.
+ *
+ * @private
+ * @param {Object} object The object to modify.
+ * @param {string} key The key of the property to assign.
+ * @param {*} value The value to assign.
+ */
+function assignValue(object, key, value) {
+ var objValue = object[key];
+ if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
+ (value === undefined && !(key in object))) {
+ object[key] = value;
}
}
-/***/ }),
-/* 656 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+}
-"use strict";
+/**
+ * The base implementation of `_.assign` without support for multiple sources
+ * or `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+function baseAssign(object, source) {
+ return object && copyObject(source, keys(source), object);
+}
+/**
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
+ * traversed objects.
+ *
+ * @private
+ * @param {*} value The value to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @param {boolean} [isFull] Specify a clone including symbols.
+ * @param {Function} [customizer] The function to customize cloning.
+ * @param {string} [key] The key of `value`.
+ * @param {Object} [object] The parent object of `value`.
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
+ * @returns {*} Returns the cloned value.
+ */
+function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
+ var result;
+ if (customizer) {
+ result = object ? customizer(value, key, object, stack) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return copyArray(value, result);
+ }
+ } else {
+ var tag = getTag(value),
+ isFunc = tag == funcTag || tag == genTag;
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
+ if (isBuffer(value)) {
+ return cloneBuffer(value, isDeep);
+ }
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ if (isHostObject(value)) {
+ return object ? value : {};
+ }
+ result = initCloneObject(isFunc ? {} : value);
+ if (!isDeep) {
+ return copySymbols(value, baseAssign(result, value));
+ }
+ } else {
+ if (!cloneableTags[tag]) {
+ return object ? value : {};
+ }
+ result = initCloneByTag(value, tag, baseClone, isDeep);
+ }
+ }
+ // Check for circular references and return its corresponding clone.
+ stack || (stack = new Stack);
+ var stacked = stack.get(value);
+ if (stacked) {
+ return stacked;
+ }
+ stack.set(value, result);
-var _assign = __webpack_require__(49);
+ if (!isArr) {
+ var props = isFull ? getAllKeys(value) : keys(value);
+ }
+ arrayEach(props || value, function(subValue, key) {
+ if (props) {
+ key = subValue;
+ subValue = value[key];
+ }
+ // Recursively populate clone (susceptible to call stack limits).
+ assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
+ });
+ return result;
+}
-var _assign2 = _interopRequireDefault(_assign);
+/**
+ * The base implementation of `_.create` without support for assigning
+ * properties to the created object.
+ *
+ * @private
+ * @param {Object} prototype The object to inherit from.
+ * @returns {Object} Returns the new object.
+ */
+function baseCreate(proto) {
+ return isObject(proto) ? objectCreate(proto) : {};
+}
-exports.default = settings;
+/**
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
+ * symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function baseGetAllKeys(object, keysFunc, symbolsFunc) {
+ var result = keysFunc(object);
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
+}
-var _ActionTypes = __webpack_require__(77);
+/**
+ * The base implementation of `getTag`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+function baseGetTag(value) {
+ return objectToString.call(value);
+}
-var types = _interopRequireWildcard(_ActionTypes);
+/**
+ * The base implementation of `_.isNative` without bad shim checks.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ */
+function baseIsNative(value) {
+ if (!isObject(value) || isMasked(value)) {
+ return false;
+ }
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
+}
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+/**
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ */
+function baseIsTypedArray(value) {
+ return isObjectLike(value) &&
+ isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
+}
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/**
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function baseKeys(object) {
+ if (!isPrototype(object)) {
+ return nativeKeys(object);
+ }
+ var result = [];
+ for (var key in Object(object)) {
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
+ result.push(key);
+ }
+ }
+ return result;
+}
-function settings() {
- var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
- values: {}
- };
- var action = arguments[1];
+/**
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function baseKeysIn(object) {
+ if (!isObject(object)) {
+ return nativeKeysIn(object);
+ }
+ var isProto = isPrototype(object),
+ result = [];
- switch (action.type) {
- case types.UPDATE_SETTINGS:
- var data = (0, _assign2.default)({}, state.values);
- data[action.shop] = (0, _assign2.default)({}, state.values[action.shop], action.value);
- return (0, _assign2.default)({}, state, { values: data });
- default:
- return state;
+ for (var key in object) {
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
}
+ return result;
}
-/***/ }),
-/* 657 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * The base implementation of `_.merge` without support for multiple sources.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} [customizer] The function to customize merged values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+function baseMerge(object, source, srcIndex, customizer, stack) {
+ if (object === source) {
+ return;
+ }
+ if (!(isArray(source) || isTypedArray(source))) {
+ var props = baseKeysIn(source);
+ }
+ arrayEach(props || source, function(srcValue, key) {
+ if (props) {
+ key = srcValue;
+ srcValue = source[key];
+ }
+ if (isObject(srcValue)) {
+ stack || (stack = new Stack);
+ baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
+ }
+ else {
+ var newValue = customizer
+ ? customizer(object[key], srcValue, (key + ''), object, source, stack)
+ : undefined;
-"use strict";
+ if (newValue === undefined) {
+ newValue = srcValue;
+ }
+ assignMergeValue(object, key, newValue);
+ }
+ });
+}
+/**
+ * A specialized version of `baseMerge` for arrays and objects which performs
+ * deep merges and tracks traversed objects enabling objects with circular
+ * references to be merged.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {string} key The key of the value to merge.
+ * @param {number} srcIndex The index of `source`.
+ * @param {Function} mergeFunc The function to merge values.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {Object} [stack] Tracks traversed source values and their merged
+ * counterparts.
+ */
+function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
+ var objValue = object[key],
+ srcValue = source[key],
+ stacked = stack.get(srcValue);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = notification;
+ if (stacked) {
+ assignMergeValue(object, key, stacked);
+ return;
+ }
+ var newValue = customizer
+ ? customizer(objValue, srcValue, (key + ''), object, source, stack)
+ : undefined;
-var _ActionTypes = __webpack_require__(77);
+ var isCommon = newValue === undefined;
-var types = _interopRequireWildcard(_ActionTypes);
+ if (isCommon) {
+ newValue = srcValue;
+ if (isArray(srcValue) || isTypedArray(srcValue)) {
+ if (isArray(objValue)) {
+ newValue = objValue;
+ }
+ else if (isArrayLikeObject(objValue)) {
+ newValue = copyArray(objValue);
+ }
+ else {
+ isCommon = false;
+ newValue = baseClone(srcValue, true);
+ }
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ if (isArguments(objValue)) {
+ newValue = toPlainObject(objValue);
+ }
+ else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
+ isCommon = false;
+ newValue = baseClone(srcValue, true);
+ }
+ else {
+ newValue = objValue;
+ }
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ if (isCommon) {
+ // Recursively merge objects and arrays (susceptible to call stack limits).
+ stack.set(srcValue, newValue);
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
+ stack['delete'](srcValue);
+ }
+ assignMergeValue(object, key, newValue);
+}
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+/**
+ * The base implementation of `_.rest` which doesn't validate or coerce arguments.
+ *
+ * @private
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ */
+function baseRest(func, start) {
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ array = Array(length);
-function notification() {
- var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
- message: null
+ while (++index < length) {
+ array[index] = args[start + index];
+ }
+ index = -1;
+ var otherArgs = Array(start + 1);
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = array;
+ return apply(func, this, otherArgs);
};
- var action = arguments[1];
+}
- switch (action.type) {
- case types.NOTIFICATION_ADD:
- return { message: action.message };
- default:
- return state;
+/**
+ * Creates a clone of `buffer`.
+ *
+ * @private
+ * @param {Buffer} buffer The buffer to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Buffer} Returns the cloned buffer.
+ */
+function cloneBuffer(buffer, isDeep) {
+ if (isDeep) {
+ return buffer.slice();
}
+ var result = new buffer.constructor(buffer.length);
+ buffer.copy(result);
+ return result;
}
-/***/ }),
-/* 658 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * Creates a clone of `arrayBuffer`.
+ *
+ * @private
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
+ */
+function cloneArrayBuffer(arrayBuffer) {
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
+ return result;
+}
-"use strict";
+/**
+ * Creates a clone of `dataView`.
+ *
+ * @private
+ * @param {Object} dataView The data view to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned data view.
+ */
+function cloneDataView(dataView, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
+}
+/**
+ * Creates a clone of `map`.
+ *
+ * @private
+ * @param {Object} map The map to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned map.
+ */
+function cloneMap(map, isDeep, cloneFunc) {
+ var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
+ return arrayReduce(array, addMapEntry, new map.constructor);
+}
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
+/**
+ * Creates a clone of `regexp`.
+ *
+ * @private
+ * @param {Object} regexp The regexp to clone.
+ * @returns {Object} Returns the cloned regexp.
+ */
+function cloneRegExp(regexp) {
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
+ result.lastIndex = regexp.lastIndex;
+ return result;
+}
-var _react = __webpack_require__(0);
+/**
+ * Creates a clone of `set`.
+ *
+ * @private
+ * @param {Object} set The set to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned set.
+ */
+function cloneSet(set, isDeep, cloneFunc) {
+ var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
+ return arrayReduce(array, addSetEntry, new set.constructor);
+}
-var _react2 = _interopRequireDefault(_react);
+/**
+ * Creates a clone of the `symbol` object.
+ *
+ * @private
+ * @param {Object} symbol The symbol object to clone.
+ * @returns {Object} Returns the cloned symbol object.
+ */
+function cloneSymbol(symbol) {
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
+}
-var _reactRouter = __webpack_require__(156);
+/**
+ * Creates a clone of `typedArray`.
+ *
+ * @private
+ * @param {Object} typedArray The typed array to clone.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the cloned typed array.
+ */
+function cloneTypedArray(typedArray, isDeep) {
+ var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
+}
-var _App = __webpack_require__(659);
+/**
+ * Copies the values of `source` to `array`.
+ *
+ * @private
+ * @param {Array} source The array to copy values from.
+ * @param {Array} [array=[]] The array to copy values to.
+ * @returns {Array} Returns `array`.
+ */
+function copyArray(source, array) {
+ var index = -1,
+ length = source.length;
-var _App2 = _interopRequireDefault(_App);
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+}
-var _Supreme = __webpack_require__(768);
+/**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property identifiers to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @param {Function} [customizer] The function to customize copied values.
+ * @returns {Object} Returns `object`.
+ */
+function copyObject(source, props, object, customizer) {
+ object || (object = {});
-var _Supreme2 = _interopRequireDefault(_Supreme);
+ var index = -1,
+ length = props.length;
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ while (++index < length) {
+ var key = props[index];
-exports.default = function () {
- return _react2.default.createElement(
- _reactRouter.Route,
- { component: _App2.default },
- _react2.default.createElement(_reactRouter.Route, { path: 'supreme/', component: _Supreme2.default }),
- _react2.default.createElement(_reactRouter.Redirect, { from: '/', to: 'supreme/' })
- );
-};
+ var newValue = customizer
+ ? customizer(object[key], source[key], key, object, source)
+ : undefined;
-/***/ }),
-/* 659 */
-/***/ (function(module, exports, __webpack_require__) {
+ assignValue(object, key, newValue === undefined ? source[key] : newValue);
+ }
+ return object;
+}
-"use strict";
+/**
+ * Copies own symbol properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy symbols from.
+ * @param {Object} [object={}] The object to copy symbols to.
+ * @returns {Object} Returns `object`.
+ */
+function copySymbols(source, object) {
+ return copyObject(source, getSymbols(source), object);
+}
+/**
+ * Creates a function like `_.assign`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+function createAssigner(assigner) {
+ return baseRest(function(object, sources) {
+ var index = -1,
+ length = sources.length,
+ customizer = length > 1 ? sources[length - 1] : undefined,
+ guard = length > 2 ? sources[2] : undefined;
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
+ customizer = (assigner.length > 3 && typeof customizer == 'function')
+ ? (length--, customizer)
+ : undefined;
-var _getPrototypeOf = __webpack_require__(3);
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ object = Object(object);
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, index, customizer);
+ }
+ }
+ return object;
+ });
+}
-var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+/**
+ * Creates an array of own enumerable property names and symbols of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names and symbols.
+ */
+function getAllKeys(object) {
+ return baseGetAllKeys(object, keys, getSymbols);
+}
-var _classCallCheck2 = __webpack_require__(1);
+/**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+}
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+}
-var _createClass2 = __webpack_require__(2);
+/**
+ * Creates an array of the own enumerable symbol properties of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of symbols.
+ */
+var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
-var _createClass3 = _interopRequireDefault(_createClass2);
+/**
+ * Gets the `toStringTag` of `value`.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+var getTag = baseGetTag;
-var _possibleConstructorReturn2 = __webpack_require__(4);
+// Fallback for data views, maps, sets, and weak maps in IE 11,
+// for data views in Edge < 14, and promises in Node.js.
+if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
+ (Map && getTag(new Map) != mapTag) ||
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
+ (Set && getTag(new Set) != setTag) ||
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
+ getTag = function(value) {
+ var result = objectToString.call(value),
+ Ctor = result == objectTag ? value.constructor : undefined,
+ ctorString = Ctor ? toSource(Ctor) : undefined;
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+ if (ctorString) {
+ switch (ctorString) {
+ case dataViewCtorString: return dataViewTag;
+ case mapCtorString: return mapTag;
+ case promiseCtorString: return promiseTag;
+ case setCtorString: return setTag;
+ case weakMapCtorString: return weakMapTag;
+ }
+ }
+ return result;
+ };
+}
-var _inherits2 = __webpack_require__(5);
+/**
+ * Initializes an array clone.
+ *
+ * @private
+ * @param {Array} array The array to clone.
+ * @returns {Array} Returns the initialized clone.
+ */
+function initCloneArray(array) {
+ var length = array.length,
+ result = array.constructor(length);
-var _inherits3 = _interopRequireDefault(_inherits2);
+ // Add properties assigned by `RegExp#exec`.
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+}
-var _react = __webpack_require__(0);
+/**
+ * Initializes an object clone.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+function initCloneObject(object) {
+ return (typeof object.constructor == 'function' && !isPrototype(object))
+ ? baseCreate(getPrototype(object))
+ : {};
+}
-var _react2 = _interopRequireDefault(_react);
+/**
+ * Initializes an object clone based on its `toStringTag`.
+ *
+ * **Note:** This function only supports cloning values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} object The object to clone.
+ * @param {string} tag The `toStringTag` of the object to clone.
+ * @param {Function} cloneFunc The function to clone values.
+ * @param {boolean} [isDeep] Specify a deep clone.
+ * @returns {Object} Returns the initialized clone.
+ */
+function initCloneByTag(object, tag, cloneFunc, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return cloneArrayBuffer(object);
-var _MuiThemeProvider = __webpack_require__(301);
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
-var _MuiThemeProvider2 = _interopRequireDefault(_MuiThemeProvider);
+ case dataViewTag:
+ return cloneDataView(object, isDeep);
-var _AppDrawer = __webpack_require__(727);
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ return cloneTypedArray(object, isDeep);
-var _AppDrawer2 = _interopRequireDefault(_AppDrawer);
+ case mapTag:
+ return cloneMap(object, isDeep, cloneFunc);
-var _NotificationBar = __webpack_require__(761);
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
-var _NotificationBar2 = _interopRequireDefault(_NotificationBar);
+ case regexpTag:
+ return cloneRegExp(object);
-var _Styles = __webpack_require__(80);
+ case setTag:
+ return cloneSet(object, isDeep, cloneFunc);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ case symbolTag:
+ return cloneSymbol(object);
+ }
+}
-var App = function (_Component) {
- (0, _inherits3.default)(App, _Component);
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+}
- function App() {
- (0, _classCallCheck3.default)(this, App);
- return (0, _possibleConstructorReturn3.default)(this, (App.__proto__ || (0, _getPrototypeOf2.default)(App)).apply(this, arguments));
+/**
+ * Checks if the given arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
+ * else `false`.
+ */
+function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)
+ ) {
+ return eq(object[index], value);
}
+ return false;
+}
- (0, _createClass3.default)(App, [{
- key: 'render',
- value: function render() {
- var children = this.props.children;
+/**
+ * Checks if `value` is suitable for use as unique object key.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
+ */
+function isKeyable(value) {
+ var type = typeof value;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+}
- return _react2.default.createElement(
- _MuiThemeProvider2.default,
- { muiTheme: (0, _Styles.getTheme)() },
- _react2.default.createElement(
- 'div',
- { style: { height: '100%' } },
- _react2.default.createElement(_AppDrawer2.default, this.props),
- _react2.default.createElement(
- 'div',
- { style: { paddingLeft: 256, height: '100%' } },
- children
- ),
- _react2.default.createElement(_NotificationBar2.default, null)
- )
- );
- }
- }]);
- return App;
-}(_react.Component);
+/**
+ * Checks if `func` has its source masked.
+ *
+ * @private
+ * @param {Function} func The function to check.
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
+ */
+function isMasked(func) {
+ return !!maskSrcKey && (maskSrcKey in func);
+}
-App.propTypes = {
- children: _react.PropTypes.element
-};
+/**
+ * Checks if `value` is likely a prototype object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
+ */
+function isPrototype(value) {
+ var Ctor = value && value.constructor,
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
-exports.default = App;
+ return value === proto;
+}
-/***/ }),
-/* 660 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * This function is like
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * except that it includes inherited enumerable properties.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function nativeKeysIn(object) {
+ var result = [];
+ if (object != null) {
+ for (var key in Object(object)) {
+ result.push(key);
+ }
+ }
+ return result;
+}
-__webpack_require__(661);
-module.exports = __webpack_require__(18).Object.getPrototypeOf;
+/**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to process.
+ * @returns {string} Returns the source code.
+ */
+function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+}
+/**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+}
-/***/ }),
-/* 661 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * Checks if `value` is likely an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
+ * else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+function isArguments(value) {
+ // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
+ return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
+ (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
+}
-// 19.1.2.9 Object.getPrototypeOf(O)
-var toObject = __webpack_require__(84);
-var $getPrototypeOf = __webpack_require__(293);
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+var isArray = Array.isArray;
-__webpack_require__(294)('getPrototypeOf', function () {
- return function getPrototypeOf(it) {
- return $getPrototypeOf(toObject(it));
- };
-});
+/**
+ * Checks if `value` is array-like. A value is considered array-like if it's
+ * not a function and has a `value.length` that's an integer greater than or
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ * @example
+ *
+ * _.isArrayLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLike(document.body.children);
+ * // => true
+ *
+ * _.isArrayLike('abc');
+ * // => true
+ *
+ * _.isArrayLike(_.noop);
+ * // => false
+ */
+function isArrayLike(value) {
+ return value != null && isLength(value.length) && !isFunction(value);
+}
+/**
+ * This method is like `_.isArrayLike` except that it also checks if `value`
+ * is an object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
+ * @example
+ *
+ * _.isArrayLikeObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isArrayLikeObject(document.body.children);
+ * // => true
+ *
+ * _.isArrayLikeObject('abc');
+ * // => false
+ *
+ * _.isArrayLikeObject(_.noop);
+ * // => false
+ */
+function isArrayLikeObject(value) {
+ return isObjectLike(value) && isArrayLike(value);
+}
-/***/ }),
-/* 662 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * Checks if `value` is a buffer.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.3.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
+ * @example
+ *
+ * _.isBuffer(new Buffer(2));
+ * // => true
+ *
+ * _.isBuffer(new Uint8Array(2));
+ * // => false
+ */
+var isBuffer = nativeIsBuffer || stubFalse;
-__webpack_require__(663);
-var $Object = __webpack_require__(18).Object;
-module.exports = function defineProperty(it, key, desc) {
- return $Object.defineProperty(it, key, desc);
-};
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8-9 which returns 'object' for typed array and other constructors.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+}
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This method is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @example
+ *
+ * _.isLength(3);
+ * // => true
+ *
+ * _.isLength(Number.MIN_VALUE);
+ * // => false
+ *
+ * _.isLength(Infinity);
+ * // => false
+ *
+ * _.isLength('3');
+ * // => false
+ */
+function isLength(value) {
+ return typeof value == 'number' &&
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
-/***/ }),
-/* 663 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
-var $export = __webpack_require__(28);
-// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
-$export($export.S + $export.F * !__webpack_require__(44), 'Object', { defineProperty: __webpack_require__(35).f });
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is a plain object, that is, an object created by the
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.8.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * }
+ *
+ * _.isPlainObject(new Foo);
+ * // => false
+ *
+ * _.isPlainObject([1, 2, 3]);
+ * // => false
+ *
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
+ * // => true
+ *
+ * _.isPlainObject(Object.create(null));
+ * // => true
+ */
+function isPlainObject(value) {
+ if (!isObjectLike(value) ||
+ objectToString.call(value) != objectTag || isHostObject(value)) {
+ return false;
+ }
+ var proto = getPrototype(value);
+ if (proto === null) {
+ return true;
+ }
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
+ return (typeof Ctor == 'function' &&
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
+}
+/**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
-/***/ }),
-/* 664 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * Converts `value` to a plain object flattening inherited enumerable string
+ * keyed properties of `value` to own properties of the plain object.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {Object} Returns the converted plain object.
+ * @example
+ *
+ * function Foo() {
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.assign({ 'a': 1 }, new Foo);
+ * // => { 'a': 1, 'b': 2 }
+ *
+ * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
+ * // => { 'a': 1, 'b': 2, 'c': 3 }
+ */
+function toPlainObject(value) {
+ return copyObject(value, keysIn(value));
+}
-module.exports = { "default": __webpack_require__(665), __esModule: true };
+/**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @since 0.1.0
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+function keys(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
+}
-/***/ }),
-/* 665 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+function keysIn(object) {
+ return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
+}
-__webpack_require__(93);
-__webpack_require__(124);
-module.exports = __webpack_require__(187).f('iterator');
+/**
+ * This method is like `_.assign` except that it recursively merges own and
+ * inherited enumerable string keyed properties of source objects into the
+ * destination object. Source properties that resolve to `undefined` are
+ * skipped if a destination value exists. Array and plain object properties
+ * are merged recursively. Other objects and value types are overridden by
+ * assignment. Source objects are applied from left to right. Subsequent
+ * sources overwrite property assignments of previous sources.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.5.0
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = {
+ * 'a': [{ 'b': 2 }, { 'd': 4 }]
+ * };
+ *
+ * var other = {
+ * 'a': [{ 'c': 3 }, { 'e': 5 }]
+ * };
+ *
+ * _.merge(object, other);
+ * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
+ */
+var merge = createAssigner(function(object, source, srcIndex) {
+ baseMerge(object, source, srcIndex);
+});
+/**
+ * This method returns a new empty array.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {Array} Returns the new empty array.
+ * @example
+ *
+ * var arrays = _.times(2, _.stubArray);
+ *
+ * console.log(arrays);
+ * // => [[], []]
+ *
+ * console.log(arrays[0] === arrays[1]);
+ * // => false
+ */
+function stubArray() {
+ return [];
+}
-/***/ }),
-/* 666 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * This method returns `false`.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.13.0
+ * @category Util
+ * @returns {boolean} Returns `false`.
+ * @example
+ *
+ * _.times(2, _.stubFalse);
+ * // => [false, false]
+ */
+function stubFalse() {
+ return false;
+}
-var toInteger = __webpack_require__(135);
-var defined = __webpack_require__(133);
-// true -> String#at
-// false -> String#codePointAt
-module.exports = function (TO_STRING) {
- return function (that, pos) {
- var s = String(defined(that));
- var i = toInteger(pos);
- var l = s.length;
- var a, b;
- if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
- a = s.charCodeAt(i);
- return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
- ? TO_STRING ? s.charAt(i) : a
- : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
- };
-};
+module.exports = merge;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46), __webpack_require__(262)(module)))
/***/ }),
-/* 667 */
+/* 677 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var create = __webpack_require__(186);
-var descriptor = __webpack_require__(82);
-var setToStringTag = __webpack_require__(123);
-var IteratorPrototype = {};
-
-// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
-__webpack_require__(50)(IteratorPrototype, __webpack_require__(22)('iterator'), function () { return this; });
-
-module.exports = function (Constructor, NAME, next) {
- Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
- setToStringTag(Constructor, NAME + ' Iterator');
-};
-
-
-/***/ }),
-/* 668 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var dP = __webpack_require__(35);
-var anObject = __webpack_require__(36);
-var getKeys = __webpack_require__(64);
-
-module.exports = __webpack_require__(44) ? Object.defineProperties : function defineProperties(O, Properties) {
- anObject(O);
- var keys = getKeys(Properties);
- var length = keys.length;
- var i = 0;
- var P;
- while (length > i) dP.f(O, P = keys[i++], Properties[P]);
- return O;
-};
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-/***/ }),
-/* 669 */
-/***/ (function(module, exports, __webpack_require__) {
+var _typeof2 = __webpack_require__(61);
-"use strict";
+var _typeof3 = _interopRequireDefault(_typeof2);
-var addToUnscopables = __webpack_require__(670);
-var step = __webpack_require__(671);
-var Iterators = __webpack_require__(78);
-var toIObject = __webpack_require__(52);
+exports.default = function (muiTheme) {
+ var isClient = typeof navigator !== 'undefined';
+ var userAgent = muiTheme.userAgent;
-// 22.1.3.4 Array.prototype.entries()
-// 22.1.3.13 Array.prototype.keys()
-// 22.1.3.29 Array.prototype.values()
-// 22.1.3.30 Array.prototype[@@iterator]()
-module.exports = __webpack_require__(295)(Array, 'Array', function (iterated, kind) {
- this._t = toIObject(iterated); // target
- this._i = 0; // next index
- this._k = kind; // kind
-// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
-}, function () {
- var O = this._t;
- var kind = this._k;
- var index = this._i++;
- if (!O || index >= O.length) {
- this._t = undefined;
- return step(1);
+ if (userAgent === undefined && isClient) {
+ userAgent = navigator.userAgent;
}
- if (kind == 'keys') return step(0, index);
- if (kind == 'values') return step(0, O[index]);
- return step(0, [index, O[index]]);
-}, 'values');
-
-// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
-Iterators.Arguments = Iterators.Array;
-addToUnscopables('keys');
-addToUnscopables('values');
-addToUnscopables('entries');
+ if (userAgent === undefined && !hasWarnedAboutUserAgent) {
+ false ? (0, _warning2.default)(false, 'Material-UI: userAgent should be supplied in the muiTheme context\n for server-side rendering.') : void 0;
+ hasWarnedAboutUserAgent = true;
+ }
-/***/ }),
-/* 670 */
-/***/ (function(module, exports) {
+ if (userAgent === false) {
+ // Disabled autoprefixer
+ return null;
+ } else if (userAgent === 'all' || userAgent === undefined) {
+ // Prefix for all user agent
+ return function (style) {
+ var isFlex = ['flex', 'inline-flex'].indexOf(style.display) !== -1;
+ var stylePrefixed = _inlineStylePrefixer2.default.prefixAll(style);
-module.exports = function () { /* empty */ };
+ if (isFlex) {
+ var display = stylePrefixed.display;
+ if (isClient) {
+ // We can't apply this join with react-dom:
+ // #https://github.com/facebook/react/issues/6467
+ stylePrefixed.display = display[display.length - 1];
+ } else {
+ stylePrefixed.display = display.join('; display: ');
+ }
+ }
+ return stylePrefixed;
+ };
+ } else {
+ var _ret = function () {
+ var prefixer = new _inlineStylePrefixer2.default({
+ userAgent: userAgent
+ });
-/***/ }),
-/* 671 */
-/***/ (function(module, exports) {
+ return {
+ v: function v(style) {
+ return prefixer.prefix(style);
+ }
+ };
+ }();
-module.exports = function (done, value) {
- return { value: value, done: !!done };
+ if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v;
+ }
};
+var _inlineStylePrefixer = __webpack_require__(678);
-/***/ }),
-/* 672 */
-/***/ (function(module, exports, __webpack_require__) {
+var _inlineStylePrefixer2 = _interopRequireDefault(_inlineStylePrefixer);
-module.exports = { "default": __webpack_require__(673), __esModule: true };
+var _warning = __webpack_require__(15);
-/***/ }),
-/* 673 */
-/***/ (function(module, exports, __webpack_require__) {
+var _warning2 = _interopRequireDefault(_warning);
-__webpack_require__(674);
-__webpack_require__(300);
-__webpack_require__(680);
-__webpack_require__(681);
-module.exports = __webpack_require__(18).Symbol;
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var hasWarnedAboutUserAgent = false;
/***/ }),
-/* 674 */
+/* 678 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-// ECMAScript 6 symbols shim
-var global = __webpack_require__(23);
-var has = __webpack_require__(51);
-var DESCRIPTORS = __webpack_require__(44);
-var $export = __webpack_require__(28);
-var redefine = __webpack_require__(296);
-var META = __webpack_require__(675).KEY;
-var $fails = __webpack_require__(63);
-var shared = __webpack_require__(137);
-var setToStringTag = __webpack_require__(123);
-var uid = __webpack_require__(100);
-var wks = __webpack_require__(22);
-var wksExt = __webpack_require__(187);
-var wksDefine = __webpack_require__(188);
-var keyOf = __webpack_require__(676);
-var enumKeys = __webpack_require__(677);
-var isArray = __webpack_require__(678);
-var anObject = __webpack_require__(36);
-var toIObject = __webpack_require__(52);
-var toPrimitive = __webpack_require__(132);
-var createDesc = __webpack_require__(82);
-var _create = __webpack_require__(186);
-var gOPNExt = __webpack_require__(679);
-var $GOPD = __webpack_require__(299);
-var $DP = __webpack_require__(35);
-var $keys = __webpack_require__(64);
-var gOPD = $GOPD.f;
-var dP = $DP.f;
-var gOPN = gOPNExt.f;
-var $Symbol = global.Symbol;
-var $JSON = global.JSON;
-var _stringify = $JSON && $JSON.stringify;
-var PROTOTYPE = 'prototype';
-var HIDDEN = wks('_hidden');
-var TO_PRIMITIVE = wks('toPrimitive');
-var isEnum = {}.propertyIsEnumerable;
-var SymbolRegistry = shared('symbol-registry');
-var AllSymbols = shared('symbols');
-var OPSymbols = shared('op-symbols');
-var ObjectProto = Object[PROTOTYPE];
-var USE_NATIVE = typeof $Symbol == 'function';
-var QObject = global.QObject;
-// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
-var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
-
-// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
-var setSymbolDesc = DESCRIPTORS && $fails(function () {
- return _create(dP({}, 'a', {
- get: function () { return dP(this, 'a', { value: 7 }).a; }
- })).a != 7;
-}) ? function (it, key, D) {
- var protoDesc = gOPD(ObjectProto, key);
- if (protoDesc) delete ObjectProto[key];
- dP(it, key, D);
- if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
-} : dP;
-
-var wrap = function (tag) {
- var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
- sym._k = tag;
- return sym;
-};
-
-var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
- return typeof it == 'symbol';
-} : function (it) {
- return it instanceof $Symbol;
-};
-
-var $defineProperty = function defineProperty(it, key, D) {
- if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
- anObject(it);
- key = toPrimitive(key, true);
- anObject(D);
- if (has(AllSymbols, key)) {
- if (!D.enumerable) {
- if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
- it[HIDDEN][key] = true;
- } else {
- if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
- D = _create(D, { enumerable: createDesc(0, false) });
- } return setSymbolDesc(it, key, D);
- } return dP(it, key, D);
-};
-var $defineProperties = function defineProperties(it, P) {
- anObject(it);
- var keys = enumKeys(P = toIObject(P));
- var i = 0;
- var l = keys.length;
- var key;
- while (l > i) $defineProperty(it, key = keys[i++], P[key]);
- return it;
-};
-var $create = function create(it, P) {
- return P === undefined ? _create(it) : $defineProperties(_create(it), P);
-};
-var $propertyIsEnumerable = function propertyIsEnumerable(key) {
- var E = isEnum.call(this, key = toPrimitive(key, true));
- if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
- return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
-};
-var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
- it = toIObject(it);
- key = toPrimitive(key, true);
- if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
- var D = gOPD(it, key);
- if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
- return D;
-};
-var $getOwnPropertyNames = function getOwnPropertyNames(it) {
- var names = gOPN(toIObject(it));
- var result = [];
- var i = 0;
- var key;
- while (names.length > i) {
- if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
- } return result;
-};
-var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
- var IS_OP = it === ObjectProto;
- var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
- var result = [];
- var i = 0;
- var key;
- while (names.length > i) {
- if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
- } return result;
-};
-
-// 19.4.1.1 Symbol([description])
-if (!USE_NATIVE) {
- $Symbol = function Symbol() {
- if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
- var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
- var $set = function (value) {
- if (this === ObjectProto) $set.call(OPSymbols, value);
- if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
- setSymbolDesc(this, tag, createDesc(1, value));
- };
- if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
- return wrap(tag);
- };
- redefine($Symbol[PROTOTYPE], 'toString', function toString() {
- return this._k;
- });
-
- $GOPD.f = $getOwnPropertyDescriptor;
- $DP.f = $defineProperty;
- __webpack_require__(298).f = gOPNExt.f = $getOwnPropertyNames;
- __webpack_require__(101).f = $propertyIsEnumerable;
- __webpack_require__(139).f = $getOwnPropertySymbols;
-
- if (DESCRIPTORS && !__webpack_require__(122)) {
- redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
- }
-
- wksExt.f = function (name) {
- return wrap(wks(name));
- };
-}
-
-$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
-
-for (var es6Symbols = (
- // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
- 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
-).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
-
-for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
-
-$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
- // 19.4.2.1 Symbol.for(key)
- 'for': function (key) {
- return has(SymbolRegistry, key += '')
- ? SymbolRegistry[key]
- : SymbolRegistry[key] = $Symbol(key);
- },
- // 19.4.2.5 Symbol.keyFor(sym)
- keyFor: function keyFor(key) {
- if (isSymbol(key)) return keyOf(SymbolRegistry, key);
- throw TypeError(key + ' is not a symbol!');
- },
- useSetter: function () { setter = true; },
- useSimple: function () { setter = false; }
-});
-
-$export($export.S + $export.F * !USE_NATIVE, 'Object', {
- // 19.1.2.2 Object.create(O [, Properties])
- create: $create,
- // 19.1.2.4 Object.defineProperty(O, P, Attributes)
- defineProperty: $defineProperty,
- // 19.1.2.3 Object.defineProperties(O, Properties)
- defineProperties: $defineProperties,
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
- getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
- // 19.1.2.7 Object.getOwnPropertyNames(O)
- getOwnPropertyNames: $getOwnPropertyNames,
- // 19.1.2.8 Object.getOwnPropertySymbols(O)
- getOwnPropertySymbols: $getOwnPropertySymbols
-});
-// 24.3.2 JSON.stringify(value [, replacer [, space]])
-$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
- var S = $Symbol();
- // MS Edge converts symbol values to JSON as {}
- // WebKit converts symbol values to JSON as null
- // V8 throws on boxed symbols
- return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
-})), 'JSON', {
- stringify: function stringify(it) {
- if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
- var args = [it];
- var i = 1;
- var replacer, $replacer;
- while (arguments.length > i) args.push(arguments[i++]);
- replacer = args[1];
- if (typeof replacer == 'function') $replacer = replacer;
- if ($replacer || !isArray(replacer)) replacer = function (key, value) {
- if ($replacer) value = $replacer.call(this, key, value);
- if (!isSymbol(value)) return value;
- };
- args[1] = replacer;
- return _stringify.apply($JSON, args);
- }
+Object.defineProperty(exports, "__esModule", {
+ value: true
});
-// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
-$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(50)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
-// 19.4.3.5 Symbol.prototype[@@toStringTag]
-setToStringTag($Symbol, 'Symbol');
-// 20.2.1.9 Math[@@toStringTag]
-setToStringTag(Math, 'Math', true);
-// 24.3.3 JSON[@@toStringTag]
-setToStringTag(global.JSON, 'JSON', true);
-
-
-/***/ }),
-/* 675 */
-/***/ (function(module, exports, __webpack_require__) {
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+// special flexbox specifications
-var META = __webpack_require__(100)('meta');
-var isObject = __webpack_require__(62);
-var has = __webpack_require__(51);
-var setDesc = __webpack_require__(35).f;
-var id = 0;
-var isExtensible = Object.isExtensible || function () {
- return true;
-};
-var FREEZE = !__webpack_require__(63)(function () {
- return isExtensible(Object.preventExtensions({}));
-});
-var setMeta = function (it) {
- setDesc(it, META, { value: {
- i: 'O' + ++id, // object ID
- w: {} // weak collections IDs
- } });
-};
-var fastKey = function (it, create) {
- // return primitive with prefix
- if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
- if (!has(it, META)) {
- // can't set metadata to uncaught frozen object
- if (!isExtensible(it)) return 'F';
- // not necessary to add metadata
- if (!create) return 'E';
- // add missing metadata
- setMeta(it);
- // return object ID
- } return it[META].i;
-};
-var getWeak = function (it, create) {
- if (!has(it, META)) {
- // can't set metadata to uncaught frozen object
- if (!isExtensible(it)) return true;
- // not necessary to add metadata
- if (!create) return false;
- // add missing metadata
- setMeta(it);
- // return hash weak collections IDs
- } return it[META].w;
-};
-// add metadata on freeze-family methods calling
-var onFreeze = function (it) {
- if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
- return it;
-};
-var meta = module.exports = {
- KEY: META,
- NEED: false,
- fastKey: fastKey,
- getWeak: getWeak,
- onFreeze: onFreeze
-};
+var _prefixAll2 = __webpack_require__(679);
-/***/ }),
-/* 676 */
-/***/ (function(module, exports, __webpack_require__) {
+var _prefixAll3 = _interopRequireDefault(_prefixAll2);
-var getKeys = __webpack_require__(64);
-var toIObject = __webpack_require__(52);
-module.exports = function (object, el) {
- var O = toIObject(object);
- var keys = getKeys(O);
- var length = keys.length;
- var index = 0;
- var key;
- while (length > index) if (O[key = keys[index++]] === el) return key;
-};
+var _getBrowserInformation = __webpack_require__(690);
+var _getBrowserInformation2 = _interopRequireDefault(_getBrowserInformation);
-/***/ }),
-/* 677 */
-/***/ (function(module, exports, __webpack_require__) {
+var _getPrefixedKeyframes = __webpack_require__(693);
-// all enumerable object keys, includes symbols
-var getKeys = __webpack_require__(64);
-var gOPS = __webpack_require__(139);
-var pIE = __webpack_require__(101);
-module.exports = function (it) {
- var result = getKeys(it);
- var getSymbols = gOPS.f;
- if (getSymbols) {
- var symbols = getSymbols(it);
- var isEnum = pIE.f;
- var i = 0;
- var key;
- while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
- } return result;
-};
+var _getPrefixedKeyframes2 = _interopRequireDefault(_getPrefixedKeyframes);
+var _capitalizeString = __webpack_require__(200);
-/***/ }),
-/* 678 */
-/***/ (function(module, exports, __webpack_require__) {
+var _capitalizeString2 = _interopRequireDefault(_capitalizeString);
-// 7.2.2 IsArray(argument)
-var cof = __webpack_require__(83);
-module.exports = Array.isArray || function isArray(arg) {
- return cof(arg) == 'Array';
-};
+var _sortPrefixedStyle = __webpack_require__(313);
+var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle);
-/***/ }),
-/* 679 */
-/***/ (function(module, exports, __webpack_require__) {
+var _prefixProps = __webpack_require__(694);
-// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
-var toIObject = __webpack_require__(52);
-var gOPN = __webpack_require__(298).f;
-var toString = {}.toString;
+var _prefixProps2 = _interopRequireDefault(_prefixProps);
-var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
- ? Object.getOwnPropertyNames(window) : [];
+var _position = __webpack_require__(695);
-var getWindowNames = function (it) {
- try {
- return gOPN(it);
- } catch (e) {
- return windowNames.slice();
- }
-};
+var _position2 = _interopRequireDefault(_position);
-module.exports.f = function getOwnPropertyNames(it) {
- return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
-};
+var _calc = __webpack_require__(696);
+var _calc2 = _interopRequireDefault(_calc);
-/***/ }),
-/* 680 */
-/***/ (function(module, exports, __webpack_require__) {
+var _zoomCursor = __webpack_require__(697);
-__webpack_require__(188)('asyncIterator');
+var _zoomCursor2 = _interopRequireDefault(_zoomCursor);
+var _grabCursor = __webpack_require__(698);
-/***/ }),
-/* 681 */
-/***/ (function(module, exports, __webpack_require__) {
+var _grabCursor2 = _interopRequireDefault(_grabCursor);
-__webpack_require__(188)('observable');
+var _flex = __webpack_require__(699);
+var _flex2 = _interopRequireDefault(_flex);
-/***/ }),
-/* 682 */
-/***/ (function(module, exports, __webpack_require__) {
+var _sizing = __webpack_require__(700);
-module.exports = { "default": __webpack_require__(683), __esModule: true };
+var _sizing2 = _interopRequireDefault(_sizing);
-/***/ }),
-/* 683 */
-/***/ (function(module, exports, __webpack_require__) {
+var _gradient = __webpack_require__(701);
-__webpack_require__(684);
-module.exports = __webpack_require__(18).Object.setPrototypeOf;
+var _gradient2 = _interopRequireDefault(_gradient);
+var _transition = __webpack_require__(702);
-/***/ }),
-/* 684 */
-/***/ (function(module, exports, __webpack_require__) {
+var _transition2 = _interopRequireDefault(_transition);
-// 19.1.3.19 Object.setPrototypeOf(O, proto)
-var $export = __webpack_require__(28);
-$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(685).set });
+var _flexboxIE = __webpack_require__(704);
+var _flexboxIE2 = _interopRequireDefault(_flexboxIE);
-/***/ }),
-/* 685 */
-/***/ (function(module, exports, __webpack_require__) {
+var _flexboxOld = __webpack_require__(705);
-// Works with __proto__ only. Old v8 can't work with null proto objects.
-/* eslint-disable no-proto */
-var isObject = __webpack_require__(62);
-var anObject = __webpack_require__(36);
-var check = function (O, proto) {
- anObject(O);
- if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
-};
-module.exports = {
- set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
- function (test, buggy, set) {
- try {
- set = __webpack_require__(61)(Function.call, __webpack_require__(299).f(Object.prototype, '__proto__').set, 2);
- set(test, []);
- buggy = !(test instanceof Array);
- } catch (e) { buggy = true; }
- return function setPrototypeOf(O, proto) {
- check(O, proto);
- if (buggy) O.__proto__ = proto;
- else set(O, proto);
- return O;
- };
- }({}, false) : undefined),
- check: check
-};
+var _flexboxOld2 = _interopRequireDefault(_flexboxOld);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-/***/ }),
-/* 686 */
-/***/ (function(module, exports, __webpack_require__) {
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-module.exports = { "default": __webpack_require__(687), __esModule: true };
+var plugins = [_position2.default, _calc2.default, _zoomCursor2.default, _grabCursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default,
+// this must be run AFTER the flexbox specs
+_flex2.default];
-/***/ }),
-/* 687 */
-/***/ (function(module, exports, __webpack_require__) {
+var Prefixer = function () {
+ /**
+ * Instantiante a new prefixer
+ * @param {string} userAgent - userAgent to gather prefix information according to caniuse.com
+ * @param {string} keepUnprefixed - keeps unprefixed properties and values
+ */
-__webpack_require__(688);
-var $Object = __webpack_require__(18).Object;
-module.exports = function create(P, D) {
- return $Object.create(P, D);
-};
+ function Prefixer() {
+ var _this = this;
+ var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
-/***/ }),
-/* 688 */
-/***/ (function(module, exports, __webpack_require__) {
+ _classCallCheck(this, Prefixer);
-var $export = __webpack_require__(28);
-// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
-$export($export.S, 'Object', { create: __webpack_require__(186) });
+ var defaultUserAgent = typeof navigator !== 'undefined' ? navigator.userAgent : undefined;
+ this._userAgent = options.userAgent || defaultUserAgent;
+ this._keepUnprefixed = options.keepUnprefixed || false;
-/***/ }),
-/* 689 */
-/***/ (function(module, exports, __webpack_require__) {
+ this._browserInfo = (0, _getBrowserInformation2.default)(this._userAgent);
-__webpack_require__(93);
-__webpack_require__(690);
-module.exports = __webpack_require__(18).Array.from;
+ // Checks if the userAgent was resolved correctly
+ if (this._browserInfo && this._browserInfo.prefix) {
+ // set additional prefix information
+ this.cssPrefix = this._browserInfo.prefix.css;
+ this.jsPrefix = this._browserInfo.prefix.inline;
+ this.prefixedKeyframes = (0, _getPrefixedKeyframes2.default)(this._browserInfo);
+ } else {
+ this._usePrefixAllFallback = true;
+ return false;
+ }
+ var data = this._browserInfo.browser && _prefixProps2.default[this._browserInfo.browser];
+ if (data) {
+ this._requiresPrefix = Object.keys(data).filter(function (key) {
+ return data[key] >= _this._browserInfo.version;
+ }).reduce(function (result, name) {
+ result[name] = true;
+ return result;
+ }, {});
+ this._hasPropsRequiringPrefix = Object.keys(this._requiresPrefix).length > 0;
+ } else {
+ this._usePrefixAllFallback = true;
+ }
+ }
-/***/ }),
-/* 690 */
-/***/ (function(module, exports, __webpack_require__) {
+ /**
+ * Returns a prefixed version of the style object
+ * @param {Object} styles - Style object that gets prefixed properties added
+ * @returns {Object} - Style object with prefixed properties and values
+ */
-"use strict";
-var ctx = __webpack_require__(61);
-var $export = __webpack_require__(28);
-var toObject = __webpack_require__(84);
-var call = __webpack_require__(303);
-var isArrayIter = __webpack_require__(304);
-var toLength = __webpack_require__(134);
-var createProperty = __webpack_require__(691);
-var getIterFn = __webpack_require__(190);
+ _createClass(Prefixer, [{
+ key: 'prefix',
+ value: function prefix(styles) {
+ var _this2 = this;
-$export($export.S + $export.F * !__webpack_require__(305)(function (iter) { Array.from(iter); }), 'Array', {
- // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
- from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
- var O = toObject(arrayLike);
- var C = typeof this == 'function' ? this : Array;
- var aLen = arguments.length;
- var mapfn = aLen > 1 ? arguments[1] : undefined;
- var mapping = mapfn !== undefined;
- var index = 0;
- var iterFn = getIterFn(O);
- var length, result, step, iterator;
- if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
- // if object isn't iterable or it's array with default iterator - use simple case
- if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
- for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
- createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
+ // use prefixAll as fallback if userAgent can not be resolved
+ if (this._usePrefixAllFallback) {
+ return (0, _prefixAll3.default)(styles);
}
- } else {
- length = toLength(O.length);
- for (result = new C(length); length > index; index++) {
- createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
+
+ // only add prefixes if needed
+ if (!this._hasPropsRequiringPrefix) {
+ return styles;
}
- }
- result.length = index;
- return result;
- }
-});
+ Object.keys(styles).forEach(function (property) {
+ var value = styles[property];
+ if (value instanceof Object && !Array.isArray(value)) {
+ // recurse through nested style objects
+ styles[property] = _this2.prefix(value);
+ } else {
+ // add prefixes if needed
+ if (_this2._requiresPrefix[property]) {
+ styles[_this2.jsPrefix + (0, _capitalizeString2.default)(property)] = value;
+ if (!_this2._keepUnprefixed) {
+ delete styles[property];
+ }
+ }
+ }
+ });
-/***/ }),
-/* 691 */
-/***/ (function(module, exports, __webpack_require__) {
+ Object.keys(styles).forEach(function (property) {
+ [].concat(styles[property]).forEach(function (value) {
+ // resolve plugins
+ plugins.forEach(function (plugin) {
+ // generates a new plugin interface with current data
+ assignStyles(styles, plugin({
+ property: property,
+ value: value,
+ styles: styles,
+ browserInfo: _this2._browserInfo,
+ prefix: {
+ js: _this2.jsPrefix,
+ css: _this2.cssPrefix,
+ keyframes: _this2.prefixedKeyframes
+ },
+ keepUnprefixed: _this2._keepUnprefixed,
+ requiresPrefix: _this2._requiresPrefix
+ }), value, _this2._keepUnprefixed);
+ });
+ });
+ });
-"use strict";
+ return (0, _sortPrefixedStyle2.default)(styles);
+ }
-var $defineProperty = __webpack_require__(35);
-var createDesc = __webpack_require__(82);
+ /**
+ * Returns a prefixed version of the style object using all vendor prefixes
+ * @param {Object} styles - Style object that gets prefixed properties added
+ * @returns {Object} - Style object with prefixed properties and values
+ */
-module.exports = function (object, index, value) {
- if (index in object) $defineProperty.f(object, index, createDesc(0, value));
- else object[index] = value;
-};
+ }], [{
+ key: 'prefixAll',
+ value: function prefixAll(styles) {
+ return (0, _prefixAll3.default)(styles);
+ }
+ }]);
+ return Prefixer;
+}();
-/***/ }),
-/* 692 */
-/***/ (function(module, exports, __webpack_require__) {
+exports.default = Prefixer;
-/* WEBPACK VAR INJECTION */(function(global, module) {/**
- * lodash (Custom Build)
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors
- * Released under MIT license
- * Based on Underscore.js 1.8.3
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
-/** Used as the size to enable large array optimizations. */
-var LARGE_ARRAY_SIZE = 200;
+function assignStyles(base) {
+ var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+ var value = arguments[2];
+ var keepUnprefixed = arguments[3];
-/** Used to stand-in for `undefined` hash values. */
-var HASH_UNDEFINED = '__lodash_hash_undefined__';
+ Object.keys(extend).forEach(function (property) {
+ var baseValue = base[property];
+ if (Array.isArray(baseValue)) {
+ [].concat(extend[property]).forEach(function (val) {
+ if (base[property].indexOf(val) === -1) {
+ base[property].splice(baseValue.indexOf(value), keepUnprefixed ? 0 : 1, val);
+ }
+ });
+ } else {
+ base[property] = extend[property];
+ }
+ });
+}
+module.exports = exports['default'];
-/** Used as references for various `Number` constants. */
-var MAX_SAFE_INTEGER = 9007199254740991;
+/***/ }),
+/* 679 */
+/***/ (function(module, exports, __webpack_require__) {
-/** `Object#toString` result references. */
-var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- objectTag = '[object Object]',
- promiseTag = '[object Promise]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- symbolTag = '[object Symbol]',
- weakMapTag = '[object WeakMap]';
+"use strict";
-var arrayBufferTag = '[object ArrayBuffer]',
- dataViewTag = '[object DataView]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
-/**
- * Used to match `RegExp`
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
- */
-var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = prefixAll;
-/** Used to match `RegExp` flags from their coerced string values. */
-var reFlags = /\w*$/;
+var _prefixProps = __webpack_require__(312);
-/** Used to detect host constructors (Safari). */
-var reIsHostCtor = /^\[object .+?Constructor\]$/;
+var _prefixProps2 = _interopRequireDefault(_prefixProps);
-/** Used to detect unsigned integer values. */
-var reIsUint = /^(?:0|[1-9]\d*)$/;
+var _capitalizeString = __webpack_require__(200);
-/** Used to identify `toStringTag` values of typed arrays. */
-var typedArrayTags = {};
-typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
-typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
-typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
-typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
-typedArrayTags[uint32Tag] = true;
-typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
-typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
-typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
-typedArrayTags[errorTag] = typedArrayTags[funcTag] =
-typedArrayTags[mapTag] = typedArrayTags[numberTag] =
-typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
-typedArrayTags[setTag] = typedArrayTags[stringTag] =
-typedArrayTags[weakMapTag] = false;
+var _capitalizeString2 = _interopRequireDefault(_capitalizeString);
-/** Used to identify `toStringTag` values supported by `_.clone`. */
-var cloneableTags = {};
-cloneableTags[argsTag] = cloneableTags[arrayTag] =
-cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
-cloneableTags[boolTag] = cloneableTags[dateTag] =
-cloneableTags[float32Tag] = cloneableTags[float64Tag] =
-cloneableTags[int8Tag] = cloneableTags[int16Tag] =
-cloneableTags[int32Tag] = cloneableTags[mapTag] =
-cloneableTags[numberTag] = cloneableTags[objectTag] =
-cloneableTags[regexpTag] = cloneableTags[setTag] =
-cloneableTags[stringTag] = cloneableTags[symbolTag] =
-cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
-cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
-cloneableTags[errorTag] = cloneableTags[funcTag] =
-cloneableTags[weakMapTag] = false;
+var _sortPrefixedStyle = __webpack_require__(313);
-/** Detect free variable `global` from Node.js. */
-var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle);
-/** Detect free variable `self`. */
-var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+var _position = __webpack_require__(681);
-/** Used as a reference to the global object. */
-var root = freeGlobal || freeSelf || Function('return this')();
+var _position2 = _interopRequireDefault(_position);
-/** Detect free variable `exports`. */
-var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
+var _calc = __webpack_require__(682);
-/** Detect free variable `module`. */
-var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
+var _calc2 = _interopRequireDefault(_calc);
-/** Detect the popular CommonJS extension `module.exports`. */
-var moduleExports = freeModule && freeModule.exports === freeExports;
+var _cursor = __webpack_require__(683);
-/** Detect free variable `process` from Node.js. */
-var freeProcess = moduleExports && freeGlobal.process;
+var _cursor2 = _interopRequireDefault(_cursor);
-/** Used to access faster Node.js helpers. */
-var nodeUtil = (function() {
- try {
- return freeProcess && freeProcess.binding('util');
- } catch (e) {}
-}());
+var _flex = __webpack_require__(684);
-/* Node.js helper references. */
-var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
+var _flex2 = _interopRequireDefault(_flex);
-/**
- * Adds the key-value `pair` to `map`.
- *
- * @private
- * @param {Object} map The map to modify.
- * @param {Array} pair The key-value pair to add.
- * @returns {Object} Returns `map`.
- */
-function addMapEntry(map, pair) {
- // Don't return `map.set` because it's not chainable in IE 11.
- map.set(pair[0], pair[1]);
- return map;
-}
+var _sizing = __webpack_require__(685);
-/**
- * Adds `value` to `set`.
- *
- * @private
- * @param {Object} set The set to modify.
- * @param {*} value The value to add.
- * @returns {Object} Returns `set`.
- */
-function addSetEntry(set, value) {
- // Don't return `set.add` because it's not chainable in IE 11.
- set.add(value);
- return set;
-}
+var _sizing2 = _interopRequireDefault(_sizing);
-/**
- * A faster alternative to `Function#apply`, this function invokes `func`
- * with the `this` binding of `thisArg` and the arguments of `args`.
- *
- * @private
- * @param {Function} func The function to invoke.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {Array} args The arguments to invoke `func` with.
- * @returns {*} Returns the result of `func`.
- */
-function apply(func, thisArg, args) {
- switch (args.length) {
- case 0: return func.call(thisArg);
- case 1: return func.call(thisArg, args[0]);
- case 2: return func.call(thisArg, args[0], args[1]);
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
- }
- return func.apply(thisArg, args);
-}
+var _gradient = __webpack_require__(686);
-/**
- * A specialized version of `_.forEach` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
-function arrayEach(array, iteratee) {
- var index = -1,
- length = array ? array.length : 0;
+var _gradient2 = _interopRequireDefault(_gradient);
- while (++index < length) {
- if (iteratee(array[index], index, array) === false) {
- break;
- }
- }
- return array;
-}
+var _transition = __webpack_require__(687);
-/**
- * Appends the elements of `values` to `array`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to append.
- * @returns {Array} Returns `array`.
- */
-function arrayPush(array, values) {
- var index = -1,
- length = values.length,
- offset = array.length;
+var _transition2 = _interopRequireDefault(_transition);
- while (++index < length) {
- array[offset + index] = values[index];
- }
- return array;
-}
+var _flexboxIE = __webpack_require__(688);
-/**
- * A specialized version of `_.reduce` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initAccum] Specify using the first element of `array` as
- * the initial value.
- * @returns {*} Returns the accumulated value.
- */
-function arrayReduce(array, iteratee, accumulator, initAccum) {
- var index = -1,
- length = array ? array.length : 0;
+var _flexboxIE2 = _interopRequireDefault(_flexboxIE);
- if (initAccum && length) {
- accumulator = array[++index];
- }
- while (++index < length) {
- accumulator = iteratee(accumulator, array[index], index, array);
- }
- return accumulator;
-}
+var _flexboxOld = __webpack_require__(689);
-/**
- * The base implementation of `_.times` without support for iteratee shorthands
- * or max array length checks.
- *
- * @private
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the array of results.
- */
-function baseTimes(n, iteratee) {
- var index = -1,
- result = Array(n);
+var _flexboxOld2 = _interopRequireDefault(_flexboxOld);
- while (++index < n) {
- result[index] = iteratee(index);
- }
- return result;
-}
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-/**
- * The base implementation of `_.unary` without support for storing metadata.
- *
- * @private
- * @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new capped function.
- */
-function baseUnary(func) {
- return function(value) {
- return func(value);
- };
-}
+// special flexbox specifications
-/**
- * Gets the value at `key` of `object`.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
- */
-function getValue(object, key) {
- return object == null ? undefined : object[key];
-}
-/**
- * Checks if `value` is a host object in IE < 9.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
- */
-function isHostObject(value) {
- // Many host objects are `Object` objects that can coerce to strings
- // despite having improperly defined `toString` methods.
- var result = false;
- if (value != null && typeof value.toString != 'function') {
- try {
- result = !!(value + '');
- } catch (e) {}
- }
- return result;
-}
+var plugins = [_position2.default, _calc2.default, _cursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, _flex2.default];
/**
- * Converts `map` to its key-value pairs.
- *
- * @private
- * @param {Object} map The map to convert.
- * @returns {Array} Returns the key-value pairs.
+ * Returns a prefixed version of the style object using all vendor prefixes
+ * @param {Object} styles - Style object that gets prefixed properties added
+ * @returns {Object} - Style object with prefixed properties and values
*/
-function mapToArray(map) {
- var index = -1,
- result = Array(map.size);
+function prefixAll(styles) {
+ Object.keys(styles).forEach(function (property) {
+ var value = styles[property];
+ if (value instanceof Object && !Array.isArray(value)) {
+ // recurse through nested style objects
+ styles[property] = prefixAll(value);
+ } else {
+ Object.keys(_prefixProps2.default).forEach(function (prefix) {
+ var properties = _prefixProps2.default[prefix];
+ // add prefixes if needed
+ if (properties[property]) {
+ styles[prefix + (0, _capitalizeString2.default)(property)] = value;
+ }
+ });
+ }
+ });
- map.forEach(function(value, key) {
- result[++index] = [key, value];
+ Object.keys(styles).forEach(function (property) {
+ [].concat(styles[property]).forEach(function (value, index) {
+ // resolve every special plugins
+ plugins.forEach(function (plugin) {
+ return assignStyles(styles, plugin(property, value));
+ });
+ });
});
- return result;
-}
-/**
- * Creates a unary function that invokes `func` with its argument transformed.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
- */
-function overArg(func, transform) {
- return function(arg) {
- return func(transform(arg));
- };
+ return (0, _sortPrefixedStyle2.default)(styles);
}
-/**
- * Converts `set` to an array of its values.
- *
- * @private
- * @param {Object} set The set to convert.
- * @returns {Array} Returns the values.
- */
-function setToArray(set) {
- var index = -1,
- result = Array(set.size);
+function assignStyles(base) {
+ var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
- set.forEach(function(value) {
- result[++index] = value;
+ Object.keys(extend).forEach(function (property) {
+ var baseValue = base[property];
+ if (Array.isArray(baseValue)) {
+ [].concat(extend[property]).forEach(function (value) {
+ var valueIndex = baseValue.indexOf(value);
+ if (valueIndex > -1) {
+ base[property].splice(valueIndex, 1);
+ }
+ base[property].push(value);
+ });
+ } else {
+ base[property] = extend[property];
+ }
});
- return result;
}
+module.exports = exports['default'];
-/** Used for built-in method references. */
-var arrayProto = Array.prototype,
- funcProto = Function.prototype,
- objectProto = Object.prototype;
+/***/ }),
+/* 680 */
+/***/ (function(module, exports, __webpack_require__) {
-/** Used to detect overreaching core-js shims. */
-var coreJsData = root['__core-js_shared__'];
+"use strict";
-/** Used to detect methods masquerading as native. */
-var maskSrcKey = (function() {
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
- return uid ? ('Symbol(src)_1.' + uid) : '';
-}());
-/** Used to resolve the decompiled source of functions. */
-var funcToString = funcProto.toString;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
+exports.default = function (property) {
+ return property.match(/^(Webkit|Moz|O|ms)/) !== null;
+};
-/** Used to infer the `Object` constructor. */
-var objectCtorString = funcToString.call(Object);
+module.exports = exports["default"];
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
+/***/ }),
+/* 681 */
+/***/ (function(module, exports, __webpack_require__) {
-/** Used to detect if a method is native. */
-var reIsNative = RegExp('^' +
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
-);
+"use strict";
-/** Built-in value references. */
-var Buffer = moduleExports ? root.Buffer : undefined,
- Symbol = root.Symbol,
- Uint8Array = root.Uint8Array,
- getPrototype = overArg(Object.getPrototypeOf, Object),
- objectCreate = Object.create,
- propertyIsEnumerable = objectProto.propertyIsEnumerable,
- splice = arrayProto.splice;
-/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeGetSymbols = Object.getOwnPropertySymbols,
- nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
- nativeKeys = overArg(Object.keys, Object),
- nativeMax = Math.max;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = position;
+function position(property, value) {
+ if (property === 'position' && value === 'sticky') {
+ return { position: ['-webkit-sticky', 'sticky'] };
+ }
+}
+module.exports = exports['default'];
-/* Built-in method references that are verified to be native. */
-var DataView = getNative(root, 'DataView'),
- Map = getNative(root, 'Map'),
- Promise = getNative(root, 'Promise'),
- Set = getNative(root, 'Set'),
- WeakMap = getNative(root, 'WeakMap'),
- nativeCreate = getNative(Object, 'create');
+/***/ }),
+/* 682 */
+/***/ (function(module, exports, __webpack_require__) {
-/** Used to detect maps, sets, and weakmaps. */
-var dataViewCtorString = toSource(DataView),
- mapCtorString = toSource(Map),
- promiseCtorString = toSource(Promise),
- setCtorString = toSource(Set),
- weakMapCtorString = toSource(WeakMap);
+"use strict";
-/** Used to convert symbols to primitives and strings. */
-var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
-/**
- * Creates a hash object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
-function Hash(entries) {
- var index = -1,
- length = entries ? entries.length : 0;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = calc;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
-}
+var _joinPrefixedValue = __webpack_require__(130);
-/**
- * Removes all key-value entries from the hash.
- *
- * @private
- * @name clear
- * @memberOf Hash
- */
-function hashClear() {
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
-}
+var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue);
-/**
- * Removes `key` and its value from the hash.
- *
- * @private
- * @name delete
- * @memberOf Hash
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
-function hashDelete(key) {
- return this.has(key) && delete this.__data__[key];
-}
+var _isPrefixedValue = __webpack_require__(201);
-/**
- * Gets the hash value for `key`.
- *
- * @private
- * @name get
- * @memberOf Hash
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function hashGet(key) {
- var data = this.__data__;
- if (nativeCreate) {
- var result = data[key];
- return result === HASH_UNDEFINED ? undefined : result;
+var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function calc(property, value) {
+ if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('calc(') > -1) {
+ return (0, _joinPrefixedValue2.default)(property, value, function (prefix, value) {
+ return value.replace(/calc\(/g, prefix + 'calc(');
+ });
}
- return hasOwnProperty.call(data, key) ? data[key] : undefined;
}
+module.exports = exports['default'];
-/**
- * Checks if a hash value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Hash
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function hashHas(key) {
- var data = this.__data__;
- return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
-}
+/***/ }),
+/* 683 */
+/***/ (function(module, exports, __webpack_require__) {
-/**
- * Sets the hash `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Hash
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the hash instance.
- */
-function hashSet(key, value) {
- var data = this.__data__;
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
- return this;
-}
+"use strict";
-// Add methods to `Hash`.
-Hash.prototype.clear = hashClear;
-Hash.prototype['delete'] = hashDelete;
-Hash.prototype.get = hashGet;
-Hash.prototype.has = hashHas;
-Hash.prototype.set = hashSet;
-/**
- * Creates an list cache object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
-function ListCache(entries) {
- var index = -1,
- length = entries ? entries.length : 0;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = cursor;
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
-}
+var _joinPrefixedValue = __webpack_require__(130);
-/**
- * Removes all key-value entries from the list cache.
- *
- * @private
- * @name clear
- * @memberOf ListCache
- */
-function listCacheClear() {
- this.__data__ = [];
-}
+var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue);
-/**
- * Removes `key` and its value from the list cache.
- *
- * @private
- * @name delete
- * @memberOf ListCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
-function listCacheDelete(key) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- if (index < 0) {
- return false;
- }
- var lastIndex = data.length - 1;
- if (index == lastIndex) {
- data.pop();
- } else {
- splice.call(data, index, 1);
+var values = {
+ 'zoom-in': true,
+ 'zoom-out': true,
+ grab: true,
+ grabbing: true
+};
+
+function cursor(property, value) {
+ if (property === 'cursor' && values[value]) {
+ return (0, _joinPrefixedValue2.default)(property, value);
}
- return true;
}
+module.exports = exports['default'];
-/**
- * Gets the list cache value for `key`.
- *
- * @private
- * @name get
- * @memberOf ListCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function listCacheGet(key) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
+/***/ }),
+/* 684 */
+/***/ (function(module, exports, __webpack_require__) {
- return index < 0 ? undefined : data[index][1];
-}
+"use strict";
-/**
- * Checks if a list cache value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf ListCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function listCacheHas(key) {
- return assocIndexOf(this.__data__, key) > -1;
-}
-/**
- * Sets the list cache `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf ListCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the list cache instance.
- */
-function listCacheSet(key, value) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = flex;
+var values = { flex: true, 'inline-flex': true };
- if (index < 0) {
- data.push([key, value]);
- } else {
- data[index][1] = value;
+function flex(property, value) {
+ if (property === 'display' && values[value]) {
+ return {
+ display: ['-webkit-box', '-moz-box', '-ms-' + value + 'box', '-webkit-' + value, value]
+ };
}
- return this;
}
+module.exports = exports['default'];
-// Add methods to `ListCache`.
-ListCache.prototype.clear = listCacheClear;
-ListCache.prototype['delete'] = listCacheDelete;
-ListCache.prototype.get = listCacheGet;
-ListCache.prototype.has = listCacheHas;
-ListCache.prototype.set = listCacheSet;
+/***/ }),
+/* 685 */
+/***/ (function(module, exports, __webpack_require__) {
-/**
- * Creates a map cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
-function MapCache(entries) {
- var index = -1,
- length = entries ? entries.length : 0;
+"use strict";
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
-}
-/**
- * Removes all key-value entries from the map.
- *
- * @private
- * @name clear
- * @memberOf MapCache
- */
-function mapCacheClear() {
- this.__data__ = {
- 'hash': new Hash,
- 'map': new (Map || ListCache),
- 'string': new Hash
- };
-}
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = sizing;
-/**
- * Removes `key` and its value from the map.
- *
- * @private
- * @name delete
- * @memberOf MapCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
-function mapCacheDelete(key) {
- return getMapData(this, key)['delete'](key);
-}
+var _joinPrefixedValue = __webpack_require__(130);
-/**
- * Gets the map value for `key`.
- *
- * @private
- * @name get
- * @memberOf MapCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function mapCacheGet(key) {
- return getMapData(this, key).get(key);
-}
+var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue);
-/**
- * Checks if a map value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf MapCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function mapCacheHas(key) {
- return getMapData(this, key).has(key);
-}
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-/**
- * Sets the map `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf MapCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the map cache instance.
- */
-function mapCacheSet(key, value) {
- getMapData(this, key).set(key, value);
- return this;
+var properties = {
+ maxHeight: true,
+ maxWidth: true,
+ width: true,
+ height: true,
+ columnWidth: true,
+ minWidth: true,
+ minHeight: true
+};
+var values = {
+ 'min-content': true,
+ 'max-content': true,
+ 'fill-available': true,
+ 'fit-content': true,
+ 'contain-floats': true
+};
+
+function sizing(property, value) {
+ if (properties[property] && values[value]) {
+ return (0, _joinPrefixedValue2.default)(property, value);
+ }
}
+module.exports = exports['default'];
+
+/***/ }),
+/* 686 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
-// Add methods to `MapCache`.
-MapCache.prototype.clear = mapCacheClear;
-MapCache.prototype['delete'] = mapCacheDelete;
-MapCache.prototype.get = mapCacheGet;
-MapCache.prototype.has = mapCacheHas;
-MapCache.prototype.set = mapCacheSet;
-/**
- * Creates a stack cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
-function Stack(entries) {
- this.__data__ = new ListCache(entries);
-}
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = gradient;
-/**
- * Removes all key-value entries from the stack.
- *
- * @private
- * @name clear
- * @memberOf Stack
- */
-function stackClear() {
- this.__data__ = new ListCache;
-}
+var _joinPrefixedValue = __webpack_require__(130);
-/**
- * Removes `key` and its value from the stack.
- *
- * @private
- * @name delete
- * @memberOf Stack
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
-function stackDelete(key) {
- return this.__data__['delete'](key);
-}
+var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue);
-/**
- * Gets the stack value for `key`.
- *
- * @private
- * @name get
- * @memberOf Stack
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function stackGet(key) {
- return this.__data__.get(key);
-}
+var _isPrefixedValue = __webpack_require__(201);
-/**
- * Checks if a stack value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Stack
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function stackHas(key) {
- return this.__data__.has(key);
-}
+var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);
-/**
- * Sets the stack `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Stack
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the stack cache instance.
- */
-function stackSet(key, value) {
- var cache = this.__data__;
- if (cache instanceof ListCache) {
- var pairs = cache.__data__;
- if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
- pairs.push([key, value]);
- return this;
- }
- cache = this.__data__ = new MapCache(pairs);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;
+
+function gradient(property, value) {
+ if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.match(values) !== null) {
+ return (0, _joinPrefixedValue2.default)(property, value);
}
- cache.set(key, value);
- return this;
}
+module.exports = exports['default'];
-// Add methods to `Stack`.
-Stack.prototype.clear = stackClear;
-Stack.prototype['delete'] = stackDelete;
-Stack.prototype.get = stackGet;
-Stack.prototype.has = stackHas;
-Stack.prototype.set = stackSet;
+/***/ }),
+/* 687 */
+/***/ (function(module, exports, __webpack_require__) {
-/**
- * Creates an array of the enumerable property names of the array-like `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @param {boolean} inherited Specify returning inherited property names.
- * @returns {Array} Returns the array of property names.
- */
-function arrayLikeKeys(value, inherited) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- // Safari 9 makes `arguments.length` enumerable in strict mode.
- var result = (isArray(value) || isArguments(value))
- ? baseTimes(value.length, String)
- : [];
+"use strict";
- var length = result.length,
- skipIndexes = !!length;
- for (var key in value) {
- if ((inherited || hasOwnProperty.call(value, key)) &&
- !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
- result.push(key);
- }
- }
- return result;
-}
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = transition;
-/**
- * This function is like `assignValue` except that it doesn't assign
- * `undefined` values.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
-function assignMergeValue(object, key, value) {
- if ((value !== undefined && !eq(object[key], value)) ||
- (typeof key == 'number' && value === undefined && !(key in object))) {
- object[key] = value;
- }
-}
+var _hyphenateStyleName = __webpack_require__(314);
-/**
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
-function assignValue(object, key, value) {
- var objValue = object[key];
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
- (value === undefined && !(key in object))) {
- object[key] = value;
- }
-}
+var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName);
-/**
- * Gets the index at which the `key` is found in `array` of key-value pairs.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} key The key to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
-function assocIndexOf(array, key) {
- var length = array.length;
- while (length--) {
- if (eq(array[length][0], key)) {
- return length;
+var _capitalizeString = __webpack_require__(200);
+
+var _capitalizeString2 = _interopRequireDefault(_capitalizeString);
+
+var _isPrefixedValue = __webpack_require__(201);
+
+var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);
+
+var _prefixProps = __webpack_require__(312);
+
+var _prefixProps2 = _interopRequireDefault(_prefixProps);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var properties = {
+ transition: true,
+ transitionProperty: true,
+ WebkitTransition: true,
+ WebkitTransitionProperty: true
+};
+
+function transition(property, value) {
+ // also check for already prefixed transitions
+ if (typeof value === 'string' && properties[property]) {
+ var _ref2;
+
+ var outputValue = prefixValue(value);
+ var webkitOutput = outputValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function (value) {
+ return value.match(/-moz-|-ms-/) === null;
+ }).join(',');
+
+ // if the property is already prefixed
+ if (property.indexOf('Webkit') > -1) {
+ return _defineProperty({}, property, webkitOutput);
}
- }
- return -1;
-}
-/**
- * The base implementation of `_.assign` without support for multiple sources
- * or `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
-function baseAssign(object, source) {
- return object && copyObject(source, keys(source), object);
+ return _ref2 = {}, _defineProperty(_ref2, 'Webkit' + (0, _capitalizeString2.default)(property), webkitOutput), _defineProperty(_ref2, property, outputValue), _ref2;
+ }
}
-/**
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
- * traversed objects.
- *
- * @private
- * @param {*} value The value to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @param {boolean} [isFull] Specify a clone including symbols.
- * @param {Function} [customizer] The function to customize cloning.
- * @param {string} [key] The key of `value`.
- * @param {Object} [object] The parent object of `value`.
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
- * @returns {*} Returns the cloned value.
- */
-function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
- var result;
- if (customizer) {
- result = object ? customizer(value, key, object, stack) : customizer(value);
- }
- if (result !== undefined) {
- return result;
- }
- if (!isObject(value)) {
+function prefixValue(value) {
+ if ((0, _isPrefixedValue2.default)(value)) {
return value;
}
- var isArr = isArray(value);
- if (isArr) {
- result = initCloneArray(value);
- if (!isDeep) {
- return copyArray(value, result);
- }
- } else {
- var tag = getTag(value),
- isFunc = tag == funcTag || tag == genTag;
- if (isBuffer(value)) {
- return cloneBuffer(value, isDeep);
- }
- if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
- if (isHostObject(value)) {
- return object ? value : {};
- }
- result = initCloneObject(isFunc ? {} : value);
- if (!isDeep) {
- return copySymbols(value, baseAssign(result, value));
- }
- } else {
- if (!cloneableTags[tag]) {
- return object ? value : {};
- }
- result = initCloneByTag(value, tag, baseClone, isDeep);
- }
- }
- // Check for circular references and return its corresponding clone.
- stack || (stack = new Stack);
- var stacked = stack.get(value);
- if (stacked) {
- return stacked;
- }
- stack.set(value, result);
+ // only split multi values, not cubic beziers
+ var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g);
- if (!isArr) {
- var props = isFull ? getAllKeys(value) : keys(value);
- }
- arrayEach(props || value, function(subValue, key) {
- if (props) {
- key = subValue;
- subValue = value[key];
- }
- // Recursively populate clone (susceptible to call stack limits).
- assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
+ // iterate each single value and check for transitioned properties
+ // that need to be prefixed as well
+ multipleValues.forEach(function (val, index) {
+ multipleValues[index] = Object.keys(_prefixProps2.default).reduce(function (out, prefix) {
+ var dashCasePrefix = '-' + prefix.toLowerCase() + '-';
+
+ Object.keys(_prefixProps2.default[prefix]).forEach(function (prop) {
+ var dashCaseProperty = (0, _hyphenateStyleName2.default)(prop);
+
+ if (val.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== 'order') {
+ // join all prefixes and create a new value
+ out = val.replace(dashCaseProperty, dashCasePrefix + dashCaseProperty) + ',' + out;
+ }
+ });
+ return out;
+ }, val);
});
- return result;
-}
-/**
- * The base implementation of `_.create` without support for assigning
- * properties to the created object.
- *
- * @private
- * @param {Object} prototype The object to inherit from.
- * @returns {Object} Returns the new object.
- */
-function baseCreate(proto) {
- return isObject(proto) ? objectCreate(proto) : {};
+ return multipleValues.join(',');
}
+module.exports = exports['default'];
-/**
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
- * symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
- * @returns {Array} Returns the array of property names and symbols.
- */
-function baseGetAllKeys(object, keysFunc, symbolsFunc) {
- var result = keysFunc(object);
- return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
-}
+/***/ }),
+/* 688 */
+/***/ (function(module, exports, __webpack_require__) {
-/**
- * The base implementation of `getTag`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
-function baseGetTag(value) {
- return objectToString.call(value);
-}
+"use strict";
-/**
- * The base implementation of `_.isNative` without bad shim checks.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function,
- * else `false`.
- */
-function baseIsNative(value) {
- if (!isObject(value) || isMasked(value)) {
- return false;
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = flexboxIE;
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var alternativeValues = {
+ 'space-around': 'distribute',
+ 'space-between': 'justify',
+ 'flex-start': 'start',
+ 'flex-end': 'end'
+};
+var alternativeProps = {
+ alignContent: 'msFlexLinePack',
+ alignSelf: 'msFlexItemAlign',
+ alignItems: 'msFlexAlign',
+ justifyContent: 'msFlexPack',
+ order: 'msFlexOrder',
+ flexGrow: 'msFlexPositive',
+ flexShrink: 'msFlexNegative',
+ flexBasis: 'msPreferredSize'
+};
+
+function flexboxIE(property, value) {
+ if (alternativeProps[property]) {
+ return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value);
}
- var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
- return pattern.test(toSource(value));
}
+module.exports = exports['default'];
-/**
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
- */
-function baseIsTypedArray(value) {
- return isObjectLike(value) &&
- isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
-}
+/***/ }),
+/* 689 */
+/***/ (function(module, exports, __webpack_require__) {
-/**
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
-function baseKeys(object) {
- if (!isPrototype(object)) {
- return nativeKeys(object);
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = flexboxOld;
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var alternativeValues = {
+ 'space-around': 'justify',
+ 'space-between': 'justify',
+ 'flex-start': 'start',
+ 'flex-end': 'end',
+ 'wrap-reverse': 'multiple',
+ wrap: 'multiple'
+};
+
+var alternativeProps = {
+ alignItems: 'WebkitBoxAlign',
+ justifyContent: 'WebkitBoxPack',
+ flexWrap: 'WebkitBoxLines'
+};
+
+function flexboxOld(property, value) {
+ if (property === 'flexDirection' && typeof value === 'string') {
+ return {
+ WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal',
+ WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal'
+ };
}
- var result = [];
- for (var key in Object(object)) {
- if (hasOwnProperty.call(object, key) && key != 'constructor') {
- result.push(key);
- }
+ if (alternativeProps[property]) {
+ return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value);
}
- return result;
}
+module.exports = exports['default'];
+
+/***/ }),
+/* 690 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _bowser = __webpack_require__(691);
+
+var _bowser2 = _interopRequireDefault(_bowser);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var vendorPrefixes = {
+ Webkit: ['chrome', 'safari', 'ios', 'android', 'phantom', 'opera', 'webos', 'blackberry', 'bada', 'tizen', 'chromium', 'vivaldi'],
+ Moz: ['firefox', 'seamonkey', 'sailfish'],
+ ms: ['msie', 'msedge']
+};
+var browsers = {
+ chrome: [['chrome'], ['chromium']],
+ safari: [['safari']],
+ firefox: [['firefox']],
+ edge: [['msedge']],
+ opera: [['opera'], ['vivaldi']],
+ ios_saf: [['ios', 'mobile'], ['ios', 'tablet']],
+ ie: [['msie']],
+ op_mini: [['opera', 'mobile'], ['opera', 'tablet']],
+ and_uc: [['android', 'mobile'], ['android', 'tablet']],
+ android: [['android', 'mobile'], ['android', 'tablet']]
+};
+
+var browserByInfo = function browserByInfo(info) {
+ if (info.firefox) {
+ return 'firefox';
+ }
+ var name = '';
+
+ Object.keys(browsers).forEach(function (browser) {
+ browsers[browser].forEach(function (condition) {
+ var match = 0;
+ condition.forEach(function (single) {
+ if (info[single]) {
+ match += 1;
+ }
+ });
+ if (condition.length === match) {
+ name = browser;
+ }
+ });
+ });
+
+ return name;
+};
/**
- * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
+ * Uses bowser to get default browser information such as version and name
+ * Evaluates bowser info and adds vendorPrefix information
+ * @param {string} userAgent - userAgent that gets evaluated
*/
-function baseKeysIn(object) {
- if (!isObject(object)) {
- return nativeKeysIn(object);
+
+exports.default = function (userAgent) {
+ if (!userAgent) {
+ return false;
}
- var isProto = isPrototype(object),
- result = [];
+ var info = _bowser2.default._detect(userAgent);
- for (var key in object) {
- if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
- result.push(key);
- }
+ Object.keys(vendorPrefixes).forEach(function (prefix) {
+ vendorPrefixes[prefix].forEach(function (browser) {
+ if (info[browser]) {
+ info.prefix = {
+ inline: prefix,
+ css: '-' + prefix.toLowerCase() + '-'
+ };
+ }
+ });
+ });
+
+ info.browser = browserByInfo(info);
+
+ // For cordova IOS 8 the version is missing, set truncated osversion to prevent NaN
+ info.version = info.version ? parseFloat(info.version) : parseInt(parseFloat(info.osversion), 10);
+ info.osversion = parseFloat(info.osversion);
+
+ // iOS forces all browsers to use Safari under the hood
+ // as the Safari version seems to match the iOS version
+ // we just explicitely use the osversion instead
+ // https://github.com/rofrischmann/inline-style-prefixer/issues/72
+ if (info.browser === 'ios_saf' && info.version > info.osversion) {
+ info.version = info.osversion;
+ info.safari = true;
}
- return result;
-}
-/**
- * The base implementation of `_.merge` without support for multiple sources.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {number} srcIndex The index of `source`.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
- */
-function baseMerge(object, source, srcIndex, customizer, stack) {
- if (object === source) {
- return;
+ // seperate native android chrome
+ // https://github.com/rofrischmann/inline-style-prefixer/issues/45
+ if (info.browser === 'android' && info.chrome && info.version > 37) {
+ info.browser = 'and_chr';
}
- if (!(isArray(source) || isTypedArray(source))) {
- var props = baseKeysIn(source);
+
+ // For android < 4.4 we want to check the osversion
+ // not the chrome version, see issue #26
+ // https://github.com/rofrischmann/inline-style-prefixer/issues/26
+ if (info.browser === 'android' && info.osversion < 5) {
+ info.version = info.osversion;
}
- arrayEach(props || source, function(srcValue, key) {
- if (props) {
- key = srcValue;
- srcValue = source[key];
- }
- if (isObject(srcValue)) {
- stack || (stack = new Stack);
- baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
- }
- else {
- var newValue = customizer
- ? customizer(object[key], srcValue, (key + ''), object, source, stack)
- : undefined;
- if (newValue === undefined) {
- newValue = srcValue;
- }
- assignMergeValue(object, key, newValue);
- }
- });
-}
+ return info;
+};
-/**
- * A specialized version of `baseMerge` for arrays and objects which performs
- * deep merges and tracks traversed objects enabling objects with circular
- * references to be merged.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {string} key The key of the value to merge.
- * @param {number} srcIndex The index of `source`.
- * @param {Function} mergeFunc The function to merge values.
- * @param {Function} [customizer] The function to customize assigned values.
- * @param {Object} [stack] Tracks traversed source values and their merged
- * counterparts.
+module.exports = exports['default'];
+
+/***/ }),
+/* 691 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/*!
+ * Bowser - a browser detector
+ * https://github.com/ded/bowser
+ * MIT License | (c) Dustin Diaz 2015
*/
-function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
- var objValue = object[key],
- srcValue = source[key],
- stacked = stack.get(srcValue);
- if (stacked) {
- assignMergeValue(object, key, stacked);
- return;
- }
- var newValue = customizer
- ? customizer(objValue, srcValue, (key + ''), object, source, stack)
- : undefined;
+!function (root, name, definition) {
+ if (typeof module != 'undefined' && module.exports) module.exports = definition()
+ else if (true) __webpack_require__(692)(name, definition)
+ else root[name] = definition()
+}(this, 'bowser', function () {
+ /**
+ * See useragents.js for examples of navigator.userAgent
+ */
- var isCommon = newValue === undefined;
+ var t = true
- if (isCommon) {
- newValue = srcValue;
- if (isArray(srcValue) || isTypedArray(srcValue)) {
- if (isArray(objValue)) {
- newValue = objValue;
+ function detect(ua) {
+
+ function getFirstMatch(regex) {
+ var match = ua.match(regex);
+ return (match && match.length > 1 && match[1]) || '';
+ }
+
+ function getSecondMatch(regex) {
+ var match = ua.match(regex);
+ return (match && match.length > 1 && match[2]) || '';
+ }
+
+ var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase()
+ , likeAndroid = /like android/i.test(ua)
+ , android = !likeAndroid && /android/i.test(ua)
+ , nexusMobile = /nexus\s*[0-6]\s*/i.test(ua)
+ , nexusTablet = !nexusMobile && /nexus\s*[0-9]+/i.test(ua)
+ , chromeos = /CrOS/.test(ua)
+ , silk = /silk/i.test(ua)
+ , sailfish = /sailfish/i.test(ua)
+ , tizen = /tizen/i.test(ua)
+ , webos = /(web|hpw)os/i.test(ua)
+ , windowsphone = /windows phone/i.test(ua)
+ , samsungBrowser = /SamsungBrowser/i.test(ua)
+ , windows = !windowsphone && /windows/i.test(ua)
+ , mac = !iosdevice && !silk && /macintosh/i.test(ua)
+ , linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua)
+ , edgeVersion = getFirstMatch(/edge\/(\d+(\.\d+)?)/i)
+ , versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i)
+ , tablet = /tablet/i.test(ua)
+ , mobile = !tablet && /[^-]mobi/i.test(ua)
+ , xbox = /xbox/i.test(ua)
+ , result
+
+ if (/opera/i.test(ua)) {
+ // an old Opera
+ result = {
+ name: 'Opera'
+ , opera: t
+ , version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)
}
- else if (isArrayLikeObject(objValue)) {
- newValue = copyArray(objValue);
+ } else if (/opr|opios/i.test(ua)) {
+ // a new Opera
+ result = {
+ name: 'Opera'
+ , opera: t
+ , version: getFirstMatch(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i) || versionIdentifier
}
- else {
- isCommon = false;
- newValue = baseClone(srcValue, true);
+ }
+ else if (/SamsungBrowser/i.test(ua)) {
+ result = {
+ name: 'Samsung Internet for Android'
+ , samsungBrowser: t
+ , version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)
}
}
- else if (isPlainObject(srcValue) || isArguments(srcValue)) {
- if (isArguments(objValue)) {
- newValue = toPlainObject(objValue);
+ else if (/coast/i.test(ua)) {
+ result = {
+ name: 'Opera Coast'
+ , coast: t
+ , version: versionIdentifier || getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i)
}
- else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
- isCommon = false;
- newValue = baseClone(srcValue, true);
+ }
+ else if (/yabrowser/i.test(ua)) {
+ result = {
+ name: 'Yandex Browser'
+ , yandexbrowser: t
+ , version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)
+ }
+ }
+ else if (/ucbrowser/i.test(ua)) {
+ result = {
+ name: 'UC Browser'
+ , ucbrowser: t
+ , version: getFirstMatch(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)
+ }
+ }
+ else if (/mxios/i.test(ua)) {
+ result = {
+ name: 'Maxthon'
+ , maxthon: t
+ , version: getFirstMatch(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)
+ }
+ }
+ else if (/epiphany/i.test(ua)) {
+ result = {
+ name: 'Epiphany'
+ , epiphany: t
+ , version: getFirstMatch(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)
+ }
+ }
+ else if (/puffin/i.test(ua)) {
+ result = {
+ name: 'Puffin'
+ , puffin: t
+ , version: getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)
+ }
+ }
+ else if (/sleipnir/i.test(ua)) {
+ result = {
+ name: 'Sleipnir'
+ , sleipnir: t
+ , version: getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)
+ }
+ }
+ else if (/k-meleon/i.test(ua)) {
+ result = {
+ name: 'K-Meleon'
+ , kMeleon: t
+ , version: getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)
+ }
+ }
+ else if (windowsphone) {
+ result = {
+ name: 'Windows Phone'
+ , windowsphone: t
+ }
+ if (edgeVersion) {
+ result.msedge = t
+ result.version = edgeVersion
}
else {
- newValue = objValue;
+ result.msie = t
+ result.version = getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i)
}
}
- else {
- isCommon = false;
+ else if (/msie|trident/i.test(ua)) {
+ result = {
+ name: 'Internet Explorer'
+ , msie: t
+ , version: getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i)
+ }
+ } else if (chromeos) {
+ result = {
+ name: 'Chrome'
+ , chromeos: t
+ , chromeBook: t
+ , chrome: t
+ , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)
+ }
+ } else if (/chrome.+? edge/i.test(ua)) {
+ result = {
+ name: 'Microsoft Edge'
+ , msedge: t
+ , version: edgeVersion
+ }
}
- }
- if (isCommon) {
- // Recursively merge objects and arrays (susceptible to call stack limits).
- stack.set(srcValue, newValue);
- mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
- stack['delete'](srcValue);
- }
- assignMergeValue(object, key, newValue);
-}
-
-/**
- * The base implementation of `_.rest` which doesn't validate or coerce arguments.
- *
- * @private
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @returns {Function} Returns the new function.
- */
-function baseRest(func, start) {
- start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- array = Array(length);
-
- while (++index < length) {
- array[index] = args[start + index];
+ else if (/vivaldi/i.test(ua)) {
+ result = {
+ name: 'Vivaldi'
+ , vivaldi: t
+ , version: getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i) || versionIdentifier
+ }
}
- index = -1;
- var otherArgs = Array(start + 1);
- while (++index < start) {
- otherArgs[index] = args[index];
+ else if (sailfish) {
+ result = {
+ name: 'Sailfish'
+ , sailfish: t
+ , version: getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i)
+ }
}
- otherArgs[start] = array;
- return apply(func, this, otherArgs);
- };
-}
-
-/**
- * Creates a clone of `buffer`.
- *
- * @private
- * @param {Buffer} buffer The buffer to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Buffer} Returns the cloned buffer.
- */
-function cloneBuffer(buffer, isDeep) {
- if (isDeep) {
- return buffer.slice();
- }
- var result = new buffer.constructor(buffer.length);
- buffer.copy(result);
- return result;
-}
-
-/**
- * Creates a clone of `arrayBuffer`.
- *
- * @private
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
- * @returns {ArrayBuffer} Returns the cloned array buffer.
- */
-function cloneArrayBuffer(arrayBuffer) {
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
- new Uint8Array(result).set(new Uint8Array(arrayBuffer));
- return result;
-}
-
-/**
- * Creates a clone of `dataView`.
- *
- * @private
- * @param {Object} dataView The data view to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned data view.
- */
-function cloneDataView(dataView, isDeep) {
- var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
-}
-
-/**
- * Creates a clone of `map`.
- *
- * @private
- * @param {Object} map The map to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned map.
- */
-function cloneMap(map, isDeep, cloneFunc) {
- var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
- return arrayReduce(array, addMapEntry, new map.constructor);
-}
+ else if (/seamonkey\//i.test(ua)) {
+ result = {
+ name: 'SeaMonkey'
+ , seamonkey: t
+ , version: getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i)
+ }
+ }
+ else if (/firefox|iceweasel|fxios/i.test(ua)) {
+ result = {
+ name: 'Firefox'
+ , firefox: t
+ , version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)
+ }
+ if (/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) {
+ result.firefoxos = t
+ }
+ }
+ else if (silk) {
+ result = {
+ name: 'Amazon Silk'
+ , silk: t
+ , version : getFirstMatch(/silk\/(\d+(\.\d+)?)/i)
+ }
+ }
+ else if (/phantom/i.test(ua)) {
+ result = {
+ name: 'PhantomJS'
+ , phantom: t
+ , version: getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i)
+ }
+ }
+ else if (/slimerjs/i.test(ua)) {
+ result = {
+ name: 'SlimerJS'
+ , slimer: t
+ , version: getFirstMatch(/slimerjs\/(\d+(\.\d+)?)/i)
+ }
+ }
+ else if (/blackberry|\bbb\d+/i.test(ua) || /rim\stablet/i.test(ua)) {
+ result = {
+ name: 'BlackBerry'
+ , blackberry: t
+ , version: versionIdentifier || getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i)
+ }
+ }
+ else if (webos) {
+ result = {
+ name: 'WebOS'
+ , webos: t
+ , version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)
+ };
+ /touchpad\//i.test(ua) && (result.touchpad = t)
+ }
+ else if (/bada/i.test(ua)) {
+ result = {
+ name: 'Bada'
+ , bada: t
+ , version: getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i)
+ };
+ }
+ else if (tizen) {
+ result = {
+ name: 'Tizen'
+ , tizen: t
+ , version: getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i) || versionIdentifier
+ };
+ }
+ else if (/qupzilla/i.test(ua)) {
+ result = {
+ name: 'QupZilla'
+ , qupzilla: t
+ , version: getFirstMatch(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i) || versionIdentifier
+ }
+ }
+ else if (/chromium/i.test(ua)) {
+ result = {
+ name: 'Chromium'
+ , chromium: t
+ , version: getFirstMatch(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i) || versionIdentifier
+ }
+ }
+ else if (/chrome|crios|crmo/i.test(ua)) {
+ result = {
+ name: 'Chrome'
+ , chrome: t
+ , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)
+ }
+ }
+ else if (android) {
+ result = {
+ name: 'Android'
+ , version: versionIdentifier
+ }
+ }
+ else if (/safari|applewebkit/i.test(ua)) {
+ result = {
+ name: 'Safari'
+ , safari: t
+ }
+ if (versionIdentifier) {
+ result.version = versionIdentifier
+ }
+ }
+ else if (iosdevice) {
+ result = {
+ name : iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod'
+ }
+ // WTF: version is not part of user agent in web apps
+ if (versionIdentifier) {
+ result.version = versionIdentifier
+ }
+ }
+ else if(/googlebot/i.test(ua)) {
+ result = {
+ name: 'Googlebot'
+ , googlebot: t
+ , version: getFirstMatch(/googlebot\/(\d+(\.\d+))/i) || versionIdentifier
+ }
+ }
+ else {
+ result = {
+ name: getFirstMatch(/^(.*)\/(.*) /),
+ version: getSecondMatch(/^(.*)\/(.*) /)
+ };
+ }
-/**
- * Creates a clone of `regexp`.
- *
- * @private
- * @param {Object} regexp The regexp to clone.
- * @returns {Object} Returns the cloned regexp.
- */
-function cloneRegExp(regexp) {
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
- result.lastIndex = regexp.lastIndex;
- return result;
-}
+ // set webkit or gecko flag for browsers based on these engines
+ if (!result.msedge && /(apple)?webkit/i.test(ua)) {
+ if (/(apple)?webkit\/537\.36/i.test(ua)) {
+ result.name = result.name || "Blink"
+ result.blink = t
+ } else {
+ result.name = result.name || "Webkit"
+ result.webkit = t
+ }
+ if (!result.version && versionIdentifier) {
+ result.version = versionIdentifier
+ }
+ } else if (!result.opera && /gecko\//i.test(ua)) {
+ result.name = result.name || "Gecko"
+ result.gecko = t
+ result.version = result.version || getFirstMatch(/gecko\/(\d+(\.\d+)?)/i)
+ }
-/**
- * Creates a clone of `set`.
- *
- * @private
- * @param {Object} set The set to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned set.
- */
-function cloneSet(set, isDeep, cloneFunc) {
- var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
- return arrayReduce(array, addSetEntry, new set.constructor);
-}
+ // set OS flags for platforms that have multiple browsers
+ if (!result.windowsphone && !result.msedge && (android || result.silk)) {
+ result.android = t
+ } else if (!result.windowsphone && !result.msedge && iosdevice) {
+ result[iosdevice] = t
+ result.ios = t
+ } else if (mac) {
+ result.mac = t
+ } else if (xbox) {
+ result.xbox = t
+ } else if (windows) {
+ result.windows = t
+ } else if (linux) {
+ result.linux = t
+ }
-/**
- * Creates a clone of the `symbol` object.
- *
- * @private
- * @param {Object} symbol The symbol object to clone.
- * @returns {Object} Returns the cloned symbol object.
- */
-function cloneSymbol(symbol) {
- return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
-}
+ // OS version extraction
+ var osVersion = '';
+ if (result.windowsphone) {
+ osVersion = getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i);
+ } else if (iosdevice) {
+ osVersion = getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i);
+ osVersion = osVersion.replace(/[_\s]/g, '.');
+ } else if (android) {
+ osVersion = getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i);
+ } else if (result.webos) {
+ osVersion = getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i);
+ } else if (result.blackberry) {
+ osVersion = getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i);
+ } else if (result.bada) {
+ osVersion = getFirstMatch(/bada\/(\d+(\.\d+)*)/i);
+ } else if (result.tizen) {
+ osVersion = getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i);
+ }
+ if (osVersion) {
+ result.osversion = osVersion;
+ }
-/**
- * Creates a clone of `typedArray`.
- *
- * @private
- * @param {Object} typedArray The typed array to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned typed array.
- */
-function cloneTypedArray(typedArray, isDeep) {
- var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
-}
+ // device type extraction
+ var osMajorVersion = osVersion.split('.')[0];
+ if (
+ tablet
+ || nexusTablet
+ || iosdevice == 'ipad'
+ || (android && (osMajorVersion == 3 || (osMajorVersion >= 4 && !mobile)))
+ || result.silk
+ ) {
+ result.tablet = t
+ } else if (
+ mobile
+ || iosdevice == 'iphone'
+ || iosdevice == 'ipod'
+ || android
+ || nexusMobile
+ || result.blackberry
+ || result.webos
+ || result.bada
+ ) {
+ result.mobile = t
+ }
-/**
- * Copies the values of `source` to `array`.
- *
- * @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
- */
-function copyArray(source, array) {
- var index = -1,
- length = source.length;
+ // Graded Browser Support
+ // http://developer.yahoo.com/yui/articles/gbs
+ if (result.msedge ||
+ (result.msie && result.version >= 10) ||
+ (result.yandexbrowser && result.version >= 15) ||
+ (result.vivaldi && result.version >= 1.0) ||
+ (result.chrome && result.version >= 20) ||
+ (result.samsungBrowser && result.version >= 4) ||
+ (result.firefox && result.version >= 20.0) ||
+ (result.safari && result.version >= 6) ||
+ (result.opera && result.version >= 10.0) ||
+ (result.ios && result.osversion && result.osversion.split(".")[0] >= 6) ||
+ (result.blackberry && result.version >= 10.1)
+ || (result.chromium && result.version >= 20)
+ ) {
+ result.a = t;
+ }
+ else if ((result.msie && result.version < 10) ||
+ (result.chrome && result.version < 20) ||
+ (result.firefox && result.version < 20.0) ||
+ (result.safari && result.version < 6) ||
+ (result.opera && result.version < 10.0) ||
+ (result.ios && result.osversion && result.osversion.split(".")[0] < 6)
+ || (result.chromium && result.version < 20)
+ ) {
+ result.c = t
+ } else result.x = t
- array || (array = Array(length));
- while (++index < length) {
- array[index] = source[index];
+ return result
}
- return array;
-}
-
-/**
- * Copies properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property identifiers to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @param {Function} [customizer] The function to customize copied values.
- * @returns {Object} Returns `object`.
- */
-function copyObject(source, props, object, customizer) {
- object || (object = {});
- var index = -1,
- length = props.length;
+ var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '')
- while (++index < length) {
- var key = props[index];
+ bowser.test = function (browserList) {
+ for (var i = 0; i < browserList.length; ++i) {
+ var browserItem = browserList[i];
+ if (typeof browserItem=== 'string') {
+ if (browserItem in bowser) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
- var newValue = customizer
- ? customizer(object[key], source[key], key, object, source)
- : undefined;
+ /**
+ * Get version precisions count
+ *
+ * @example
+ * getVersionPrecision("1.10.3") // 3
+ *
+ * @param {string} version
+ * @return {number}
+ */
+ function getVersionPrecision(version) {
+ return version.split(".").length;
+ }
- assignValue(object, key, newValue === undefined ? source[key] : newValue);
+ /**
+ * Array::map polyfill
+ *
+ * @param {Array} arr
+ * @param {Function} iterator
+ * @return {Array}
+ */
+ function map(arr, iterator) {
+ var result = [], i;
+ if (Array.prototype.map) {
+ return Array.prototype.map.call(arr, iterator);
+ }
+ for (i = 0; i < arr.length; i++) {
+ result.push(iterator(arr[i]));
+ }
+ return result;
}
- return object;
-}
-/**
- * Copies own symbol properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy symbols from.
- * @param {Object} [object={}] The object to copy symbols to.
- * @returns {Object} Returns `object`.
- */
-function copySymbols(source, object) {
- return copyObject(source, getSymbols(source), object);
-}
+ /**
+ * Calculate browser version weight
+ *
+ * @example
+ * compareVersions(['1.10.2.1', '1.8.2.1.90']) // 1
+ * compareVersions(['1.010.2.1', '1.09.2.1.90']); // 1
+ * compareVersions(['1.10.2.1', '1.10.2.1']); // 0
+ * compareVersions(['1.10.2.1', '1.0800.2']); // -1
+ *
+ * @param {Array} versions versions to compare
+ * @return {Number} comparison result
+ */
+ function compareVersions(versions) {
+ // 1) get common precision for both versions, for example for "10.0" and "9" it should be 2
+ var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1]));
+ var chunks = map(versions, function (version) {
+ var delta = precision - getVersionPrecision(version);
-/**
- * Creates a function like `_.assign`.
- *
- * @private
- * @param {Function} assigner The function to assign values.
- * @returns {Function} Returns the new assigner function.
- */
-function createAssigner(assigner) {
- return baseRest(function(object, sources) {
- var index = -1,
- length = sources.length,
- customizer = length > 1 ? sources[length - 1] : undefined,
- guard = length > 2 ? sources[2] : undefined;
+ // 2) "9" -> "9.0" (for precision = 2)
+ version = version + new Array(delta + 1).join(".0");
- customizer = (assigner.length > 3 && typeof customizer == 'function')
- ? (length--, customizer)
- : undefined;
+ // 3) "9.0" -> ["000000000"", "000000009"]
+ return map(version.split("."), function (chunk) {
+ return new Array(20 - chunk.length).join("0") + chunk;
+ }).reverse();
+ });
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- customizer = length < 3 ? undefined : customizer;
- length = 1;
- }
- object = Object(object);
- while (++index < length) {
- var source = sources[index];
- if (source) {
- assigner(object, source, index, customizer);
+ // iterate in reverse order by reversed chunks array
+ while (--precision >= 0) {
+ // 4) compare: "000000009" > "000000010" = false (but "9" > "10" = true)
+ if (chunks[0][precision] > chunks[1][precision]) {
+ return 1;
+ }
+ else if (chunks[0][precision] === chunks[1][precision]) {
+ if (precision === 0) {
+ // all version chunks are same
+ return 0;
+ }
+ }
+ else {
+ return -1;
}
}
- return object;
- });
-}
-
-/**
- * Creates an array of own enumerable property names and symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names and symbols.
- */
-function getAllKeys(object) {
- return baseGetAllKeys(object, keys, getSymbols);
-}
-
-/**
- * Gets the data for `map`.
- *
- * @private
- * @param {Object} map The map to query.
- * @param {string} key The reference key.
- * @returns {*} Returns the map data.
- */
-function getMapData(map, key) {
- var data = map.__data__;
- return isKeyable(key)
- ? data[typeof key == 'string' ? 'string' : 'hash']
- : data.map;
-}
+ }
-/**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
-function getNative(object, key) {
- var value = getValue(object, key);
- return baseIsNative(value) ? value : undefined;
-}
+ /**
+ * Check if browser is unsupported
+ *
+ * @example
+ * bowser.isUnsupportedBrowser({
+ * msie: "10",
+ * firefox: "23",
+ * chrome: "29",
+ * safari: "5.1",
+ * opera: "16",
+ * phantom: "534"
+ * });
+ *
+ * @param {Object} minVersions map of minimal version to browser
+ * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map
+ * @param {String} [ua] user agent string
+ * @return {Boolean}
+ */
+ function isUnsupportedBrowser(minVersions, strictMode, ua) {
+ var _bowser = bowser;
-/**
- * Creates an array of the own enumerable symbol properties of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of symbols.
- */
-var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
+ // make strictMode param optional with ua param usage
+ if (typeof strictMode === 'string') {
+ ua = strictMode;
+ strictMode = void(0);
+ }
-/**
- * Gets the `toStringTag` of `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
-var getTag = baseGetTag;
+ if (strictMode === void(0)) {
+ strictMode = false;
+ }
+ if (ua) {
+ _bowser = detect(ua);
+ }
-// Fallback for data views, maps, sets, and weak maps in IE 11,
-// for data views in Edge < 14, and promises in Node.js.
-if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
- (Map && getTag(new Map) != mapTag) ||
- (Promise && getTag(Promise.resolve()) != promiseTag) ||
- (Set && getTag(new Set) != setTag) ||
- (WeakMap && getTag(new WeakMap) != weakMapTag)) {
- getTag = function(value) {
- var result = objectToString.call(value),
- Ctor = result == objectTag ? value.constructor : undefined,
- ctorString = Ctor ? toSource(Ctor) : undefined;
+ var version = "" + _bowser.version;
+ for (var browser in minVersions) {
+ if (minVersions.hasOwnProperty(browser)) {
+ if (_bowser[browser]) {
+ if (typeof minVersions[browser] !== 'string') {
+ throw new Error('Browser version in the minVersion map should be a string: ' + browser + ': ' + String(minVersions));
+ }
- if (ctorString) {
- switch (ctorString) {
- case dataViewCtorString: return dataViewTag;
- case mapCtorString: return mapTag;
- case promiseCtorString: return promiseTag;
- case setCtorString: return setTag;
- case weakMapCtorString: return weakMapTag;
+ // browser version and min supported version.
+ return compareVersions([version, minVersions[browser]]) < 0;
+ }
}
}
- return result;
- };
-}
-/**
- * Initializes an array clone.
- *
- * @private
- * @param {Array} array The array to clone.
- * @returns {Array} Returns the initialized clone.
- */
-function initCloneArray(array) {
- var length = array.length,
- result = array.constructor(length);
+ return strictMode; // not found
+ }
- // Add properties assigned by `RegExp#exec`.
- if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
- result.index = array.index;
- result.input = array.input;
+ /**
+ * Check if browser is supported
+ *
+ * @param {Object} minVersions map of minimal version to browser
+ * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map
+ * @param {String} [ua] user agent string
+ * @return {Boolean}
+ */
+ function check(minVersions, strictMode, ua) {
+ return !isUnsupportedBrowser(minVersions, strictMode, ua);
}
- return result;
-}
-/**
- * Initializes an object clone.
- *
- * @private
- * @param {Object} object The object to clone.
- * @returns {Object} Returns the initialized clone.
- */
-function initCloneObject(object) {
- return (typeof object.constructor == 'function' && !isPrototype(object))
- ? baseCreate(getPrototype(object))
- : {};
-}
+ bowser.isUnsupportedBrowser = isUnsupportedBrowser;
+ bowser.compareVersions = compareVersions;
+ bowser.check = check;
-/**
- * Initializes an object clone based on its `toStringTag`.
- *
- * **Note:** This function only supports cloning values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to clone.
- * @param {string} tag The `toStringTag` of the object to clone.
- * @param {Function} cloneFunc The function to clone values.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the initialized clone.
- */
-function initCloneByTag(object, tag, cloneFunc, isDeep) {
- var Ctor = object.constructor;
- switch (tag) {
- case arrayBufferTag:
- return cloneArrayBuffer(object);
+ /*
+ * Set our detect method to the main bowser object so we can
+ * reuse it to test other user agents.
+ * This is needed to implement future tests.
+ */
+ bowser._detect = detect;
- case boolTag:
- case dateTag:
- return new Ctor(+object);
+ return bowser
+});
- case dataViewTag:
- return cloneDataView(object, isDeep);
- case float32Tag: case float64Tag:
- case int8Tag: case int16Tag: case int32Tag:
- case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
- return cloneTypedArray(object, isDeep);
+/***/ }),
+/* 692 */
+/***/ (function(module, exports) {
- case mapTag:
- return cloneMap(object, isDeep, cloneFunc);
+module.exports = function() {
+ throw new Error("define cannot be used indirect");
+};
- case numberTag:
- case stringTag:
- return new Ctor(object);
- case regexpTag:
- return cloneRegExp(object);
+/***/ }),
+/* 693 */
+/***/ (function(module, exports, __webpack_require__) {
- case setTag:
- return cloneSet(object, isDeep, cloneFunc);
+"use strict";
- case symbolTag:
- return cloneSymbol(object);
- }
-}
-/**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
-function isIndex(value, length) {
- length = length == null ? MAX_SAFE_INTEGER : length;
- return !!length &&
- (typeof value == 'number' || reIsUint.test(value)) &&
- (value > -1 && value % 1 == 0 && value < length);
-}
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-/**
- * Checks if the given arguments are from an iteratee call.
- *
- * @private
- * @param {*} value The potential iteratee value argument.
- * @param {*} index The potential iteratee index or key argument.
- * @param {*} object The potential iteratee object argument.
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
- * else `false`.
- */
-function isIterateeCall(value, index, object) {
- if (!isObject(object)) {
- return false;
- }
- var type = typeof index;
- if (type == 'number'
- ? (isArrayLike(object) && isIndex(index, object.length))
- : (type == 'string' && index in object)
- ) {
- return eq(object[index], value);
+exports.default = function (_ref) {
+ var browser = _ref.browser;
+ var version = _ref.version;
+ var prefix = _ref.prefix;
+
+ var prefixedKeyframes = 'keyframes';
+
+ if (browser === 'chrome' && version < 43 || (browser === 'safari' || browser === 'ios_saf') && version < 9 || browser === 'opera' && version < 30 || browser === 'android' && version <= 4.4 || browser === 'and_uc') {
+ prefixedKeyframes = prefix.css + prefixedKeyframes;
}
- return false;
-}
+ return prefixedKeyframes;
+};
-/**
- * Checks if `value` is suitable for use as unique object key.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
- */
-function isKeyable(value) {
- var type = typeof value;
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
- ? (value !== '__proto__')
- : (value === null);
-}
+module.exports = exports['default'];
-/**
- * Checks if `func` has its source masked.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
- */
-function isMasked(func) {
- return !!maskSrcKey && (maskSrcKey in func);
-}
+/***/ }),
+/* 694 */
+/***/ (function(module, exports, __webpack_require__) {
-/**
- * Checks if `value` is likely a prototype object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
- */
-function isPrototype(value) {
- var Ctor = value && value.constructor,
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
+"use strict";
- return value === proto;
-}
-/**
- * This function is like
- * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * except that it includes inherited enumerable properties.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
-function nativeKeysIn(object) {
- var result = [];
- if (object != null) {
- for (var key in Object(object)) {
- result.push(key);
- }
- }
- return result;
-}
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = { "chrome": { "transform": 35, "transformOrigin": 35, "transformOriginX": 35, "transformOriginY": 35, "backfaceVisibility": 35, "perspective": 35, "perspectiveOrigin": 35, "transformStyle": 35, "transformOriginZ": 35, "animation": 42, "animationDelay": 42, "animationDirection": 42, "animationFillMode": 42, "animationDuration": 42, "animationIterationCount": 42, "animationName": 42, "animationPlayState": 42, "animationTimingFunction": 42, "appearance": 55, "userSelect": 55, "fontKerning": 32, "textEmphasisPosition": 55, "textEmphasis": 55, "textEmphasisStyle": 55, "textEmphasisColor": 55, "boxDecorationBreak": 55, "clipPath": 55, "maskImage": 55, "maskMode": 55, "maskRepeat": 55, "maskPosition": 55, "maskClip": 55, "maskOrigin": 55, "maskSize": 55, "maskComposite": 55, "mask": 55, "maskBorderSource": 55, "maskBorderMode": 55, "maskBorderSlice": 55, "maskBorderWidth": 55, "maskBorderOutset": 55, "maskBorderRepeat": 55, "maskBorder": 55, "maskType": 55, "textDecorationStyle": 55, "textDecorationSkip": 55, "textDecorationLine": 55, "textDecorationColor": 55, "filter": 52, "fontFeatureSettings": 47, "breakAfter": 49, "breakBefore": 49, "breakInside": 49, "columnCount": 49, "columnFill": 49, "columnGap": 49, "columnRule": 49, "columnRuleColor": 49, "columnRuleStyle": 49, "columnRuleWidth": 49, "columns": 49, "columnSpan": 49, "columnWidth": 49 }, "safari": { "flex": 8, "flexBasis": 8, "flexDirection": 8, "flexGrow": 8, "flexFlow": 8, "flexShrink": 8, "flexWrap": 8, "alignContent": 8, "alignItems": 8, "alignSelf": 8, "justifyContent": 8, "order": 8, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8, "transformOrigin": 8, "transformOriginX": 8, "transformOriginY": 8, "backfaceVisibility": 8, "perspective": 8, "perspectiveOrigin": 8, "transformStyle": 8, "transformOriginZ": 8, "animation": 8, "animationDelay": 8, "animationDirection": 8, "animationFillMode": 8, "animationDuration": 8, "animationIterationCount": 8, "animationName": 8, "animationPlayState": 8, "animationTimingFunction": 8, "appearance": 10, "userSelect": 10, "backdropFilter": 10, "fontKerning": 9, "scrollSnapType": 10, "scrollSnapPointsX": 10, "scrollSnapPointsY": 10, "scrollSnapDestination": 10, "scrollSnapCoordinate": 10, "textEmphasisPosition": 7, "textEmphasis": 7, "textEmphasisStyle": 7, "textEmphasisColor": 7, "boxDecorationBreak": 10, "clipPath": 10, "maskImage": 10, "maskMode": 10, "maskRepeat": 10, "maskPosition": 10, "maskClip": 10, "maskOrigin": 10, "maskSize": 10, "maskComposite": 10, "mask": 10, "maskBorderSource": 10, "maskBorderMode": 10, "maskBorderSlice": 10, "maskBorderWidth": 10, "maskBorderOutset": 10, "maskBorderRepeat": 10, "maskBorder": 10, "maskType": 10, "textDecorationStyle": 10, "textDecorationSkip": 10, "textDecorationLine": 10, "textDecorationColor": 10, "shapeImageThreshold": 10, "shapeImageMargin": 10, "shapeImageOutside": 10, "filter": 9, "hyphens": 10, "flowInto": 10, "flowFrom": 10, "breakBefore": 8, "breakAfter": 8, "breakInside": 8, "regionFragment": 10, "columnCount": 8, "columnFill": 8, "columnGap": 8, "columnRule": 8, "columnRuleColor": 8, "columnRuleStyle": 8, "columnRuleWidth": 8, "columns": 8, "columnSpan": 8, "columnWidth": 8 }, "firefox": { "appearance": 51, "userSelect": 51, "boxSizing": 28, "textAlignLast": 48, "textDecorationStyle": 35, "textDecorationSkip": 35, "textDecorationLine": 35, "textDecorationColor": 35, "tabSize": 51, "hyphens": 42, "fontFeatureSettings": 33, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "opera": { "flex": 16, "flexBasis": 16, "flexDirection": 16, "flexGrow": 16, "flexFlow": 16, "flexShrink": 16, "flexWrap": 16, "alignContent": 16, "alignItems": 16, "alignSelf": 16, "justifyContent": 16, "order": 16, "transform": 22, "transformOrigin": 22, "transformOriginX": 22, "transformOriginY": 22, "backfaceVisibility": 22, "perspective": 22, "perspectiveOrigin": 22, "transformStyle": 22, "transformOriginZ": 22, "animation": 29, "animationDelay": 29, "animationDirection": 29, "animationFillMode": 29, "animationDuration": 29, "animationIterationCount": 29, "animationName": 29, "animationPlayState": 29, "animationTimingFunction": 29, "appearance": 41, "userSelect": 41, "fontKerning": 19, "textEmphasisPosition": 41, "textEmphasis": 41, "textEmphasisStyle": 41, "textEmphasisColor": 41, "boxDecorationBreak": 41, "clipPath": 41, "maskImage": 41, "maskMode": 41, "maskRepeat": 41, "maskPosition": 41, "maskClip": 41, "maskOrigin": 41, "maskSize": 41, "maskComposite": 41, "mask": 41, "maskBorderSource": 41, "maskBorderMode": 41, "maskBorderSlice": 41, "maskBorderWidth": 41, "maskBorderOutset": 41, "maskBorderRepeat": 41, "maskBorder": 41, "maskType": 41, "textDecorationStyle": 41, "textDecorationSkip": 41, "textDecorationLine": 41, "textDecorationColor": 41, "filter": 39, "fontFeatureSettings": 34, "breakAfter": 36, "breakBefore": 36, "breakInside": 36, "columnCount": 36, "columnFill": 36, "columnGap": 36, "columnRule": 36, "columnRuleColor": 36, "columnRuleStyle": 36, "columnRuleWidth": 36, "columns": 36, "columnSpan": 36, "columnWidth": 36 }, "ie": { "flex": 10, "flexDirection": 10, "flexFlow": 10, "flexWrap": 10, "transform": 9, "transformOrigin": 9, "transformOriginX": 9, "transformOriginY": 9, "userSelect": 11, "wrapFlow": 11, "wrapThrough": 11, "wrapMargin": 11, "scrollSnapType": 11, "scrollSnapPointsX": 11, "scrollSnapPointsY": 11, "scrollSnapDestination": 11, "scrollSnapCoordinate": 11, "touchAction": 10, "hyphens": 11, "flowInto": 11, "flowFrom": 11, "breakBefore": 11, "breakAfter": 11, "breakInside": 11, "regionFragment": 11, "gridTemplateColumns": 11, "gridTemplateRows": 11, "gridTemplateAreas": 11, "gridTemplate": 11, "gridAutoColumns": 11, "gridAutoRows": 11, "gridAutoFlow": 11, "grid": 11, "gridRowStart": 11, "gridColumnStart": 11, "gridRowEnd": 11, "gridRow": 11, "gridColumn": 11, "gridColumnEnd": 11, "gridColumnGap": 11, "gridRowGap": 11, "gridArea": 11, "gridGap": 11, "textSizeAdjust": 11 }, "edge": { "userSelect": 14, "wrapFlow": 14, "wrapThrough": 14, "wrapMargin": 14, "scrollSnapType": 14, "scrollSnapPointsX": 14, "scrollSnapPointsY": 14, "scrollSnapDestination": 14, "scrollSnapCoordinate": 14, "hyphens": 14, "flowInto": 14, "flowFrom": 14, "breakBefore": 14, "breakAfter": 14, "breakInside": 14, "regionFragment": 14, "gridTemplateColumns": 14, "gridTemplateRows": 14, "gridTemplateAreas": 14, "gridTemplate": 14, "gridAutoColumns": 14, "gridAutoRows": 14, "gridAutoFlow": 14, "grid": 14, "gridRowStart": 14, "gridColumnStart": 14, "gridRowEnd": 14, "gridRow": 14, "gridColumn": 14, "gridColumnEnd": 14, "gridColumnGap": 14, "gridRowGap": 14, "gridArea": 14, "gridGap": 14 }, "ios_saf": { "flex": 8.1, "flexBasis": 8.1, "flexDirection": 8.1, "flexGrow": 8.1, "flexFlow": 8.1, "flexShrink": 8.1, "flexWrap": 8.1, "alignContent": 8.1, "alignItems": 8.1, "alignSelf": 8.1, "justifyContent": 8.1, "order": 8.1, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8.1, "transformOrigin": 8.1, "transformOriginX": 8.1, "transformOriginY": 8.1, "backfaceVisibility": 8.1, "perspective": 8.1, "perspectiveOrigin": 8.1, "transformStyle": 8.1, "transformOriginZ": 8.1, "animation": 8.1, "animationDelay": 8.1, "animationDirection": 8.1, "animationFillMode": 8.1, "animationDuration": 8.1, "animationIterationCount": 8.1, "animationName": 8.1, "animationPlayState": 8.1, "animationTimingFunction": 8.1, "appearance": 9.3, "userSelect": 9.3, "backdropFilter": 9.3, "fontKerning": 9.3, "scrollSnapType": 9.3, "scrollSnapPointsX": 9.3, "scrollSnapPointsY": 9.3, "scrollSnapDestination": 9.3, "scrollSnapCoordinate": 9.3, "boxDecorationBreak": 9.3, "clipPath": 9.3, "maskImage": 9.3, "maskMode": 9.3, "maskRepeat": 9.3, "maskPosition": 9.3, "maskClip": 9.3, "maskOrigin": 9.3, "maskSize": 9.3, "maskComposite": 9.3, "mask": 9.3, "maskBorderSource": 9.3, "maskBorderMode": 9.3, "maskBorderSlice": 9.3, "maskBorderWidth": 9.3, "maskBorderOutset": 9.3, "maskBorderRepeat": 9.3, "maskBorder": 9.3, "maskType": 9.3, "textSizeAdjust": 9.3, "textDecorationStyle": 9.3, "textDecorationSkip": 9.3, "textDecorationLine": 9.3, "textDecorationColor": 9.3, "shapeImageThreshold": 9.3, "shapeImageMargin": 9.3, "shapeImageOutside": 9.3, "filter": 9, "hyphens": 9.3, "flowInto": 9.3, "flowFrom": 9.3, "breakBefore": 8.1, "breakAfter": 8.1, "breakInside": 8.1, "regionFragment": 9.3, "columnCount": 8.1, "columnFill": 8.1, "columnGap": 8.1, "columnRule": 8.1, "columnRuleColor": 8.1, "columnRuleStyle": 8.1, "columnRuleWidth": 8.1, "columns": 8.1, "columnSpan": 8.1, "columnWidth": 8.1 }, "android": { "flex": 4.2, "flexBasis": 4.2, "flexDirection": 4.2, "flexGrow": 4.2, "flexFlow": 4.2, "flexShrink": 4.2, "flexWrap": 4.2, "alignContent": 4.2, "alignItems": 4.2, "alignSelf": 4.2, "justifyContent": 4.2, "order": 4.2, "transition": 4.2, "transitionDelay": 4.2, "transitionDuration": 4.2, "transitionProperty": 4.2, "transitionTimingFunction": 4.2, "transform": 4.4, "transformOrigin": 4.4, "transformOriginX": 4.4, "transformOriginY": 4.4, "backfaceVisibility": 4.4, "perspective": 4.4, "perspectiveOrigin": 4.4, "transformStyle": 4.4, "transformOriginZ": 4.4, "animation": 4.4, "animationDelay": 4.4, "animationDirection": 4.4, "animationFillMode": 4.4, "animationDuration": 4.4, "animationIterationCount": 4.4, "animationName": 4.4, "animationPlayState": 4.4, "animationTimingFunction": 4.4, "appearance": 51, "userSelect": 51, "fontKerning": 4.4, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "filter": 51, "fontFeatureSettings": 4.4, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "and_chr": { "appearance": 51, "userSelect": 51, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "textDecorationStyle": 51, "textDecorationSkip": 51, "textDecorationLine": 51, "textDecorationColor": 51, "filter": 51 }, "and_uc": { "flex": 9.9, "flexBasis": 9.9, "flexDirection": 9.9, "flexGrow": 9.9, "flexFlow": 9.9, "flexShrink": 9.9, "flexWrap": 9.9, "alignContent": 9.9, "alignItems": 9.9, "alignSelf": 9.9, "justifyContent": 9.9, "order": 9.9, "transition": 9.9, "transitionDelay": 9.9, "transitionDuration": 9.9, "transitionProperty": 9.9, "transitionTimingFunction": 9.9, "transform": 9.9, "transformOrigin": 9.9, "transformOriginX": 9.9, "transformOriginY": 9.9, "backfaceVisibility": 9.9, "perspective": 9.9, "perspectiveOrigin": 9.9, "transformStyle": 9.9, "transformOriginZ": 9.9, "animation": 9.9, "animationDelay": 9.9, "animationDirection": 9.9, "animationFillMode": 9.9, "animationDuration": 9.9, "animationIterationCount": 9.9, "animationName": 9.9, "animationPlayState": 9.9, "animationTimingFunction": 9.9, "appearance": 9.9, "userSelect": 9.9, "fontKerning": 9.9, "textEmphasisPosition": 9.9, "textEmphasis": 9.9, "textEmphasisStyle": 9.9, "textEmphasisColor": 9.9, "maskImage": 9.9, "maskMode": 9.9, "maskRepeat": 9.9, "maskPosition": 9.9, "maskClip": 9.9, "maskOrigin": 9.9, "maskSize": 9.9, "maskComposite": 9.9, "mask": 9.9, "maskBorderSource": 9.9, "maskBorderMode": 9.9, "maskBorderSlice": 9.9, "maskBorderWidth": 9.9, "maskBorderOutset": 9.9, "maskBorderRepeat": 9.9, "maskBorder": 9.9, "maskType": 9.9, "textSizeAdjust": 9.9, "filter": 9.9, "hyphens": 9.9, "flowInto": 9.9, "flowFrom": 9.9, "breakBefore": 9.9, "breakAfter": 9.9, "breakInside": 9.9, "regionFragment": 9.9, "fontFeatureSettings": 9.9, "columnCount": 9.9, "columnFill": 9.9, "columnGap": 9.9, "columnRule": 9.9, "columnRuleColor": 9.9, "columnRuleStyle": 9.9, "columnRuleWidth": 9.9, "columns": 9.9, "columnSpan": 9.9, "columnWidth": 9.9 }, "op_mini": {} };
+module.exports = exports["default"];
-/**
- * Converts `func` to its source code.
- *
- * @private
- * @param {Function} func The function to process.
- * @returns {string} Returns the source code.
- */
-function toSource(func) {
- if (func != null) {
- try {
- return funcToString.call(func);
- } catch (e) {}
- try {
- return (func + '');
- } catch (e) {}
- }
- return '';
-}
+/***/ }),
+/* 695 */
+/***/ (function(module, exports, __webpack_require__) {
-/**
- * Performs a
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
-function eq(value, other) {
- return value === other || (value !== value && other !== other);
-}
+"use strict";
-/**
- * Checks if `value` is likely an `arguments` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- * else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
-function isArguments(value) {
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
- return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
- (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
-}
-/**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(document.body.children);
- * // => false
- *
- * _.isArray('abc');
- * // => false
- *
- * _.isArray(_.noop);
- * // => false
- */
-var isArray = Array.isArray;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = position;
-/**
- * Checks if `value` is array-like. A value is considered array-like if it's
- * not a function and has a `value.length` that's an integer greater than or
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- * @example
- *
- * _.isArrayLike([1, 2, 3]);
- * // => true
- *
- * _.isArrayLike(document.body.children);
- * // => true
- *
- * _.isArrayLike('abc');
- * // => true
- *
- * _.isArrayLike(_.noop);
- * // => false
- */
-function isArrayLike(value) {
- return value != null && isLength(value.length) && !isFunction(value);
-}
+var _getPrefixedValue = __webpack_require__(38);
-/**
- * This method is like `_.isArrayLike` except that it also checks if `value`
- * is an object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array-like object,
- * else `false`.
- * @example
- *
- * _.isArrayLikeObject([1, 2, 3]);
- * // => true
- *
- * _.isArrayLikeObject(document.body.children);
- * // => true
- *
- * _.isArrayLikeObject('abc');
- * // => false
- *
- * _.isArrayLikeObject(_.noop);
- * // => false
- */
-function isArrayLikeObject(value) {
- return isObjectLike(value) && isArrayLike(value);
-}
+var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
-/**
- * Checks if `value` is a buffer.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
- * @example
- *
- * _.isBuffer(new Buffer(2));
- * // => true
- *
- * _.isBuffer(new Uint8Array(2));
- * // => false
- */
-var isBuffer = nativeIsBuffer || stubFalse;
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-/**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
-function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8-9 which returns 'object' for typed array and other constructors.
- var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag;
-}
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-/**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This method is loosely based on
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- * @example
- *
- * _.isLength(3);
- * // => true
- *
- * _.isLength(Number.MIN_VALUE);
- * // => false
- *
- * _.isLength(Infinity);
- * // => false
- *
- * _.isLength('3');
- * // => false
- */
-function isLength(value) {
- return typeof value == 'number' &&
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
-}
+function position(_ref) {
+ var property = _ref.property;
+ var value = _ref.value;
+ var browser = _ref.browserInfo.browser;
+ var css = _ref.prefix.css;
+ var keepUnprefixed = _ref.keepUnprefixed;
-/**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
-function isObject(value) {
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
+ if (property === 'position' && value === 'sticky' && (browser === 'safari' || browser === 'ios_saf')) {
+ return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed));
+ }
}
+module.exports = exports['default'];
-/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
+/***/ }),
+/* 696 */
+/***/ (function(module, exports, __webpack_require__) {
-/**
- * Checks if `value` is a plain object, that is, an object created by the
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
- *
- * @static
- * @memberOf _
- * @since 0.8.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * _.isPlainObject(new Foo);
- * // => false
- *
- * _.isPlainObject([1, 2, 3]);
- * // => false
- *
- * _.isPlainObject({ 'x': 0, 'y': 0 });
- * // => true
- *
- * _.isPlainObject(Object.create(null));
- * // => true
- */
-function isPlainObject(value) {
- if (!isObjectLike(value) ||
- objectToString.call(value) != objectTag || isHostObject(value)) {
- return false;
- }
- var proto = getPrototype(value);
- if (proto === null) {
- return true;
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = calc;
+
+var _getPrefixedValue = __webpack_require__(38);
+
+var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+function calc(_ref) {
+ var property = _ref.property;
+ var value = _ref.value;
+ var _ref$browserInfo = _ref.browserInfo;
+ var browser = _ref$browserInfo.browser;
+ var version = _ref$browserInfo.version;
+ var css = _ref.prefix.css;
+ var keepUnprefixed = _ref.keepUnprefixed;
+
+ if (typeof value === 'string' && value.indexOf('calc(') > -1 && (browser === 'firefox' && version < 15 || browser === 'chrome' && version < 25 || browser === 'safari' && version < 6.1 || browser === 'ios_saf' && version < 7)) {
+ return _defineProperty({}, property, (0, _getPrefixedValue2.default)(value.replace(/calc\(/g, css + 'calc('), value, keepUnprefixed));
}
- var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
- return (typeof Ctor == 'function' &&
- Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
}
+module.exports = exports['default'];
-/**
- * Checks if `value` is classified as a typed array.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
- * @example
- *
- * _.isTypedArray(new Uint8Array);
- * // => true
- *
- * _.isTypedArray([]);
- * // => false
- */
-var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
+/***/ }),
+/* 697 */
+/***/ (function(module, exports, __webpack_require__) {
-/**
- * Converts `value` to a plain object flattening inherited enumerable string
- * keyed properties of `value` to own properties of the plain object.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Object} Returns the converted plain object.
- * @example
- *
- * function Foo() {
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.assign({ 'a': 1 }, new Foo);
- * // => { 'a': 1, 'b': 2 }
- *
- * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
- * // => { 'a': 1, 'b': 2, 'c': 3 }
- */
-function toPlainObject(value) {
- return copyObject(value, keysIn(value));
-}
+"use strict";
-/**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
-function keys(object) {
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
-}
-/**
- * Creates an array of the own and inherited enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keysIn(new Foo);
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
- */
-function keysIn(object) {
- return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = zoomCursor;
+
+var _getPrefixedValue = __webpack_require__(38);
+
+var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var values = { 'zoom-in': true, 'zoom-out': true };
+
+function zoomCursor(_ref) {
+ var property = _ref.property;
+ var value = _ref.value;
+ var _ref$browserInfo = _ref.browserInfo;
+ var browser = _ref$browserInfo.browser;
+ var version = _ref$browserInfo.version;
+ var css = _ref.prefix.css;
+ var keepUnprefixed = _ref.keepUnprefixed;
+
+ if (property === 'cursor' && values[value] && (browser === 'firefox' && version < 24 || browser === 'chrome' && version < 37 || browser === 'safari' && version < 9 || browser === 'opera' && version < 24)) {
+ return {
+ cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)
+ };
+ }
}
+module.exports = exports['default'];
-/**
- * This method is like `_.assign` except that it recursively merges own and
- * inherited enumerable string keyed properties of source objects into the
- * destination object. Source properties that resolve to `undefined` are
- * skipped if a destination value exists. Array and plain object properties
- * are merged recursively. Other objects and value types are overridden by
- * assignment. Source objects are applied from left to right. Subsequent
- * sources overwrite property assignments of previous sources.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 0.5.0
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = {
- * 'a': [{ 'b': 2 }, { 'd': 4 }]
- * };
- *
- * var other = {
- * 'a': [{ 'c': 3 }, { 'e': 5 }]
- * };
- *
- * _.merge(object, other);
- * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
- */
-var merge = createAssigner(function(object, source, srcIndex) {
- baseMerge(object, source, srcIndex);
+/***/ }),
+/* 698 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
});
+exports.default = grabCursor;
-/**
- * This method returns a new empty array.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {Array} Returns the new empty array.
- * @example
- *
- * var arrays = _.times(2, _.stubArray);
- *
- * console.log(arrays);
- * // => [[], []]
- *
- * console.log(arrays[0] === arrays[1]);
- * // => false
- */
-function stubArray() {
- return [];
-}
+var _getPrefixedValue = __webpack_require__(38);
-/**
- * This method returns `false`.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {boolean} Returns `false`.
- * @example
- *
- * _.times(2, _.stubFalse);
- * // => [false, false]
- */
-function stubFalse() {
- return false;
+var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var values = { grab: true, grabbing: true };
+
+function grabCursor(_ref) {
+ var property = _ref.property;
+ var value = _ref.value;
+ var browser = _ref.browserInfo.browser;
+ var css = _ref.prefix.css;
+ var keepUnprefixed = _ref.keepUnprefixed;
+
+ // adds prefixes for firefox, chrome, safari, and opera regardless of version until a reliable brwoser support info can be found (see: https://github.com/rofrischmann/inline-style-prefixer/issues/79)
+ if (property === 'cursor' && values[value] && (browser === 'firefox' || browser === 'chrome' || browser === 'safari' || browser === 'opera')) {
+ return {
+ cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)
+ };
+ }
}
+module.exports = exports['default'];
-module.exports = merge;
+/***/ }),
+/* 699 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = flex;
+
+var _getPrefixedValue = __webpack_require__(38);
+
+var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var values = { flex: true, 'inline-flex': true };
+
+function flex(_ref) {
+ var property = _ref.property;
+ var value = _ref.value;
+ var _ref$browserInfo = _ref.browserInfo;
+ var browser = _ref$browserInfo.browser;
+ var version = _ref$browserInfo.version;
+ var css = _ref.prefix.css;
+ var keepUnprefixed = _ref.keepUnprefixed;
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47), __webpack_require__(256)(module)))
+ if (property === 'display' && values[value] && (browser === 'chrome' && version < 29 && version > 20 || (browser === 'safari' || browser === 'ios_saf') && version < 9 && version > 6 || browser === 'opera' && (version == 15 || version == 16))) {
+ return {
+ display: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)
+ };
+ }
+}
+module.exports = exports['default'];
/***/ }),
-/* 693 */
+/* 700 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -52647,78 +55761,236 @@ module.exports = merge;
Object.defineProperty(exports, "__esModule", {
value: true
});
+exports.default = sizing;
-var _typeof2 = __webpack_require__(92);
+var _getPrefixedValue = __webpack_require__(38);
-var _typeof3 = _interopRequireDefault(_typeof2);
+var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
-exports.default = function (muiTheme) {
- var isClient = typeof navigator !== 'undefined';
- var userAgent = muiTheme.userAgent;
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- if (userAgent === undefined && isClient) {
- userAgent = navigator.userAgent;
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var properties = {
+ maxHeight: true,
+ maxWidth: true,
+ width: true,
+ height: true,
+ columnWidth: true,
+ minWidth: true,
+ minHeight: true
+};
+var values = {
+ 'min-content': true,
+ 'max-content': true,
+ 'fill-available': true,
+ 'fit-content': true,
+ 'contain-floats': true
+};
+
+function sizing(_ref) {
+ var property = _ref.property;
+ var value = _ref.value;
+ var css = _ref.prefix.css;
+ var keepUnprefixed = _ref.keepUnprefixed;
+
+ // This might change in the future
+ // Keep an eye on it
+ if (properties[property] && values[value]) {
+ return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed));
}
+}
+module.exports = exports['default'];
- if (userAgent === undefined && !hasWarnedAboutUserAgent) {
- false ? (0, _warning2.default)(false, 'Material-UI: userAgent should be supplied in the muiTheme context\n for server-side rendering.') : void 0;
+/***/ }),
+/* 701 */
+/***/ (function(module, exports, __webpack_require__) {
- hasWarnedAboutUserAgent = true;
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = gradient;
+
+var _getPrefixedValue = __webpack_require__(38);
+
+var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;
+
+function gradient(_ref) {
+ var property = _ref.property;
+ var value = _ref.value;
+ var _ref$browserInfo = _ref.browserInfo;
+ var browser = _ref$browserInfo.browser;
+ var version = _ref$browserInfo.version;
+ var css = _ref.prefix.css;
+ var keepUnprefixed = _ref.keepUnprefixed;
+
+ if (typeof value === 'string' && value.match(values) !== null && (browser === 'firefox' && version < 16 || browser === 'chrome' && version < 26 || (browser === 'safari' || browser === 'ios_saf') && version < 7 || (browser === 'opera' || browser === 'op_mini') && version < 12.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) {
+ return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed));
}
+}
+module.exports = exports['default'];
- if (userAgent === false) {
- // Disabled autoprefixer
- return null;
- } else if (userAgent === 'all' || userAgent === undefined) {
- // Prefix for all user agent
- return function (style) {
- var isFlex = ['flex', 'inline-flex'].indexOf(style.display) !== -1;
- var stylePrefixed = _inlineStylePrefixer2.default.prefixAll(style);
+/***/ }),
+/* 702 */
+/***/ (function(module, exports, __webpack_require__) {
- if (isFlex) {
- var display = stylePrefixed.display;
- if (isClient) {
- // We can't apply this join with react-dom:
- // #https://github.com/facebook/react/issues/6467
- stylePrefixed.display = display[display.length - 1];
- } else {
- stylePrefixed.display = display.join('; display: ');
- }
- }
+"use strict";
- return stylePrefixed;
- };
- } else {
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
+
+exports.default = transition;
+
+var _hyphenateStyleName = __webpack_require__(314);
+
+var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName);
+
+var _unprefixProperty = __webpack_require__(703);
+
+var _unprefixProperty2 = _interopRequireDefault(_unprefixProperty);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var properties = { transition: true, transitionProperty: true };
+
+function transition(_ref) {
+ var property = _ref.property;
+ var value = _ref.value;
+ var css = _ref.prefix.css;
+ var requiresPrefix = _ref.requiresPrefix;
+ var keepUnprefixed = _ref.keepUnprefixed;
+
+ // also check for already prefixed transitions
+ var unprefixedProperty = (0, _unprefixProperty2.default)(property);
+
+ if (typeof value === 'string' && properties[unprefixedProperty]) {
var _ret = function () {
- var prefixer = new _inlineStylePrefixer2.default({
- userAgent: userAgent
+ // TODO: memoize this array
+ var requiresPrefixDashCased = Object.keys(requiresPrefix).map(function (prop) {
+ return (0, _hyphenateStyleName2.default)(prop);
+ });
+
+ // only split multi values, not cubic beziers
+ var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g);
+
+ requiresPrefixDashCased.forEach(function (prop) {
+ multipleValues.forEach(function (val, index) {
+ if (val.indexOf(prop) > -1 && prop !== 'order') {
+ multipleValues[index] = val.replace(prop, css + prop) + (keepUnprefixed ? ',' + val : '');
+ }
+ });
});
return {
- v: function v(style) {
- return prefixer.prefix(style);
- }
+ v: _defineProperty({}, property, multipleValues.join(','))
};
}();
- if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v;
+ if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
+ }
+}
+module.exports = exports['default'];
+
+/***/ }),
+/* 703 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+exports.default = function (property) {
+ var unprefixed = property.replace(/^(ms|Webkit|Moz|O)/, '');
+ return unprefixed.charAt(0).toLowerCase() + unprefixed.slice(1);
+};
+
+module.exports = exports['default'];
+
+/***/ }),
+/* 704 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = flexboxIE;
+
+var _getPrefixedValue = __webpack_require__(38);
+
+var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var alternativeValues = {
+ 'space-around': 'distribute',
+ 'space-between': 'justify',
+ 'flex-start': 'start',
+ 'flex-end': 'end',
+ flex: 'flexbox',
+ 'inline-flex': 'inline-flexbox'
+};
+var alternativeProps = {
+ alignContent: 'msFlexLinePack',
+ alignSelf: 'msFlexItemAlign',
+ alignItems: 'msFlexAlign',
+ justifyContent: 'msFlexPack',
+ order: 'msFlexOrder',
+ flexGrow: 'msFlexPositive',
+ flexShrink: 'msFlexNegative',
+ flexBasis: 'msPreferredSize'
+};
+
+function flexboxIE(_ref) {
+ var property = _ref.property;
+ var value = _ref.value;
+ var styles = _ref.styles;
+ var _ref$browserInfo = _ref.browserInfo;
+ var browser = _ref$browserInfo.browser;
+ var version = _ref$browserInfo.version;
+ var css = _ref.prefix.css;
+ var keepUnprefixed = _ref.keepUnprefixed;
+
+ if ((alternativeProps[property] || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'ie_mob' || browser === 'ie') && version == 10) {
+ if (!keepUnprefixed && !Array.isArray(styles[property])) {
+ delete styles[property];
+ }
+ if (property === 'display' && alternativeValues[value]) {
+ return {
+ display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed)
+ };
+ }
+ if (alternativeProps[property]) {
+ return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value);
+ }
}
-};
-
-var _inlineStylePrefixer = __webpack_require__(694);
-
-var _inlineStylePrefixer2 = _interopRequireDefault(_inlineStylePrefixer);
-
-var _warning = __webpack_require__(17);
-
-var _warning2 = _interopRequireDefault(_warning);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var hasWarnedAboutUserAgent = false;
+}
+module.exports = exports['default'];
/***/ }),
-/* 694 */
+/* 705 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -52727,233 +55999,257 @@ var hasWarnedAboutUserAgent = false;
Object.defineProperty(exports, "__esModule", {
value: true
});
+exports.default = flexboxOld;
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-// special flexbox specifications
-
-
-var _prefixAll2 = __webpack_require__(695);
-
-var _prefixAll3 = _interopRequireDefault(_prefixAll2);
-
-var _getBrowserInformation = __webpack_require__(706);
-
-var _getBrowserInformation2 = _interopRequireDefault(_getBrowserInformation);
-
-var _getPrefixedKeyframes = __webpack_require__(709);
-
-var _getPrefixedKeyframes2 = _interopRequireDefault(_getPrefixedKeyframes);
-
-var _capitalizeString = __webpack_require__(193);
-
-var _capitalizeString2 = _interopRequireDefault(_capitalizeString);
+var _getPrefixedValue = __webpack_require__(38);
-var _sortPrefixedStyle = __webpack_require__(309);
+var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
-var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _prefixProps = __webpack_require__(710);
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-var _prefixProps2 = _interopRequireDefault(_prefixProps);
+var alternativeValues = {
+ 'space-around': 'justify',
+ 'space-between': 'justify',
+ 'flex-start': 'start',
+ 'flex-end': 'end',
+ 'wrap-reverse': 'multiple',
+ wrap: 'multiple',
+ flex: 'box',
+ 'inline-flex': 'inline-box'
+};
-var _position = __webpack_require__(711);
+var alternativeProps = {
+ alignItems: 'WebkitBoxAlign',
+ justifyContent: 'WebkitBoxPack',
+ flexWrap: 'WebkitBoxLines'
+};
-var _position2 = _interopRequireDefault(_position);
+var otherProps = ['alignContent', 'alignSelf', 'order', 'flexGrow', 'flexShrink', 'flexBasis', 'flexDirection'];
+var properties = Object.keys(alternativeProps).concat(otherProps);
-var _calc = __webpack_require__(712);
+function flexboxOld(_ref) {
+ var property = _ref.property;
+ var value = _ref.value;
+ var styles = _ref.styles;
+ var _ref$browserInfo = _ref.browserInfo;
+ var browser = _ref$browserInfo.browser;
+ var version = _ref$browserInfo.version;
+ var css = _ref.prefix.css;
+ var keepUnprefixed = _ref.keepUnprefixed;
-var _calc2 = _interopRequireDefault(_calc);
+ if ((properties.indexOf(property) > -1 || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'firefox' && version < 22 || browser === 'chrome' && version < 21 || (browser === 'safari' || browser === 'ios_saf') && version <= 6.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) {
+ if (!keepUnprefixed && !Array.isArray(styles[property])) {
+ delete styles[property];
+ }
+ if (property === 'flexDirection' && typeof value === 'string') {
+ return {
+ WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal',
+ WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal'
+ };
+ }
+ if (property === 'display' && alternativeValues[value]) {
+ return {
+ display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed)
+ };
+ }
+ if (alternativeProps[property]) {
+ return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value);
+ }
+ }
+}
+module.exports = exports['default'];
-var _zoomCursor = __webpack_require__(713);
+/***/ }),
+/* 706 */
+/***/ (function(module, exports, __webpack_require__) {
-var _zoomCursor2 = _interopRequireDefault(_zoomCursor);
+"use strict";
-var _grabCursor = __webpack_require__(714);
-var _grabCursor2 = _interopRequireDefault(_grabCursor);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = callOnce;
-var _flex = __webpack_require__(715);
+var _warning = __webpack_require__(15);
-var _flex2 = _interopRequireDefault(_flex);
+var _warning2 = _interopRequireDefault(_warning);
-var _sizing = __webpack_require__(716);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _sizing2 = _interopRequireDefault(_sizing);
+var CALLED_ONCE = 'muiPrepared';
-var _gradient = __webpack_require__(717);
+function callOnce() {
+ if (false) {
+ return function (style) {
+ if (style[CALLED_ONCE]) {
+ process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: You cannot call prepareStyles() on the same style object more than once.') : void 0;
+ }
+ style[CALLED_ONCE] = true;
+ return style;
+ };
+ }
+}
-var _gradient2 = _interopRequireDefault(_gradient);
+/***/ }),
+/* 707 */
+/***/ (function(module, exports, __webpack_require__) {
-var _transition = __webpack_require__(718);
+"use strict";
-var _transition2 = _interopRequireDefault(_transition);
-var _flexboxIE = __webpack_require__(720);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-var _flexboxIE2 = _interopRequireDefault(_flexboxIE);
+var _keys = __webpack_require__(62);
-var _flexboxOld = __webpack_require__(721);
+var _keys2 = _interopRequireDefault(_keys);
-var _flexboxOld2 = _interopRequireDefault(_flexboxOld);
+exports.default = rtl;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var plugins = [_position2.default, _calc2.default, _zoomCursor2.default, _grabCursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default,
-// this must be run AFTER the flexbox specs
-_flex2.default];
-
-var Prefixer = function () {
- /**
- * Instantiante a new prefixer
- * @param {string} userAgent - userAgent to gather prefix information according to caniuse.com
- * @param {string} keepUnprefixed - keeps unprefixed properties and values
- */
+var reTranslate = /((^|\s)translate(3d|X)?\()(\-?[\d]+)/;
+var reSkew = /((^|\s)skew(x|y)?\()\s*(\-?[\d]+)(deg|rad|grad)(,\s*(\-?[\d]+)(deg|rad|grad))?/;
- function Prefixer() {
- var _this = this;
+/**
+ * This function ensures that `style` supports both ltr and rtl directions by
+ * checking `styleConstants` in `muiTheme` and replacing attribute keys if
+ * necessary.
+ */
+function rtl(muiTheme) {
+ if (muiTheme.isRtl) {
+ return function (style) {
+ if (style.directionInvariant === true) {
+ return style;
+ }
- var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+ var flippedAttributes = {
+ // Keys and their replacements.
+ right: 'left',
+ left: 'right',
+ marginRight: 'marginLeft',
+ marginLeft: 'marginRight',
+ paddingRight: 'paddingLeft',
+ paddingLeft: 'paddingRight',
+ borderRight: 'borderLeft',
+ borderLeft: 'borderRight'
+ };
- _classCallCheck(this, Prefixer);
+ var newStyle = {};
- var defaultUserAgent = typeof navigator !== 'undefined' ? navigator.userAgent : undefined;
+ (0, _keys2.default)(style).forEach(function (attribute) {
+ var value = style[attribute];
+ var key = attribute;
- this._userAgent = options.userAgent || defaultUserAgent;
- this._keepUnprefixed = options.keepUnprefixed || false;
+ if (flippedAttributes.hasOwnProperty(attribute)) {
+ key = flippedAttributes[attribute];
+ }
- this._browserInfo = (0, _getBrowserInformation2.default)(this._userAgent);
+ switch (attribute) {
+ case 'float':
+ case 'textAlign':
+ if (value === 'right') {
+ value = 'left';
+ } else if (value === 'left') {
+ value = 'right';
+ }
+ break;
- // Checks if the userAgent was resolved correctly
- if (this._browserInfo && this._browserInfo.prefix) {
- // set additional prefix information
- this.cssPrefix = this._browserInfo.prefix.css;
- this.jsPrefix = this._browserInfo.prefix.inline;
- this.prefixedKeyframes = (0, _getPrefixedKeyframes2.default)(this._browserInfo);
- } else {
- this._usePrefixAllFallback = true;
- return false;
- }
+ case 'direction':
+ if (value === 'ltr') {
+ value = 'rtl';
+ } else if (value === 'rtl') {
+ value = 'ltr';
+ }
+ break;
- var data = this._browserInfo.browser && _prefixProps2.default[this._browserInfo.browser];
- if (data) {
- this._requiresPrefix = Object.keys(data).filter(function (key) {
- return data[key] >= _this._browserInfo.version;
- }).reduce(function (result, name) {
- result[name] = true;
- return result;
- }, {});
- this._hasPropsRequiringPrefix = Object.keys(this._requiresPrefix).length > 0;
- } else {
- this._usePrefixAllFallback = true;
- }
- }
+ case 'transform':
+ if (!value) break;
+ var matches = void 0;
+ if (matches = value.match(reTranslate)) {
+ value = value.replace(matches[0], matches[1] + -parseFloat(matches[4]));
+ }
+ if (matches = value.match(reSkew)) {
+ value = value.replace(matches[0], matches[1] + -parseFloat(matches[4]) + matches[5] + matches[6] ? ', ' + (-parseFloat(matches[7]) + matches[8]) : '');
+ }
+ break;
- /**
- * Returns a prefixed version of the style object
- * @param {Object} styles - Style object that gets prefixed properties added
- * @returns {Object} - Style object with prefixed properties and values
- */
+ case 'transformOrigin':
+ if (!value) break;
+ if (value.indexOf('right') > -1) {
+ value = value.replace('right', 'left');
+ } else if (value.indexOf('left') > -1) {
+ value = value.replace('left', 'right');
+ }
+ break;
+ }
+ newStyle[key] = value;
+ });
- _createClass(Prefixer, [{
- key: 'prefix',
- value: function prefix(styles) {
- var _this2 = this;
+ return newStyle;
+ };
+ }
+}
- // use prefixAll as fallback if userAgent can not be resolved
- if (this._usePrefixAllFallback) {
- return (0, _prefixAll3.default)(styles);
- }
+/***/ }),
+/* 708 */
+/***/ (function(module, exports, __webpack_require__) {
- // only add prefixes if needed
- if (!this._hasPropsRequiringPrefix) {
- return styles;
- }
+__webpack_require__(709);
+module.exports = __webpack_require__(18).Object.keys;
- Object.keys(styles).forEach(function (property) {
- var value = styles[property];
- if (value instanceof Object && !Array.isArray(value)) {
- // recurse through nested style objects
- styles[property] = _this2.prefix(value);
- } else {
- // add prefixes if needed
- if (_this2._requiresPrefix[property]) {
- styles[_this2.jsPrefix + (0, _capitalizeString2.default)(property)] = value;
- if (!_this2._keepUnprefixed) {
- delete styles[property];
- }
- }
- }
- });
+/***/ }),
+/* 709 */
+/***/ (function(module, exports, __webpack_require__) {
- Object.keys(styles).forEach(function (property) {
- [].concat(styles[property]).forEach(function (value) {
- // resolve plugins
- plugins.forEach(function (plugin) {
- // generates a new plugin interface with current data
- assignStyles(styles, plugin({
- property: property,
- value: value,
- styles: styles,
- browserInfo: _this2._browserInfo,
- prefix: {
- js: _this2.jsPrefix,
- css: _this2.cssPrefix,
- keyframes: _this2.prefixedKeyframes
- },
- keepUnprefixed: _this2._keepUnprefixed,
- requiresPrefix: _this2._requiresPrefix
- }), value, _this2._keepUnprefixed);
- });
- });
- });
+// 19.1.2.14 Object.keys(O)
+var toObject = __webpack_require__(88)
+ , $keys = __webpack_require__(70);
- return (0, _sortPrefixedStyle2.default)(styles);
- }
+__webpack_require__(304)('keys', function(){
+ return function keys(it){
+ return $keys(toObject(it));
+ };
+});
- /**
- * Returns a prefixed version of the style object using all vendor prefixes
- * @param {Object} styles - Style object that gets prefixed properties added
- * @returns {Object} - Style object with prefixed properties and values
- */
+/***/ }),
+/* 710 */
+/***/ (function(module, exports, __webpack_require__) {
- }], [{
- key: 'prefixAll',
- value: function prefixAll(styles) {
- return (0, _prefixAll3.default)(styles);
- }
- }]);
+"use strict";
- return Prefixer;
-}();
-exports.default = Prefixer;
+exports.__esModule = true;
+exports.default = compose;
+function compose() {
+ for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
+ funcs[_key] = arguments[_key];
+ }
+ if (funcs.length === 0) {
+ return function (arg) {
+ return arg;
+ };
+ }
-function assignStyles(base) {
- var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
- var value = arguments[2];
- var keepUnprefixed = arguments[3];
+ if (funcs.length === 1) {
+ return funcs[0];
+ }
- Object.keys(extend).forEach(function (property) {
- var baseValue = base[property];
- if (Array.isArray(baseValue)) {
- [].concat(extend[property]).forEach(function (val) {
- if (base[property].indexOf(val) === -1) {
- base[property].splice(baseValue.indexOf(value), keepUnprefixed ? 0 : 1, val);
- }
- });
- } else {
- base[property] = extend[property];
- }
+ return funcs.reduce(function (a, b) {
+ return function () {
+ return a(b.apply(undefined, arguments));
+ };
});
}
-module.exports = exports['default'];
/***/ }),
-/* 695 */
+/* 711 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -52962,154 +56258,159 @@ module.exports = exports['default'];
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.default = prefixAll;
-var _prefixProps = __webpack_require__(308);
+var _keys = __webpack_require__(62);
-var _prefixProps2 = _interopRequireDefault(_prefixProps);
+var _keys2 = _interopRequireDefault(_keys);
-var _capitalizeString = __webpack_require__(193);
+var _react = __webpack_require__(0);
-var _capitalizeString2 = _interopRequireDefault(_capitalizeString);
+var _react2 = _interopRequireDefault(_react);
-var _sortPrefixedStyle = __webpack_require__(309);
+var _reactRedux = __webpack_require__(19);
-var _sortPrefixedStyle2 = _interopRequireDefault(_sortPrefixedStyle);
+var _reactRouter = __webpack_require__(163);
-var _position = __webpack_require__(697);
+var _List = __webpack_require__(712);
-var _position2 = _interopRequireDefault(_position);
+var _Drawer = __webpack_require__(734);
-var _calc = __webpack_require__(698);
+var _Drawer2 = _interopRequireDefault(_Drawer);
-var _calc2 = _interopRequireDefault(_calc);
+var _Subheader = __webpack_require__(316);
-var _cursor = __webpack_require__(699);
+var _Subheader2 = _interopRequireDefault(_Subheader);
-var _cursor2 = _interopRequireDefault(_cursor);
+var _code = __webpack_require__(742);
-var _flex = __webpack_require__(700);
+var _code2 = _interopRequireDefault(_code);
-var _flex2 = _interopRequireDefault(_flex);
+var _shop = __webpack_require__(743);
-var _sizing = __webpack_require__(701);
+var _shop2 = _interopRequireDefault(_shop);
-var _sizing2 = _interopRequireDefault(_sizing);
+var _accountCircle = __webpack_require__(744);
-var _gradient = __webpack_require__(702);
+var _accountCircle2 = _interopRequireDefault(_accountCircle);
-var _gradient2 = _interopRequireDefault(_gradient);
+var _error = __webpack_require__(745);
-var _transition = __webpack_require__(703);
+var _error2 = _interopRequireDefault(_error);
-var _transition2 = _interopRequireDefault(_transition);
+var _Styles = __webpack_require__(52);
-var _flexboxIE = __webpack_require__(704);
+var _Styles2 = _interopRequireDefault(_Styles);
-var _flexboxIE2 = _interopRequireDefault(_flexboxIE);
+var _Supreme = __webpack_require__(325);
-var _flexboxOld = __webpack_require__(705);
+var _Menus = __webpack_require__(84);
-var _flexboxOld2 = _interopRequireDefault(_flexboxOld);
+var Menus = _interopRequireWildcard(_Menus);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-// special flexbox specifications
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var SelectableList = (0, _List.makeSelectable)(_List.List);
-var plugins = [_position2.default, _calc2.default, _cursor2.default, _sizing2.default, _gradient2.default, _transition2.default, _flexboxIE2.default, _flexboxOld2.default, _flex2.default];
+function openUrlInNewTab(url) {
+ var win = window.open(url, '_blank');
+ win.focus();
+}
-/**
- * Returns a prefixed version of the style object using all vendor prefixes
- * @param {Object} styles - Style object that gets prefixed properties added
- * @returns {Object} - Style object with prefixed properties and values
- */
-function prefixAll(styles) {
- Object.keys(styles).forEach(function (property) {
- var value = styles[property];
- if (value instanceof Object && !Array.isArray(value)) {
- // recurse through nested style objects
- styles[property] = prefixAll(value);
- } else {
- Object.keys(_prefixProps2.default).forEach(function (prefix) {
- var properties = _prefixProps2.default[prefix];
- // add prefixes if needed
- if (properties[property]) {
- styles[prefix + (0, _capitalizeString2.default)(property)] = value;
- }
- });
- }
+function getIconForShop(settings, shopName) {
+ var menus = (0, _keys2.default)(Menus).map(function (x) {
+ return Menus[x];
});
-
- Object.keys(styles).forEach(function (property) {
- [].concat(styles[property]).forEach(function (value, index) {
- // resolve every special plugins
- plugins.forEach(function (plugin) {
- return assignStyles(styles, plugin(property, value));
- });
- });
+ var isIncomplete = !settings[shopName] || menus.some(function (x) {
+ return !settings[shopName][x];
});
-
- return (0, _sortPrefixedStyle2.default)(styles);
+ if (isIncomplete) {
+ return _react2.default.createElement(_error2.default, null);
+ }
+ return _react2.default.createElement(_shop2.default, null);
}
-function assignStyles(base) {
- var extend = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+function AppDrawer(props) {
+ var location = props.location,
+ currentProfile = props.currentProfile,
+ settings = props.settings;
- Object.keys(extend).forEach(function (property) {
- var baseValue = base[property];
- if (Array.isArray(baseValue)) {
- [].concat(extend[property]).forEach(function (value) {
- var valueIndex = baseValue.indexOf(value);
- if (valueIndex > -1) {
- base[property].splice(valueIndex, 1);
- }
- base[property].push(value);
- });
- } else {
- base[property] = extend[property];
- }
+ var paths = location.pathname.split('/').filter(function (x) {
+ return !!x;
});
+ var currentPage = paths[0];
+ return _react2.default.createElement(
+ _Drawer2.default,
+ { open: true },
+ _react2.default.createElement(
+ 'div',
+ { style: _Styles2.default.logo },
+ 'Supreme Auto Checkout'
+ ),
+ _react2.default.createElement(
+ SelectableList,
+ { value: currentPage },
+ _react2.default.createElement(
+ _Subheader2.default,
+ null,
+ 'Shops'
+ ),
+ _react2.default.createElement(_List.ListItem, {
+ value: 'supreme',
+ primaryText: 'Supreme',
+ containerElement: _react2.default.createElement(_reactRouter.Link, { to: '/supreme/' }),
+ leftIcon: getIconForShop(settings, _Supreme.SHOP_NAME)
+ }),
+ _react2.default.createElement(
+ _Subheader2.default,
+ null,
+ 'Settings'
+ ),
+ _react2.default.createElement(_List.ListItem, {
+ value: 'profiles',
+ primaryText: 'Profiles (' + currentProfile + ')',
+ containerElement: _react2.default.createElement(_reactRouter.Link, { to: '/profiles/' }),
+ leftIcon: _react2.default.createElement(_accountCircle2.default, null)
+ }),
+ _react2.default.createElement(
+ _Subheader2.default,
+ null,
+ 'Other'
+ ),
+ _react2.default.createElement(_List.ListItem, {
+ value: 'about',
+ primaryText: 'Github',
+ onTouchTap: function onTouchTap() {
+ return openUrlInNewTab('https://github.com/val92130/Supreme-Auto-Checkout');
+ },
+ leftIcon: _react2.default.createElement(_code2.default, null)
+ })
+ )
+ );
}
-module.exports = exports['default'];
-
-/***/ }),
-/* 696 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-exports.default = function (property) {
- return property.match(/^(Webkit|Moz|O|ms)/) !== null;
-};
-
-module.exports = exports["default"];
-
-/***/ }),
-/* 697 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
+AppDrawer.propTypes = {
+ location: _react.PropTypes.shape({
+ pathname: _react.PropTypes.string.isRequired
+ }),
+ currentProfile: _react.PropTypes.string
+};
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = position;
-function position(property, value) {
- if (property === 'position' && value === 'sticky') {
- return { position: ['-webkit-sticky', 'sticky'] };
- }
+function mapStateToProps(state) {
+ var currentProfile = state.profiles.currentProfile;
+ return {
+ settings: state.profiles.profiles.filter(function (x) {
+ return x.name === currentProfile;
+ })[0].settings,
+ currentProfile: currentProfile
+ };
}
-module.exports = exports['default'];
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps)(AppDrawer);
/***/ }),
-/* 698 */
+/* 712 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -53118,29 +56419,29 @@ module.exports = exports['default'];
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.default = calc;
+exports.default = exports.makeSelectable = exports.ListItem = exports.List = undefined;
-var _joinPrefixedValue = __webpack_require__(126);
+var _List2 = __webpack_require__(202);
-var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue);
+var _List3 = _interopRequireDefault(_List2);
-var _isPrefixedValue = __webpack_require__(194);
+var _ListItem2 = __webpack_require__(317);
-var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);
+var _ListItem3 = _interopRequireDefault(_ListItem2);
+
+var _makeSelectable2 = __webpack_require__(733);
+
+var _makeSelectable3 = _interopRequireDefault(_makeSelectable2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function calc(property, value) {
- if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('calc(') > -1) {
- return (0, _joinPrefixedValue2.default)(property, value, function (prefix, value) {
- return value.replace(/calc\(/g, prefix + 'calc(');
- });
- }
-}
-module.exports = exports['default'];
+exports.List = _List3.default;
+exports.ListItem = _ListItem3.default;
+exports.makeSelectable = _makeSelectable3.default;
+exports.default = _List3.default;
/***/ }),
-/* 699 */
+/* 713 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -53149,125 +56450,163 @@ module.exports = exports['default'];
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.default = cursor;
-var _joinPrefixedValue = __webpack_require__(126);
-
-var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _extends2 = __webpack_require__(7);
-var values = {
- 'zoom-in': true,
- 'zoom-out': true,
- grab: true,
- grabbing: true
-};
+var _extends3 = _interopRequireDefault(_extends2);
-function cursor(property, value) {
- if (property === 'cursor' && values[value]) {
- return (0, _joinPrefixedValue2.default)(property, value);
- }
-}
-module.exports = exports['default'];
+var _objectWithoutProperties2 = __webpack_require__(8);
-/***/ }),
-/* 700 */
-/***/ (function(module, exports, __webpack_require__) {
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-"use strict";
+var _simpleAssign = __webpack_require__(6);
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = flex;
-var values = { flex: true, 'inline-flex': true };
+var _react = __webpack_require__(0);
-function flex(property, value) {
- if (property === 'display' && values[value]) {
- return {
- display: ['-webkit-box', '-moz-box', '-ms-' + value + 'box', '-webkit-' + value, value]
- };
- }
-}
-module.exports = exports['default'];
+var _react2 = _interopRequireDefault(_react);
-/***/ }),
-/* 701 */
-/***/ (function(module, exports, __webpack_require__) {
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-"use strict";
+var Subheader = function Subheader(props, context) {
+ var children = props.children,
+ inset = props.inset,
+ style = props.style,
+ other = (0, _objectWithoutProperties3.default)(props, ['children', 'inset', 'style']);
+ var _context$muiTheme = context.muiTheme,
+ prepareStyles = _context$muiTheme.prepareStyles,
+ subheader = _context$muiTheme.subheader;
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = sizing;
+ var styles = {
+ root: {
+ boxSizing: 'border-box',
+ color: subheader.color,
+ fontSize: 14,
+ fontWeight: subheader.fontWeight,
+ lineHeight: '48px',
+ paddingLeft: inset ? 72 : 16,
+ width: '100%'
+ }
+ };
-var _joinPrefixedValue = __webpack_require__(126);
+ return _react2.default.createElement(
+ 'div',
+ (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }),
+ children
+ );
+};
-var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue);
+Subheader.muiName = 'Subheader';
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ false ? Subheader.propTypes = {
+ /**
+ * Node that will be placed inside the `Subheader`.
+ */
+ children: _react.PropTypes.node,
+ /**
+ * If true, the `Subheader` will be indented.
+ */
+ inset: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
+} : void 0;
-var properties = {
- maxHeight: true,
- maxWidth: true,
- width: true,
- height: true,
- columnWidth: true,
- minWidth: true,
- minHeight: true
+Subheader.defaultProps = {
+ inset: false
};
-var values = {
- 'min-content': true,
- 'max-content': true,
- 'fill-available': true,
- 'fit-content': true,
- 'contain-floats': true
+
+Subheader.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
};
-function sizing(property, value) {
- if (properties[property] && values[value]) {
- return (0, _joinPrefixedValue2.default)(property, value);
- }
-}
-module.exports = exports['default'];
+exports.default = Subheader;
/***/ }),
-/* 702 */
+/* 714 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = __webpack_require__(715).create;
+
+/***/ }),
+/* 715 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
+/**
+ * Copyright 2015-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = gradient;
-var _joinPrefixedValue = __webpack_require__(126);
+var _prodInvariant = __webpack_require__(71);
-var _joinPrefixedValue2 = _interopRequireDefault(_joinPrefixedValue);
+var ReactChildren = __webpack_require__(219);
+var ReactElement = __webpack_require__(57);
-var _isPrefixedValue = __webpack_require__(194);
+var emptyFunction = __webpack_require__(22);
+var invariant = __webpack_require__(9);
+var warning = __webpack_require__(11);
-var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);
+/**
+ * We used to allow keyed objects to serve as a collection of ReactElements,
+ * or nested sets. This allowed us a way to explicitly key a set or fragment of
+ * components. This is now being replaced with an opaque data structure.
+ * The upgrade path is to call React.addons.createFragment({ key: value }) to
+ * create a keyed fragment. The resulting data structure is an array.
+ */
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var numericPropertyRegex = /^\d+$/;
-var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;
+var warnedAboutNumeric = false;
-function gradient(property, value) {
- if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.match(values) !== null) {
- return (0, _joinPrefixedValue2.default)(property, value);
+var ReactFragment = {
+ /**
+ * Wrap a keyed object in an opaque proxy that warns you if you access any
+ * of its properties.
+ * See https://facebook.github.io/react/docs/create-fragment.html
+ */
+ create: function (object) {
+ if (typeof object !== 'object' || !object || Array.isArray(object)) {
+ false ? warning(false, 'React.addons.createFragment only accepts a single object. Got: %s', object) : void 0;
+ return object;
+ }
+ if (ReactElement.isValidElement(object)) {
+ false ? warning(false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.') : void 0;
+ return object;
+ }
+
+ !(object.nodeType !== 1) ? false ? invariant(false, 'React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.') : _prodInvariant('0') : void 0;
+
+ var result = [];
+
+ for (var key in object) {
+ if (false) {
+ if (!warnedAboutNumeric && numericPropertyRegex.test(key)) {
+ process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment(...): Child objects should have ' + 'non-numeric keys so ordering is preserved.') : void 0;
+ warnedAboutNumeric = true;
+ }
+ }
+ ReactChildren.mapIntoWithKeyPrefixInternal(object[key], result, key, emptyFunction.thatReturnsArgument);
+ }
+
+ return result;
}
-}
-module.exports = exports['default'];
+};
+
+module.exports = ReactFragment;
/***/ }),
-/* 703 */
+/* 716 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -53276,896 +56615,905 @@ module.exports = exports['default'];
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.default = transition;
-
-var _hyphenateStyleName = __webpack_require__(310);
-var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName);
-
-var _capitalizeString = __webpack_require__(193);
-
-var _capitalizeString2 = _interopRequireDefault(_capitalizeString);
+var _extends2 = __webpack_require__(7);
-var _isPrefixedValue = __webpack_require__(194);
+var _extends3 = _interopRequireDefault(_extends2);
-var _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);
+var _objectWithoutProperties2 = __webpack_require__(8);
-var _prefixProps = __webpack_require__(308);
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-var _prefixProps2 = _interopRequireDefault(_prefixProps);
+var _getPrototypeOf = __webpack_require__(3);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+var _classCallCheck2 = __webpack_require__(1);
-var properties = {
- transition: true,
- transitionProperty: true,
- WebkitTransition: true,
- WebkitTransitionProperty: true
-};
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-function transition(property, value) {
- // also check for already prefixed transitions
- if (typeof value === 'string' && properties[property]) {
- var _ref2;
+var _createClass2 = __webpack_require__(2);
- var outputValue = prefixValue(value);
- var webkitOutput = outputValue.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function (value) {
- return value.match(/-moz-|-ms-/) === null;
- }).join(',');
+var _createClass3 = _interopRequireDefault(_createClass2);
- // if the property is already prefixed
- if (property.indexOf('Webkit') > -1) {
- return _defineProperty({}, property, webkitOutput);
- }
+var _possibleConstructorReturn2 = __webpack_require__(4);
- return _ref2 = {}, _defineProperty(_ref2, 'Webkit' + (0, _capitalizeString2.default)(property), webkitOutput), _defineProperty(_ref2, property, outputValue), _ref2;
- }
-}
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-function prefixValue(value) {
- if ((0, _isPrefixedValue2.default)(value)) {
- return value;
- }
+var _inherits2 = __webpack_require__(5);
- // only split multi values, not cubic beziers
- var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g);
+var _inherits3 = _interopRequireDefault(_inherits2);
- // iterate each single value and check for transitioned properties
- // that need to be prefixed as well
- multipleValues.forEach(function (val, index) {
- multipleValues[index] = Object.keys(_prefixProps2.default).reduce(function (out, prefix) {
- var dashCasePrefix = '-' + prefix.toLowerCase() + '-';
+var _simpleAssign = __webpack_require__(6);
- Object.keys(_prefixProps2.default[prefix]).forEach(function (prop) {
- var dashCaseProperty = (0, _hyphenateStyleName2.default)(prop);
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
- if (val.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== 'order') {
- // join all prefixes and create a new value
- out = val.replace(dashCaseProperty, dashCasePrefix + dashCaseProperty) + ',' + out;
- }
- });
- return out;
- }, val);
- });
+var _react = __webpack_require__(0);
- return multipleValues.join(',');
-}
-module.exports = exports['default'];
+var _react2 = _interopRequireDefault(_react);
-/***/ }),
-/* 704 */
-/***/ (function(module, exports, __webpack_require__) {
+var _reactAddonsTransitionGroup = __webpack_require__(132);
-"use strict";
+var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup);
+var _ScaleInChild = __webpack_require__(720);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = flexboxIE;
+var _ScaleInChild2 = _interopRequireDefault(_ScaleInChild);
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var alternativeValues = {
- 'space-around': 'distribute',
- 'space-between': 'justify',
- 'flex-start': 'start',
- 'flex-end': 'end'
-};
-var alternativeProps = {
- alignContent: 'msFlexLinePack',
- alignSelf: 'msFlexItemAlign',
- alignItems: 'msFlexAlign',
- justifyContent: 'msFlexPack',
- order: 'msFlexOrder',
- flexGrow: 'msFlexPositive',
- flexShrink: 'msFlexNegative',
- flexBasis: 'msPreferredSize'
-};
+var ScaleIn = function (_Component) {
+ (0, _inherits3.default)(ScaleIn, _Component);
-function flexboxIE(property, value) {
- if (alternativeProps[property]) {
- return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value);
+ function ScaleIn() {
+ (0, _classCallCheck3.default)(this, ScaleIn);
+ return (0, _possibleConstructorReturn3.default)(this, (ScaleIn.__proto__ || (0, _getPrototypeOf2.default)(ScaleIn)).apply(this, arguments));
}
-}
-module.exports = exports['default'];
-/***/ }),
-/* 705 */
-/***/ (function(module, exports, __webpack_require__) {
+ (0, _createClass3.default)(ScaleIn, [{
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ children = _props.children,
+ childStyle = _props.childStyle,
+ enterDelay = _props.enterDelay,
+ maxScale = _props.maxScale,
+ minScale = _props.minScale,
+ style = _props.style,
+ other = (0, _objectWithoutProperties3.default)(_props, ['children', 'childStyle', 'enterDelay', 'maxScale', 'minScale', 'style']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
-"use strict";
+ var mergedRootStyles = (0, _simpleAssign2.default)({}, {
+ position: 'relative',
+ overflow: 'hidden',
+ height: '100%'
+ }, style);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = flexboxOld;
+ var newChildren = _react2.default.Children.map(children, function (child) {
+ return _react2.default.createElement(
+ _ScaleInChild2.default,
+ {
+ key: child.key,
+ enterDelay: enterDelay,
+ maxScale: maxScale,
+ minScale: minScale,
+ style: childStyle
+ },
+ child
+ );
+ });
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+ return _react2.default.createElement(
+ _reactAddonsTransitionGroup2.default,
+ (0, _extends3.default)({}, other, {
+ style: prepareStyles(mergedRootStyles),
+ component: 'div'
+ }),
+ newChildren
+ );
+ }
+ }]);
+ return ScaleIn;
+}(_react.Component);
-var alternativeValues = {
- 'space-around': 'justify',
- 'space-between': 'justify',
- 'flex-start': 'start',
- 'flex-end': 'end',
- 'wrap-reverse': 'multiple',
- wrap: 'multiple'
+ScaleIn.defaultProps = {
+ enterDelay: 0
};
-
-var alternativeProps = {
- alignItems: 'WebkitBoxAlign',
- justifyContent: 'WebkitBoxPack',
- flexWrap: 'WebkitBoxLines'
+ScaleIn.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
};
-
-function flexboxOld(property, value) {
- if (property === 'flexDirection' && typeof value === 'string') {
- return {
- WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal',
- WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal'
- };
- }
- if (alternativeProps[property]) {
- return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value);
- }
-}
-module.exports = exports['default'];
+ false ? ScaleIn.propTypes = {
+ childStyle: _react.PropTypes.object,
+ children: _react.PropTypes.node,
+ enterDelay: _react.PropTypes.number,
+ maxScale: _react.PropTypes.number,
+ minScale: _react.PropTypes.number,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
+} : void 0;
+exports.default = ScaleIn;
/***/ }),
-/* 706 */
+/* 717 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _bowser = __webpack_require__(707);
-
-var _bowser2 = _interopRequireDefault(_bowser);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var vendorPrefixes = {
- Webkit: ['chrome', 'safari', 'ios', 'android', 'phantom', 'opera', 'webos', 'blackberry', 'bada', 'tizen', 'chromium', 'vivaldi'],
- Moz: ['firefox', 'seamonkey', 'sailfish'],
- ms: ['msie', 'msedge']
-};
-var browsers = {
- chrome: [['chrome'], ['chromium']],
- safari: [['safari']],
- firefox: [['firefox']],
- edge: [['msedge']],
- opera: [['opera'], ['vivaldi']],
- ios_saf: [['ios', 'mobile'], ['ios', 'tablet']],
- ie: [['msie']],
- op_mini: [['opera', 'mobile'], ['opera', 'tablet']],
- and_uc: [['android', 'mobile'], ['android', 'tablet']],
- android: [['android', 'mobile'], ['android', 'tablet']]
-};
-
-var browserByInfo = function browserByInfo(info) {
- if (info.firefox) {
- return 'firefox';
- }
- var name = '';
-
- Object.keys(browsers).forEach(function (browser) {
- browsers[browser].forEach(function (condition) {
- var match = 0;
- condition.forEach(function (single) {
- if (info[single]) {
- match += 1;
- }
- });
- if (condition.length === match) {
- name = browser;
- }
- });
- });
-
- return name;
-};
-
/**
- * Uses bowser to get default browser information such as version and name
- * Evaluates bowser info and adds vendorPrefix information
- * @param {string} userAgent - userAgent that gets evaluated
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
*/
-exports.default = function (userAgent) {
- if (!userAgent) {
- return false;
- }
- var info = _bowser2.default._detect(userAgent);
-
- Object.keys(vendorPrefixes).forEach(function (prefix) {
- vendorPrefixes[prefix].forEach(function (browser) {
- if (info[browser]) {
- info.prefix = {
- inline: prefix,
- css: '-' + prefix.toLowerCase() + '-'
- };
- }
- });
- });
- info.browser = browserByInfo(info);
- // For cordova IOS 8 the version is missing, set truncated osversion to prevent NaN
- info.version = info.version ? parseFloat(info.version) : parseInt(parseFloat(info.osversion), 10);
- info.osversion = parseFloat(info.osversion);
+var _assign = __webpack_require__(13);
- // iOS forces all browsers to use Safari under the hood
- // as the Safari version seems to match the iOS version
- // we just explicitely use the osversion instead
- // https://github.com/rofrischmann/inline-style-prefixer/issues/72
- if (info.browser === 'ios_saf' && info.version > info.osversion) {
- info.version = info.osversion;
- info.safari = true;
- }
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- // seperate native android chrome
- // https://github.com/rofrischmann/inline-style-prefixer/issues/45
- if (info.browser === 'android' && info.chrome && info.version > 37) {
- info.browser = 'and_chr';
- }
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- // For android < 4.4 we want to check the osversion
- // not the chrome version, see issue #26
- // https://github.com/rofrischmann/inline-style-prefixer/issues/26
- if (info.browser === 'android' && info.osversion < 5) {
- info.version = info.osversion;
- }
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- return info;
-};
+var React = __webpack_require__(56);
+var ReactTransitionChildMapping = __webpack_require__(718);
-module.exports = exports['default'];
+var propTypesFactory = __webpack_require__(223);
+var PropTypes = propTypesFactory(React.isValidElement);
-/***/ }),
-/* 707 */
-/***/ (function(module, exports, __webpack_require__) {
+var emptyFunction = __webpack_require__(22);
-/*!
- * Bowser - a browser detector
- * https://github.com/ded/bowser
- * MIT License | (c) Dustin Diaz 2015
+/**
+ * A basis for animations. When children are declaratively added or removed,
+ * special lifecycle hooks are called.
+ * See https://facebook.github.io/react/docs/animation.html#low-level-api-reacttransitiongroup
*/
-!function (root, name, definition) {
- if (typeof module != 'undefined' && module.exports) module.exports = definition()
- else if (true) __webpack_require__(708)(name, definition)
- else root[name] = definition()
-}(this, 'bowser', function () {
- /**
- * See useragents.js for examples of navigator.userAgent
- */
+var ReactTransitionGroup = function (_React$Component) {
+ _inherits(ReactTransitionGroup, _React$Component);
- var t = true
+ function ReactTransitionGroup() {
+ var _temp, _this, _ret;
- function detect(ua) {
+ _classCallCheck(this, ReactTransitionGroup);
- function getFirstMatch(regex) {
- var match = ua.match(regex);
- return (match && match.length > 1 && match[1]) || '';
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
}
- function getSecondMatch(regex) {
- var match = ua.match(regex);
- return (match && match.length > 1 && match[2]) || '';
- }
+ return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
+ // TODO: can we get useful debug information to show at this point?
+ children: ReactTransitionChildMapping.getChildMapping(_this.props.children)
+ }, _this.performAppear = function (key) {
+ _this.currentlyTransitioningKeys[key] = true;
- var iosdevice = getFirstMatch(/(ipod|iphone|ipad)/i).toLowerCase()
- , likeAndroid = /like android/i.test(ua)
- , android = !likeAndroid && /android/i.test(ua)
- , nexusMobile = /nexus\s*[0-6]\s*/i.test(ua)
- , nexusTablet = !nexusMobile && /nexus\s*[0-9]+/i.test(ua)
- , chromeos = /CrOS/.test(ua)
- , silk = /silk/i.test(ua)
- , sailfish = /sailfish/i.test(ua)
- , tizen = /tizen/i.test(ua)
- , webos = /(web|hpw)os/i.test(ua)
- , windowsphone = /windows phone/i.test(ua)
- , samsungBrowser = /SamsungBrowser/i.test(ua)
- , windows = !windowsphone && /windows/i.test(ua)
- , mac = !iosdevice && !silk && /macintosh/i.test(ua)
- , linux = !android && !sailfish && !tizen && !webos && /linux/i.test(ua)
- , edgeVersion = getFirstMatch(/edge\/(\d+(\.\d+)?)/i)
- , versionIdentifier = getFirstMatch(/version\/(\d+(\.\d+)?)/i)
- , tablet = /tablet/i.test(ua) && !/tablet pc/i.test(ua)
- , mobile = !tablet && /[^-]mobi/i.test(ua)
- , xbox = /xbox/i.test(ua)
- , result
+ var component = _this.refs[key];
- if (/opera/i.test(ua)) {
- // an old Opera
- result = {
- name: 'Opera'
- , opera: t
- , version: versionIdentifier || getFirstMatch(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)
- }
- } else if (/opr|opios/i.test(ua)) {
- // a new Opera
- result = {
- name: 'Opera'
- , opera: t
- , version: getFirstMatch(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i) || versionIdentifier
- }
- }
- else if (/SamsungBrowser/i.test(ua)) {
- result = {
- name: 'Samsung Internet for Android'
- , samsungBrowser: t
- , version: versionIdentifier || getFirstMatch(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)
- }
- }
- else if (/coast/i.test(ua)) {
- result = {
- name: 'Opera Coast'
- , coast: t
- , version: versionIdentifier || getFirstMatch(/(?:coast)[\s\/](\d+(\.\d+)?)/i)
- }
- }
- else if (/yabrowser/i.test(ua)) {
- result = {
- name: 'Yandex Browser'
- , yandexbrowser: t
- , version: versionIdentifier || getFirstMatch(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)
- }
- }
- else if (/ucbrowser/i.test(ua)) {
- result = {
- name: 'UC Browser'
- , ucbrowser: t
- , version: getFirstMatch(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)
- }
- }
- else if (/mxios/i.test(ua)) {
- result = {
- name: 'Maxthon'
- , maxthon: t
- , version: getFirstMatch(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)
- }
- }
- else if (/epiphany/i.test(ua)) {
- result = {
- name: 'Epiphany'
- , epiphany: t
- , version: getFirstMatch(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)
- }
- }
- else if (/puffin/i.test(ua)) {
- result = {
- name: 'Puffin'
- , puffin: t
- , version: getFirstMatch(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)
- }
- }
- else if (/sleipnir/i.test(ua)) {
- result = {
- name: 'Sleipnir'
- , sleipnir: t
- , version: getFirstMatch(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)
- }
- }
- else if (/k-meleon/i.test(ua)) {
- result = {
- name: 'K-Meleon'
- , kMeleon: t
- , version: getFirstMatch(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)
- }
- }
- else if (windowsphone) {
- result = {
- name: 'Windows Phone'
- , windowsphone: t
- }
- if (edgeVersion) {
- result.msedge = t
- result.version = edgeVersion
- }
- else {
- result.msie = t
- result.version = getFirstMatch(/iemobile\/(\d+(\.\d+)?)/i)
- }
- }
- else if (/msie|trident/i.test(ua)) {
- result = {
- name: 'Internet Explorer'
- , msie: t
- , version: getFirstMatch(/(?:msie |rv:)(\d+(\.\d+)?)/i)
- }
- } else if (chromeos) {
- result = {
- name: 'Chrome'
- , chromeos: t
- , chromeBook: t
- , chrome: t
- , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)
- }
- } else if (/chrome.+? edge/i.test(ua)) {
- result = {
- name: 'Microsoft Edge'
- , msedge: t
- , version: edgeVersion
- }
- }
- else if (/vivaldi/i.test(ua)) {
- result = {
- name: 'Vivaldi'
- , vivaldi: t
- , version: getFirstMatch(/vivaldi\/(\d+(\.\d+)?)/i) || versionIdentifier
- }
- }
- else if (sailfish) {
- result = {
- name: 'Sailfish'
- , sailfish: t
- , version: getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i)
- }
- }
- else if (/seamonkey\//i.test(ua)) {
- result = {
- name: 'SeaMonkey'
- , seamonkey: t
- , version: getFirstMatch(/seamonkey\/(\d+(\.\d+)?)/i)
- }
- }
- else if (/firefox|iceweasel|fxios/i.test(ua)) {
- result = {
- name: 'Firefox'
- , firefox: t
- , version: getFirstMatch(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)
- }
- if (/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(ua)) {
- result.firefoxos = t
- }
- }
- else if (silk) {
- result = {
- name: 'Amazon Silk'
- , silk: t
- , version : getFirstMatch(/silk\/(\d+(\.\d+)?)/i)
- }
- }
- else if (/phantom/i.test(ua)) {
- result = {
- name: 'PhantomJS'
- , phantom: t
- , version: getFirstMatch(/phantomjs\/(\d+(\.\d+)?)/i)
- }
- }
- else if (/slimerjs/i.test(ua)) {
- result = {
- name: 'SlimerJS'
- , slimer: t
- , version: getFirstMatch(/slimerjs\/(\d+(\.\d+)?)/i)
+ if (component.componentWillAppear) {
+ component.componentWillAppear(_this._handleDoneAppearing.bind(_this, key));
+ } else {
+ _this._handleDoneAppearing(key);
}
- }
- else if (/blackberry|\bbb\d+/i.test(ua) || /rim\stablet/i.test(ua)) {
- result = {
- name: 'BlackBerry'
- , blackberry: t
- , version: versionIdentifier || getFirstMatch(/blackberry[\d]+\/(\d+(\.\d+)?)/i)
+ }, _this._handleDoneAppearing = function (key) {
+ var component = _this.refs[key];
+ if (component.componentDidAppear) {
+ component.componentDidAppear();
}
- }
- else if (webos) {
- result = {
- name: 'WebOS'
- , webos: t
- , version: versionIdentifier || getFirstMatch(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)
- };
- /touchpad\//i.test(ua) && (result.touchpad = t)
- }
- else if (/bada/i.test(ua)) {
- result = {
- name: 'Bada'
- , bada: t
- , version: getFirstMatch(/dolfin\/(\d+(\.\d+)?)/i)
- };
- }
- else if (tizen) {
- result = {
- name: 'Tizen'
- , tizen: t
- , version: getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i) || versionIdentifier
- };
- }
- else if (/qupzilla/i.test(ua)) {
- result = {
- name: 'QupZilla'
- , qupzilla: t
- , version: getFirstMatch(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i) || versionIdentifier
+
+ delete _this.currentlyTransitioningKeys[key];
+
+ var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children);
+
+ if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {
+ // This was removed before it had fully appeared. Remove it.
+ _this.performLeave(key);
}
- }
- else if (/chromium/i.test(ua)) {
- result = {
- name: 'Chromium'
- , chromium: t
- , version: getFirstMatch(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i) || versionIdentifier
+ }, _this.performEnter = function (key) {
+ _this.currentlyTransitioningKeys[key] = true;
+
+ var component = _this.refs[key];
+
+ if (component.componentWillEnter) {
+ component.componentWillEnter(_this._handleDoneEntering.bind(_this, key));
+ } else {
+ _this._handleDoneEntering(key);
}
- }
- else if (/chrome|crios|crmo/i.test(ua)) {
- result = {
- name: 'Chrome'
- , chrome: t
- , version: getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)
+ }, _this._handleDoneEntering = function (key) {
+ var component = _this.refs[key];
+ if (component.componentDidEnter) {
+ component.componentDidEnter();
}
- }
- else if (android) {
- result = {
- name: 'Android'
- , version: versionIdentifier
+
+ delete _this.currentlyTransitioningKeys[key];
+
+ var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children);
+
+ if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {
+ // This was removed before it had fully entered. Remove it.
+ _this.performLeave(key);
}
- }
- else if (/safari|applewebkit/i.test(ua)) {
- result = {
- name: 'Safari'
- , safari: t
+ }, _this.performLeave = function (key) {
+ _this.currentlyTransitioningKeys[key] = true;
+
+ var component = _this.refs[key];
+ if (component.componentWillLeave) {
+ component.componentWillLeave(_this._handleDoneLeaving.bind(_this, key));
+ } else {
+ // Note that this is somewhat dangerous b/c it calls setState()
+ // again, effectively mutating the component before all the work
+ // is done.
+ _this._handleDoneLeaving(key);
}
- if (versionIdentifier) {
- result.version = versionIdentifier
+ }, _this._handleDoneLeaving = function (key) {
+ var component = _this.refs[key];
+
+ if (component.componentDidLeave) {
+ component.componentDidLeave();
}
- }
- else if (iosdevice) {
- result = {
- name : iosdevice == 'iphone' ? 'iPhone' : iosdevice == 'ipad' ? 'iPad' : 'iPod'
+
+ delete _this.currentlyTransitioningKeys[key];
+
+ var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children);
+
+ if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) {
+ // This entered again before it fully left. Add it again.
+ _this.performEnter(key);
+ } else {
+ _this.setState(function (state) {
+ var newChildren = _assign({}, state.children);
+ delete newChildren[key];
+ return { children: newChildren };
+ });
}
- // WTF: version is not part of user agent in web apps
- if (versionIdentifier) {
- result.version = versionIdentifier
+ }, _temp), _possibleConstructorReturn(_this, _ret);
+ }
+
+ ReactTransitionGroup.prototype.componentWillMount = function componentWillMount() {
+ this.currentlyTransitioningKeys = {};
+ this.keysToEnter = [];
+ this.keysToLeave = [];
+ };
+
+ ReactTransitionGroup.prototype.componentDidMount = function componentDidMount() {
+ var initialChildMapping = this.state.children;
+ for (var key in initialChildMapping) {
+ if (initialChildMapping[key]) {
+ this.performAppear(key);
}
}
- else if(/googlebot/i.test(ua)) {
- result = {
- name: 'Googlebot'
- , googlebot: t
- , version: getFirstMatch(/googlebot\/(\d+(\.\d+))/i) || versionIdentifier
+ };
+
+ ReactTransitionGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+ var nextChildMapping = ReactTransitionChildMapping.getChildMapping(nextProps.children);
+ var prevChildMapping = this.state.children;
+
+ this.setState({
+ children: ReactTransitionChildMapping.mergeChildMappings(prevChildMapping, nextChildMapping)
+ });
+
+ var key;
+
+ for (key in nextChildMapping) {
+ var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key);
+ if (nextChildMapping[key] && !hasPrev && !this.currentlyTransitioningKeys[key]) {
+ this.keysToEnter.push(key);
}
}
- else {
- result = {
- name: getFirstMatch(/^(.*)\/(.*) /),
- version: getSecondMatch(/^(.*)\/(.*) /)
- };
- }
- // set webkit or gecko flag for browsers based on these engines
- if (!result.msedge && /(apple)?webkit/i.test(ua)) {
- if (/(apple)?webkit\/537\.36/i.test(ua)) {
- result.name = result.name || "Blink"
- result.blink = t
- } else {
- result.name = result.name || "Webkit"
- result.webkit = t
+ for (key in prevChildMapping) {
+ var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key);
+ if (prevChildMapping[key] && !hasNext && !this.currentlyTransitioningKeys[key]) {
+ this.keysToLeave.push(key);
}
- if (!result.version && versionIdentifier) {
- result.version = versionIdentifier
- }
- } else if (!result.opera && /gecko\//i.test(ua)) {
- result.name = result.name || "Gecko"
- result.gecko = t
- result.version = result.version || getFirstMatch(/gecko\/(\d+(\.\d+)?)/i)
}
- // set OS flags for platforms that have multiple browsers
- if (!result.windowsphone && !result.msedge && (android || result.silk)) {
- result.android = t
- } else if (!result.windowsphone && !result.msedge && iosdevice) {
- result[iosdevice] = t
- result.ios = t
- } else if (mac) {
- result.mac = t
- } else if (xbox) {
- result.xbox = t
- } else if (windows) {
- result.windows = t
- } else if (linux) {
- result.linux = t
- }
+ // If we want to someday check for reordering, we could do it here.
+ };
+
+ ReactTransitionGroup.prototype.componentDidUpdate = function componentDidUpdate() {
+ var keysToEnter = this.keysToEnter;
+ this.keysToEnter = [];
+ keysToEnter.forEach(this.performEnter);
+
+ var keysToLeave = this.keysToLeave;
+ this.keysToLeave = [];
+ keysToLeave.forEach(this.performLeave);
+ };
- function getWindowsVersion (s) {
- switch (s) {
- case 'NT': return 'NT'
- case 'XP': return 'XP'
- case 'NT 5.0': return '2000'
- case 'NT 5.1': return 'XP'
- case 'NT 5.2': return '2003'
- case 'NT 6.0': return 'Vista'
- case 'NT 6.1': return '7'
- case 'NT 6.2': return '8'
- case 'NT 6.3': return '8.1'
- case 'NT 10.0': return '10'
- default: return undefined
+ ReactTransitionGroup.prototype.render = function render() {
+ // TODO: we could get rid of the need for the wrapper node
+ // by cloning a single child
+ var childrenToRender = [];
+ for (var key in this.state.children) {
+ var child = this.state.children[key];
+ if (child) {
+ // You may need to apply reactive updates to a child as it is leaving.
+ // The normal React way to do it won't work since the child will have
+ // already been removed. In case you need this behavior you can provide
+ // a childFactory function to wrap every child, even the ones that are
+ // leaving.
+ childrenToRender.push(React.cloneElement(this.props.childFactory(child), {
+ ref: key,
+ key: key
+ }));
}
}
-
- // OS version extraction
- var osVersion = '';
- if (result.windows) {
- osVersion = getWindowsVersion(getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i))
- } else if (result.windowsphone) {
- osVersion = getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i);
- } else if (result.mac) {
- osVersion = getFirstMatch(/Mac OS X (\d+([_\.\s]\d+)*)/i);
- osVersion = osVersion.replace(/[_\s]/g, '.');
- } else if (iosdevice) {
- osVersion = getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i);
- osVersion = osVersion.replace(/[_\s]/g, '.');
- } else if (android) {
- osVersion = getFirstMatch(/android[ \/-](\d+(\.\d+)*)/i);
- } else if (result.webos) {
- osVersion = getFirstMatch(/(?:web|hpw)os\/(\d+(\.\d+)*)/i);
- } else if (result.blackberry) {
- osVersion = getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i);
- } else if (result.bada) {
- osVersion = getFirstMatch(/bada\/(\d+(\.\d+)*)/i);
- } else if (result.tizen) {
- osVersion = getFirstMatch(/tizen[\/\s](\d+(\.\d+)*)/i);
- }
- if (osVersion) {
- result.osversion = osVersion;
- }
- // device type extraction
- var osMajorVersion = !result.windows && osVersion.split('.')[0];
- if (
- tablet
- || nexusTablet
- || iosdevice == 'ipad'
- || (android && (osMajorVersion == 3 || (osMajorVersion >= 4 && !mobile)))
- || result.silk
- ) {
- result.tablet = t
- } else if (
- mobile
- || iosdevice == 'iphone'
- || iosdevice == 'ipod'
- || android
- || nexusMobile
- || result.blackberry
- || result.webos
- || result.bada
- ) {
- result.mobile = t
- }
+ // Do not forward ReactTransitionGroup props to primitive DOM nodes
+ var props = _assign({}, this.props);
+ delete props.transitionLeave;
+ delete props.transitionName;
+ delete props.transitionAppear;
+ delete props.transitionEnter;
+ delete props.childFactory;
+ delete props.transitionLeaveTimeout;
+ delete props.transitionEnterTimeout;
+ delete props.transitionAppearTimeout;
+ delete props.component;
- // Graded Browser Support
- // http://developer.yahoo.com/yui/articles/gbs
- if (result.msedge ||
- (result.msie && result.version >= 10) ||
- (result.yandexbrowser && result.version >= 15) ||
- (result.vivaldi && result.version >= 1.0) ||
- (result.chrome && result.version >= 20) ||
- (result.samsungBrowser && result.version >= 4) ||
- (result.firefox && result.version >= 20.0) ||
- (result.safari && result.version >= 6) ||
- (result.opera && result.version >= 10.0) ||
- (result.ios && result.osversion && result.osversion.split(".")[0] >= 6) ||
- (result.blackberry && result.version >= 10.1)
- || (result.chromium && result.version >= 20)
- ) {
- result.a = t;
- }
- else if ((result.msie && result.version < 10) ||
- (result.chrome && result.version < 20) ||
- (result.firefox && result.version < 20.0) ||
- (result.safari && result.version < 6) ||
- (result.opera && result.version < 10.0) ||
- (result.ios && result.osversion && result.osversion.split(".")[0] < 6)
- || (result.chromium && result.version < 20)
- ) {
- result.c = t
- } else result.x = t
+ return React.createElement(this.props.component, props, childrenToRender);
+ };
+
+ return ReactTransitionGroup;
+}(React.Component);
+
+ReactTransitionGroup.displayName = 'ReactTransitionGroup';
+ReactTransitionGroup.propTypes = {
+ component: PropTypes.any,
+ childFactory: PropTypes.func
+};
+ReactTransitionGroup.defaultProps = {
+ component: 'span',
+ childFactory: emptyFunction.thatReturnsArgument
+};
+
+
+module.exports = ReactTransitionGroup;
+
+/***/ }),
+/* 718 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
- return result
- }
- var bowser = detect(typeof navigator !== 'undefined' ? navigator.userAgent || '' : '')
- bowser.test = function (browserList) {
- for (var i = 0; i < browserList.length; ++i) {
- var browserItem = browserList[i];
- if (typeof browserItem=== 'string') {
- if (browserItem in bowser) {
- return true;
- }
- }
- }
- return false;
- }
+var flattenChildren = __webpack_require__(719);
+var ReactTransitionChildMapping = {
/**
- * Get version precisions count
- *
- * @example
- * getVersionPrecision("1.10.3") // 3
+ * Given `this.props.children`, return an object mapping key to child. Just
+ * simple syntactic sugar around flattenChildren().
*
- * @param {string} version
- * @return {number}
+ * @param {*} children `this.props.children`
+ * @param {number=} selfDebugID Optional debugID of the current internal instance.
+ * @return {object} Mapping of key to child
*/
- function getVersionPrecision(version) {
- return version.split(".").length;
- }
+ getChildMapping: function (children, selfDebugID) {
+ if (!children) {
+ return children;
+ }
+
+ if (false) {
+ return flattenChildren(children, selfDebugID);
+ }
+
+ return flattenChildren(children);
+ },
/**
- * Array::map polyfill
+ * When you're adding or removing children some may be added or removed in the
+ * same render pass. We want to show *both* since we want to simultaneously
+ * animate elements in and out. This function takes a previous set of keys
+ * and a new set of keys and merges them with its best guess of the correct
+ * ordering. In the future we may expose some of the utilities in
+ * ReactMultiChild to make this easy, but for now React itself does not
+ * directly have this concept of the union of prevChildren and nextChildren
+ * so we implement it here.
*
- * @param {Array} arr
- * @param {Function} iterator
- * @return {Array}
- */
- function map(arr, iterator) {
- var result = [], i;
- if (Array.prototype.map) {
- return Array.prototype.map.call(arr, iterator);
+ * @param {object} prev prev children as returned from
+ * `ReactTransitionChildMapping.getChildMapping()`.
+ * @param {object} next next children as returned from
+ * `ReactTransitionChildMapping.getChildMapping()`.
+ * @return {object} a key set that contains all keys in `prev` and all keys
+ * in `next` in a reasonable order.
+ */
+ mergeChildMappings: function (prev, next) {
+ prev = prev || {};
+ next = next || {};
+
+ function getValueForKey(key) {
+ if (next.hasOwnProperty(key)) {
+ return next[key];
+ } else {
+ return prev[key];
+ }
}
- for (i = 0; i < arr.length; i++) {
- result.push(iterator(arr[i]));
+
+ // For each key of `next`, the list of keys to insert before that key in
+ // the combined list
+ var nextKeysPending = {};
+
+ var pendingKeys = [];
+ for (var prevKey in prev) {
+ if (next.hasOwnProperty(prevKey)) {
+ if (pendingKeys.length) {
+ nextKeysPending[prevKey] = pendingKeys;
+ pendingKeys = [];
+ }
+ } else {
+ pendingKeys.push(prevKey);
+ }
}
- return result;
+
+ var i;
+ var childMapping = {};
+ for (var nextKey in next) {
+ if (nextKeysPending.hasOwnProperty(nextKey)) {
+ for (i = 0; i < nextKeysPending[nextKey].length; i++) {
+ var pendingNextKey = nextKeysPending[nextKey][i];
+ childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
+ }
+ }
+ childMapping[nextKey] = getValueForKey(nextKey);
+ }
+
+ // Finally, add the keys which didn't appear before any key in `next`
+ for (i = 0; i < pendingKeys.length; i++) {
+ childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
+ }
+
+ return childMapping;
}
+};
- /**
- * Calculate browser version weight
- *
- * @example
- * compareVersions(['1.10.2.1', '1.8.2.1.90']) // 1
- * compareVersions(['1.010.2.1', '1.09.2.1.90']); // 1
- * compareVersions(['1.10.2.1', '1.10.2.1']); // 0
- * compareVersions(['1.10.2.1', '1.0800.2']); // -1
- *
- * @param {Array} versions versions to compare
- * @return {Number} comparison result
- */
- function compareVersions(versions) {
- // 1) get common precision for both versions, for example for "10.0" and "9" it should be 2
- var precision = Math.max(getVersionPrecision(versions[0]), getVersionPrecision(versions[1]));
- var chunks = map(versions, function (version) {
- var delta = precision - getVersionPrecision(version);
+module.exports = ReactTransitionChildMapping;
- // 2) "9" -> "9.0" (for precision = 2)
- version = version + new Array(delta + 1).join(".0");
+/***/ }),
+/* 719 */
+/***/ (function(module, exports, __webpack_require__) {
- // 3) "9.0" -> ["000000000"", "000000009"]
- return map(version.split("."), function (chunk) {
- return new Array(20 - chunk.length).join("0") + chunk;
- }).reverse();
- });
+"use strict";
+/* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
- // iterate in reverse order by reversed chunks array
- while (--precision >= 0) {
- // 4) compare: "000000009" > "000000010" = false (but "9" > "10" = true)
- if (chunks[0][precision] > chunks[1][precision]) {
- return 1;
- }
- else if (chunks[0][precision] === chunks[1][precision]) {
- if (precision === 0) {
- // all version chunks are same
- return 0;
- }
+
+
+var KeyEscapeUtils = __webpack_require__(222);
+var traverseAllChildren = __webpack_require__(221);
+var warning = __webpack_require__(11);
+
+var ReactComponentTreeHook;
+
+if (typeof process !== 'undefined' && Object({"NODE_ENV":'production'}) && 'production' === 'test') {
+ // Temporary hack.
+ // Inline requires don't work well with Jest:
+ // https://github.com/facebook/react/issues/7240
+ // Remove the inline requires when we don't need them anymore:
+ // https://github.com/facebook/react/pull/7178
+ ReactComponentTreeHook = __webpack_require__(159);
+}
+
+/**
+ * @param {function} traverseContext Context passed through traversal.
+ * @param {?ReactComponent} child React child component.
+ * @param {!string} name String name of key path to child.
+ * @param {number=} selfDebugID Optional debugID of the current internal instance.
+ */
+function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {
+ // We found a component instance.
+ if (traverseContext && typeof traverseContext === 'object') {
+ var result = traverseContext;
+ var keyUnique = result[name] === undefined;
+ if (false) {
+ if (!ReactComponentTreeHook) {
+ ReactComponentTreeHook = require('./ReactComponentTreeHook');
}
- else {
- return -1;
+ if (!keyUnique) {
+ process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
}
}
+ if (keyUnique && child != null) {
+ result[name] = child;
+ }
}
+}
- /**
- * Check if browser is unsupported
- *
- * @example
- * bowser.isUnsupportedBrowser({
- * msie: "10",
- * firefox: "23",
- * chrome: "29",
- * safari: "5.1",
- * opera: "16",
- * phantom: "534"
- * });
- *
- * @param {Object} minVersions map of minimal version to browser
- * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map
- * @param {String} [ua] user agent string
- * @return {Boolean}
- */
- function isUnsupportedBrowser(minVersions, strictMode, ua) {
- var _bowser = bowser;
+/**
+ * Flattens children that are typically specified as `props.children`. Any null
+ * children will not be included in the resulting object.
+ * @return {!object} flattened children keyed by name.
+ */
+function flattenChildren(children, selfDebugID) {
+ if (children == null) {
+ return children;
+ }
+ var result = {};
- // make strictMode param optional with ua param usage
- if (typeof strictMode === 'string') {
- ua = strictMode;
- strictMode = void(0);
+ if (false) {
+ traverseAllChildren(children, function (traverseContext, child, name) {
+ return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);
+ }, result);
+ } else {
+ traverseAllChildren(children, flattenSingleChildIntoContext, result);
+ }
+ return result;
+}
+
+module.exports = flattenChildren;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(112)))
+
+/***/ }),
+/* 720 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _extends2 = __webpack_require__(7);
+
+var _extends3 = _interopRequireDefault(_extends2);
+
+var _objectWithoutProperties2 = __webpack_require__(8);
+
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _simpleAssign = __webpack_require__(6);
+
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _reactDom = __webpack_require__(16);
+
+var _reactDom2 = _interopRequireDefault(_reactDom);
+
+var _autoPrefix = __webpack_require__(96);
+
+var _autoPrefix2 = _interopRequireDefault(_autoPrefix);
+
+var _transitions = __webpack_require__(10);
+
+var _transitions2 = _interopRequireDefault(_transitions);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var ScaleInChild = function (_Component) {
+ (0, _inherits3.default)(ScaleInChild, _Component);
+
+ function ScaleInChild() {
+ (0, _classCallCheck3.default)(this, ScaleInChild);
+ return (0, _possibleConstructorReturn3.default)(this, (ScaleInChild.__proto__ || (0, _getPrototypeOf2.default)(ScaleInChild)).apply(this, arguments));
+ }
+
+ (0, _createClass3.default)(ScaleInChild, [{
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ clearTimeout(this.enterTimer);
+ clearTimeout(this.leaveTimer);
+ }
+ }, {
+ key: 'componentWillAppear',
+ value: function componentWillAppear(callback) {
+ this.initializeAnimation(callback);
+ }
+ }, {
+ key: 'componentWillEnter',
+ value: function componentWillEnter(callback) {
+ this.initializeAnimation(callback);
+ }
+ }, {
+ key: 'componentDidAppear',
+ value: function componentDidAppear() {
+ this.animate();
+ }
+ }, {
+ key: 'componentDidEnter',
+ value: function componentDidEnter() {
+ this.animate();
}
+ }, {
+ key: 'componentWillLeave',
+ value: function componentWillLeave(callback) {
+ var style = _reactDom2.default.findDOMNode(this).style;
- if (strictMode === void(0)) {
- strictMode = false;
+ style.opacity = '0';
+ _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.minScale + ')');
+
+ this.leaveTimer = setTimeout(callback, 450);
}
- if (ua) {
- _bowser = detect(ua);
+ }, {
+ key: 'animate',
+ value: function animate() {
+ var style = _reactDom2.default.findDOMNode(this).style;
+
+ style.opacity = '1';
+ _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.maxScale + ')');
}
+ }, {
+ key: 'initializeAnimation',
+ value: function initializeAnimation(callback) {
+ var style = _reactDom2.default.findDOMNode(this).style;
- var version = "" + _bowser.version;
- for (var browser in minVersions) {
- if (minVersions.hasOwnProperty(browser)) {
- if (_bowser[browser]) {
- if (typeof minVersions[browser] !== 'string') {
- throw new Error('Browser version in the minVersion map should be a string: ' + browser + ': ' + String(minVersions));
- }
+ style.opacity = '0';
+ _autoPrefix2.default.set(style, 'transform', 'scale(0)');
- // browser version and min supported version.
- return compareVersions([version, minVersions[browser]]) < 0;
- }
- }
+ this.enterTimer = setTimeout(callback, this.props.enterDelay);
}
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ children = _props.children,
+ enterDelay = _props.enterDelay,
+ maxScale = _props.maxScale,
+ minScale = _props.minScale,
+ style = _props.style,
+ other = (0, _objectWithoutProperties3.default)(_props, ['children', 'enterDelay', 'maxScale', 'minScale', 'style']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
- return strictMode; // not found
- }
- /**
- * Check if browser is supported
- *
- * @param {Object} minVersions map of minimal version to browser
- * @param {Boolean} [strictMode = false] flag to return false if browser wasn't found in map
- * @param {String} [ua] user agent string
- * @return {Boolean}
- */
- function check(minVersions, strictMode, ua) {
- return !isUnsupportedBrowser(minVersions, strictMode, ua);
- }
+ var mergedRootStyles = (0, _simpleAssign2.default)({}, {
+ position: 'absolute',
+ height: '100%',
+ width: '100%',
+ top: 0,
+ left: 0,
+ transition: _transitions2.default.easeOut(null, ['transform', 'opacity'])
+ }, style);
- bowser.isUnsupportedBrowser = isUnsupportedBrowser;
- bowser.compareVersions = compareVersions;
- bowser.check = check;
+ return _react2.default.createElement(
+ 'div',
+ (0, _extends3.default)({}, other, { style: prepareStyles(mergedRootStyles) }),
+ children
+ );
+ }
+ }]);
+ return ScaleInChild;
+}(_react.Component);
- /*
- * Set our detect method to the main bowser object so we can
- * reuse it to test other user agents.
- * This is needed to implement future tests.
- */
- bowser._detect = detect;
+ScaleInChild.defaultProps = {
+ enterDelay: 0,
+ maxScale: 1,
+ minScale: 0
+};
+ScaleInChild.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? ScaleInChild.propTypes = {
+ children: _react.PropTypes.node,
+ enterDelay: _react.PropTypes.number,
+ maxScale: _react.PropTypes.number,
+ minScale: _react.PropTypes.number,
+ style: _react.PropTypes.object
+} : void 0;
+exports.default = ScaleInChild;
- return bowser
+/***/ }),
+/* 721 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
});
+var _extends2 = __webpack_require__(7);
+
+var _extends3 = _interopRequireDefault(_extends2);
+
+var _objectWithoutProperties2 = __webpack_require__(8);
+
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _simpleAssign = __webpack_require__(6);
+
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _reactDom = __webpack_require__(16);
+
+var _reactDom2 = _interopRequireDefault(_reactDom);
+
+var _shallowEqual = __webpack_require__(63);
+
+var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
+
+var _autoPrefix = __webpack_require__(96);
+
+var _autoPrefix2 = _interopRequireDefault(_autoPrefix);
+
+var _transitions = __webpack_require__(10);
+
+var _transitions2 = _interopRequireDefault(_transitions);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var CircleRipple = function (_Component) {
+ (0, _inherits3.default)(CircleRipple, _Component);
+
+ function CircleRipple() {
+ (0, _classCallCheck3.default)(this, CircleRipple);
+ return (0, _possibleConstructorReturn3.default)(this, (CircleRipple.__proto__ || (0, _getPrototypeOf2.default)(CircleRipple)).apply(this, arguments));
+ }
+
+ (0, _createClass3.default)(CircleRipple, [{
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps) {
+ return !(0, _shallowEqual2.default)(this.props, nextProps);
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ clearTimeout(this.enterTimer);
+ clearTimeout(this.leaveTimer);
+ }
+ }, {
+ key: 'componentWillAppear',
+ value: function componentWillAppear(callback) {
+ this.initializeAnimation(callback);
+ }
+ }, {
+ key: 'componentWillEnter',
+ value: function componentWillEnter(callback) {
+ this.initializeAnimation(callback);
+ }
+ }, {
+ key: 'componentDidAppear',
+ value: function componentDidAppear() {
+ this.animate();
+ }
+ }, {
+ key: 'componentDidEnter',
+ value: function componentDidEnter() {
+ this.animate();
+ }
+ }, {
+ key: 'componentWillLeave',
+ value: function componentWillLeave(callback) {
+ var style = _reactDom2.default.findDOMNode(this).style;
+ style.opacity = 0;
+ // If the animation is aborted, remove from the DOM immediately
+ var removeAfter = this.props.aborted ? 0 : 2000;
+ this.enterTimer = setTimeout(callback, removeAfter);
+ }
+ }, {
+ key: 'animate',
+ value: function animate() {
+ var style = _reactDom2.default.findDOMNode(this).style;
+ var transitionValue = _transitions2.default.easeOut('2s', 'opacity') + ', ' + _transitions2.default.easeOut('1s', 'transform');
+ _autoPrefix2.default.set(style, 'transition', transitionValue);
+ _autoPrefix2.default.set(style, 'transform', 'scale(1)');
+ }
+ }, {
+ key: 'initializeAnimation',
+ value: function initializeAnimation(callback) {
+ var style = _reactDom2.default.findDOMNode(this).style;
+ style.opacity = this.props.opacity;
+ _autoPrefix2.default.set(style, 'transform', 'scale(0)');
+ this.leaveTimer = setTimeout(callback, 0);
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ aborted = _props.aborted,
+ color = _props.color,
+ opacity = _props.opacity,
+ style = _props.style,
+ touchGenerated = _props.touchGenerated,
+ other = (0, _objectWithoutProperties3.default)(_props, ['aborted', 'color', 'opacity', 'style', 'touchGenerated']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
+
-/***/ }),
-/* 708 */
-/***/ (function(module, exports) {
+ var mergedStyles = (0, _simpleAssign2.default)({
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ height: '100%',
+ width: '100%',
+ borderRadius: '50%',
+ backgroundColor: color
+ }, style);
-module.exports = function() {
- throw new Error("define cannot be used indirect");
-};
+ return _react2.default.createElement('div', (0, _extends3.default)({}, other, { style: prepareStyles(mergedStyles) }));
+ }
+ }]);
+ return CircleRipple;
+}(_react.Component);
+CircleRipple.defaultProps = {
+ opacity: 0.1,
+ aborted: false
+};
+CircleRipple.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? CircleRipple.propTypes = {
+ aborted: _react.PropTypes.bool,
+ color: _react.PropTypes.string,
+ opacity: _react.PropTypes.number,
+ style: _react.PropTypes.object,
+ touchGenerated: _react.PropTypes.bool
+} : void 0;
+exports.default = CircleRipple;
/***/ }),
-/* 709 */
+/* 722 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -54175,265 +57523,377 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.default = function (_ref) {
- var browser = _ref.browser;
- var version = _ref.version;
- var prefix = _ref.prefix;
-
- var prefixedKeyframes = 'keyframes';
-
- if (browser === 'chrome' && version < 43 || (browser === 'safari' || browser === 'ios_saf') && version < 9 || browser === 'opera' && version < 30 || browser === 'android' && version <= 4.4 || browser === 'and_uc') {
- prefixedKeyframes = prefix.css + prefixedKeyframes;
- }
- return prefixedKeyframes;
-};
-
-module.exports = exports['default'];
-
-/***/ }),
-/* 710 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
+var _extends2 = __webpack_require__(7);
+var _extends3 = _interopRequireDefault(_extends2);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = { "chrome": { "transform": 35, "transformOrigin": 35, "transformOriginX": 35, "transformOriginY": 35, "backfaceVisibility": 35, "perspective": 35, "perspectiveOrigin": 35, "transformStyle": 35, "transformOriginZ": 35, "animation": 42, "animationDelay": 42, "animationDirection": 42, "animationFillMode": 42, "animationDuration": 42, "animationIterationCount": 42, "animationName": 42, "animationPlayState": 42, "animationTimingFunction": 42, "appearance": 55, "userSelect": 55, "fontKerning": 32, "textEmphasisPosition": 55, "textEmphasis": 55, "textEmphasisStyle": 55, "textEmphasisColor": 55, "boxDecorationBreak": 55, "clipPath": 55, "maskImage": 55, "maskMode": 55, "maskRepeat": 55, "maskPosition": 55, "maskClip": 55, "maskOrigin": 55, "maskSize": 55, "maskComposite": 55, "mask": 55, "maskBorderSource": 55, "maskBorderMode": 55, "maskBorderSlice": 55, "maskBorderWidth": 55, "maskBorderOutset": 55, "maskBorderRepeat": 55, "maskBorder": 55, "maskType": 55, "textDecorationStyle": 55, "textDecorationSkip": 55, "textDecorationLine": 55, "textDecorationColor": 55, "filter": 52, "fontFeatureSettings": 47, "breakAfter": 49, "breakBefore": 49, "breakInside": 49, "columnCount": 49, "columnFill": 49, "columnGap": 49, "columnRule": 49, "columnRuleColor": 49, "columnRuleStyle": 49, "columnRuleWidth": 49, "columns": 49, "columnSpan": 49, "columnWidth": 49 }, "safari": { "flex": 8, "flexBasis": 8, "flexDirection": 8, "flexGrow": 8, "flexFlow": 8, "flexShrink": 8, "flexWrap": 8, "alignContent": 8, "alignItems": 8, "alignSelf": 8, "justifyContent": 8, "order": 8, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8, "transformOrigin": 8, "transformOriginX": 8, "transformOriginY": 8, "backfaceVisibility": 8, "perspective": 8, "perspectiveOrigin": 8, "transformStyle": 8, "transformOriginZ": 8, "animation": 8, "animationDelay": 8, "animationDirection": 8, "animationFillMode": 8, "animationDuration": 8, "animationIterationCount": 8, "animationName": 8, "animationPlayState": 8, "animationTimingFunction": 8, "appearance": 10, "userSelect": 10, "backdropFilter": 10, "fontKerning": 9, "scrollSnapType": 10, "scrollSnapPointsX": 10, "scrollSnapPointsY": 10, "scrollSnapDestination": 10, "scrollSnapCoordinate": 10, "textEmphasisPosition": 7, "textEmphasis": 7, "textEmphasisStyle": 7, "textEmphasisColor": 7, "boxDecorationBreak": 10, "clipPath": 10, "maskImage": 10, "maskMode": 10, "maskRepeat": 10, "maskPosition": 10, "maskClip": 10, "maskOrigin": 10, "maskSize": 10, "maskComposite": 10, "mask": 10, "maskBorderSource": 10, "maskBorderMode": 10, "maskBorderSlice": 10, "maskBorderWidth": 10, "maskBorderOutset": 10, "maskBorderRepeat": 10, "maskBorder": 10, "maskType": 10, "textDecorationStyle": 10, "textDecorationSkip": 10, "textDecorationLine": 10, "textDecorationColor": 10, "shapeImageThreshold": 10, "shapeImageMargin": 10, "shapeImageOutside": 10, "filter": 9, "hyphens": 10, "flowInto": 10, "flowFrom": 10, "breakBefore": 8, "breakAfter": 8, "breakInside": 8, "regionFragment": 10, "columnCount": 8, "columnFill": 8, "columnGap": 8, "columnRule": 8, "columnRuleColor": 8, "columnRuleStyle": 8, "columnRuleWidth": 8, "columns": 8, "columnSpan": 8, "columnWidth": 8 }, "firefox": { "appearance": 51, "userSelect": 51, "boxSizing": 28, "textAlignLast": 48, "textDecorationStyle": 35, "textDecorationSkip": 35, "textDecorationLine": 35, "textDecorationColor": 35, "tabSize": 51, "hyphens": 42, "fontFeatureSettings": 33, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "opera": { "flex": 16, "flexBasis": 16, "flexDirection": 16, "flexGrow": 16, "flexFlow": 16, "flexShrink": 16, "flexWrap": 16, "alignContent": 16, "alignItems": 16, "alignSelf": 16, "justifyContent": 16, "order": 16, "transform": 22, "transformOrigin": 22, "transformOriginX": 22, "transformOriginY": 22, "backfaceVisibility": 22, "perspective": 22, "perspectiveOrigin": 22, "transformStyle": 22, "transformOriginZ": 22, "animation": 29, "animationDelay": 29, "animationDirection": 29, "animationFillMode": 29, "animationDuration": 29, "animationIterationCount": 29, "animationName": 29, "animationPlayState": 29, "animationTimingFunction": 29, "appearance": 41, "userSelect": 41, "fontKerning": 19, "textEmphasisPosition": 41, "textEmphasis": 41, "textEmphasisStyle": 41, "textEmphasisColor": 41, "boxDecorationBreak": 41, "clipPath": 41, "maskImage": 41, "maskMode": 41, "maskRepeat": 41, "maskPosition": 41, "maskClip": 41, "maskOrigin": 41, "maskSize": 41, "maskComposite": 41, "mask": 41, "maskBorderSource": 41, "maskBorderMode": 41, "maskBorderSlice": 41, "maskBorderWidth": 41, "maskBorderOutset": 41, "maskBorderRepeat": 41, "maskBorder": 41, "maskType": 41, "textDecorationStyle": 41, "textDecorationSkip": 41, "textDecorationLine": 41, "textDecorationColor": 41, "filter": 39, "fontFeatureSettings": 34, "breakAfter": 36, "breakBefore": 36, "breakInside": 36, "columnCount": 36, "columnFill": 36, "columnGap": 36, "columnRule": 36, "columnRuleColor": 36, "columnRuleStyle": 36, "columnRuleWidth": 36, "columns": 36, "columnSpan": 36, "columnWidth": 36 }, "ie": { "flex": 10, "flexDirection": 10, "flexFlow": 10, "flexWrap": 10, "transform": 9, "transformOrigin": 9, "transformOriginX": 9, "transformOriginY": 9, "userSelect": 11, "wrapFlow": 11, "wrapThrough": 11, "wrapMargin": 11, "scrollSnapType": 11, "scrollSnapPointsX": 11, "scrollSnapPointsY": 11, "scrollSnapDestination": 11, "scrollSnapCoordinate": 11, "touchAction": 10, "hyphens": 11, "flowInto": 11, "flowFrom": 11, "breakBefore": 11, "breakAfter": 11, "breakInside": 11, "regionFragment": 11, "gridTemplateColumns": 11, "gridTemplateRows": 11, "gridTemplateAreas": 11, "gridTemplate": 11, "gridAutoColumns": 11, "gridAutoRows": 11, "gridAutoFlow": 11, "grid": 11, "gridRowStart": 11, "gridColumnStart": 11, "gridRowEnd": 11, "gridRow": 11, "gridColumn": 11, "gridColumnEnd": 11, "gridColumnGap": 11, "gridRowGap": 11, "gridArea": 11, "gridGap": 11, "textSizeAdjust": 11 }, "edge": { "userSelect": 14, "wrapFlow": 14, "wrapThrough": 14, "wrapMargin": 14, "scrollSnapType": 14, "scrollSnapPointsX": 14, "scrollSnapPointsY": 14, "scrollSnapDestination": 14, "scrollSnapCoordinate": 14, "hyphens": 14, "flowInto": 14, "flowFrom": 14, "breakBefore": 14, "breakAfter": 14, "breakInside": 14, "regionFragment": 14, "gridTemplateColumns": 14, "gridTemplateRows": 14, "gridTemplateAreas": 14, "gridTemplate": 14, "gridAutoColumns": 14, "gridAutoRows": 14, "gridAutoFlow": 14, "grid": 14, "gridRowStart": 14, "gridColumnStart": 14, "gridRowEnd": 14, "gridRow": 14, "gridColumn": 14, "gridColumnEnd": 14, "gridColumnGap": 14, "gridRowGap": 14, "gridArea": 14, "gridGap": 14 }, "ios_saf": { "flex": 8.1, "flexBasis": 8.1, "flexDirection": 8.1, "flexGrow": 8.1, "flexFlow": 8.1, "flexShrink": 8.1, "flexWrap": 8.1, "alignContent": 8.1, "alignItems": 8.1, "alignSelf": 8.1, "justifyContent": 8.1, "order": 8.1, "transition": 6, "transitionDelay": 6, "transitionDuration": 6, "transitionProperty": 6, "transitionTimingFunction": 6, "transform": 8.1, "transformOrigin": 8.1, "transformOriginX": 8.1, "transformOriginY": 8.1, "backfaceVisibility": 8.1, "perspective": 8.1, "perspectiveOrigin": 8.1, "transformStyle": 8.1, "transformOriginZ": 8.1, "animation": 8.1, "animationDelay": 8.1, "animationDirection": 8.1, "animationFillMode": 8.1, "animationDuration": 8.1, "animationIterationCount": 8.1, "animationName": 8.1, "animationPlayState": 8.1, "animationTimingFunction": 8.1, "appearance": 9.3, "userSelect": 9.3, "backdropFilter": 9.3, "fontKerning": 9.3, "scrollSnapType": 9.3, "scrollSnapPointsX": 9.3, "scrollSnapPointsY": 9.3, "scrollSnapDestination": 9.3, "scrollSnapCoordinate": 9.3, "boxDecorationBreak": 9.3, "clipPath": 9.3, "maskImage": 9.3, "maskMode": 9.3, "maskRepeat": 9.3, "maskPosition": 9.3, "maskClip": 9.3, "maskOrigin": 9.3, "maskSize": 9.3, "maskComposite": 9.3, "mask": 9.3, "maskBorderSource": 9.3, "maskBorderMode": 9.3, "maskBorderSlice": 9.3, "maskBorderWidth": 9.3, "maskBorderOutset": 9.3, "maskBorderRepeat": 9.3, "maskBorder": 9.3, "maskType": 9.3, "textSizeAdjust": 9.3, "textDecorationStyle": 9.3, "textDecorationSkip": 9.3, "textDecorationLine": 9.3, "textDecorationColor": 9.3, "shapeImageThreshold": 9.3, "shapeImageMargin": 9.3, "shapeImageOutside": 9.3, "filter": 9, "hyphens": 9.3, "flowInto": 9.3, "flowFrom": 9.3, "breakBefore": 8.1, "breakAfter": 8.1, "breakInside": 8.1, "regionFragment": 9.3, "columnCount": 8.1, "columnFill": 8.1, "columnGap": 8.1, "columnRule": 8.1, "columnRuleColor": 8.1, "columnRuleStyle": 8.1, "columnRuleWidth": 8.1, "columns": 8.1, "columnSpan": 8.1, "columnWidth": 8.1 }, "android": { "flex": 4.2, "flexBasis": 4.2, "flexDirection": 4.2, "flexGrow": 4.2, "flexFlow": 4.2, "flexShrink": 4.2, "flexWrap": 4.2, "alignContent": 4.2, "alignItems": 4.2, "alignSelf": 4.2, "justifyContent": 4.2, "order": 4.2, "transition": 4.2, "transitionDelay": 4.2, "transitionDuration": 4.2, "transitionProperty": 4.2, "transitionTimingFunction": 4.2, "transform": 4.4, "transformOrigin": 4.4, "transformOriginX": 4.4, "transformOriginY": 4.4, "backfaceVisibility": 4.4, "perspective": 4.4, "perspectiveOrigin": 4.4, "transformStyle": 4.4, "transformOriginZ": 4.4, "animation": 4.4, "animationDelay": 4.4, "animationDirection": 4.4, "animationFillMode": 4.4, "animationDuration": 4.4, "animationIterationCount": 4.4, "animationName": 4.4, "animationPlayState": 4.4, "animationTimingFunction": 4.4, "appearance": 51, "userSelect": 51, "fontKerning": 4.4, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "filter": 51, "fontFeatureSettings": 4.4, "breakAfter": 51, "breakBefore": 51, "breakInside": 51, "columnCount": 51, "columnFill": 51, "columnGap": 51, "columnRule": 51, "columnRuleColor": 51, "columnRuleStyle": 51, "columnRuleWidth": 51, "columns": 51, "columnSpan": 51, "columnWidth": 51 }, "and_chr": { "appearance": 51, "userSelect": 51, "textEmphasisPosition": 51, "textEmphasis": 51, "textEmphasisStyle": 51, "textEmphasisColor": 51, "boxDecorationBreak": 51, "clipPath": 51, "maskImage": 51, "maskMode": 51, "maskRepeat": 51, "maskPosition": 51, "maskClip": 51, "maskOrigin": 51, "maskSize": 51, "maskComposite": 51, "mask": 51, "maskBorderSource": 51, "maskBorderMode": 51, "maskBorderSlice": 51, "maskBorderWidth": 51, "maskBorderOutset": 51, "maskBorderRepeat": 51, "maskBorder": 51, "maskType": 51, "textDecorationStyle": 51, "textDecorationSkip": 51, "textDecorationLine": 51, "textDecorationColor": 51, "filter": 51 }, "and_uc": { "flex": 9.9, "flexBasis": 9.9, "flexDirection": 9.9, "flexGrow": 9.9, "flexFlow": 9.9, "flexShrink": 9.9, "flexWrap": 9.9, "alignContent": 9.9, "alignItems": 9.9, "alignSelf": 9.9, "justifyContent": 9.9, "order": 9.9, "transition": 9.9, "transitionDelay": 9.9, "transitionDuration": 9.9, "transitionProperty": 9.9, "transitionTimingFunction": 9.9, "transform": 9.9, "transformOrigin": 9.9, "transformOriginX": 9.9, "transformOriginY": 9.9, "backfaceVisibility": 9.9, "perspective": 9.9, "perspectiveOrigin": 9.9, "transformStyle": 9.9, "transformOriginZ": 9.9, "animation": 9.9, "animationDelay": 9.9, "animationDirection": 9.9, "animationFillMode": 9.9, "animationDuration": 9.9, "animationIterationCount": 9.9, "animationName": 9.9, "animationPlayState": 9.9, "animationTimingFunction": 9.9, "appearance": 9.9, "userSelect": 9.9, "fontKerning": 9.9, "textEmphasisPosition": 9.9, "textEmphasis": 9.9, "textEmphasisStyle": 9.9, "textEmphasisColor": 9.9, "maskImage": 9.9, "maskMode": 9.9, "maskRepeat": 9.9, "maskPosition": 9.9, "maskClip": 9.9, "maskOrigin": 9.9, "maskSize": 9.9, "maskComposite": 9.9, "mask": 9.9, "maskBorderSource": 9.9, "maskBorderMode": 9.9, "maskBorderSlice": 9.9, "maskBorderWidth": 9.9, "maskBorderOutset": 9.9, "maskBorderRepeat": 9.9, "maskBorder": 9.9, "maskType": 9.9, "textSizeAdjust": 9.9, "filter": 9.9, "hyphens": 9.9, "flowInto": 9.9, "flowFrom": 9.9, "breakBefore": 9.9, "breakAfter": 9.9, "breakInside": 9.9, "regionFragment": 9.9, "fontFeatureSettings": 9.9, "columnCount": 9.9, "columnFill": 9.9, "columnGap": 9.9, "columnRule": 9.9, "columnRuleColor": 9.9, "columnRuleStyle": 9.9, "columnRuleWidth": 9.9, "columns": 9.9, "columnSpan": 9.9, "columnWidth": 9.9 }, "op_mini": {} };
-module.exports = exports["default"];
+var _objectWithoutProperties2 = __webpack_require__(8);
-/***/ }),
-/* 711 */
-/***/ (function(module, exports, __webpack_require__) {
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-"use strict";
+var _getPrototypeOf = __webpack_require__(3);
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = position;
+var _classCallCheck2 = __webpack_require__(1);
-var _getPrefixedValue = __webpack_require__(40);
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
+var _createClass2 = __webpack_require__(2);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _createClass3 = _interopRequireDefault(_createClass2);
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+var _possibleConstructorReturn2 = __webpack_require__(4);
-function position(_ref) {
- var property = _ref.property;
- var value = _ref.value;
- var browser = _ref.browserInfo.browser;
- var css = _ref.prefix.css;
- var keepUnprefixed = _ref.keepUnprefixed;
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- if (property === 'position' && value === 'sticky' && (browser === 'safari' || browser === 'ios_saf')) {
- return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed));
- }
-}
-module.exports = exports['default'];
+var _inherits2 = __webpack_require__(5);
-/***/ }),
-/* 712 */
-/***/ (function(module, exports, __webpack_require__) {
+var _inherits3 = _interopRequireDefault(_inherits2);
-"use strict";
+var _simpleAssign = __webpack_require__(6);
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = calc;
+var _react = __webpack_require__(0);
-var _getPrefixedValue = __webpack_require__(40);
+var _react2 = _interopRequireDefault(_react);
-var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
+var _transitions = __webpack_require__(10);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _transitions2 = _interopRequireDefault(_transitions);
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+var _propTypes = __webpack_require__(39);
-function calc(_ref) {
- var property = _ref.property;
- var value = _ref.value;
- var _ref$browserInfo = _ref.browserInfo;
- var browser = _ref$browserInfo.browser;
- var version = _ref$browserInfo.version;
- var css = _ref.prefix.css;
- var keepUnprefixed = _ref.keepUnprefixed;
+var _propTypes2 = _interopRequireDefault(_propTypes);
- if (typeof value === 'string' && value.indexOf('calc(') > -1 && (browser === 'firefox' && version < 15 || browser === 'chrome' && version < 25 || browser === 'safari' && version < 6.1 || browser === 'ios_saf' && version < 7)) {
- return _defineProperty({}, property, (0, _getPrefixedValue2.default)(value.replace(/calc\(/g, css + 'calc('), value, keepUnprefixed));
- }
-}
-module.exports = exports['default'];
+var _EnhancedButton = __webpack_require__(51);
-/***/ }),
-/* 713 */
-/***/ (function(module, exports, __webpack_require__) {
+var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton);
-"use strict";
+var _FontIcon = __webpack_require__(321);
+var _FontIcon2 = _interopRequireDefault(_FontIcon);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = zoomCursor;
+var _Tooltip = __webpack_require__(322);
-var _getPrefixedValue = __webpack_require__(40);
+var _Tooltip2 = _interopRequireDefault(_Tooltip);
-var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
+var _childUtils = __webpack_require__(131);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var values = { 'zoom-in': true, 'zoom-out': true };
+function getStyles(props, context) {
+ var baseTheme = context.muiTheme.baseTheme;
-function zoomCursor(_ref) {
- var property = _ref.property;
- var value = _ref.value;
- var _ref$browserInfo = _ref.browserInfo;
- var browser = _ref$browserInfo.browser;
- var version = _ref$browserInfo.version;
- var css = _ref.prefix.css;
- var keepUnprefixed = _ref.keepUnprefixed;
- if (property === 'cursor' && values[value] && (browser === 'firefox' && version < 24 || browser === 'chrome' && version < 37 || browser === 'safari' && version < 9 || browser === 'opera' && version < 24)) {
- return {
- cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)
- };
- }
+ return {
+ root: {
+ boxSizing: 'border-box',
+ overflow: 'visible',
+ transition: _transitions2.default.easeOut(),
+ padding: baseTheme.spacing.iconSize / 2,
+ width: baseTheme.spacing.iconSize * 2,
+ height: baseTheme.spacing.iconSize * 2,
+ fontSize: 0
+ },
+ tooltip: {
+ boxSizing: 'border-box'
+ },
+ disabled: {
+ color: baseTheme.palette.disabledColor,
+ fill: baseTheme.palette.disabledColor,
+ cursor: 'not-allowed'
+ }
+ };
}
-module.exports = exports['default'];
-/***/ }),
-/* 714 */
-/***/ (function(module, exports, __webpack_require__) {
+var IconButton = function (_Component) {
+ (0, _inherits3.default)(IconButton, _Component);
-"use strict";
+ function IconButton() {
+ var _ref;
+ var _temp, _this, _ret;
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = grabCursor;
+ (0, _classCallCheck3.default)(this, IconButton);
-var _getPrefixedValue = __webpack_require__(40);
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
-var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = IconButton.__proto__ || (0, _getPrototypeOf2.default)(IconButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ hovered: false,
+ isKeyboardFocused: false,
+ // Not to be confonded with the touch property.
+ // This state is to determined if it's a mobile device.
+ touch: false,
+ tooltipShown: false
+ }, _this.handleBlur = function (event) {
+ _this.hideTooltip();
+ if (_this.props.onBlur) {
+ _this.props.onBlur(event);
+ }
+ }, _this.handleFocus = function (event) {
+ _this.showTooltip();
+ if (_this.props.onFocus) {
+ _this.props.onFocus(event);
+ }
+ }, _this.handleMouseLeave = function (event) {
+ if (!_this.button.isKeyboardFocused()) {
+ _this.hideTooltip();
+ }
+ _this.setState({ hovered: false });
+ if (_this.props.onMouseLeave) {
+ _this.props.onMouseLeave(event);
+ }
+ }, _this.handleMouseOut = function (event) {
+ if (_this.props.disabled) _this.hideTooltip();
+ if (_this.props.onMouseOut) _this.props.onMouseOut(event);
+ }, _this.handleMouseEnter = function (event) {
+ _this.showTooltip();
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ // Cancel hover styles for touch devices
+ if (!_this.state.touch) {
+ _this.setState({ hovered: true });
+ }
+ if (_this.props.onMouseEnter) {
+ _this.props.onMouseEnter(event);
+ }
+ }, _this.handleTouchStart = function (event) {
+ _this.setState({ touch: true });
-var values = { grab: true, grabbing: true };
+ if (_this.props.onTouchStart) {
+ _this.props.onTouchStart(event);
+ }
+ }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) {
+ var _this$props = _this.props,
+ disabled = _this$props.disabled,
+ onFocus = _this$props.onFocus,
+ onBlur = _this$props.onBlur,
+ onKeyboardFocus = _this$props.onKeyboardFocus;
-function grabCursor(_ref) {
- var property = _ref.property;
- var value = _ref.value;
- var browser = _ref.browserInfo.browser;
- var css = _ref.prefix.css;
- var keepUnprefixed = _ref.keepUnprefixed;
+ if (isKeyboardFocused && !disabled) {
+ _this.showTooltip();
+ if (onFocus) {
+ onFocus(event);
+ }
+ } else {
+ _this.hideTooltip();
+ if (onBlur) {
+ onBlur(event);
+ }
+ }
- // adds prefixes for firefox, chrome, safari, and opera regardless of version until a reliable brwoser support info can be found (see: https://github.com/rofrischmann/inline-style-prefixer/issues/79)
- if (property === 'cursor' && values[value] && (browser === 'firefox' || browser === 'chrome' || browser === 'safari' || browser === 'opera')) {
- return {
- cursor: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)
- };
+ _this.setState({ isKeyboardFocused: isKeyboardFocused });
+ if (onKeyboardFocus) {
+ onKeyboardFocus(event, isKeyboardFocused);
+ }
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
-}
-module.exports = exports['default'];
-
-/***/ }),
-/* 715 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
+ (0, _createClass3.default)(IconButton, [{
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ if (nextProps.disabled) {
+ this.setState({ hovered: false });
+ }
+ }
+ }, {
+ key: 'setKeyboardFocus',
+ value: function setKeyboardFocus() {
+ this.button.setKeyboardFocus();
+ }
+ }, {
+ key: 'showTooltip',
+ value: function showTooltip() {
+ if (this.props.tooltip) {
+ this.setState({ tooltipShown: true });
+ }
+ }
+ }, {
+ key: 'hideTooltip',
+ value: function hideTooltip() {
+ if (this.props.tooltip) this.setState({ tooltipShown: false });
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _this2 = this;
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = flex;
-
-var _getPrefixedValue = __webpack_require__(40);
-
-var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var values = { flex: true, 'inline-flex': true };
+ var _props = this.props,
+ disabled = _props.disabled,
+ hoveredStyle = _props.hoveredStyle,
+ disableTouchRipple = _props.disableTouchRipple,
+ children = _props.children,
+ iconClassName = _props.iconClassName,
+ style = _props.style,
+ tooltip = _props.tooltip,
+ tooltipPositionProp = _props.tooltipPosition,
+ tooltipStyles = _props.tooltipStyles,
+ touch = _props.touch,
+ iconStyle = _props.iconStyle,
+ other = (0, _objectWithoutProperties3.default)(_props, ['disabled', 'hoveredStyle', 'disableTouchRipple', 'children', 'iconClassName', 'style', 'tooltip', 'tooltipPosition', 'tooltipStyles', 'touch', 'iconStyle']);
-function flex(_ref) {
- var property = _ref.property;
- var value = _ref.value;
- var _ref$browserInfo = _ref.browserInfo;
- var browser = _ref$browserInfo.browser;
- var version = _ref$browserInfo.version;
- var css = _ref.prefix.css;
- var keepUnprefixed = _ref.keepUnprefixed;
+ var fonticon = void 0;
- if (property === 'display' && values[value] && (browser === 'chrome' && version < 29 && version > 20 || (browser === 'safari' || browser === 'ios_saf') && version < 9 && version > 6 || browser === 'opera' && (version == 15 || version == 16))) {
- return {
- display: (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed)
- };
- }
-}
-module.exports = exports['default'];
+ var styles = getStyles(this.props, this.context);
+ var tooltipPosition = tooltipPositionProp.split('-');
-/***/ }),
-/* 716 */
-/***/ (function(module, exports, __webpack_require__) {
+ var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled;
-"use strict";
+ var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style, hovered ? hoveredStyle : {});
+ var tooltipElement = tooltip ? _react2.default.createElement(_Tooltip2.default, {
+ label: tooltip,
+ show: this.state.tooltipShown,
+ touch: touch,
+ style: (0, _simpleAssign2.default)(styles.tooltip, tooltipStyles),
+ verticalPosition: tooltipPosition[0],
+ horizontalPosition: tooltipPosition[1]
+ }) : null;
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = sizing;
+ if (iconClassName) {
+ var iconHoverColor = iconStyle.iconHoverColor,
+ iconStyleFontIcon = (0, _objectWithoutProperties3.default)(iconStyle, ['iconHoverColor']);
-var _getPrefixedValue = __webpack_require__(40);
-var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
+ fonticon = _react2.default.createElement(
+ _FontIcon2.default,
+ {
+ className: iconClassName,
+ hoverColor: disabled ? null : iconHoverColor,
+ style: (0, _simpleAssign2.default)({}, disabled && styles.disabled, iconStyleFontIcon),
+ color: this.context.muiTheme.baseTheme.palette.textColor
+ },
+ children
+ );
+ }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ var childrenStyle = disabled ? (0, _simpleAssign2.default)({}, iconStyle, styles.disabled) : iconStyle;
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+ return _react2.default.createElement(
+ _EnhancedButton2.default,
+ (0, _extends3.default)({
+ ref: function ref(_ref2) {
+ return _this2.button = _ref2;
+ }
+ }, other, {
+ centerRipple: true,
+ disabled: disabled,
+ onTouchStart: this.handleTouchStart,
+ style: mergedRootStyles,
+ disableTouchRipple: disableTouchRipple,
+ onBlur: this.handleBlur,
+ onFocus: this.handleFocus,
+ onMouseLeave: this.handleMouseLeave,
+ onMouseEnter: this.handleMouseEnter,
+ onMouseOut: this.handleMouseOut,
+ onKeyboardFocus: this.handleKeyboardFocus
+ }),
+ tooltipElement,
+ fonticon,
+ (0, _childUtils.extendChildren)(children, {
+ style: childrenStyle
+ })
+ );
+ }
+ }]);
+ return IconButton;
+}(_react.Component);
-var properties = {
- maxHeight: true,
- maxWidth: true,
- width: true,
- height: true,
- columnWidth: true,
- minWidth: true,
- minHeight: true
+IconButton.muiName = 'IconButton';
+IconButton.defaultProps = {
+ disabled: false,
+ disableTouchRipple: false,
+ iconStyle: {},
+ tooltipPosition: 'bottom-center',
+ touch: false
};
-var values = {
- 'min-content': true,
- 'max-content': true,
- 'fill-available': true,
- 'fit-content': true,
- 'contain-floats': true
+IconButton.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
};
-
-function sizing(_ref) {
- var property = _ref.property;
- var value = _ref.value;
- var css = _ref.prefix.css;
- var keepUnprefixed = _ref.keepUnprefixed;
-
- // This might change in the future
- // Keep an eye on it
- if (properties[property] && values[value]) {
- return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed));
- }
-}
-module.exports = exports['default'];
+ false ? IconButton.propTypes = {
+ /**
+ * Can be used to pass a `FontIcon` element as the icon for the button.
+ */
+ children: _react.PropTypes.node,
+ /**
+ * The CSS class name of the root element.
+ */
+ className: _react.PropTypes.string,
+ /**
+ * If true, the element's ripple effect will be disabled.
+ */
+ disableTouchRipple: _react.PropTypes.bool,
+ /**
+ * If true, the element will be disabled.
+ */
+ disabled: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the root element when the component is hovered.
+ */
+ hoveredStyle: _react.PropTypes.object,
+ /**
+ * The URL to link to when the button is clicked.
+ */
+ href: _react.PropTypes.string,
+ /**
+ * The CSS class name of the icon. Used for setting the icon with a stylesheet.
+ */
+ iconClassName: _react.PropTypes.string,
+ /**
+ * Override the inline-styles of the icon element.
+ * Note: you can specify iconHoverColor as a String inside this object.
+ */
+ iconStyle: _react.PropTypes.object,
+ /** @ignore */
+ onBlur: _react.PropTypes.func,
+ /** @ignore */
+ onFocus: _react.PropTypes.func,
+ /**
+ * Callback function fired when the element is focused or blurred by the keyboard.
+ *
+ * @param {object} event `focus` or `blur` event targeting the element.
+ * @param {boolean} keyboardFocused Indicates whether the element is focused.
+ */
+ onKeyboardFocus: _react.PropTypes.func,
+ /** @ignore */
+ onMouseEnter: _react.PropTypes.func,
+ /** @ignore */
+ onMouseLeave: _react.PropTypes.func,
+ /** @ignore */
+ onMouseOut: _react.PropTypes.func,
+ /** @ignore */
+ onTouchStart: _react.PropTypes.func,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object,
+ /**
+ * The text to supply to the element's tooltip.
+ */
+ tooltip: _react.PropTypes.node,
+ /**
+ * The vertical and horizontal positions, respectively, of the element's tooltip.
+ * Possible values are: "bottom-center", "top-center", "bottom-right", "top-right",
+ * "bottom-left", and "top-left".
+ */
+ tooltipPosition: _propTypes2.default.cornersAndCenter,
+ /**
+ * Override the inline-styles of the tooltip element.
+ */
+ tooltipStyles: _react.PropTypes.object,
+ /**
+ * If true, increase the tooltip element's size. Useful for increasing tooltip
+ * readability on mobile devices.
+ */
+ touch: _react.PropTypes.bool
+} : void 0;
+exports.default = IconButton;
/***/ }),
-/* 717 */
+/* 723 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -54442,185 +57902,158 @@ module.exports = exports['default'];
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.default = gradient;
-
-var _getPrefixedValue = __webpack_require__(40);
-
-var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+var _extends2 = __webpack_require__(7);
-var values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;
+var _extends3 = _interopRequireDefault(_extends2);
-function gradient(_ref) {
- var property = _ref.property;
- var value = _ref.value;
- var _ref$browserInfo = _ref.browserInfo;
- var browser = _ref$browserInfo.browser;
- var version = _ref$browserInfo.version;
- var css = _ref.prefix.css;
- var keepUnprefixed = _ref.keepUnprefixed;
+var _objectWithoutProperties2 = __webpack_require__(8);
- if (typeof value === 'string' && value.match(values) !== null && (browser === 'firefox' && version < 16 || browser === 'chrome' && version < 26 || (browser === 'safari' || browser === 'ios_saf') && version < 7 || (browser === 'opera' || browser === 'op_mini') && version < 12.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) {
- return _defineProperty({}, property, (0, _getPrefixedValue2.default)(css + value, value, keepUnprefixed));
- }
-}
-module.exports = exports['default'];
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-/***/ }),
-/* 718 */
-/***/ (function(module, exports, __webpack_require__) {
+var _getPrototypeOf = __webpack_require__(3);
-"use strict";
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+var _classCallCheck2 = __webpack_require__(1);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
+var _createClass2 = __webpack_require__(2);
-exports.default = transition;
+var _createClass3 = _interopRequireDefault(_createClass2);
-var _hyphenateStyleName = __webpack_require__(310);
+var _possibleConstructorReturn2 = __webpack_require__(4);
-var _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName);
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-var _unprefixProperty = __webpack_require__(719);
+var _inherits2 = __webpack_require__(5);
-var _unprefixProperty2 = _interopRequireDefault(_unprefixProperty);
+var _inherits3 = _interopRequireDefault(_inherits2);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _simpleAssign = __webpack_require__(6);
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-var properties = { transition: true, transitionProperty: true };
+var _react = __webpack_require__(0);
-function transition(_ref) {
- var property = _ref.property;
- var value = _ref.value;
- var css = _ref.prefix.css;
- var requiresPrefix = _ref.requiresPrefix;
- var keepUnprefixed = _ref.keepUnprefixed;
+var _react2 = _interopRequireDefault(_react);
- // also check for already prefixed transitions
- var unprefixedProperty = (0, _unprefixProperty2.default)(property);
+var _transitions = __webpack_require__(10);
- if (typeof value === 'string' && properties[unprefixedProperty]) {
- var _ret = function () {
- // TODO: memoize this array
- var requiresPrefixDashCased = Object.keys(requiresPrefix).map(function (prop) {
- return (0, _hyphenateStyleName2.default)(prop);
- });
+var _transitions2 = _interopRequireDefault(_transitions);
- // only split multi values, not cubic beziers
- var multipleValues = value.split(/,(?![^()]*(?:\([^()]*\))?\))/g);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- requiresPrefixDashCased.forEach(function (prop) {
- multipleValues.forEach(function (val, index) {
- if (val.indexOf(prop) > -1 && prop !== 'order') {
- multipleValues[index] = val.replace(prop, css + prop) + (keepUnprefixed ? ',' + val : '');
- }
- });
- });
+function getStyles(props, context, state) {
+ var color = props.color,
+ hoverColor = props.hoverColor;
+ var baseTheme = context.muiTheme.baseTheme;
- return {
- v: _defineProperty({}, property, multipleValues.join(','))
- };
- }();
+ var offColor = color || baseTheme.palette.textColor;
+ var onColor = hoverColor || offColor;
- if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v;
- }
+ return {
+ root: {
+ color: state.hovered ? onColor : offColor,
+ position: 'relative',
+ fontSize: baseTheme.spacing.iconSize,
+ display: 'inline-block',
+ userSelect: 'none',
+ transition: _transitions2.default.easeOut()
+ }
+ };
}
-module.exports = exports['default'];
-
-/***/ }),
-/* 719 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-exports.default = function (property) {
- var unprefixed = property.replace(/^(ms|Webkit|Moz|O)/, '');
- return unprefixed.charAt(0).toLowerCase() + unprefixed.slice(1);
-};
-module.exports = exports['default'];
+var FontIcon = function (_Component) {
+ (0, _inherits3.default)(FontIcon, _Component);
-/***/ }),
-/* 720 */
-/***/ (function(module, exports, __webpack_require__) {
+ function FontIcon() {
+ var _ref;
-"use strict";
+ var _temp, _this, _ret;
+ (0, _classCallCheck3.default)(this, FontIcon);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = flexboxIE;
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
-var _getPrefixedValue = __webpack_require__(40);
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FontIcon.__proto__ || (0, _getPrototypeOf2.default)(FontIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ hovered: false
+ }, _this.handleMouseLeave = function (event) {
+ // hover is needed only when a hoverColor is defined
+ if (_this.props.hoverColor !== undefined) {
+ _this.setState({ hovered: false });
+ }
+ if (_this.props.onMouseLeave) {
+ _this.props.onMouseLeave(event);
+ }
+ }, _this.handleMouseEnter = function (event) {
+ // hover is needed only when a hoverColor is defined
+ if (_this.props.hoverColor !== undefined) {
+ _this.setState({ hovered: true });
+ }
+ if (_this.props.onMouseEnter) {
+ _this.props.onMouseEnter(event);
+ }
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
-var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
+ (0, _createClass3.default)(FontIcon, [{
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ hoverColor = _props.hoverColor,
+ onMouseLeave = _props.onMouseLeave,
+ onMouseEnter = _props.onMouseEnter,
+ style = _props.style,
+ other = (0, _objectWithoutProperties3.default)(_props, ['hoverColor', 'onMouseLeave', 'onMouseEnter', 'style']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ var styles = getStyles(this.props, this.context, this.state);
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+ return _react2.default.createElement('span', (0, _extends3.default)({}, other, {
+ onMouseLeave: this.handleMouseLeave,
+ onMouseEnter: this.handleMouseEnter,
+ style: prepareStyles((0, _simpleAssign2.default)(styles.root, style))
+ }));
+ }
+ }]);
+ return FontIcon;
+}(_react.Component);
-var alternativeValues = {
- 'space-around': 'distribute',
- 'space-between': 'justify',
- 'flex-start': 'start',
- 'flex-end': 'end',
- flex: 'flexbox',
- 'inline-flex': 'inline-flexbox'
+FontIcon.muiName = 'FontIcon';
+FontIcon.defaultProps = {
+ onMouseEnter: function onMouseEnter() {},
+ onMouseLeave: function onMouseLeave() {}
};
-var alternativeProps = {
- alignContent: 'msFlexLinePack',
- alignSelf: 'msFlexItemAlign',
- alignItems: 'msFlexAlign',
- justifyContent: 'msFlexPack',
- order: 'msFlexOrder',
- flexGrow: 'msFlexPositive',
- flexShrink: 'msFlexNegative',
- flexBasis: 'msPreferredSize'
+FontIcon.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
};
-
-function flexboxIE(_ref) {
- var property = _ref.property;
- var value = _ref.value;
- var styles = _ref.styles;
- var _ref$browserInfo = _ref.browserInfo;
- var browser = _ref$browserInfo.browser;
- var version = _ref$browserInfo.version;
- var css = _ref.prefix.css;
- var keepUnprefixed = _ref.keepUnprefixed;
-
- if ((alternativeProps[property] || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'ie_mob' || browser === 'ie') && version == 10) {
- if (!keepUnprefixed && !Array.isArray(styles[property])) {
- delete styles[property];
- }
- if (property === 'display' && alternativeValues[value]) {
- return {
- display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed)
- };
- }
- if (alternativeProps[property]) {
- return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value);
- }
- }
-}
-module.exports = exports['default'];
+ false ? FontIcon.propTypes = {
+ /**
+ * This is the font color of the font icon. If not specified,
+ * this component will default to muiTheme.palette.textColor.
+ */
+ color: _react.PropTypes.string,
+ /**
+ * This is the icon color when the mouse hovers over the icon.
+ */
+ hoverColor: _react.PropTypes.string,
+ /** @ignore */
+ onMouseEnter: _react.PropTypes.func,
+ /** @ignore */
+ onMouseLeave: _react.PropTypes.func,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
+} : void 0;
+exports.default = FontIcon;
/***/ }),
-/* 721 */
+/* 724 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -54629,358 +58062,156 @@ module.exports = exports['default'];
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.default = flexboxOld;
-var _getPrefixedValue = __webpack_require__(40);
+var _react = __webpack_require__(0);
-var _getPrefixedValue2 = _interopRequireDefault(_getPrefixedValue);
+var _react2 = _interopRequireDefault(_react);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _pure = __webpack_require__(20);
-function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+var _pure2 = _interopRequireDefault(_pure);
-var alternativeValues = {
- 'space-around': 'justify',
- 'space-between': 'justify',
- 'flex-start': 'start',
- 'flex-end': 'end',
- 'wrap-reverse': 'multiple',
- wrap: 'multiple',
- flex: 'box',
- 'inline-flex': 'inline-box'
-};
+var _SvgIcon = __webpack_require__(21);
-var alternativeProps = {
- alignItems: 'WebkitBoxAlign',
- justifyContent: 'WebkitBoxPack',
- flexWrap: 'WebkitBoxLines'
-};
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
-var otherProps = ['alignContent', 'alignSelf', 'order', 'flexGrow', 'flexShrink', 'flexBasis', 'flexDirection'];
-var properties = Object.keys(alternativeProps).concat(otherProps);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function flexboxOld(_ref) {
- var property = _ref.property;
- var value = _ref.value;
- var styles = _ref.styles;
- var _ref$browserInfo = _ref.browserInfo;
- var browser = _ref$browserInfo.browser;
- var version = _ref$browserInfo.version;
- var css = _ref.prefix.css;
- var keepUnprefixed = _ref.keepUnprefixed;
+var NavigationExpandLess = function NavigationExpandLess(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z' })
+ );
+};
+NavigationExpandLess = (0, _pure2.default)(NavigationExpandLess);
+NavigationExpandLess.displayName = 'NavigationExpandLess';
+NavigationExpandLess.muiName = 'SvgIcon';
- if ((properties.indexOf(property) > -1 || property === 'display' && typeof value === 'string' && value.indexOf('flex') > -1) && (browser === 'firefox' && version < 22 || browser === 'chrome' && version < 21 || (browser === 'safari' || browser === 'ios_saf') && version <= 6.1 || browser === 'android' && version < 4.4 || browser === 'and_uc')) {
- if (!keepUnprefixed && !Array.isArray(styles[property])) {
- delete styles[property];
- }
- if (property === 'flexDirection' && typeof value === 'string') {
- return {
- WebkitBoxOrient: value.indexOf('column') > -1 ? 'vertical' : 'horizontal',
- WebkitBoxDirection: value.indexOf('reverse') > -1 ? 'reverse' : 'normal'
- };
- }
- if (property === 'display' && alternativeValues[value]) {
- return {
- display: (0, _getPrefixedValue2.default)(css + alternativeValues[value], value, keepUnprefixed)
- };
- }
- if (alternativeProps[property]) {
- return _defineProperty({}, alternativeProps[property], alternativeValues[value] || value);
- }
- }
-}
-module.exports = exports['default'];
+exports.default = NavigationExpandLess;
/***/ }),
-/* 722 */
+/* 725 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = callOnce;
-
-var _warning = __webpack_require__(17);
-
-var _warning2 = _interopRequireDefault(_warning);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+exports.__esModule = true;
-var CALLED_ONCE = 'muiPrepared';
+var _react = __webpack_require__(0);
-function callOnce() {
- if (false) {
- return function (style) {
- if (style[CALLED_ONCE]) {
- process.env.NODE_ENV !== "production" ? (0, _warning2.default)(false, 'Material-UI: You cannot call prepareStyles() on the same style object more than once.') : void 0;
- }
- style[CALLED_ONCE] = true;
- return style;
- };
- }
-}
+var _createHelper = __webpack_require__(323);
-/***/ }),
-/* 723 */
-/***/ (function(module, exports, __webpack_require__) {
+var _createHelper2 = _interopRequireDefault(_createHelper);
-"use strict";
+var _createEagerFactory = __webpack_require__(726);
+var _createEagerFactory2 = _interopRequireDefault(_createEagerFactory);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _keys = __webpack_require__(79);
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-var _keys2 = _interopRequireDefault(_keys);
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-exports.default = rtl;
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var shouldUpdate = function shouldUpdate(test) {
+ return function (BaseComponent) {
+ var factory = (0, _createEagerFactory2.default)(BaseComponent);
+ return function (_Component) {
+ _inherits(_class, _Component);
-var reTranslate = /((^|\s)translate(3d|X)?\()(\-?[\d]+)/;
-var reSkew = /((^|\s)skew(x|y)?\()\s*(\-?[\d]+)(deg|rad|grad)(,\s*(\-?[\d]+)(deg|rad|grad))?/;
+ function _class() {
+ _classCallCheck(this, _class);
-/**
- * This function ensures that `style` supports both ltr and rtl directions by
- * checking `styleConstants` in `muiTheme` and replacing attribute keys if
- * necessary.
- */
-function rtl(muiTheme) {
- if (muiTheme.isRtl) {
- return function (style) {
- if (style.directionInvariant === true) {
- return style;
+ return _possibleConstructorReturn(this, _Component.apply(this, arguments));
}
- var flippedAttributes = {
- // Keys and their replacements.
- right: 'left',
- left: 'right',
- marginRight: 'marginLeft',
- marginLeft: 'marginRight',
- paddingRight: 'paddingLeft',
- paddingLeft: 'paddingRight',
- borderRight: 'borderLeft',
- borderLeft: 'borderRight'
+ _class.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
+ return test(this.props, nextProps);
};
- var newStyle = {};
-
- (0, _keys2.default)(style).forEach(function (attribute) {
- var value = style[attribute];
- var key = attribute;
-
- if (flippedAttributes.hasOwnProperty(attribute)) {
- key = flippedAttributes[attribute];
- }
-
- switch (attribute) {
- case 'float':
- case 'textAlign':
- if (value === 'right') {
- value = 'left';
- } else if (value === 'left') {
- value = 'right';
- }
- break;
-
- case 'direction':
- if (value === 'ltr') {
- value = 'rtl';
- } else if (value === 'rtl') {
- value = 'ltr';
- }
- break;
-
- case 'transform':
- if (!value) break;
- var matches = void 0;
- if (matches = value.match(reTranslate)) {
- value = value.replace(matches[0], matches[1] + -parseFloat(matches[4]));
- }
- if (matches = value.match(reSkew)) {
- value = value.replace(matches[0], matches[1] + -parseFloat(matches[4]) + matches[5] + matches[6] ? ', ' + (-parseFloat(matches[7]) + matches[8]) : '');
- }
- break;
-
- case 'transformOrigin':
- if (!value) break;
- if (value.indexOf('right') > -1) {
- value = value.replace('right', 'left');
- } else if (value.indexOf('left') > -1) {
- value = value.replace('left', 'right');
- }
- break;
- }
-
- newStyle[key] = value;
- });
-
- return newStyle;
- };
- }
-}
-
-/***/ }),
-/* 724 */
-/***/ (function(module, exports, __webpack_require__) {
-
-__webpack_require__(725);
-module.exports = __webpack_require__(18).Object.keys;
-
-
-/***/ }),
-/* 725 */
-/***/ (function(module, exports, __webpack_require__) {
-
-// 19.1.2.14 Object.keys(O)
-var toObject = __webpack_require__(84);
-var $keys = __webpack_require__(64);
-
-__webpack_require__(294)('keys', function () {
- return function keys(it) {
- return $keys(toObject(it));
- };
-});
-
-
-/***/ }),
-/* 726 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-exports.__esModule = true;
-exports.default = compose;
-function compose() {
- for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
- funcs[_key] = arguments[_key];
- }
-
- if (funcs.length === 0) {
- return function (arg) {
- return arg;
- };
- }
+ _class.prototype.render = function render() {
+ return factory(this.props);
+ };
- if (funcs.length === 1) {
- return funcs[0];
- }
+ return _class;
+ }(_react.Component);
+ };
+};
- return funcs.reduce(function (a, b) {
- return function () {
- return a(b.apply(undefined, arguments));
- };
- });
-}
+exports.default = (0, _createHelper2.default)(shouldUpdate, 'shouldUpdate');
/***/ }),
-/* 727 */
+/* 726 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = AppDrawer;
+exports.__esModule = true;
-var _react = __webpack_require__(0);
+var _createEagerElementUtil = __webpack_require__(727);
-var _react2 = _interopRequireDefault(_react);
+var _createEagerElementUtil2 = _interopRequireDefault(_createEagerElementUtil);
-var _reactRouter = __webpack_require__(156);
+var _isReferentiallyTransparentFunctionComponent = __webpack_require__(728);
-var _List = __webpack_require__(728);
+var _isReferentiallyTransparentFunctionComponent2 = _interopRequireDefault(_isReferentiallyTransparentFunctionComponent);
-var _Drawer = __webpack_require__(750);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _Drawer2 = _interopRequireDefault(_Drawer);
+var createFactory = function createFactory(type) {
+ var isReferentiallyTransparent = (0, _isReferentiallyTransparentFunctionComponent2.default)(type);
+ return function (p, c) {
+ return (0, _createEagerElementUtil2.default)(false, isReferentiallyTransparent, type, p, c);
+ };
+};
-var _Subheader = __webpack_require__(312);
+exports.default = createFactory;
-var _Subheader2 = _interopRequireDefault(_Subheader);
+/***/ }),
+/* 727 */
+/***/ (function(module, exports, __webpack_require__) {
-var _code = __webpack_require__(756);
+"use strict";
-var _code2 = _interopRequireDefault(_code);
-var _shop = __webpack_require__(757);
+exports.__esModule = true;
-var _shop2 = _interopRequireDefault(_shop);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-var _Styles = __webpack_require__(80);
+var _react = __webpack_require__(0);
-var _Styles2 = _interopRequireDefault(_Styles);
+var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var SelectableList = (0, _List.makeSelectable)(_List.List);
-
-function openUrlInNewTab(url) {
- var win = window.open(url, '_blank');
- win.focus();
-}
+var createEagerElementUtil = function createEagerElementUtil(hasKey, isReferentiallyTransparent, type, props, children) {
+ if (!hasKey && isReferentiallyTransparent) {
+ if (children) {
+ return type(_extends({}, props, { children: children }));
+ }
+ return type(props);
+ }
-function AppDrawer(props) {
- var location = props.location;
+ var Component = type;
- var paths = location.pathname.split('/').filter(function (x) {
- return !!x;
- });
- var currentPage = paths[0];
- return _react2.default.createElement(
- _Drawer2.default,
- { open: true },
- _react2.default.createElement(
- 'div',
- { style: _Styles2.default.logo },
- 'Supreme Auto Checkout'
- ),
- _react2.default.createElement(
- SelectableList,
- { value: currentPage },
- _react2.default.createElement(
- _Subheader2.default,
- null,
- 'Shops'
- ),
- _react2.default.createElement(_List.ListItem, {
- value: 'supreme',
- primaryText: 'Supreme',
- containerElement: _react2.default.createElement(_reactRouter.Link, { to: '/supreme/' }),
- leftIcon: _react2.default.createElement(_shop2.default, null)
- }),
- _react2.default.createElement(
- _Subheader2.default,
- null,
- 'Other'
- ),
- _react2.default.createElement(_List.ListItem, {
- value: 'about',
- primaryText: 'Github',
- onTouchTap: function onTouchTap() {
- return openUrlInNewTab('https://github.com/val92130/Supreme-Auto-Checkout');
- },
- leftIcon: _react2.default.createElement(_code2.default, null)
- })
- )
- );
-}
+ if (children) {
+ return _react2.default.createElement(
+ Component,
+ props,
+ children
+ );
+ }
-AppDrawer.propTypes = {
- location: _react.PropTypes.shape({
- pathname: _react.PropTypes.string.isRequired
- })
+ return _react2.default.createElement(Component, props);
};
+exports.default = createEagerElementUtil;
+
/***/ }),
/* 728 */
/***/ (function(module, exports, __webpack_require__) {
@@ -54988,32 +58219,36 @@ AppDrawer.propTypes = {
"use strict";
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = exports.makeSelectable = exports.ListItem = exports.List = undefined;
+exports.__esModule = true;
-var _List2 = __webpack_require__(195);
+var _isClassComponent = __webpack_require__(729);
-var _List3 = _interopRequireDefault(_List2);
+var _isClassComponent2 = _interopRequireDefault(_isClassComponent);
-var _ListItem2 = __webpack_require__(313);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _ListItem3 = _interopRequireDefault(_ListItem2);
+var isReferentiallyTransparentFunctionComponent = function isReferentiallyTransparentFunctionComponent(Component) {
+ return Boolean(typeof Component === 'function' && !(0, _isClassComponent2.default)(Component) && !Component.defaultProps && !Component.contextTypes && ('production' === 'production' || !Component.propTypes));
+};
-var _makeSelectable2 = __webpack_require__(749);
+exports.default = isReferentiallyTransparentFunctionComponent;
-var _makeSelectable3 = _interopRequireDefault(_makeSelectable2);
+/***/ }),
+/* 729 */
+/***/ (function(module, exports, __webpack_require__) {
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+"use strict";
-exports.List = _List3.default;
-exports.ListItem = _ListItem3.default;
-exports.makeSelectable = _makeSelectable3.default;
-exports.default = _List3.default;
+
+exports.__esModule = true;
+var isClassComponent = function isClassComponent(Component) {
+ return Boolean(Component && Component.prototype && typeof Component.prototype.isReactComponent === 'object');
+};
+
+exports.default = isClassComponent;
/***/ }),
-/* 729 */
+/* 730 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -55031,429 +58266,249 @@ var _objectWithoutProperties2 = __webpack_require__(8);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-var _simpleAssign = __webpack_require__(6);
-
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-
-var _react = __webpack_require__(0);
+var _getPrototypeOf = __webpack_require__(3);
-var _react2 = _interopRequireDefault(_react);
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _classCallCheck2 = __webpack_require__(1);
-var Subheader = function Subheader(props, context) {
- var children = props.children,
- inset = props.inset,
- style = props.style,
- other = (0, _objectWithoutProperties3.default)(props, ['children', 'inset', 'style']);
- var _context$muiTheme = context.muiTheme,
- prepareStyles = _context$muiTheme.prepareStyles,
- subheader = _context$muiTheme.subheader;
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+var _createClass2 = __webpack_require__(2);
- var styles = {
- root: {
- boxSizing: 'border-box',
- color: subheader.color,
- fontSize: 14,
- fontWeight: subheader.fontWeight,
- lineHeight: '48px',
- paddingLeft: inset ? 72 : 16,
- width: '100%'
- }
- };
+var _createClass3 = _interopRequireDefault(_createClass2);
- return _react2.default.createElement(
- 'div',
- (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }),
- children
- );
-};
+var _possibleConstructorReturn2 = __webpack_require__(4);
-Subheader.muiName = 'Subheader';
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- false ? Subheader.propTypes = {
- /**
- * Node that will be placed inside the `Subheader`.
- */
- children: _react.PropTypes.node,
- /**
- * If true, the `Subheader` will be indented.
- */
- inset: _react.PropTypes.bool,
- /**
- * Override the inline-styles of the root element.
- */
- style: _react.PropTypes.object
-} : void 0;
+var _inherits2 = __webpack_require__(5);
-Subheader.defaultProps = {
- inset: false
-};
+var _inherits3 = _interopRequireDefault(_inherits2);
-Subheader.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
+var _simpleAssign = __webpack_require__(6);
-exports.default = Subheader;
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-/***/ }),
-/* 730 */
-/***/ (function(module, exports, __webpack_require__) {
+var _react = __webpack_require__(0);
-"use strict";
-/**
- * Copyright 2015-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- */
+var _react2 = _interopRequireDefault(_react);
+var _transitions = __webpack_require__(10);
+var _transitions2 = _interopRequireDefault(_transitions);
-var React = __webpack_require__(0);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var REACT_ELEMENT_TYPE =
- (typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element')) ||
- 0xeac7;
+var SvgIcon = function (_Component) {
+ (0, _inherits3.default)(SvgIcon, _Component);
-var emptyFunction = __webpack_require__(24);
-var invariant = __webpack_require__(9);
-var warning = __webpack_require__(12);
+ function SvgIcon() {
+ var _ref;
-var SEPARATOR = '.';
-var SUBSEPARATOR = ':';
+ var _temp, _this, _ret;
-var didWarnAboutMaps = false;
+ (0, _classCallCheck3.default)(this, SvgIcon);
-var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
-var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
-function getIteratorFn(maybeIterable) {
- var iteratorFn =
- maybeIterable &&
- ((ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL]) ||
- maybeIterable[FAUX_ITERATOR_SYMBOL]);
- if (typeof iteratorFn === 'function') {
- return iteratorFn;
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = SvgIcon.__proto__ || (0, _getPrototypeOf2.default)(SvgIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ hovered: false
+ }, _this.handleMouseLeave = function (event) {
+ _this.setState({ hovered: false });
+ _this.props.onMouseLeave(event);
+ }, _this.handleMouseEnter = function (event) {
+ _this.setState({ hovered: true });
+ _this.props.onMouseEnter(event);
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
-}
-function escape(key) {
- var escapeRegex = /[=:]/g;
- var escaperLookup = {
- '=': '=0',
- ':': '=2'
- };
- var escapedString = ('' + key).replace(escapeRegex, function(match) {
- return escaperLookup[match];
- });
+ (0, _createClass3.default)(SvgIcon, [{
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ children = _props.children,
+ color = _props.color,
+ hoverColor = _props.hoverColor,
+ onMouseEnter = _props.onMouseEnter,
+ onMouseLeave = _props.onMouseLeave,
+ style = _props.style,
+ viewBox = _props.viewBox,
+ other = (0, _objectWithoutProperties3.default)(_props, ['children', 'color', 'hoverColor', 'onMouseEnter', 'onMouseLeave', 'style', 'viewBox']);
+ var _context$muiTheme = this.context.muiTheme,
+ svgIcon = _context$muiTheme.svgIcon,
+ prepareStyles = _context$muiTheme.prepareStyles;
- return '$' + escapedString;
-}
-function getComponentKey(component, index) {
- // Do some typechecking here since we call this blindly. We want to ensure
- // that we don't block potential future ES APIs.
- if (component && typeof component === 'object' && component.key != null) {
- // Explicit key
- return escape(component.key);
- }
- // Implicit key determined by the index in the set
- return index.toString(36);
-}
+ var offColor = color ? color : 'currentColor';
+ var onColor = hoverColor ? hoverColor : offColor;
-function traverseAllChildrenImpl(
- children,
- nameSoFar,
- callback,
- traverseContext
-) {
- var type = typeof children;
+ var mergedStyles = (0, _simpleAssign2.default)({
+ display: 'inline-block',
+ color: svgIcon.color,
+ fill: this.state.hovered ? onColor : offColor,
+ height: 24,
+ width: 24,
+ userSelect: 'none',
+ transition: _transitions2.default.easeOut()
+ }, style);
- if (type === 'undefined' || type === 'boolean') {
- // All of the above are perceived as null.
- children = null;
- }
+ return _react2.default.createElement(
+ 'svg',
+ (0, _extends3.default)({}, other, {
+ onMouseEnter: this.handleMouseEnter,
+ onMouseLeave: this.handleMouseLeave,
+ style: prepareStyles(mergedStyles),
+ viewBox: viewBox
+ }),
+ children
+ );
+ }
+ }]);
+ return SvgIcon;
+}(_react.Component);
- if (
- children === null ||
- type === 'string' ||
- type === 'number' ||
- // The following is inlined from ReactElement. This means we can optimize
- // some checks. React Fiber also inlines this logic for similar purposes.
- (type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE)
- ) {
- callback(
- traverseContext,
- children,
- // If it's the only child, treat the name as if it was wrapped in an array
- // so that it's consistent if the number of children grows.
- nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar
- );
- return 1;
- }
+SvgIcon.muiName = 'SvgIcon';
+SvgIcon.defaultProps = {
+ onMouseEnter: function onMouseEnter() {},
+ onMouseLeave: function onMouseLeave() {},
+ viewBox: '0 0 24 24'
+};
+SvgIcon.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? SvgIcon.propTypes = {
+ /**
+ * Elements passed into the SVG Icon.
+ */
+ children: _react.PropTypes.node,
+ /**
+ * This is the fill color of the svg icon.
+ * If not specified, this component will default
+ * to muiTheme.palette.textColor.
+ */
+ color: _react.PropTypes.string,
+ /**
+ * This is the icon color when the mouse hovers over the icon.
+ */
+ hoverColor: _react.PropTypes.string,
+ /** @ignore */
+ onMouseEnter: _react.PropTypes.func,
+ /** @ignore */
+ onMouseLeave: _react.PropTypes.func,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object,
+ /**
+ * Allows you to redefine what the coordinates
+ * without units mean inside an svg element. For example,
+ * if the SVG element is 500 (width) by 200 (height), and you
+ * pass viewBox="0 0 50 20", this means that the coordinates inside
+ * the svg will go from the top left corner (0,0) to bottom right (50,20)
+ * and each unit will be worth 10px.
+ */
+ viewBox: _react.PropTypes.string
+} : void 0;
+exports.default = SvgIcon;
- var child;
- var nextName;
- var subtreeCount = 0; // Count of children found in the current subtree.
- var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
+/***/ }),
+/* 731 */
+/***/ (function(module, exports, __webpack_require__) {
- if (Array.isArray(children)) {
- for (var i = 0; i < children.length; i++) {
- child = children[i];
- nextName = nextNamePrefix + getComponentKey(child, i);
- subtreeCount += traverseAllChildrenImpl(
- child,
- nextName,
- callback,
- traverseContext
- );
- }
- } else {
- var iteratorFn = getIteratorFn(children);
- if (iteratorFn) {
- if (false) {
- // Warn about using Maps as children
- if (iteratorFn === children.entries) {
- warning(
- didWarnAboutMaps,
- 'Using Maps as children is unsupported and will likely yield ' +
- 'unexpected results. Convert it to a sequence/iterable of keyed ' +
- 'ReactElements instead.'
- );
- didWarnAboutMaps = true;
- }
- }
+"use strict";
- var iterator = iteratorFn.call(children);
- var step;
- var ii = 0;
- while (!(step = iterator.next()).done) {
- child = step.value;
- nextName = nextNamePrefix + getComponentKey(child, ii++);
- subtreeCount += traverseAllChildrenImpl(
- child,
- nextName,
- callback,
- traverseContext
- );
- }
- } else if (type === 'object') {
- var addendum = '';
- if (false) {
- addendum =
- ' If you meant to render a collection of children, use an array ' +
- 'instead or wrap the object using createFragment(object) from the ' +
- 'React add-ons.';
- }
- var childrenString = '' + children;
- invariant(
- false,
- 'Objects are not valid as a React child (found: %s).%s',
- childrenString === '[object Object]'
- ? 'object with keys {' + Object.keys(children).join(', ') + '}'
- : childrenString,
- addendum
- );
- }
- }
- return subtreeCount;
-}
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-function traverseAllChildren(children, callback, traverseContext) {
- if (children == null) {
- return 0;
- }
+var _react = __webpack_require__(0);
- return traverseAllChildrenImpl(children, '', callback, traverseContext);
-}
+var _react2 = _interopRequireDefault(_react);
-var userProvidedKeyEscapeRegex = /\/+/g;
-function escapeUserProvidedKey(text) {
- return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
-}
+var _pure = __webpack_require__(20);
-function cloneAndReplaceKey(oldElement, newKey) {
- return React.cloneElement(
- oldElement,
- {key: newKey},
- oldElement.props !== undefined ? oldElement.props.children : undefined
- );
-}
+var _pure2 = _interopRequireDefault(_pure);
-var DEFAULT_POOL_SIZE = 10;
-var DEFAULT_POOLER = oneArgumentPooler;
+var _SvgIcon = __webpack_require__(21);
-var oneArgumentPooler = function(copyFieldsFrom) {
- var Klass = this;
- if (Klass.instancePool.length) {
- var instance = Klass.instancePool.pop();
- Klass.call(instance, copyFieldsFrom);
- return instance;
- } else {
- return new Klass(copyFieldsFrom);
- }
-};
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
-var addPoolingTo = function addPoolingTo(CopyConstructor, pooler) {
- // Casting as any so that flow ignores the actual implementation and trusts
- // it to match the type we declared
- var NewKlass = CopyConstructor;
- NewKlass.instancePool = [];
- NewKlass.getPooled = pooler || DEFAULT_POOLER;
- if (!NewKlass.poolSize) {
- NewKlass.poolSize = DEFAULT_POOL_SIZE;
- }
- NewKlass.release = standardReleaser;
- return NewKlass;
-};
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var standardReleaser = function standardReleaser(instance) {
- var Klass = this;
- invariant(
- instance instanceof Klass,
- 'Trying to release an instance into a pool of a different type.'
+var NavigationExpandMore = function NavigationExpandMore(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z' })
);
- instance.destructor();
- if (Klass.instancePool.length < Klass.poolSize) {
- Klass.instancePool.push(instance);
- }
};
+NavigationExpandMore = (0, _pure2.default)(NavigationExpandMore);
+NavigationExpandMore.displayName = 'NavigationExpandMore';
+NavigationExpandMore.muiName = 'SvgIcon';
-var fourArgumentPooler = function fourArgumentPooler(a1, a2, a3, a4) {
- var Klass = this;
- if (Klass.instancePool.length) {
- var instance = Klass.instancePool.pop();
- Klass.call(instance, a1, a2, a3, a4);
- return instance;
- } else {
- return new Klass(a1, a2, a3, a4);
- }
-};
+exports.default = NavigationExpandMore;
-function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
- this.result = mapResult;
- this.keyPrefix = keyPrefix;
- this.func = mapFunction;
- this.context = mapContext;
- this.count = 0;
-}
-MapBookKeeping.prototype.destructor = function() {
- this.result = null;
- this.keyPrefix = null;
- this.func = null;
- this.context = null;
- this.count = 0;
-};
-addPoolingTo(MapBookKeeping, fourArgumentPooler);
+/***/ }),
+/* 732 */
+/***/ (function(module, exports, __webpack_require__) {
-function mapSingleChildIntoContext(bookKeeping, child, childKey) {
- var result = bookKeeping.result;
- var keyPrefix = bookKeeping.keyPrefix;
- var func = bookKeeping.func;
- var context = bookKeeping.context;
+"use strict";
- var mappedChild = func.call(context, child, bookKeeping.count++);
- if (Array.isArray(mappedChild)) {
- mapIntoWithKeyPrefixInternal(
- mappedChild,
- result,
- childKey,
- emptyFunction.thatReturnsArgument
- );
- } else if (mappedChild != null) {
- if (React.isValidElement(mappedChild)) {
- mappedChild = cloneAndReplaceKey(
- mappedChild,
- // Keep both the (mapped) and old keys if they differ, just as
- // traverseAllChildren used to do for objects as children
- keyPrefix +
- (mappedChild.key && (!child || child.key !== mappedChild.key)
- ? escapeUserProvidedKey(mappedChild.key) + '/'
- : '') +
- childKey
- );
- }
- result.push(mappedChild);
- }
-}
-function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
- var escapedPrefix = '';
- if (prefix != null) {
- escapedPrefix = escapeUserProvidedKey(prefix) + '/';
- }
- var traverseContext = MapBookKeeping.getPooled(
- array,
- escapedPrefix,
- func,
- context
- );
- traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
- MapBookKeeping.release(traverseContext);
-}
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _react = __webpack_require__(0);
-var numericPropertyRegex = /^\d+$/;
+var _react2 = _interopRequireDefault(_react);
-var warnedAboutNumeric = false;
+var _List = __webpack_require__(202);
-function createReactFragment(object) {
- if (typeof object !== 'object' || !object || Array.isArray(object)) {
- warning(
- false,
- 'React.addons.createFragment only accepts a single object. Got: %s',
- object
- );
- return object;
- }
- if (React.isValidElement(object)) {
- warning(
- false,
- 'React.addons.createFragment does not accept a ReactElement ' +
- 'without a wrapper object.'
- );
- return object;
- }
+var _List2 = _interopRequireDefault(_List);
- invariant(
- object.nodeType !== 1,
- 'React.addons.createFragment(...): Encountered an invalid child; DOM ' +
- 'elements are not valid children of React components.'
- );
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- var result = [];
+var NestedList = function NestedList(props) {
+ var children = props.children,
+ open = props.open,
+ nestedLevel = props.nestedLevel,
+ style = props.style;
- for (var key in object) {
- if (false) {
- if (!warnedAboutNumeric && numericPropertyRegex.test(key)) {
- warning(
- false,
- 'React.addons.createFragment(...): Child objects should have ' +
- 'non-numeric keys so ordering is preserved.'
- );
- warnedAboutNumeric = true;
- }
- }
- mapIntoWithKeyPrefixInternal(
- object[key],
- result,
- key,
- emptyFunction.thatReturnsArgument
- );
+
+ if (!open) {
+ return null;
}
- return result;
-}
+ return _react2.default.createElement(
+ _List2.default,
+ { style: style },
+ _react.Children.map(children, function (child) {
+ return (0, _react.isValidElement)(child) ? (0, _react.cloneElement)(child, {
+ nestedLevel: nestedLevel + 1
+ }) : child;
+ })
+ );
+};
-module.exports = createReactFragment;
+ false ? NestedList.propTypes = {
+ children: _react.PropTypes.node,
+ nestedLevel: _react.PropTypes.number.isRequired,
+ open: _react.PropTypes.bool.isRequired,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
+} : void 0;
+exports.default = NestedList;
/***/ }),
-/* 731 */
+/* 733 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -55462,6 +58517,7 @@ module.exports = createReactFragment;
Object.defineProperty(exports, "__esModule", {
value: true
});
+exports.makeSelectable = undefined;
var _extends2 = __webpack_require__(7);
@@ -55499,490 +58555,655 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactAddonsTransitionGroup = __webpack_require__(128);
+var _colorManipulator = __webpack_require__(50);
-var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _ScaleInChild = __webpack_require__(735);
+var makeSelectable = exports.makeSelectable = function makeSelectable(MyComponent) {
+ var _class, _temp2;
-var _ScaleInChild2 = _interopRequireDefault(_ScaleInChild);
+ return _temp2 = _class = function (_Component) {
+ (0, _inherits3.default)(_class, _Component);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ function _class() {
+ var _ref;
-var ScaleIn = function (_Component) {
- (0, _inherits3.default)(ScaleIn, _Component);
+ var _temp, _this, _ret;
- function ScaleIn() {
- (0, _classCallCheck3.default)(this, ScaleIn);
- return (0, _possibleConstructorReturn3.default)(this, (ScaleIn.__proto__ || (0, _getPrototypeOf2.default)(ScaleIn)).apply(this, arguments));
- }
+ (0, _classCallCheck3.default)(this, _class);
- (0, _createClass3.default)(ScaleIn, [{
- key: 'render',
- value: function render() {
- var _props = this.props,
- children = _props.children,
- childStyle = _props.childStyle,
- enterDelay = _props.enterDelay,
- maxScale = _props.maxScale,
- minScale = _props.minScale,
- style = _props.style,
- other = (0, _objectWithoutProperties3.default)(_props, ['children', 'childStyle', 'enterDelay', 'maxScale', 'minScale', 'style']);
- var prepareStyles = this.context.muiTheme.prepareStyles;
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = _class.__proto__ || (0, _getPrototypeOf2.default)(_class)).call.apply(_ref, [this].concat(args))), _this), _this.hasSelectedDescendant = function (previousValue, child) {
+ if (_react2.default.isValidElement(child) && child.props.nestedItems && child.props.nestedItems.length > 0) {
+ return child.props.nestedItems.reduce(_this.hasSelectedDescendant, previousValue);
+ }
+ return previousValue || _this.isChildSelected(child, _this.props);
+ }, _this.handleItemTouchTap = function (event, item) {
+ var itemValue = item.props.value;
+ if (itemValue !== _this.props.value) {
+ if (_this.props.onChange) {
+ _this.props.onChange(event, itemValue);
+ }
+ }
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
- var mergedRootStyles = (0, _simpleAssign2.default)({}, {
- position: 'relative',
- overflow: 'hidden',
- height: '100%'
- }, style);
+ (0, _createClass3.default)(_class, [{
+ key: 'extendChild',
+ value: function extendChild(child, styles, selectedItemStyle) {
+ var _this2 = this;
+
+ if (child && child.type && child.type.muiName === 'ListItem') {
+ var selected = this.isChildSelected(child, this.props);
+ var selectedChildrenStyles = void 0;
+ if (selected) {
+ selectedChildrenStyles = (0, _simpleAssign2.default)({}, styles, selectedItemStyle);
+ }
+
+ var mergedChildrenStyles = (0, _simpleAssign2.default)({}, child.props.style, selectedChildrenStyles);
+
+ this.keyIndex += 1;
+
+ return _react2.default.cloneElement(child, {
+ onTouchTap: function onTouchTap(event) {
+ _this2.handleItemTouchTap(event, child);
+ if (child.props.onTouchTap) {
+ child.props.onTouchTap(event);
+ }
+ },
+ key: this.keyIndex,
+ style: mergedChildrenStyles,
+ nestedItems: child.props.nestedItems.map(function (child) {
+ return _this2.extendChild(child, styles, selectedItemStyle);
+ }),
+ initiallyOpen: this.isInitiallyOpen(child)
+ });
+ } else {
+ return child;
+ }
+ }
+ }, {
+ key: 'isInitiallyOpen',
+ value: function isInitiallyOpen(child) {
+ if (child.props.initiallyOpen) {
+ return child.props.initiallyOpen;
+ }
+ return this.hasSelectedDescendant(false, child);
+ }
+ }, {
+ key: 'isChildSelected',
+ value: function isChildSelected(child, props) {
+ return props.value === child.props.value;
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _this3 = this;
+
+ var _props = this.props,
+ children = _props.children,
+ selectedItemStyle = _props.selectedItemStyle,
+ other = (0, _objectWithoutProperties3.default)(_props, ['children', 'selectedItemStyle']);
+
+
+ this.keyIndex = 0;
+ var styles = {};
+
+ if (!selectedItemStyle) {
+ var textColor = this.context.muiTheme.baseTheme.palette.textColor;
+ styles.backgroundColor = (0, _colorManipulator.fade)(textColor, 0.2);
+ }
- var newChildren = _react2.default.Children.map(children, function (child) {
return _react2.default.createElement(
- _ScaleInChild2.default,
- {
- key: child.key,
- enterDelay: enterDelay,
- maxScale: maxScale,
- minScale: minScale,
- style: childStyle
- },
- child
+ MyComponent,
+ (0, _extends3.default)({}, other, this.state),
+ _react.Children.map(children, function (child) {
+ return _this3.extendChild(child, styles, selectedItemStyle);
+ })
);
- });
+ }
+ }]);
+ return _class;
+ }(_react.Component), _class.propTypes = {
+ children: _react.PropTypes.node,
+ onChange: _react.PropTypes.func,
+ selectedItemStyle: _react.PropTypes.object,
+ value: _react.PropTypes.any
+ }, _class.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+ }, _temp2;
+};
- return _react2.default.createElement(
- _reactAddonsTransitionGroup2.default,
- (0, _extends3.default)({}, other, {
- style: prepareStyles(mergedRootStyles),
- component: 'div'
- }),
- newChildren
- );
- }
- }]);
- return ScaleIn;
-}(_react.Component);
+exports.default = makeSelectable;
-ScaleIn.defaultProps = {
- enterDelay: 0
-};
-ScaleIn.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? ScaleIn.propTypes = {
- childStyle: _react.PropTypes.object,
- children: _react.PropTypes.node,
- enterDelay: _react.PropTypes.number,
- maxScale: _react.PropTypes.number,
- minScale: _react.PropTypes.number,
- /**
- * Override the inline-styles of the root element.
- */
- style: _react.PropTypes.object
-} : void 0;
-exports.default = ScaleIn;
+/***/ }),
+/* 734 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = undefined;
+
+var _Drawer = __webpack_require__(735);
+
+var _Drawer2 = _interopRequireDefault(_Drawer);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _Drawer2.default;
/***/ }),
-/* 732 */
+/* 735 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
-var _chainFunction = __webpack_require__(733);
+var _simpleAssign = __webpack_require__(6);
-var _chainFunction2 = _interopRequireDefault(_chainFunction);
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _propTypes = __webpack_require__(14);
+var _reactDom = __webpack_require__(16);
-var _propTypes2 = _interopRequireDefault(_propTypes);
+var _reactDom2 = _interopRequireDefault(_reactDom);
-var _warning = __webpack_require__(17);
+var _reactEventListener = __webpack_require__(40);
-var _warning2 = _interopRequireDefault(_warning);
+var _reactEventListener2 = _interopRequireDefault(_reactEventListener);
-var _ChildMapping = __webpack_require__(734);
+var _keycode = __webpack_require__(26);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _keycode2 = _interopRequireDefault(_keycode);
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+var _autoPrefix = __webpack_require__(96);
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+var _autoPrefix2 = _interopRequireDefault(_autoPrefix);
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+var _transitions = __webpack_require__(10);
-var propTypes = {
- component: _propTypes2.default.any,
- childFactory: _propTypes2.default.func,
- children: _propTypes2.default.node
-};
+var _transitions2 = _interopRequireDefault(_transitions);
-var defaultProps = {
- component: 'span',
- childFactory: function childFactory(child) {
- return child;
- }
-};
+var _Overlay = __webpack_require__(324);
-var TransitionGroup = function (_React$Component) {
- _inherits(TransitionGroup, _React$Component);
+var _Overlay2 = _interopRequireDefault(_Overlay);
- function TransitionGroup(props, context) {
- _classCallCheck(this, TransitionGroup);
+var _Paper = __webpack_require__(32);
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));
+var _Paper2 = _interopRequireDefault(_Paper);
- _this.performAppear = function (key, component) {
- _this.currentlyTransitioningKeys[key] = true;
+var _propTypes = __webpack_require__(39);
- if (component.componentWillAppear) {
- component.componentWillAppear(_this._handleDoneAppearing.bind(_this, key, component));
- } else {
- _this._handleDoneAppearing(key, component);
- }
- };
+var _propTypes2 = _interopRequireDefault(_propTypes);
- _this._handleDoneAppearing = function (key, component) {
- if (component.componentDidAppear) {
- component.componentDidAppear();
- }
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- delete _this.currentlyTransitioningKeys[key];
+var openNavEventHandler = null;
- var currentChildMapping = (0, _ChildMapping.getChildMapping)(_this.props.children);
+var Drawer = function (_Component) {
+ (0, _inherits3.default)(Drawer, _Component);
- if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {
- // This was removed before it had fully appeared. Remove it.
- _this.performLeave(key, component);
+ function Drawer() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, Drawer);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Drawer.__proto__ || (0, _getPrototypeOf2.default)(Drawer)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapOverlay = function (event) {
+ event.preventDefault();
+ _this.close('clickaway');
+ }, _this.handleKeyUp = function (event) {
+ if (_this.state.open && !_this.props.docked && (0, _keycode2.default)(event) === 'esc') {
+ _this.close('escape');
}
- };
+ }, _this.onBodyTouchStart = function (event) {
+ var swipeAreaWidth = _this.props.swipeAreaWidth;
- _this.performEnter = function (key, component) {
- _this.currentlyTransitioningKeys[key] = true;
+ var touchStartX = event.touches[0].pageX;
+ var touchStartY = event.touches[0].pageY;
- if (component.componentWillEnter) {
- component.componentWillEnter(_this._handleDoneEntering.bind(_this, key, component));
- } else {
- _this._handleDoneEntering(key, component);
+ // Open only if swiping from far left (or right) while closed
+ if (swipeAreaWidth !== null && !_this.state.open) {
+ if (_this.props.openSecondary) {
+ // If openSecondary is true calculate from the far right
+ if (touchStartX < document.body.offsetWidth - swipeAreaWidth) return;
+ } else {
+ // If openSecondary is false calculate from the far left
+ if (touchStartX > swipeAreaWidth) return;
+ }
}
- };
- _this._handleDoneEntering = function (key, component) {
- if (component.componentDidEnter) {
- component.componentDidEnter();
+ if (!_this.state.open && (openNavEventHandler !== _this.onBodyTouchStart || _this.props.disableSwipeToOpen)) {
+ return;
}
- delete _this.currentlyTransitioningKeys[key];
+ _this.maybeSwiping = true;
+ _this.touchStartX = touchStartX;
+ _this.touchStartY = touchStartY;
- var currentChildMapping = (0, _ChildMapping.getChildMapping)(_this.props.children);
+ document.body.addEventListener('touchmove', _this.onBodyTouchMove);
+ document.body.addEventListener('touchend', _this.onBodyTouchEnd);
+ document.body.addEventListener('touchcancel', _this.onBodyTouchEnd);
+ }, _this.onBodyTouchMove = function (event) {
+ var currentX = event.touches[0].pageX;
+ var currentY = event.touches[0].pageY;
- if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {
- // This was removed before it had fully entered. Remove it.
- _this.performLeave(key, component);
+ if (_this.state.swiping) {
+ event.preventDefault();
+ _this.setPosition(_this.getTranslateX(currentX));
+ } else if (_this.maybeSwiping) {
+ var dXAbs = Math.abs(currentX - _this.touchStartX);
+ var dYAbs = Math.abs(currentY - _this.touchStartY);
+ // If the user has moved his thumb ten pixels in either direction,
+ // we can safely make an assumption about whether he was intending
+ // to swipe or scroll.
+ var threshold = 10;
+
+ if (dXAbs > threshold && dYAbs <= threshold) {
+ _this.swipeStartX = currentX;
+ _this.setState({
+ swiping: _this.state.open ? 'closing' : 'opening'
+ });
+ _this.setPosition(_this.getTranslateX(currentX));
+ } else if (dXAbs <= threshold && dYAbs > threshold) {
+ _this.onBodyTouchEnd();
+ }
}
- };
+ }, _this.onBodyTouchEnd = function (event) {
+ if (_this.state.swiping) {
+ var currentX = event.changedTouches[0].pageX;
+ var translateRatio = _this.getTranslateX(currentX) / _this.getMaxTranslateX();
- _this.performLeave = function (key, component) {
- _this.currentlyTransitioningKeys[key] = true;
+ _this.maybeSwiping = false;
+ var swiping = _this.state.swiping;
+ _this.setState({
+ swiping: null
+ });
- if (component.componentWillLeave) {
- component.componentWillLeave(_this._handleDoneLeaving.bind(_this, key, component));
+ // We have to open or close after setting swiping to null,
+ // because only then CSS transition is enabled.
+ if (translateRatio > 0.5) {
+ if (swiping === 'opening') {
+ _this.setPosition(_this.getMaxTranslateX());
+ } else {
+ _this.close('swipe');
+ }
+ } else {
+ if (swiping === 'opening') {
+ _this.open('swipe');
+ } else {
+ _this.setPosition(0);
+ }
+ }
} else {
- // Note that this is somewhat dangerous b/c it calls setState()
- // again, effectively mutating the component before all the work
- // is done.
- _this._handleDoneLeaving(key, component);
- }
- };
-
- _this._handleDoneLeaving = function (key, component) {
- if (component.componentDidLeave) {
- component.componentDidLeave();
+ _this.maybeSwiping = false;
}
- delete _this.currentlyTransitioningKeys[key];
+ document.body.removeEventListener('touchmove', _this.onBodyTouchMove);
+ document.body.removeEventListener('touchend', _this.onBodyTouchEnd);
+ document.body.removeEventListener('touchcancel', _this.onBodyTouchEnd);
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
- var currentChildMapping = (0, _ChildMapping.getChildMapping)(_this.props.children);
+ (0, _createClass3.default)(Drawer, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ this.maybeSwiping = false;
+ this.touchStartX = null;
+ this.touchStartY = null;
+ this.swipeStartX = null;
- if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) {
- // This entered again before it fully left. Add it again.
- _this.keysToEnter.push(key);
- } else {
- _this.setState(function (state) {
- var newChildren = _extends({}, state.children);
- delete newChildren[key];
- return { children: newChildren };
+ this.setState({
+ open: this.props.open !== null ? this.props.open : this.props.docked,
+ swiping: null
+ });
+ }
+ }, {
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ this.enableSwipeHandling();
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ // If controlled then the open prop takes precedence.
+ if (nextProps.open !== null) {
+ this.setState({
+ open: nextProps.open
+ });
+ // Otherwise, if docked is changed, change the open state for when uncontrolled.
+ } else if (this.props.docked !== nextProps.docked) {
+ this.setState({
+ open: nextProps.docked
});
}
- };
-
- _this.childRefs = Object.create(null);
+ }
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate() {
+ this.enableSwipeHandling();
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ this.disableSwipeHandling();
+ }
+ }, {
+ key: 'getStyles',
+ value: function getStyles() {
+ var muiTheme = this.context.muiTheme;
+ var theme = muiTheme.drawer;
- _this.state = {
- children: (0, _ChildMapping.getChildMapping)(props.children)
- };
- return _this;
- }
+ var x = this.getTranslateMultiplier() * (this.state.open ? 0 : this.getMaxTranslateX());
- TransitionGroup.prototype.componentWillMount = function componentWillMount() {
- this.currentlyTransitioningKeys = {};
- this.keysToEnter = [];
- this.keysToLeave = [];
- };
+ var styles = {
+ root: {
+ height: '100%',
+ width: this.props.width || theme.width,
+ position: 'fixed',
+ zIndex: muiTheme.zIndex.drawer,
+ left: 0,
+ top: 0,
+ transform: 'translate(' + x + 'px, 0)',
+ transition: !this.state.swiping && _transitions2.default.easeOut(null, 'transform', null),
+ backgroundColor: theme.color,
+ overflow: 'auto',
+ WebkitOverflowScrolling: 'touch' },
+ overlay: {
+ zIndex: muiTheme.zIndex.drawerOverlay,
+ pointerEvents: this.state.open ? 'auto' : 'none' },
+ rootWhenOpenRight: {
+ left: 'auto',
+ right: 0
+ }
+ };
- TransitionGroup.prototype.componentDidMount = function componentDidMount() {
- var initialChildMapping = this.state.children;
- for (var key in initialChildMapping) {
- if (initialChildMapping[key]) {
- this.performAppear(key, this.childRefs[key]);
- }
+ return styles;
}
- };
-
- TransitionGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- var nextChildMapping = (0, _ChildMapping.getChildMapping)(nextProps.children);
- var prevChildMapping = this.state.children;
-
- this.setState({
- children: (0, _ChildMapping.mergeChildMappings)(prevChildMapping, nextChildMapping)
- });
-
- for (var key in nextChildMapping) {
- var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key);
- if (nextChildMapping[key] && !hasPrev && !this.currentlyTransitioningKeys[key]) {
- this.keysToEnter.push(key);
+ }, {
+ key: 'shouldShow',
+ value: function shouldShow() {
+ return this.state.open || !!this.state.swiping; // component is swiping
+ }
+ }, {
+ key: 'close',
+ value: function close(reason) {
+ if (this.props.open === null) this.setState({ open: false });
+ if (this.props.onRequestChange) this.props.onRequestChange(false, reason);
+ return this;
+ }
+ }, {
+ key: 'open',
+ value: function open(reason) {
+ if (this.props.open === null) this.setState({ open: true });
+ if (this.props.onRequestChange) this.props.onRequestChange(true, reason);
+ return this;
+ }
+ }, {
+ key: 'getMaxTranslateX',
+ value: function getMaxTranslateX() {
+ var width = this.props.width || this.context.muiTheme.drawer.width;
+ return width + 10;
+ }
+ }, {
+ key: 'getTranslateMultiplier',
+ value: function getTranslateMultiplier() {
+ return this.props.openSecondary ? 1 : -1;
+ }
+ }, {
+ key: 'enableSwipeHandling',
+ value: function enableSwipeHandling() {
+ if (!this.props.docked) {
+ document.body.addEventListener('touchstart', this.onBodyTouchStart);
+ if (!openNavEventHandler) {
+ openNavEventHandler = this.onBodyTouchStart;
+ }
+ } else {
+ this.disableSwipeHandling();
}
}
-
- for (var _key in prevChildMapping) {
- var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(_key);
- if (prevChildMapping[_key] && !hasNext && !this.currentlyTransitioningKeys[_key]) {
- this.keysToLeave.push(_key);
+ }, {
+ key: 'disableSwipeHandling',
+ value: function disableSwipeHandling() {
+ document.body.removeEventListener('touchstart', this.onBodyTouchStart);
+ if (openNavEventHandler === this.onBodyTouchStart) {
+ openNavEventHandler = null;
}
}
+ }, {
+ key: 'setPosition',
+ value: function setPosition(translateX) {
+ var drawer = _reactDom2.default.findDOMNode(this.refs.clickAwayableElement);
+ var transformCSS = 'translate(' + this.getTranslateMultiplier() * translateX + 'px, 0)';
+ this.refs.overlay.setOpacity(1 - translateX / this.getMaxTranslateX());
+ _autoPrefix2.default.set(drawer.style, 'transform', transformCSS);
+ }
+ }, {
+ key: 'getTranslateX',
+ value: function getTranslateX(currentX) {
+ return Math.min(Math.max(this.state.swiping === 'closing' ? this.getTranslateMultiplier() * (currentX - this.swipeStartX) : this.getMaxTranslateX() - this.getTranslateMultiplier() * (this.swipeStartX - currentX), 0), this.getMaxTranslateX());
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ children = _props.children,
+ className = _props.className,
+ containerClassName = _props.containerClassName,
+ containerStyle = _props.containerStyle,
+ docked = _props.docked,
+ openSecondary = _props.openSecondary,
+ overlayClassName = _props.overlayClassName,
+ overlayStyle = _props.overlayStyle,
+ style = _props.style,
+ zDepth = _props.zDepth;
- // If we want to someday check for reordering, we could do it here.
- };
-
- TransitionGroup.prototype.componentDidUpdate = function componentDidUpdate() {
- var _this2 = this;
-
- var keysToEnter = this.keysToEnter;
- this.keysToEnter = [];
- keysToEnter.forEach(function (key) {
- return _this2.performEnter(key, _this2.childRefs[key]);
- });
-
- var keysToLeave = this.keysToLeave;
- this.keysToLeave = [];
- keysToLeave.forEach(function (key) {
- return _this2.performLeave(key, _this2.childRefs[key]);
- });
- };
-
- TransitionGroup.prototype.render = function render() {
- var _this3 = this;
-
- // TODO: we could get rid of the need for the wrapper node
- // by cloning a single child
- var childrenToRender = [];
-
- var _loop = function _loop(key) {
- var child = _this3.state.children[key];
- if (child) {
- var isCallbackRef = typeof child.ref !== 'string';
- var factoryChild = _this3.props.childFactory(child);
- var ref = function ref(r) {
- _this3.childRefs[key] = r;
- };
-
- false ? (0, _warning2.default)(isCallbackRef, 'string refs are not supported on children of TransitionGroup and will be ignored. ' + 'Please use a callback ref instead: https://facebook.github.io/react/docs/refs-and-the-dom.html#the-ref-callback-attribute') : void 0;
- // Always chaining the refs leads to problems when the childFactory
- // wraps the child. The child ref callback gets called twice with the
- // wrapper and the child. So we only need to chain the ref if the
- // factoryChild is not different from child.
- if (factoryChild === child && isCallbackRef) {
- ref = (0, _chainFunction2.default)(child.ref, ref);
- }
+ var styles = this.getStyles();
- // You may need to apply reactive updates to a child as it is leaving.
- // The normal React way to do it won't work since the child will have
- // already been removed. In case you need this behavior you can provide
- // a childFactory function to wrap every child, even the ones that are
- // leaving.
- childrenToRender.push(_react2.default.cloneElement(factoryChild, {
- key: key,
- ref: ref
- }));
+ var overlay = void 0;
+ if (!docked) {
+ overlay = _react2.default.createElement(_Overlay2.default, {
+ ref: 'overlay',
+ show: this.shouldShow(),
+ className: overlayClassName,
+ style: (0, _simpleAssign2.default)(styles.overlay, overlayStyle),
+ transitionEnabled: !this.state.swiping,
+ onTouchTap: this.handleTouchTapOverlay
+ });
}
- };
- for (var key in this.state.children) {
- _loop(key);
+ return _react2.default.createElement(
+ 'div',
+ {
+ className: className,
+ style: style
+ },
+ _react2.default.createElement(_reactEventListener2.default, { target: 'window', onKeyUp: this.handleKeyUp }),
+ overlay,
+ _react2.default.createElement(
+ _Paper2.default,
+ {
+ ref: 'clickAwayableElement',
+ zDepth: zDepth,
+ rounded: false,
+ transitionEnabled: !this.state.swiping,
+ className: containerClassName,
+ style: (0, _simpleAssign2.default)(styles.root, openSecondary && styles.rootWhenOpenRight, containerStyle)
+ },
+ children
+ )
+ );
}
+ }]);
+ return Drawer;
+}(_react.Component);
- // Do not forward TransitionGroup props to primitive DOM nodes
- var props = _extends({}, this.props);
- delete props.transitionLeave;
- delete props.transitionName;
- delete props.transitionAppear;
- delete props.transitionEnter;
- delete props.childFactory;
- delete props.transitionLeaveTimeout;
- delete props.transitionEnterTimeout;
- delete props.transitionAppearTimeout;
- delete props.component;
-
- return _react2.default.createElement(this.props.component, props, childrenToRender);
- };
-
- return TransitionGroup;
-}(_react2.default.Component);
-
-TransitionGroup.displayName = 'TransitionGroup';
-
-
-TransitionGroup.propTypes = false ? propTypes : {};
-TransitionGroup.defaultProps = defaultProps;
+Drawer.defaultProps = {
+ disableSwipeToOpen: false,
+ docked: true,
+ open: null,
+ openSecondary: false,
+ swipeAreaWidth: 30,
+ width: null,
+ zDepth: 2
+};
+Drawer.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? Drawer.propTypes = {
+ /**
+ * The contents of the `Drawer`
+ */
+ children: _react.PropTypes.node,
+ /**
+ * The CSS class name of the root element.
+ */
+ className: _react.PropTypes.string,
+ /**
+ * The CSS class name of the container element.
+ */
+ containerClassName: _react.PropTypes.string,
+ /**
+ * Override the inline-styles of the container element.
+ */
+ containerStyle: _react.PropTypes.object,
+ /**
+ * If true, swiping sideways when the `Drawer` is closed will not open it.
+ */
+ disableSwipeToOpen: _react.PropTypes.bool,
+ /**
+ * If true, the `Drawer` will be docked. In this state, the overlay won't show and
+ * clicking on a menu item will not close the `Drawer`.
+ */
+ docked: _react.PropTypes.bool,
+ /**
+ * Callback function fired when the `open` state of the `Drawer` is requested to be changed.
+ *
+ * @param {boolean} open If true, the `Drawer` was requested to be opened.
+ * @param {string} reason The reason for the open or close request. Possible values are
+ * 'swipe' for open requests; 'clickaway' (on overlay clicks),
+ * 'escape' (on escape key press), and 'swipe' for close requests.
+ */
+ onRequestChange: _react.PropTypes.func,
+ /**
+ * If true, the `Drawer` is opened. Providing a value will turn the `Drawer`
+ * into a controlled component.
+ */
+ open: _react.PropTypes.bool,
+ /**
+ * If true, the `Drawer` is positioned to open from the opposite side.
+ */
+ openSecondary: _react.PropTypes.bool,
+ /**
+ * The CSS class name to add to the `Overlay` component that is rendered behind the `Drawer`.
+ */
+ overlayClassName: _react.PropTypes.string,
+ /**
+ * Override the inline-styles of the `Overlay` component that is rendered behind the `Drawer`.
+ */
+ overlayStyle: _react.PropTypes.object,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object,
+ /**
+ * The width of the left most (or right most) area in pixels where the `Drawer` can be
+ * swiped open from. Setting this to `null` spans that area to the entire page
+ * (**CAUTION!** Setting this property to `null` might cause issues with sliders and
+ * swipeable `Tabs`: use at your own risk).
+ */
+ swipeAreaWidth: _react.PropTypes.number,
+ /**
+ * The width of the `Drawer` in pixels. Defaults to using the values from theme.
+ */
+ width: _react.PropTypes.number,
+ /**
+ * The zDepth of the `Drawer`.
+ */
+ zDepth: _propTypes2.default.zDepth
-exports.default = TransitionGroup;
-module.exports = exports['default'];
+} : void 0;
+exports.default = Drawer;
/***/ }),
-/* 733 */
-/***/ (function(module, exports) {
-
-
-module.exports = function chain(){
- var len = arguments.length
- var args = [];
-
- for (var i = 0; i < len; i++)
- args[i] = arguments[i]
-
- args = args.filter(function(fn){ return fn != null })
-
- if (args.length === 0) return undefined
- if (args.length === 1) return args[0]
-
- return args.reduce(function(current, next){
- return function chainedFunction() {
- current.apply(this, arguments);
- next.apply(this, arguments);
- };
- })
-}
+/* 736 */
+/***/ (function(module, exports, __webpack_require__) {
+module.exports = __webpack_require__(737);
/***/ }),
-/* 734 */
+/* 737 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
-exports.__esModule = true;
-exports.getChildMapping = getChildMapping;
-exports.mergeChildMappings = mergeChildMappings;
-
-var _react = __webpack_require__(0);
-
/**
- * Given `this.props.children`, return an object mapping key to child.
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
*
- * @param {*} children `this.props.children`
- * @return {object} Mapping of key to child
- */
-function getChildMapping(children) {
- if (!children) {
- return children;
- }
- var result = {};
- _react.Children.map(children, function (child) {
- return child;
- }).forEach(function (child) {
- result[child.key] = child;
- });
- return result;
-}
-
-/**
- * When you're adding or removing children some may be added or removed in the
- * same render pass. We want to show *both* since we want to simultaneously
- * animate elements in and out. This function takes a previous set of keys
- * and a new set of keys and merges them with its best guess of the correct
- * ordering. In the future we may expose some of the utilities in
- * ReactMultiChild to make this easy, but for now React itself does not
- * directly have this concept of the union of prevChildren and nextChildren
- * so we implement it here.
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
*
- * @param {object} prev prev children as returned from
- * `ReactTransitionChildMapping.getChildMapping()`.
- * @param {object} next next children as returned from
- * `ReactTransitionChildMapping.getChildMapping()`.
- * @return {object} a key set that contains all keys in `prev` and all keys
- * in `next` in a reasonable order.
*/
-function mergeChildMappings(prev, next) {
- prev = prev || {};
- next = next || {};
-
- function getValueForKey(key) {
- if (next.hasOwnProperty(key)) {
- return next[key];
- }
-
- return prev[key];
- }
- // For each key of `next`, the list of keys to insert before that key in
- // the combined list
- var nextKeysPending = {};
- var pendingKeys = [];
- for (var prevKey in prev) {
- if (next.hasOwnProperty(prevKey)) {
- if (pendingKeys.length) {
- nextKeysPending[prevKey] = pendingKeys;
- pendingKeys = [];
- }
- } else {
- pendingKeys.push(prevKey);
- }
- }
-
- var i = void 0;
- var childMapping = {};
- for (var nextKey in next) {
- if (nextKeysPending.hasOwnProperty(nextKey)) {
- for (i = 0; i < nextKeysPending[nextKey].length; i++) {
- var pendingNextKey = nextKeysPending[nextKey][i];
- childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
- }
- }
- childMapping[nextKey] = getValueForKey(nextKey);
- }
- // Finally, add the keys which didn't appear before any key in `next`
- for (i = 0; i < pendingKeys.length; i++) {
- childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
- }
+var shallowEqual = __webpack_require__(90);
- return childMapping;
+/**
+ * Does a shallow comparison for props and state.
+ * See ReactComponentWithPureRenderMixin
+ * See also https://facebook.github.io/react/docs/shallow-compare.html
+ */
+function shallowCompare(instance, nextProps, nextState) {
+ return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);
}
+module.exports = shallowCompare;
+
/***/ }),
-/* 735 */
+/* 738 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -55991,170 +59212,77 @@ function mergeChildMappings(prev, next) {
Object.defineProperty(exports, "__esModule", {
value: true
});
+exports.passiveOption = exports.detachEvent = exports.attachEvent = exports.removeEventListener = exports.addEventListener = exports.canUseDOM = undefined;
-var _extends2 = __webpack_require__(7);
-
-var _extends3 = _interopRequireDefault(_extends2);
-
-var _objectWithoutProperties2 = __webpack_require__(8);
-
-var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-
-var _getPrototypeOf = __webpack_require__(3);
-
-var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+var _defineProperty = __webpack_require__(739);
-var _classCallCheck2 = __webpack_require__(1);
+var _defineProperty2 = _interopRequireDefault(_defineProperty);
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _createClass2 = __webpack_require__(2);
+// Inspired by https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/ExecutionEnvironment.js
+var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
-var _createClass3 = _interopRequireDefault(_createClass2);
+var addEventListener = exports.addEventListener = canUseDOM && 'addEventListener' in window;
+var removeEventListener = exports.removeEventListener = canUseDOM && 'removeEventListener' in window;
-var _possibleConstructorReturn2 = __webpack_require__(4);
+// IE8+ Support
+var attachEvent = exports.attachEvent = canUseDOM && 'attachEvent' in window;
+var detachEvent = exports.detachEvent = canUseDOM && 'detachEvent' in window;
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+// Passive options
+// Inspired by https://github.com/Modernizr/Modernizr/blob/master/feature-detects/dom/passiveeventlisteners.js
+var passiveOption = exports.passiveOption = function () {
+ var cache = null;
-var _inherits2 = __webpack_require__(5);
+ return function () {
+ if (cache !== null) {
+ return cache;
+ }
-var _inherits3 = _interopRequireDefault(_inherits2);
+ var supportsPassiveOption = false;
-var _simpleAssign = __webpack_require__(6);
+ try {
+ window.addEventListener('test', null, (0, _defineProperty2.default)({}, 'passive', {
+ get: function get() {
+ supportsPassiveOption = true;
+ }
+ }));
+ } catch (e) {} // eslint-disable-line no-empty
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+ cache = supportsPassiveOption;
-var _react = __webpack_require__(0);
+ return supportsPassiveOption;
+ }();
+}();
-var _react2 = _interopRequireDefault(_react);
+/***/ }),
+/* 739 */
+/***/ (function(module, exports, __webpack_require__) {
-var _reactDom = __webpack_require__(19);
+"use strict";
-var _reactDom2 = _interopRequireDefault(_reactDom);
-var _autoPrefix = __webpack_require__(94);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-var _autoPrefix2 = _interopRequireDefault(_autoPrefix);
+var _defineProperty = __webpack_require__(196);
-var _transitions = __webpack_require__(10);
+var _defineProperty2 = _interopRequireDefault(_defineProperty);
-var _transitions2 = _interopRequireDefault(_transitions);
+exports.default = defineProperty;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var ScaleInChild = function (_Component) {
- (0, _inherits3.default)(ScaleInChild, _Component);
-
- function ScaleInChild() {
- (0, _classCallCheck3.default)(this, ScaleInChild);
- return (0, _possibleConstructorReturn3.default)(this, (ScaleInChild.__proto__ || (0, _getPrototypeOf2.default)(ScaleInChild)).apply(this, arguments));
- }
-
- (0, _createClass3.default)(ScaleInChild, [{
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- clearTimeout(this.enterTimer);
- clearTimeout(this.leaveTimer);
- }
- }, {
- key: 'componentWillAppear',
- value: function componentWillAppear(callback) {
- this.initializeAnimation(callback);
- }
- }, {
- key: 'componentWillEnter',
- value: function componentWillEnter(callback) {
- this.initializeAnimation(callback);
- }
- }, {
- key: 'componentDidAppear',
- value: function componentDidAppear() {
- this.animate();
- }
- }, {
- key: 'componentDidEnter',
- value: function componentDidEnter() {
- this.animate();
- }
- }, {
- key: 'componentWillLeave',
- value: function componentWillLeave(callback) {
- var style = _reactDom2.default.findDOMNode(this).style;
-
- style.opacity = '0';
- _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.minScale + ')');
-
- this.leaveTimer = setTimeout(callback, 450);
- }
- }, {
- key: 'animate',
- value: function animate() {
- var style = _reactDom2.default.findDOMNode(this).style;
-
- style.opacity = '1';
- _autoPrefix2.default.set(style, 'transform', 'scale(' + this.props.maxScale + ')');
- }
- }, {
- key: 'initializeAnimation',
- value: function initializeAnimation(callback) {
- var style = _reactDom2.default.findDOMNode(this).style;
-
- style.opacity = '0';
- _autoPrefix2.default.set(style, 'transform', 'scale(0)');
-
- this.enterTimer = setTimeout(callback, this.props.enterDelay);
- }
- }, {
- key: 'render',
- value: function render() {
- var _props = this.props,
- children = _props.children,
- enterDelay = _props.enterDelay,
- maxScale = _props.maxScale,
- minScale = _props.minScale,
- style = _props.style,
- other = (0, _objectWithoutProperties3.default)(_props, ['children', 'enterDelay', 'maxScale', 'minScale', 'style']);
- var prepareStyles = this.context.muiTheme.prepareStyles;
-
-
- var mergedRootStyles = (0, _simpleAssign2.default)({}, {
- position: 'absolute',
- height: '100%',
- width: '100%',
- top: 0,
- left: 0,
- transition: _transitions2.default.easeOut(null, ['transform', 'opacity'])
- }, style);
-
- return _react2.default.createElement(
- 'div',
- (0, _extends3.default)({}, other, { style: prepareStyles(mergedRootStyles) }),
- children
- );
- }
- }]);
- return ScaleInChild;
-}(_react.Component);
+// weak
-ScaleInChild.defaultProps = {
- enterDelay: 0,
- maxScale: 1,
- minScale: 0
-};
-ScaleInChild.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? ScaleInChild.propTypes = {
- children: _react.PropTypes.node,
- enterDelay: _react.PropTypes.number,
- maxScale: _react.PropTypes.number,
- minScale: _react.PropTypes.number,
- style: _react.PropTypes.object
-} : void 0;
-exports.default = ScaleInChild;
+function defineProperty(o, p, attr) {
+ return (0, _defineProperty2.default)(o, p, attr);
+}
/***/ }),
-/* 736 */
+/* 740 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -56164,14 +59292,6 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _extends2 = __webpack_require__(7);
-
-var _extends3 = _interopRequireDefault(_extends2);
-
-var _objectWithoutProperties2 = __webpack_require__(8);
-
-var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-
var _getPrototypeOf = __webpack_require__(3);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -56186,149 +59306,109 @@ var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = __webpack_require__(4);
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-
-var _inherits2 = __webpack_require__(5);
-
-var _inherits3 = _interopRequireDefault(_inherits2);
-
-var _simpleAssign = __webpack_require__(6);
-
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-
-var _react = __webpack_require__(0);
-
-var _react2 = _interopRequireDefault(_react);
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-var _reactDom = __webpack_require__(19);
+var _inherits2 = __webpack_require__(5);
-var _reactDom2 = _interopRequireDefault(_reactDom);
+var _inherits3 = _interopRequireDefault(_inherits2);
-var _shallowEqual = __webpack_require__(58);
+var _react = __webpack_require__(0);
-var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _autoPrefix = __webpack_require__(94);
+var originalBodyOverflow = null;
+var lockingCounter = 0;
-var _autoPrefix2 = _interopRequireDefault(_autoPrefix);
+var AutoLockScrolling = function (_Component) {
+ (0, _inherits3.default)(AutoLockScrolling, _Component);
-var _transitions = __webpack_require__(10);
+ function AutoLockScrolling() {
+ var _ref;
-var _transitions2 = _interopRequireDefault(_transitions);
+ var _temp, _this, _ret;
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ (0, _classCallCheck3.default)(this, AutoLockScrolling);
-var CircleRipple = function (_Component) {
- (0, _inherits3.default)(CircleRipple, _Component);
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
- function CircleRipple() {
- (0, _classCallCheck3.default)(this, CircleRipple);
- return (0, _possibleConstructorReturn3.default)(this, (CircleRipple.__proto__ || (0, _getPrototypeOf2.default)(CircleRipple)).apply(this, arguments));
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoLockScrolling.__proto__ || (0, _getPrototypeOf2.default)(AutoLockScrolling)).call.apply(_ref, [this].concat(args))), _this), _this.locked = false, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(CircleRipple, [{
- key: 'shouldComponentUpdate',
- value: function shouldComponentUpdate(nextProps) {
- return !(0, _shallowEqual2.default)(this.props, nextProps);
- }
- }, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- clearTimeout(this.enterTimer);
- clearTimeout(this.leaveTimer);
- }
- }, {
- key: 'componentWillAppear',
- value: function componentWillAppear(callback) {
- this.initializeAnimation(callback);
- }
- }, {
- key: 'componentWillEnter',
- value: function componentWillEnter(callback) {
- this.initializeAnimation(callback);
- }
- }, {
- key: 'componentDidAppear',
- value: function componentDidAppear() {
- this.animate();
+ (0, _createClass3.default)(AutoLockScrolling, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ if (this.props.lock === true) {
+ this.preventScrolling();
+ }
}
}, {
- key: 'componentDidEnter',
- value: function componentDidEnter() {
- this.animate();
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ if (this.props.lock !== nextProps.lock) {
+ if (nextProps.lock) {
+ this.preventScrolling();
+ } else {
+ this.allowScrolling();
+ }
+ }
}
}, {
- key: 'componentWillLeave',
- value: function componentWillLeave(callback) {
- var style = _reactDom2.default.findDOMNode(this).style;
- style.opacity = 0;
- // If the animation is aborted, remove from the DOM immediately
- var removeAfter = this.props.aborted ? 0 : 2000;
- this.enterTimer = setTimeout(callback, removeAfter);
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ this.allowScrolling();
}
+
+ // force to only lock/unlock once
+
}, {
- key: 'animate',
- value: function animate() {
- var style = _reactDom2.default.findDOMNode(this).style;
- var transitionValue = _transitions2.default.easeOut('2s', 'opacity') + ', ' + _transitions2.default.easeOut('1s', 'transform');
- _autoPrefix2.default.set(style, 'transition', transitionValue);
- _autoPrefix2.default.set(style, 'transform', 'scale(1)');
+ key: 'preventScrolling',
+ value: function preventScrolling() {
+ if (this.locked === true) {
+ return;
+ }
+
+ lockingCounter = lockingCounter + 1;
+ this.locked = true;
+
+ // only lock the first time the component is mounted.
+ if (lockingCounter === 1) {
+ var body = document.getElementsByTagName('body')[0];
+ originalBodyOverflow = body.style.overflow;
+ body.style.overflow = 'hidden';
+ }
}
}, {
- key: 'initializeAnimation',
- value: function initializeAnimation(callback) {
- var style = _reactDom2.default.findDOMNode(this).style;
- style.opacity = this.props.opacity;
- _autoPrefix2.default.set(style, 'transform', 'scale(0)');
- this.leaveTimer = setTimeout(callback, 0);
+ key: 'allowScrolling',
+ value: function allowScrolling() {
+ if (this.locked === true) {
+ lockingCounter = lockingCounter - 1;
+ this.locked = false;
+ }
+
+ if (lockingCounter === 0 && originalBodyOverflow !== null) {
+ var body = document.getElementsByTagName('body')[0];
+ body.style.overflow = originalBodyOverflow || '';
+ originalBodyOverflow = null;
+ }
}
}, {
key: 'render',
value: function render() {
- var _props = this.props,
- aborted = _props.aborted,
- color = _props.color,
- opacity = _props.opacity,
- style = _props.style,
- touchGenerated = _props.touchGenerated,
- other = (0, _objectWithoutProperties3.default)(_props, ['aborted', 'color', 'opacity', 'style', 'touchGenerated']);
- var prepareStyles = this.context.muiTheme.prepareStyles;
-
-
- var mergedStyles = (0, _simpleAssign2.default)({
- position: 'absolute',
- top: 0,
- left: 0,
- height: '100%',
- width: '100%',
- borderRadius: '50%',
- backgroundColor: color
- }, style);
-
- return _react2.default.createElement('div', (0, _extends3.default)({}, other, { style: prepareStyles(mergedStyles) }));
+ return null;
}
}]);
- return CircleRipple;
+ return AutoLockScrolling;
}(_react.Component);
-CircleRipple.defaultProps = {
- opacity: 0.1,
- aborted: false
-};
-CircleRipple.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? CircleRipple.propTypes = {
- aborted: _react.PropTypes.bool,
- color: _react.PropTypes.string,
- opacity: _react.PropTypes.number,
- style: _react.PropTypes.object,
- touchGenerated: _react.PropTypes.bool
+ false ? AutoLockScrolling.propTypes = {
+ lock: _react.PropTypes.bool.isRequired
} : void 0;
-exports.default = CircleRipple;
+exports.default = AutoLockScrolling;
/***/ }),
-/* 737 */
+/* 741 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -56374,341 +59454,151 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _transitions = __webpack_require__(10);
-
-var _transitions2 = _interopRequireDefault(_transitions);
-
-var _propTypes = __webpack_require__(41);
+var _propTypes = __webpack_require__(39);
var _propTypes2 = _interopRequireDefault(_propTypes);
-var _EnhancedButton = __webpack_require__(59);
-
-var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton);
-
-var _FontIcon = __webpack_require__(317);
-
-var _FontIcon2 = _interopRequireDefault(_FontIcon);
-
-var _Tooltip = __webpack_require__(739);
-
-var _Tooltip2 = _interopRequireDefault(_Tooltip);
+var _transitions = __webpack_require__(10);
-var _childUtils = __webpack_require__(127);
+var _transitions2 = _interopRequireDefault(_transitions);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function getStyles(props, context) {
- var baseTheme = context.muiTheme.baseTheme;
+ var rounded = props.rounded,
+ circle = props.circle,
+ transitionEnabled = props.transitionEnabled,
+ zDepth = props.zDepth;
+ var _context$muiTheme = context.muiTheme,
+ baseTheme = _context$muiTheme.baseTheme,
+ paper = _context$muiTheme.paper;
return {
root: {
+ color: paper.color,
+ backgroundColor: paper.backgroundColor,
+ transition: transitionEnabled && _transitions2.default.easeOut(),
boxSizing: 'border-box',
- overflow: 'visible',
- transition: _transitions2.default.easeOut(),
- padding: baseTheme.spacing.iconSize / 2,
- width: baseTheme.spacing.iconSize * 2,
- height: baseTheme.spacing.iconSize * 2,
- fontSize: 0
- },
- tooltip: {
- boxSizing: 'border-box'
- },
- disabled: {
- color: baseTheme.palette.disabledColor,
- fill: baseTheme.palette.disabledColor,
- cursor: 'not-allowed'
+ fontFamily: baseTheme.fontFamily,
+ WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated)
+ boxShadow: paper.zDepthShadows[zDepth - 1], // No shadow for 0 depth papers
+ borderRadius: circle ? '50%' : rounded ? '2px' : '0px'
}
};
}
-var IconButton = function (_Component) {
- (0, _inherits3.default)(IconButton, _Component);
-
- function IconButton() {
- var _ref;
-
- var _temp, _this, _ret;
-
- (0, _classCallCheck3.default)(this, IconButton);
-
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = IconButton.__proto__ || (0, _getPrototypeOf2.default)(IconButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- hovered: false,
- isKeyboardFocused: false,
- // Not to be confonded with the touch property.
- // This state is to determined if it's a mobile device.
- touch: false,
- tooltipShown: false
- }, _this.handleBlur = function (event) {
- _this.hideTooltip();
- if (_this.props.onBlur) {
- _this.props.onBlur(event);
- }
- }, _this.handleFocus = function (event) {
- _this.showTooltip();
- if (_this.props.onFocus) {
- _this.props.onFocus(event);
- }
- }, _this.handleMouseLeave = function (event) {
- if (!_this.button.isKeyboardFocused()) {
- _this.hideTooltip();
- }
- _this.setState({ hovered: false });
- if (_this.props.onMouseLeave) {
- _this.props.onMouseLeave(event);
- }
- }, _this.handleMouseOut = function (event) {
- if (_this.props.disabled) _this.hideTooltip();
- if (_this.props.onMouseOut) _this.props.onMouseOut(event);
- }, _this.handleMouseEnter = function (event) {
- _this.showTooltip();
-
- // Cancel hover styles for touch devices
- if (!_this.state.touch) {
- _this.setState({ hovered: true });
- }
- if (_this.props.onMouseEnter) {
- _this.props.onMouseEnter(event);
- }
- }, _this.handleTouchStart = function (event) {
- _this.setState({ touch: true });
-
- if (_this.props.onTouchStart) {
- _this.props.onTouchStart(event);
- }
- }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) {
- var _this$props = _this.props,
- disabled = _this$props.disabled,
- onFocus = _this$props.onFocus,
- onBlur = _this$props.onBlur,
- onKeyboardFocus = _this$props.onKeyboardFocus;
-
- if (isKeyboardFocused && !disabled) {
- _this.showTooltip();
- if (onFocus) {
- onFocus(event);
- }
- } else {
- _this.hideTooltip();
- if (onBlur) {
- onBlur(event);
- }
- }
+var Paper = function (_Component) {
+ (0, _inherits3.default)(Paper, _Component);
- _this.setState({ isKeyboardFocused: isKeyboardFocused });
- if (onKeyboardFocus) {
- onKeyboardFocus(event, isKeyboardFocused);
- }
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ function Paper() {
+ (0, _classCallCheck3.default)(this, Paper);
+ return (0, _possibleConstructorReturn3.default)(this, (Paper.__proto__ || (0, _getPrototypeOf2.default)(Paper)).apply(this, arguments));
}
- (0, _createClass3.default)(IconButton, [{
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- if (nextProps.disabled) {
- this.setState({ hovered: false });
- }
- }
- }, {
- key: 'setKeyboardFocus',
- value: function setKeyboardFocus() {
- this.button.setKeyboardFocus();
- }
- }, {
- key: 'showTooltip',
- value: function showTooltip() {
- if (this.props.tooltip) {
- this.setState({ tooltipShown: true });
- }
- }
- }, {
- key: 'hideTooltip',
- value: function hideTooltip() {
- if (this.props.tooltip) this.setState({ tooltipShown: false });
- }
- }, {
+ (0, _createClass3.default)(Paper, [{
key: 'render',
value: function render() {
- var _this2 = this;
-
var _props = this.props,
- disabled = _props.disabled,
- hoveredStyle = _props.hoveredStyle,
- disableTouchRipple = _props.disableTouchRipple,
children = _props.children,
- iconClassName = _props.iconClassName,
+ circle = _props.circle,
+ rounded = _props.rounded,
style = _props.style,
- tooltip = _props.tooltip,
- tooltipPositionProp = _props.tooltipPosition,
- tooltipStyles = _props.tooltipStyles,
- touch = _props.touch,
- iconStyle = _props.iconStyle,
- other = (0, _objectWithoutProperties3.default)(_props, ['disabled', 'hoveredStyle', 'disableTouchRipple', 'children', 'iconClassName', 'style', 'tooltip', 'tooltipPosition', 'tooltipStyles', 'touch', 'iconStyle']);
-
- var fonticon = void 0;
+ transitionEnabled = _props.transitionEnabled,
+ zDepth = _props.zDepth,
+ other = (0, _objectWithoutProperties3.default)(_props, ['children', 'circle', 'rounded', 'style', 'transitionEnabled', 'zDepth']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
var styles = getStyles(this.props, this.context);
- var tooltipPosition = tooltipPositionProp.split('-');
-
- var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled;
-
- var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style, hovered ? hoveredStyle : {});
-
- var tooltipElement = tooltip ? _react2.default.createElement(_Tooltip2.default, {
- label: tooltip,
- show: this.state.tooltipShown,
- touch: touch,
- style: (0, _simpleAssign2.default)(styles.tooltip, tooltipStyles),
- verticalPosition: tooltipPosition[0],
- horizontalPosition: tooltipPosition[1]
- }) : null;
-
- if (iconClassName) {
- var iconHoverColor = iconStyle.iconHoverColor,
- iconStyleFontIcon = (0, _objectWithoutProperties3.default)(iconStyle, ['iconHoverColor']);
-
-
- fonticon = _react2.default.createElement(
- _FontIcon2.default,
- {
- className: iconClassName,
- hoverColor: disabled ? null : iconHoverColor,
- style: (0, _simpleAssign2.default)({}, disabled && styles.disabled, iconStyleFontIcon),
- color: this.context.muiTheme.baseTheme.palette.textColor
- },
- children
- );
- }
-
- var childrenStyle = disabled ? (0, _simpleAssign2.default)({}, iconStyle, styles.disabled) : iconStyle;
return _react2.default.createElement(
- _EnhancedButton2.default,
- (0, _extends3.default)({
- ref: function ref(_ref2) {
- return _this2.button = _ref2;
- }
- }, other, {
- centerRipple: true,
- disabled: disabled,
- onTouchStart: this.handleTouchStart,
- style: mergedRootStyles,
- disableTouchRipple: disableTouchRipple,
- onBlur: this.handleBlur,
- onFocus: this.handleFocus,
- onMouseLeave: this.handleMouseLeave,
- onMouseEnter: this.handleMouseEnter,
- onMouseOut: this.handleMouseOut,
- onKeyboardFocus: this.handleKeyboardFocus
- }),
- tooltipElement,
- fonticon,
- (0, _childUtils.extendChildren)(children, {
- style: childrenStyle
- })
+ 'div',
+ (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }),
+ children
);
}
}]);
- return IconButton;
+ return Paper;
}(_react.Component);
-IconButton.muiName = 'IconButton';
-IconButton.defaultProps = {
- disabled: false,
- disableTouchRipple: false,
- iconStyle: {},
- tooltipPosition: 'bottom-center',
- touch: false
+Paper.defaultProps = {
+ circle: false,
+ rounded: true,
+ transitionEnabled: true,
+ zDepth: 1
};
-IconButton.contextTypes = {
+Paper.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? IconButton.propTypes = {
+ false ? Paper.propTypes = {
/**
- * Can be used to pass a `FontIcon` element as the icon for the button.
+ * Children passed into the paper element.
*/
children: _react.PropTypes.node,
/**
- * The CSS class name of the root element.
- */
- className: _react.PropTypes.string,
- /**
- * If true, the element's ripple effect will be disabled.
- */
- disableTouchRipple: _react.PropTypes.bool,
- /**
- * If true, the element will be disabled.
- */
- disabled: _react.PropTypes.bool,
- /**
- * Override the inline-styles of the root element when the component is hovered.
- */
- hoveredStyle: _react.PropTypes.object,
- /**
- * The URL to link to when the button is clicked.
- */
- href: _react.PropTypes.string,
- /**
- * The CSS class name of the icon. Used for setting the icon with a stylesheet.
- */
- iconClassName: _react.PropTypes.string,
- /**
- * Override the inline-styles of the icon element.
- * Note: you can specify iconHoverColor as a String inside this object.
+ * Set to true to generate a circlular paper container.
*/
- iconStyle: _react.PropTypes.object,
- /** @ignore */
- onBlur: _react.PropTypes.func,
- /** @ignore */
- onFocus: _react.PropTypes.func,
+ circle: _react.PropTypes.bool,
/**
- * Callback function fired when the element is focused or blurred by the keyboard.
- *
- * @param {object} event `focus` or `blur` event targeting the element.
- * @param {boolean} keyboardFocused Indicates whether the element is focused.
+ * By default, the paper container will have a border radius.
+ * Set this to false to generate a container with sharp corners.
*/
- onKeyboardFocus: _react.PropTypes.func,
- /** @ignore */
- onMouseEnter: _react.PropTypes.func,
- /** @ignore */
- onMouseLeave: _react.PropTypes.func,
- /** @ignore */
- onMouseOut: _react.PropTypes.func,
- /** @ignore */
- onTouchStart: _react.PropTypes.func,
+ rounded: _react.PropTypes.bool,
/**
* Override the inline-styles of the root element.
*/
style: _react.PropTypes.object,
/**
- * The text to supply to the element's tooltip.
- */
- tooltip: _react.PropTypes.node,
- /**
- * The vertical and horizontal positions, respectively, of the element's tooltip.
- * Possible values are: "bottom-center", "top-center", "bottom-right", "top-right",
- * "bottom-left", and "top-left".
- */
- tooltipPosition: _propTypes2.default.cornersAndCenter,
- /**
- * Override the inline-styles of the tooltip element.
+ * Set to false to disable CSS transitions for the paper element.
*/
- tooltipStyles: _react.PropTypes.object,
+ transitionEnabled: _react.PropTypes.bool,
/**
- * If true, increase the tooltip element's size. Useful for increasing tooltip
- * readability on mobile devices.
+ * This number represents the zDepth of the paper shadow.
*/
- touch: _react.PropTypes.bool
+ zDepth: _propTypes2.default.zDepth
} : void 0;
-exports.default = IconButton;
+exports.default = Paper;
+
+/***/ }),
+/* 742 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _pure = __webpack_require__(20);
+
+var _pure2 = _interopRequireDefault(_pure);
+
+var _SvgIcon = __webpack_require__(21);
+
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var ActionCode = function ActionCode(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z' })
+ );
+};
+ActionCode = (0, _pure2.default)(ActionCode);
+ActionCode.displayName = 'ActionCode';
+ActionCode.muiName = 'SvgIcon';
+
+exports.default = ActionCode;
/***/ }),
-/* 738 */
+/* 743 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -56718,157 +59608,276 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _extends2 = __webpack_require__(7);
+var _react = __webpack_require__(0);
-var _extends3 = _interopRequireDefault(_extends2);
+var _react2 = _interopRequireDefault(_react);
-var _objectWithoutProperties2 = __webpack_require__(8);
+var _pure = __webpack_require__(20);
-var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+var _pure2 = _interopRequireDefault(_pure);
-var _getPrototypeOf = __webpack_require__(3);
+var _SvgIcon = __webpack_require__(21);
-var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
-var _classCallCheck2 = __webpack_require__(1);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+var ActionShop = function ActionShop(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M16 6V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H2v13c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6h-6zm-6-2h4v2h-4V4zM9 18V9l7.5 4L9 18z' })
+ );
+};
+ActionShop = (0, _pure2.default)(ActionShop);
+ActionShop.displayName = 'ActionShop';
+ActionShop.muiName = 'SvgIcon';
-var _createClass2 = __webpack_require__(2);
+exports.default = ActionShop;
-var _createClass3 = _interopRequireDefault(_createClass2);
+/***/ }),
+/* 744 */
+/***/ (function(module, exports, __webpack_require__) {
-var _possibleConstructorReturn2 = __webpack_require__(4);
+"use strict";
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-var _inherits2 = __webpack_require__(5);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-var _inherits3 = _interopRequireDefault(_inherits2);
+var _react = __webpack_require__(0);
-var _simpleAssign = __webpack_require__(6);
+var _react2 = _interopRequireDefault(_react);
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+var _pure = __webpack_require__(20);
+
+var _pure2 = _interopRequireDefault(_pure);
+
+var _SvgIcon = __webpack_require__(21);
+
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var ActionAccountCircle = function ActionAccountCircle(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z' })
+ );
+};
+ActionAccountCircle = (0, _pure2.default)(ActionAccountCircle);
+ActionAccountCircle.displayName = 'ActionAccountCircle';
+ActionAccountCircle.muiName = 'SvgIcon';
+
+exports.default = ActionAccountCircle;
+
+/***/ }),
+/* 745 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _transitions = __webpack_require__(10);
+var _pure = __webpack_require__(20);
-var _transitions2 = _interopRequireDefault(_transitions);
+var _pure2 = _interopRequireDefault(_pure);
+
+var _SvgIcon = __webpack_require__(21);
+
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function getStyles(props, context, state) {
- var color = props.color,
- hoverColor = props.hoverColor;
- var baseTheme = context.muiTheme.baseTheme;
+var AlertError = function AlertError(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z' })
+ );
+};
+AlertError = (0, _pure2.default)(AlertError);
+AlertError.displayName = 'AlertError';
+AlertError.muiName = 'SvgIcon';
- var offColor = color || baseTheme.palette.textColor;
- var onColor = hoverColor || offColor;
+exports.default = AlertError;
- return {
- root: {
- color: state.hovered ? onColor : offColor,
- position: 'relative',
- fontSize: baseTheme.spacing.iconSize,
- display: 'inline-block',
- userSelect: 'none',
- transition: _transitions2.default.easeOut()
- }
- };
-}
+/***/ }),
+/* 746 */
+/***/ (function(module, exports, __webpack_require__) {
-var FontIcon = function (_Component) {
- (0, _inherits3.default)(FontIcon, _Component);
+"use strict";
- function FontIcon() {
- var _ref;
- var _temp, _this, _ret;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.zIndex = exports.typography = exports.transitions = exports.spacing = exports.muiThemeable = exports.getMuiTheme = exports.LightRawTheme = exports.lightBaseTheme = exports.DarkRawTheme = exports.darkBaseTheme = exports.colors = exports.MuiThemeProvider = undefined;
- (0, _classCallCheck3.default)(this, FontIcon);
+var _MuiThemeProvider2 = __webpack_require__(305);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
+var _MuiThemeProvider3 = _interopRequireDefault(_MuiThemeProvider2);
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FontIcon.__proto__ || (0, _getPrototypeOf2.default)(FontIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- hovered: false
- }, _this.handleMouseLeave = function (event) {
- // hover is needed only when a hoverColor is defined
- if (_this.props.hoverColor !== undefined) {
- _this.setState({ hovered: false });
- }
- if (_this.props.onMouseLeave) {
- _this.props.onMouseLeave(event);
- }
- }, _this.handleMouseEnter = function (event) {
- // hover is needed only when a hoverColor is defined
- if (_this.props.hoverColor !== undefined) {
- _this.setState({ hovered: true });
- }
- if (_this.props.onMouseEnter) {
- _this.props.onMouseEnter(event);
- }
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
- }
+var _colors2 = __webpack_require__(31);
- (0, _createClass3.default)(FontIcon, [{
- key: 'render',
- value: function render() {
- var _props = this.props,
- hoverColor = _props.hoverColor,
- onMouseLeave = _props.onMouseLeave,
- onMouseEnter = _props.onMouseEnter,
- style = _props.style,
- other = (0, _objectWithoutProperties3.default)(_props, ['hoverColor', 'onMouseLeave', 'onMouseEnter', 'style']);
- var prepareStyles = this.context.muiTheme.prepareStyles;
+var _colors = _interopRequireWildcard(_colors2);
- var styles = getStyles(this.props, this.context, this.state);
+var _darkBaseTheme2 = __webpack_require__(747);
- return _react2.default.createElement('span', (0, _extends3.default)({}, other, {
- onMouseLeave: this.handleMouseLeave,
- onMouseEnter: this.handleMouseEnter,
- style: prepareStyles((0, _simpleAssign2.default)(styles.root, style))
- }));
- }
- }]);
- return FontIcon;
-}(_react.Component);
+var _darkBaseTheme3 = _interopRequireDefault(_darkBaseTheme2);
-FontIcon.muiName = 'FontIcon';
-FontIcon.defaultProps = {
- onMouseEnter: function onMouseEnter() {},
- onMouseLeave: function onMouseLeave() {}
-};
-FontIcon.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
+var _lightBaseTheme2 = __webpack_require__(310);
+
+var _lightBaseTheme3 = _interopRequireDefault(_lightBaseTheme2);
+
+var _getMuiTheme2 = __webpack_require__(129);
+
+var _getMuiTheme3 = _interopRequireDefault(_getMuiTheme2);
+
+var _muiThemeable2 = __webpack_require__(748);
+
+var _muiThemeable3 = _interopRequireDefault(_muiThemeable2);
+
+var _spacing2 = __webpack_require__(199);
+
+var _spacing3 = _interopRequireDefault(_spacing2);
+
+var _transitions2 = __webpack_require__(10);
+
+var _transitions3 = _interopRequireDefault(_transitions2);
+
+var _typography2 = __webpack_require__(315);
+
+var _typography3 = _interopRequireDefault(_typography2);
+
+var _zIndex2 = __webpack_require__(311);
+
+var _zIndex3 = _interopRequireDefault(_zIndex2);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.MuiThemeProvider = _MuiThemeProvider3.default;
+exports.colors = _colors;
+exports.darkBaseTheme = _darkBaseTheme3.default;
+exports.DarkRawTheme = _darkBaseTheme3.default;
+exports.lightBaseTheme = _lightBaseTheme3.default;
+exports.LightRawTheme = _lightBaseTheme3.default;
+exports.getMuiTheme = _getMuiTheme3.default;
+exports.muiThemeable = _muiThemeable3.default;
+exports.spacing = _spacing3.default;
+exports.transitions = _transitions3.default;
+exports.typography = _typography3.default;
+exports.zIndex = _zIndex3.default;
+
+/***/ }),
+/* 747 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _colors = __webpack_require__(31);
+
+var _colorManipulator = __webpack_require__(50);
+
+var _spacing = __webpack_require__(199);
+
+var _spacing2 = _interopRequireDefault(_spacing);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = {
+ spacing: _spacing2.default,
+ fontFamily: 'Roboto, sans-serif',
+ palette: {
+ primary1Color: _colors.cyan700,
+ primary2Color: _colors.cyan700,
+ primary3Color: _colors.grey600,
+ accent1Color: _colors.pinkA200,
+ accent2Color: _colors.pinkA400,
+ accent3Color: _colors.pinkA100,
+ textColor: _colors.fullWhite,
+ secondaryTextColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.7),
+ alternateTextColor: '#303030',
+ canvasColor: '#303030',
+ borderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3),
+ disabledColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3),
+ pickerHeaderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12),
+ clockCircleColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12)
+ }
};
- false ? FontIcon.propTypes = {
- /**
- * This is the font color of the font icon. If not specified,
- * this component will default to muiTheme.palette.textColor.
- */
- color: _react.PropTypes.string,
- /**
- * This is the icon color when the mouse hovers over the icon.
- */
- hoverColor: _react.PropTypes.string,
- /** @ignore */
- onMouseEnter: _react.PropTypes.func,
- /** @ignore */
- onMouseLeave: _react.PropTypes.func,
- /**
- * Override the inline-styles of the root element.
- */
- style: _react.PropTypes.object
-} : void 0;
-exports.default = FontIcon;
/***/ }),
-/* 739 */
+/* 748 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _extends2 = __webpack_require__(7);
+
+var _extends3 = _interopRequireDefault(_extends2);
+
+exports.default = muiThemeable;
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _getMuiTheme = __webpack_require__(129);
+
+var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var DEFAULT_THEME = void 0;
+
+function getDefaultTheme() {
+ if (!DEFAULT_THEME) {
+ DEFAULT_THEME = (0, _getMuiTheme2.default)();
+ }
+ return DEFAULT_THEME;
+}
+
+function muiThemeable() {
+ return function (Component) {
+ var MuiComponent = function MuiComponent(props, context) {
+ var _context$muiTheme = context.muiTheme,
+ muiTheme = _context$muiTheme === undefined ? getDefaultTheme() : _context$muiTheme;
+
+
+ return _react2.default.createElement(Component, (0, _extends3.default)({ muiTheme: muiTheme }, props));
+ };
+
+ MuiComponent.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+ };
+
+ return MuiComponent;
+ };
+}
+
+/***/ }),
+/* 749 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -56914,190 +59923,178 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _transitions = __webpack_require__(10);
+var _EnhancedButton = __webpack_require__(51);
-var _transitions2 = _interopRequireDefault(_transitions);
+var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function getStyles(props, context, state) {
- var verticalPosition = props.verticalPosition;
- var horizontalPosition = props.horizontalPosition;
- var touchMarginOffset = props.touch ? 10 : 0;
- var touchOffsetTop = props.touch ? -20 : -10;
- var offset = verticalPosition === 'bottom' ? 14 + touchMarginOffset : -14 - touchMarginOffset;
-
- var _context$muiTheme = context.muiTheme,
- baseTheme = _context$muiTheme.baseTheme,
- zIndex = _context$muiTheme.zIndex,
- tooltip = _context$muiTheme.tooltip;
+function getStyles(props, context) {
+ var tabs = context.muiTheme.tabs;
- var styles = {
+ return {
root: {
- position: 'absolute',
- fontFamily: baseTheme.fontFamily,
- fontSize: '10px',
- lineHeight: '22px',
- padding: '0 8px',
- zIndex: zIndex.tooltip,
- color: tooltip.color,
- overflow: 'hidden',
- top: -10000,
- borderRadius: 2,
- userSelect: 'none',
- opacity: 0,
- right: horizontalPosition === 'left' ? 12 : null,
- left: horizontalPosition === 'center' ? (state.offsetWidth - 48) / 2 * -1 : null,
- transition: _transitions2.default.easeOut('0ms', 'top', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms')
- },
- label: {
- position: 'relative',
- whiteSpace: 'nowrap'
- },
- ripple: {
- position: 'absolute',
- left: horizontalPosition === 'center' ? '50%' : horizontalPosition === 'left' ? '100%' : '0%',
- top: verticalPosition === 'bottom' ? 0 : '100%',
- transform: 'translate(-50%, -50%)',
- borderRadius: '50%',
- backgroundColor: 'transparent',
- transition: _transitions2.default.easeOut('0ms', 'width', '450ms') + ', ' + _transitions2.default.easeOut('0ms', 'height', '450ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms')
- },
- rootWhenShown: {
- top: verticalPosition === 'top' ? touchOffsetTop : 36,
- opacity: 0.9,
- transform: 'translate(0px, ' + offset + 'px)',
- transition: _transitions2.default.easeOut('0ms', 'top', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'transform', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'opacity', '0ms')
- },
- rootWhenTouched: {
- fontSize: '14px',
- lineHeight: '32px',
- padding: '0 16px'
+ color: props.selected ? tabs.selectedTextColor : tabs.textColor,
+ fontWeight: 500,
+ fontSize: 14,
+ width: props.width,
+ textTransform: 'uppercase',
+ padding: 0
},
- rippleWhenShown: {
- backgroundColor: tooltip.rippleBackgroundColor,
- transition: _transitions2.default.easeOut('450ms', 'width', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'height', '0ms') + ', ' + _transitions2.default.easeOut('450ms', 'backgroundColor', '0ms')
+ button: {
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'center',
+ justifyContent: 'center',
+ height: props.label && props.icon ? 72 : 48
}
};
-
- return styles;
}
-var Tooltip = function (_Component) {
- (0, _inherits3.default)(Tooltip, _Component);
+var Tab = function (_Component) {
+ (0, _inherits3.default)(Tab, _Component);
- function Tooltip() {
+ function Tab() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, Tooltip);
+ (0, _classCallCheck3.default)(this, Tab);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tooltip.__proto__ || (0, _getPrototypeOf2.default)(Tooltip)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- offsetWidth: null
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tab.__proto__ || (0, _getPrototypeOf2.default)(Tab)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTap = function (event) {
+ if (_this.props.onTouchTap) {
+ _this.props.onTouchTap(_this.props.value, event, _this);
+ }
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(Tooltip, [{
- key: 'componentDidMount',
- value: function componentDidMount() {
- this.setRippleSize();
- this.setTooltipPosition();
- }
- }, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps() {
- this.setTooltipPosition();
- }
- }, {
- key: 'componentDidUpdate',
- value: function componentDidUpdate() {
- this.setRippleSize();
- }
- }, {
- key: 'setRippleSize',
- value: function setRippleSize() {
- var ripple = this.refs.ripple;
- var tooltip = this.refs.tooltip;
- var tooltipWidth = parseInt(tooltip.offsetWidth, 10) / (this.props.horizontalPosition === 'center' ? 2 : 1);
- var tooltipHeight = parseInt(tooltip.offsetHeight, 10);
-
- var rippleDiameter = Math.ceil(Math.sqrt(Math.pow(tooltipHeight, 2) + Math.pow(tooltipWidth, 2)) * 2);
- if (this.props.show) {
- ripple.style.height = rippleDiameter + 'px';
- ripple.style.width = rippleDiameter + 'px';
- } else {
- ripple.style.width = '0px';
- ripple.style.height = '0px';
- }
- }
- }, {
- key: 'setTooltipPosition',
- value: function setTooltipPosition() {
- this.setState({ offsetWidth: this.refs.tooltip.offsetWidth });
- }
- }, {
+ (0, _createClass3.default)(Tab, [{
key: 'render',
value: function render() {
var _props = this.props,
- horizontalPosition = _props.horizontalPosition,
+ icon = _props.icon,
+ index = _props.index,
+ onActive = _props.onActive,
+ onTouchTap = _props.onTouchTap,
+ selected = _props.selected,
label = _props.label,
- show = _props.show,
- touch = _props.touch,
- verticalPosition = _props.verticalPosition,
- other = (0, _objectWithoutProperties3.default)(_props, ['horizontalPosition', 'label', 'show', 'touch', 'verticalPosition']);
- var prepareStyles = this.context.muiTheme.prepareStyles;
+ buttonStyle = _props.buttonStyle,
+ style = _props.style,
+ value = _props.value,
+ width = _props.width,
+ other = (0, _objectWithoutProperties3.default)(_props, ['icon', 'index', 'onActive', 'onTouchTap', 'selected', 'label', 'buttonStyle', 'style', 'value', 'width']);
- var styles = getStyles(this.props, this.context, this.state);
+
+ var styles = getStyles(this.props, this.context);
+
+ var iconElement = void 0;
+ if (icon && _react2.default.isValidElement(icon)) {
+ var iconProps = {
+ style: {
+ fontSize: 24,
+ color: styles.root.color,
+ marginBottom: label ? 5 : 0
+ }
+ };
+ // If it's svg icon set color via props
+ if (icon.type.muiName !== 'FontIcon') {
+ iconProps.color = styles.root.color;
+ }
+ iconElement = _react2.default.cloneElement(icon, iconProps);
+ }
+
+ var rippleOpacity = 0.3;
+ var rippleColor = this.context.muiTheme.tabs.selectedTextColor;
return _react2.default.createElement(
- 'div',
+ _EnhancedButton2.default,
(0, _extends3.default)({}, other, {
- ref: 'tooltip',
- style: prepareStyles((0, _simpleAssign2.default)(styles.root, this.props.show && styles.rootWhenShown, this.props.touch && styles.rootWhenTouched, this.props.style))
- }),
- _react2.default.createElement('div', {
- ref: 'ripple',
- style: prepareStyles((0, _simpleAssign2.default)(styles.ripple, this.props.show && styles.rippleWhenShown))
+ style: (0, _simpleAssign2.default)(styles.root, style),
+ focusRippleColor: rippleColor,
+ touchRippleColor: rippleColor,
+ focusRippleOpacity: rippleOpacity,
+ touchRippleOpacity: rippleOpacity,
+ onTouchTap: this.handleTouchTap
}),
_react2.default.createElement(
- 'span',
- { style: prepareStyles(styles.label) },
+ 'div',
+ { style: (0, _simpleAssign2.default)(styles.button, buttonStyle) },
+ iconElement,
label
)
);
}
}]);
- return Tooltip;
+ return Tab;
}(_react.Component);
-Tooltip.contextTypes = {
+Tab.muiName = 'Tab';
+Tab.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? Tooltip.propTypes = {
+ false ? Tab.propTypes = {
+ /**
+ * Override the inline-styles of the button element.
+ */
+ buttonStyle: _react.PropTypes.object,
/**
* The css class name of the root element.
*/
className: _react.PropTypes.string,
- horizontalPosition: _react.PropTypes.oneOf(['left', 'right', 'center']),
- label: _react.PropTypes.node.isRequired,
- show: _react.PropTypes.bool,
+ /**
+ * Sets the icon of the tab, you can pass `FontIcon` or `SvgIcon` elements.
+ */
+ icon: _react.PropTypes.node,
+ /**
+ * @ignore
+ */
+ index: _react.PropTypes.any,
+ /**
+ * Sets the text value of the tab item to the string specified.
+ */
+ label: _react.PropTypes.node,
+ /**
+ * Fired when the active tab changes by touch or tap.
+ * Use this event to specify any functionality when an active tab changes.
+ * For example - we are using this to route to home when the third tab becomes active.
+ * This function will always recieve the active tab as it\'s first argument.
+ */
+ onActive: _react.PropTypes.func,
+ /**
+ * @ignore
+ * This property is overriden by the Tabs component.
+ */
+ onTouchTap: _react.PropTypes.func,
+ /**
+ * @ignore
+ * Defines if the current tab is selected or not.
+ * The Tabs component is responsible for setting this property.
+ */
+ selected: _react.PropTypes.bool,
/**
* Override the inline-styles of the root element.
*/
style: _react.PropTypes.object,
- touch: _react.PropTypes.bool,
- verticalPosition: _react.PropTypes.oneOf(['top', 'bottom'])
+ /**
+ * If value prop passed to Tabs component, this value prop is also required.
+ * It assigns a value to the tab so that it can be selected by the Tabs.
+ */
+ value: _react.PropTypes.any,
+ /**
+ * @ignore
+ * This property is overriden by the Tabs component.
+ */
+ width: _react.PropTypes.string
} : void 0;
-exports.default = Tooltip;
+exports.default = Tab;
/***/ }),
-/* 740 */
+/* 750 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -57111,188 +60108,725 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _pure = __webpack_require__(25);
+var _reduxForm = __webpack_require__(82);
-var _pure2 = _interopRequireDefault(_pure);
+var _reactRedux = __webpack_require__(19);
-var _SvgIcon = __webpack_require__(26);
+var _MenuItem = __webpack_require__(97);
-var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
+var _MenuItem2 = _interopRequireDefault(_MenuItem);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _RaisedButton = __webpack_require__(65);
-var NavigationExpandLess = function NavigationExpandLess(props) {
- return _react2.default.createElement(
- _SvgIcon2.default,
- props,
- _react2.default.createElement('path', { d: 'M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z' })
- );
-};
-NavigationExpandLess = (0, _pure2.default)(NavigationExpandLess);
-NavigationExpandLess.displayName = 'NavigationExpandLess';
-NavigationExpandLess.muiName = 'SvgIcon';
+var _RaisedButton2 = _interopRequireDefault(_RaisedButton);
-exports.default = NavigationExpandLess;
+var _reduxFormMaterialUi = __webpack_require__(98);
-/***/ }),
-/* 741 */
-/***/ (function(module, exports, __webpack_require__) {
+var _Styles = __webpack_require__(52);
-"use strict";
+var _Styles2 = _interopRequireDefault(_Styles);
+var _Utils = __webpack_require__(210);
-exports.__esModule = true;
+var Utils = _interopRequireWildcard(_Utils);
-var _react = __webpack_require__(0);
+var _FormValidators = __webpack_require__(102);
-var _createHelper = __webpack_require__(318);
+var Validators = _interopRequireWildcard(_FormValidators);
-var _createHelper2 = _interopRequireDefault(_createHelper);
+var _Menus = __webpack_require__(84);
-var _createEagerFactory = __webpack_require__(742);
+var menus = _interopRequireWildcard(_Menus);
-var _createEagerFactory2 = _interopRequireDefault(_createEagerFactory);
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-var shouldUpdate = function shouldUpdate(test) {
- return function (BaseComponent) {
- var factory = (0, _createEagerFactory2.default)(BaseComponent);
- return function (_Component) {
- _inherits(_class, _Component);
+function getStatesForCountry(country) {
+ switch (country) {
+ case 'USA':
+ return Utils.usaRegions;
+ case 'JAPAN':
+ return Utils.japanRegions;
+ case 'CANADA':
+ return Utils.canadaRegions;
+ default:
+ return [];
+ }
+}
- function _class() {
- _classCallCheck(this, _class);
+var Billing = function Billing(props) {
+ var handleSubmit = props.handleSubmit,
+ pristine = props.pristine,
+ submitting = props.submitting,
+ country = props.country;
- return _possibleConstructorReturn(this, _Component.apply(this, arguments));
- }
+ return _react2.default.createElement(
+ 'form',
+ { onSubmit: handleSubmit, id: 'biling-form' },
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_reduxForm.Field, {
+ name: 'order_billing_name',
+ validate: Validators.fullName,
+ component: _reduxFormMaterialUi.TextField,
+ floatingLabelText: 'Firstname and Lastname',
+ hintText: 'Firstname and Lastname',
+ style: _Styles2.default.fields.text
+ })
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_reduxForm.Field, {
+ name: 'order_email',
+ component: _reduxFormMaterialUi.TextField,
+ floatingLabelText: 'Email',
+ hintText: 'Email',
+ style: _Styles2.default.fields.text,
+ validate: [Validators.required, Validators.email]
+ })
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_reduxForm.Field, {
+ name: 'order_tel',
+ component: _reduxFormMaterialUi.TextField,
+ floatingLabelText: 'Phone number',
+ hintText: 'Phone number',
+ style: _Styles2.default.fields.text,
+ validate: [Validators.required]
+ })
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_reduxForm.Field, {
+ name: 'bo',
+ component: _reduxFormMaterialUi.TextField,
+ floatingLabelText: 'Address',
+ hintText: 'Address',
+ style: _Styles2.default.fields.text,
+ validate: [Validators.required]
+ })
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_reduxForm.Field, {
+ name: 'order_billing_city',
+ component: _reduxFormMaterialUi.TextField,
+ floatingLabelText: 'City',
+ hintText: 'City',
+ style: _Styles2.default.fields.text,
+ validate: [Validators.required]
+ })
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(
+ _reduxForm.Field,
+ {
+ name: 'order_billing_country',
+ component: _reduxFormMaterialUi.SelectField,
+ floatingLabelText: 'Country',
+ hintText: 'Country',
+ style: _Styles2.default.fields.text,
+ validate: [Validators.required]
+ },
+ Utils.countries.map(function (x) {
+ return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text });
+ })
+ )
+ ),
+ ['JAPAN', 'USA', 'CANADA'].indexOf(country) !== -1 && _react2.default.createElement(
+ _reduxForm.Field,
+ {
+ name: 'order_billing_state',
+ component: _reduxFormMaterialUi.SelectField,
+ floatingLabelText: 'State',
+ hintText: 'State',
+ style: _Styles2.default.fields.text,
+ validate: [Validators.required]
+ },
+ getStatesForCountry(country).map(function (x) {
+ return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text });
+ })
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_reduxForm.Field, {
+ name: 'order_billing_zip',
+ component: _reduxFormMaterialUi.TextField,
+ floatingLabelText: 'Zip',
+ style: _Styles2.default.fields.text
+ })
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(
+ _reduxForm.Field,
+ {
+ name: 'credit_card_type',
+ component: _reduxFormMaterialUi.SelectField,
+ floatingLabelText: 'Credit card type',
+ style: _Styles2.default.fields.text,
+ validate: [Validators.required]
+ },
+ (country === 'JAPAN' ? Utils.japanCreditCards : Utils.creditCards).map(function (x) {
+ return _react2.default.createElement(_MenuItem2.default, { value: x.value, primaryText: x.text, key: x.value });
+ })
+ )
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_reduxForm.Field, {
+ name: 'cnb',
+ component: _reduxFormMaterialUi.TextField,
+ floatingLabelText: 'Credit Card Number',
+ hintText: 'Credit Card Number',
+ style: _Styles2.default.fields.text,
+ validate: [Validators.required]
+ })
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(
+ _reduxForm.Field,
+ {
+ name: 'credit_card_month',
+ component: _reduxFormMaterialUi.SelectField,
+ floatingLabelText: 'Expiry month',
+ hintText: 'Expiry month',
+ validate: [Validators.required],
+ style: _Styles2.default.fields.text
+ },
+ Array.apply(null, new Array(12)).map(function (x, i) {
+ var month = ++i < 10 ? '0' + i : i;
+ return _react2.default.createElement(_MenuItem2.default, { key: month, value: month, primaryText: month });
+ })
+ )
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(
+ _reduxForm.Field,
+ {
+ name: 'credit_card_year',
+ component: _reduxFormMaterialUi.SelectField,
+ floatingLabelText: 'Expiry year',
+ hintText: 'Expiry year',
+ style: _Styles2.default.fields.text,
+ validate: [Validators.required]
+ },
+ Array.apply(null, new Array(5)).map(function (x, i) {
+ var year = new Date().getFullYear() + i;
+ return _react2.default.createElement(_MenuItem2.default, { key: year, value: year, primaryText: year });
+ })
+ )
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_reduxForm.Field, {
+ name: 'vval',
+ component: _reduxFormMaterialUi.TextField,
+ hintText: 'CCV',
+ floatingLabelText: 'CCV',
+ style: _Styles2.default.fields.text,
+ validate: [Validators.required]
+ })
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_RaisedButton2.default, {
+ label: 'Save',
+ disabled: pristine || submitting,
+ type: 'submit'
+ })
+ )
+ );
+};
- _class.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
- return test(this.props, nextProps);
- };
+var BillingForm = (0, _reduxForm.reduxForm)({
+ form: 'billing'
+})(Billing);
- _class.prototype.render = function render() {
- return factory(this.props);
- };
+Billing.propTypes = {
+ shop: _react.PropTypes.string.isRequired
+};
+var selector = (0, _reduxForm.formValueSelector)('billing');
- return _class;
- }(_react.Component);
+function mapStateToProps(state, ownProps) {
+ var currentProfile = state.profiles.currentProfile;
+ var settings = state.profiles.profiles.filter(function (x) {
+ return x.name === currentProfile;
+ })[0].settings;
+ return {
+ initialValues: (settings[ownProps.shop] || {})[menus.MENU_BILLING] || {},
+ country: selector(state, 'order_billing_country')
};
-};
+}
-exports.default = (0, _createHelper2.default)(shouldUpdate, 'shouldUpdate');
+exports.default = (0, _reactRedux.connect)(mapStateToProps)(BillingForm);
/***/ }),
-/* 742 */
+/* 751 */
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+/* WEBPACK VAR INJECTION */(function(global) {/**
+ * lodash (Custom Build)
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright jQuery Foundation and other contributors
+ * Released under MIT license
+ * Based on Underscore.js 1.8.3
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ */
+/** Used as the `TypeError` message for "Functions" methods. */
+var FUNC_ERROR_TEXT = 'Expected a function';
-exports.__esModule = true;
+/** Used as references for various `Number` constants. */
+var NAN = 0 / 0;
-var _createEagerElementUtil = __webpack_require__(743);
+/** `Object#toString` result references. */
+var symbolTag = '[object Symbol]';
-var _createEagerElementUtil2 = _interopRequireDefault(_createEagerElementUtil);
+/** Used to match leading and trailing whitespace. */
+var reTrim = /^\s+|\s+$/g;
-var _isReferentiallyTransparentFunctionComponent = __webpack_require__(744);
+/** Used to detect bad signed hexadecimal string values. */
+var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
-var _isReferentiallyTransparentFunctionComponent2 = _interopRequireDefault(_isReferentiallyTransparentFunctionComponent);
+/** Used to detect binary string values. */
+var reIsBinary = /^0b[01]+$/i;
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/** Used to detect octal string values. */
+var reIsOctal = /^0o[0-7]+$/i;
-var createFactory = function createFactory(type) {
- var isReferentiallyTransparent = (0, _isReferentiallyTransparentFunctionComponent2.default)(type);
- return function (p, c) {
- return (0, _createEagerElementUtil2.default)(false, isReferentiallyTransparent, type, p, c);
- };
+/** Built-in method references without a dependency on `root`. */
+var freeParseInt = parseInt;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+/** Used as a reference to the global object. */
+var root = freeGlobal || freeSelf || Function('return this')();
+
+/** Used for built-in method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/* Built-in method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max,
+ nativeMin = Math.min;
+
+/**
+ * Gets the timestamp of the number of milliseconds that have elapsed since
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
+ *
+ * @static
+ * @memberOf _
+ * @since 2.4.0
+ * @category Date
+ * @returns {number} Returns the timestamp.
+ * @example
+ *
+ * _.defer(function(stamp) {
+ * console.log(_.now() - stamp);
+ * }, _.now());
+ * // => Logs the number of milliseconds it took for the deferred invocation.
+ */
+var now = function() {
+ return root.Date.now();
};
-exports.default = createFactory;
+/**
+ * Creates a debounced function that delays invoking `func` until after `wait`
+ * milliseconds have elapsed since the last time the debounced function was
+ * invoked. The debounced function comes with a `cancel` method to cancel
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
+ * Provide `options` to indicate whether `func` should be invoked on the
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
+ * with the last arguments provided to the debounced function. Subsequent
+ * calls to the debounced function return the result of the last `func`
+ * invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the debounced function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.debounce` and `_.throttle`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to debounce.
+ * @param {number} [wait=0] The number of milliseconds to delay.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=false]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {number} [options.maxWait]
+ * The maximum time `func` is allowed to be delayed before it's invoked.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new debounced function.
+ * @example
+ *
+ * // Avoid costly calculations while the window size is in flux.
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
+ *
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
+ * 'leading': true,
+ * 'trailing': false
+ * }));
+ *
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
+ * var source = new EventSource('/stream');
+ * jQuery(source).on('message', debounced);
+ *
+ * // Cancel the trailing debounced invocation.
+ * jQuery(window).on('popstate', debounced.cancel);
+ */
+function debounce(func, wait, options) {
+ var lastArgs,
+ lastThis,
+ maxWait,
+ result,
+ timerId,
+ lastCallTime,
+ lastInvokeTime = 0,
+ leading = false,
+ maxing = false,
+ trailing = true;
-/***/ }),
-/* 743 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ wait = toNumber(wait) || 0;
+ if (isObject(options)) {
+ leading = !!options.leading;
+ maxing = 'maxWait' in options;
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
-"use strict";
+ function invokeFunc(time) {
+ var args = lastArgs,
+ thisArg = lastThis;
+ lastArgs = lastThis = undefined;
+ lastInvokeTime = time;
+ result = func.apply(thisArg, args);
+ return result;
+ }
-exports.__esModule = true;
+ function leadingEdge(time) {
+ // Reset any `maxWait` timer.
+ lastInvokeTime = time;
+ // Start the timer for the trailing edge.
+ timerId = setTimeout(timerExpired, wait);
+ // Invoke the leading edge.
+ return leading ? invokeFunc(time) : result;
+ }
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+ function remainingWait(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime,
+ result = wait - timeSinceLastCall;
-var _react = __webpack_require__(0);
+ return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
+ }
-var _react2 = _interopRequireDefault(_react);
+ function shouldInvoke(time) {
+ var timeSinceLastCall = time - lastCallTime,
+ timeSinceLastInvoke = time - lastInvokeTime;
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ // Either this is the first call, activity has stopped and we're at the
+ // trailing edge, the system time has gone backwards and we're treating
+ // it as the trailing edge, or we've hit the `maxWait` limit.
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
+ }
-var createEagerElementUtil = function createEagerElementUtil(hasKey, isReferentiallyTransparent, type, props, children) {
- if (!hasKey && isReferentiallyTransparent) {
- if (children) {
- return type(_extends({}, props, { children: children }));
+ function timerExpired() {
+ var time = now();
+ if (shouldInvoke(time)) {
+ return trailingEdge(time);
}
- return type(props);
+ // Restart the timer.
+ timerId = setTimeout(timerExpired, remainingWait(time));
}
- var Component = type;
+ function trailingEdge(time) {
+ timerId = undefined;
- if (children) {
- return _react2.default.createElement(
- Component,
- props,
- children
- );
+ // Only invoke if we have `lastArgs` which means `func` has been
+ // debounced at least once.
+ if (trailing && lastArgs) {
+ return invokeFunc(time);
+ }
+ lastArgs = lastThis = undefined;
+ return result;
}
- return _react2.default.createElement(Component, props);
-};
-
-exports.default = createEagerElementUtil;
-
-/***/ }),
-/* 744 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
+ function cancel() {
+ if (timerId !== undefined) {
+ clearTimeout(timerId);
+ }
+ lastInvokeTime = 0;
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
+ }
+ function flush() {
+ return timerId === undefined ? result : trailingEdge(now());
+ }
-exports.__esModule = true;
+ function debounced() {
+ var time = now(),
+ isInvoking = shouldInvoke(time);
-var _isClassComponent = __webpack_require__(745);
+ lastArgs = arguments;
+ lastThis = this;
+ lastCallTime = time;
-var _isClassComponent2 = _interopRequireDefault(_isClassComponent);
+ if (isInvoking) {
+ if (timerId === undefined) {
+ return leadingEdge(lastCallTime);
+ }
+ if (maxing) {
+ // Handle invocations in a tight loop.
+ timerId = setTimeout(timerExpired, wait);
+ return invokeFunc(lastCallTime);
+ }
+ }
+ if (timerId === undefined) {
+ timerId = setTimeout(timerExpired, wait);
+ }
+ return result;
+ }
+ debounced.cancel = cancel;
+ debounced.flush = flush;
+ return debounced;
+}
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+/**
+ * Creates a throttled function that only invokes `func` at most once per
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
+ * method to cancel delayed `func` invocations and a `flush` method to
+ * immediately invoke them. Provide `options` to indicate whether `func`
+ * should be invoked on the leading and/or trailing edge of the `wait`
+ * timeout. The `func` is invoked with the last arguments provided to the
+ * throttled function. Subsequent calls to the throttled function return the
+ * result of the last `func` invocation.
+ *
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
+ * invoked on the trailing edge of the timeout only if the throttled function
+ * is invoked more than once during the `wait` timeout.
+ *
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
+ *
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
+ * for details over the differences between `_.throttle` and `_.debounce`.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Function
+ * @param {Function} func The function to throttle.
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
+ * @param {Object} [options={}] The options object.
+ * @param {boolean} [options.leading=true]
+ * Specify invoking on the leading edge of the timeout.
+ * @param {boolean} [options.trailing=true]
+ * Specify invoking on the trailing edge of the timeout.
+ * @returns {Function} Returns the new throttled function.
+ * @example
+ *
+ * // Avoid excessively updating the position while scrolling.
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
+ *
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
+ * jQuery(element).on('click', throttled);
+ *
+ * // Cancel the trailing throttled invocation.
+ * jQuery(window).on('popstate', throttled.cancel);
+ */
+function throttle(func, wait, options) {
+ var leading = true,
+ trailing = true;
-var isReferentiallyTransparentFunctionComponent = function isReferentiallyTransparentFunctionComponent(Component) {
- return Boolean(typeof Component === 'function' && !(0, _isClassComponent2.default)(Component) && !Component.defaultProps && !Component.contextTypes && ('production' === 'production' || !Component.propTypes));
-};
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (isObject(options)) {
+ leading = 'leading' in options ? !!options.leading : leading;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+ return debounce(func, wait, {
+ 'leading': leading,
+ 'maxWait': wait,
+ 'trailing': trailing
+ });
+}
-exports.default = isReferentiallyTransparentFunctionComponent;
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
-/***/ }),
-/* 745 */
-/***/ (function(module, exports, __webpack_require__) {
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
-"use strict";
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+/**
+ * Converts `value` to a number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to process.
+ * @returns {number} Returns the number.
+ * @example
+ *
+ * _.toNumber(3.2);
+ * // => 3.2
+ *
+ * _.toNumber(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toNumber(Infinity);
+ * // => Infinity
+ *
+ * _.toNumber('3.2');
+ * // => 3.2
+ */
+function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
+ if (isObject(value)) {
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
+ value = isObject(other) ? (other + '') : other;
+ }
+ if (typeof value != 'string') {
+ return value === 0 ? value : +value;
+ }
+ value = value.replace(reTrim, '');
+ var isBinary = reIsBinary.test(value);
+ return (isBinary || reIsOctal.test(value))
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
+ : (reIsBadHex.test(value) ? NAN : +value);
+}
-exports.__esModule = true;
-var isClassComponent = function isClassComponent(Component) {
- return Boolean(Component && Component.prototype && typeof Component.prototype.isReactComponent === 'object');
-};
+module.exports = throttle;
-exports.default = isClassComponent;
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46)))
/***/ }),
-/* 746 */
+/* 752 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -57302,14 +60836,6 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _extends2 = __webpack_require__(7);
-
-var _extends3 = _interopRequireDefault(_extends2);
-
-var _objectWithoutProperties2 = __webpack_require__(8);
-
-var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-
var _getPrototypeOf = __webpack_require__(3);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -57334,132 +60860,180 @@ var _simpleAssign = __webpack_require__(6);
var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+var _transitions = __webpack_require__(10);
+
+var _transitions2 = _interopRequireDefault(_transitions);
+
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _transitions = __webpack_require__(10);
+var _propTypes = __webpack_require__(39);
-var _transitions2 = _interopRequireDefault(_transitions);
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
+var _Paper = __webpack_require__(32);
+
+var _Paper2 = _interopRequireDefault(_Paper);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var SvgIcon = function (_Component) {
- (0, _inherits3.default)(SvgIcon, _Component);
+function getStyles(props, context, state) {
+ var targetOrigin = props.targetOrigin;
+ var open = state.open;
+ var muiTheme = context.muiTheme;
- function SvgIcon() {
+ var horizontal = targetOrigin.horizontal.replace('middle', 'vertical');
+
+ return {
+ root: {
+ position: 'fixed',
+ zIndex: muiTheme.zIndex.popover,
+ opacity: open ? 1 : 0,
+ transform: open ? 'scale(1, 1)' : 'scale(0, 0)',
+ transformOrigin: horizontal + ' ' + targetOrigin.vertical,
+ transition: _transitions2.default.easeOut('250ms', ['transform', 'opacity']),
+ maxHeight: '100%'
+ },
+ horizontal: {
+ maxHeight: '100%',
+ overflowY: 'auto',
+ transform: open ? 'scaleX(1)' : 'scaleX(0)',
+ opacity: open ? 1 : 0,
+ transformOrigin: horizontal + ' ' + targetOrigin.vertical,
+ transition: _transitions2.default.easeOut('250ms', ['transform', 'opacity'])
+ },
+ vertical: {
+ opacity: open ? 1 : 0,
+ transform: open ? 'scaleY(1)' : 'scaleY(0)',
+ transformOrigin: horizontal + ' ' + targetOrigin.vertical,
+ transition: _transitions2.default.easeOut('500ms', ['transform', 'opacity'])
+ }
+ };
+}
+
+var PopoverAnimationDefault = function (_Component) {
+ (0, _inherits3.default)(PopoverAnimationDefault, _Component);
+
+ function PopoverAnimationDefault() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, SvgIcon);
+ (0, _classCallCheck3.default)(this, PopoverAnimationDefault);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = SvgIcon.__proto__ || (0, _getPrototypeOf2.default)(SvgIcon)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- hovered: false
- }, _this.handleMouseLeave = function (event) {
- _this.setState({ hovered: false });
- _this.props.onMouseLeave(event);
- }, _this.handleMouseEnter = function (event) {
- _this.setState({ hovered: true });
- _this.props.onMouseEnter(event);
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = PopoverAnimationDefault.__proto__ || (0, _getPrototypeOf2.default)(PopoverAnimationDefault)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ open: false
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(SvgIcon, [{
+ (0, _createClass3.default)(PopoverAnimationDefault, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ this.setState({ open: true }); // eslint-disable-line react/no-did-mount-set-state
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ this.setState({
+ open: nextProps.open
+ });
+ }
+ }, {
key: 'render',
value: function render() {
var _props = this.props,
- children = _props.children,
- color = _props.color,
- hoverColor = _props.hoverColor,
- onMouseEnter = _props.onMouseEnter,
- onMouseLeave = _props.onMouseLeave,
+ className = _props.className,
style = _props.style,
- viewBox = _props.viewBox,
- other = (0, _objectWithoutProperties3.default)(_props, ['children', 'color', 'hoverColor', 'onMouseEnter', 'onMouseLeave', 'style', 'viewBox']);
- var _context$muiTheme = this.context.muiTheme,
- svgIcon = _context$muiTheme.svgIcon,
- prepareStyles = _context$muiTheme.prepareStyles;
-
-
- var offColor = color ? color : 'currentColor';
- var onColor = hoverColor ? hoverColor : offColor;
+ zDepth = _props.zDepth;
+ var prepareStyles = this.context.muiTheme.prepareStyles;
- var mergedStyles = (0, _simpleAssign2.default)({
- display: 'inline-block',
- color: svgIcon.color,
- fill: this.state.hovered ? onColor : offColor,
- height: 24,
- width: 24,
- userSelect: 'none',
- transition: _transitions2.default.easeOut()
- }, style);
+ var styles = getStyles(this.props, this.context, this.state);
return _react2.default.createElement(
- 'svg',
- (0, _extends3.default)({}, other, {
- onMouseEnter: this.handleMouseEnter,
- onMouseLeave: this.handleMouseLeave,
- style: prepareStyles(mergedStyles),
- viewBox: viewBox
- }),
- children
+ _Paper2.default,
+ {
+ style: (0, _simpleAssign2.default)(styles.root, style),
+ zDepth: zDepth,
+ className: className
+ },
+ _react2.default.createElement(
+ 'div',
+ { style: prepareStyles(styles.horizontal) },
+ _react2.default.createElement(
+ 'div',
+ { style: prepareStyles(styles.vertical) },
+ this.props.children
+ )
+ )
);
}
}]);
- return SvgIcon;
+ return PopoverAnimationDefault;
}(_react.Component);
-SvgIcon.muiName = 'SvgIcon';
-SvgIcon.defaultProps = {
- onMouseEnter: function onMouseEnter() {},
- onMouseLeave: function onMouseLeave() {},
- viewBox: '0 0 24 24'
+PopoverAnimationDefault.defaultProps = {
+ style: {},
+ zDepth: 1
};
-SvgIcon.contextTypes = {
+PopoverAnimationDefault.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? SvgIcon.propTypes = {
- /**
- * Elements passed into the SVG Icon.
- */
+ false ? PopoverAnimationDefault.propTypes = {
children: _react.PropTypes.node,
/**
- * This is the fill color of the svg icon.
- * If not specified, this component will default
- * to muiTheme.palette.textColor.
- */
- color: _react.PropTypes.string,
- /**
- * This is the icon color when the mouse hovers over the icon.
+ * The css class name of the root element.
*/
- hoverColor: _react.PropTypes.string,
- /** @ignore */
- onMouseEnter: _react.PropTypes.func,
- /** @ignore */
- onMouseLeave: _react.PropTypes.func,
+ className: _react.PropTypes.string,
+ open: _react.PropTypes.bool.isRequired,
/**
* Override the inline-styles of the root element.
*/
style: _react.PropTypes.object,
- /**
- * Allows you to redefine what the coordinates
- * without units mean inside an svg element. For example,
- * if the SVG element is 500 (width) by 200 (height), and you
- * pass viewBox="0 0 50 20", this means that the coordinates inside
- * the svg will go from the top left corner (0,0) to bottom right (50,20)
- * and each unit will be worth 10px.
- */
- viewBox: _react.PropTypes.string
+ targetOrigin: _propTypes2.default.origin.isRequired,
+ zDepth: _propTypes2.default.zDepth
} : void 0;
-exports.default = SvgIcon;
+exports.default = PopoverAnimationDefault;
/***/ }),
-/* 747 */
+/* 753 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+/**
+* Returns a number of pixels from the top of the screen for given dom element.
+*
+* @param {object} dom element
+* @returns {number} A position from the top of the screen in pixels
+*/
+var getOffsetTop = exports.getOffsetTop = function getOffsetTop(elem) {
+ var yPos = elem.offsetTop;
+ var tempEl = elem.offsetParent;
+
+ while (tempEl != null) {
+ yPos += tempEl.offsetTop;
+ tempEl = tempEl.offsetParent;
+ }
+
+ return yPos;
+};
+
+var isIOS = exports.isIOS = function isIOS() {
+ return (/iPad|iPhone|iPod/.test(window.navigator.userAgent) && !window.MSStream
+ );
+};
+
+/***/ }),
+/* 754 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -57473,31 +61047,31 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _pure = __webpack_require__(25);
+var _pure = __webpack_require__(20);
var _pure2 = _interopRequireDefault(_pure);
-var _SvgIcon = __webpack_require__(26);
+var _SvgIcon = __webpack_require__(21);
var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var NavigationExpandMore = function NavigationExpandMore(props) {
+var NavigationCheck = function NavigationCheck(props) {
return _react2.default.createElement(
_SvgIcon2.default,
props,
- _react2.default.createElement('path', { d: 'M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z' })
+ _react2.default.createElement('path', { d: 'M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z' })
);
};
-NavigationExpandMore = (0, _pure2.default)(NavigationExpandMore);
-NavigationExpandMore.displayName = 'NavigationExpandMore';
-NavigationExpandMore.muiName = 'SvgIcon';
+NavigationCheck = (0, _pure2.default)(NavigationCheck);
+NavigationCheck.displayName = 'NavigationCheck';
+NavigationCheck.muiName = 'SvgIcon';
-exports.default = NavigationExpandMore;
+exports.default = NavigationCheck;
/***/ }),
-/* 748 */
+/* 755 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -57506,53 +61080,43 @@ exports.default = NavigationExpandMore;
Object.defineProperty(exports, "__esModule", {
value: true
});
+exports.HotKeyHolder = undefined;
-var _react = __webpack_require__(0);
+var _classCallCheck2 = __webpack_require__(1);
-var _react2 = _interopRequireDefault(_react);
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-var _List = __webpack_require__(195);
+var _createClass2 = __webpack_require__(2);
-var _List2 = _interopRequireDefault(_List);
+var _createClass3 = _interopRequireDefault(_createClass2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var NestedList = function NestedList(props) {
- var children = props.children,
- open = props.open,
- nestedLevel = props.nestedLevel,
- style = props.style;
+var HotKeyHolder = exports.HotKeyHolder = function () {
+ function HotKeyHolder() {
+ var _this = this;
+ (0, _classCallCheck3.default)(this, HotKeyHolder);
- if (!open) {
- return null;
+ this.clear = function () {
+ _this.timerId = null;
+ _this.lastKeys = null;
+ };
}
- return _react2.default.createElement(
- _List2.default,
- { style: style },
- _react.Children.map(children, function (child) {
- return (0, _react.isValidElement)(child) ? (0, _react.cloneElement)(child, {
- nestedLevel: nestedLevel + 1
- }) : child;
- })
- );
-};
-
- false ? NestedList.propTypes = {
- children: _react.PropTypes.node,
- nestedLevel: _react.PropTypes.number.isRequired,
- open: _react.PropTypes.bool.isRequired,
- /**
- * Override the inline-styles of the root element.
- */
- style: _react.PropTypes.object
-} : void 0;
-
-exports.default = NestedList;
+ (0, _createClass3.default)(HotKeyHolder, [{
+ key: 'append',
+ value: function append(key) {
+ clearTimeout(this.timerId);
+ this.timerId = setTimeout(this.clear, 500);
+ return this.lastKeys = (this.lastKeys || '') + key;
+ }
+ }]);
+ return HotKeyHolder;
+}();
/***/ }),
-/* 749 */
+/* 756 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -57561,7 +61125,6 @@ exports.default = NestedList;
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.makeSelectable = undefined;
var _extends2 = __webpack_require__(7);
@@ -57599,133 +61162,497 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _colorManipulator = __webpack_require__(56);
+var _transitions = __webpack_require__(10);
+
+var _transitions2 = _interopRequireDefault(_transitions);
+
+var _colorManipulator = __webpack_require__(50);
+
+var _childUtils = __webpack_require__(131);
+
+var _EnhancedButton = __webpack_require__(51);
+
+var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton);
+
+var _Paper = __webpack_require__(32);
+
+var _Paper2 = _interopRequireDefault(_Paper);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var makeSelectable = exports.makeSelectable = function makeSelectable(MyComponent) {
- var _class, _temp2;
+function validateLabel(props, propName, componentName) {
+ if (false) {
+ if (!props.children && props.label !== 0 && !props.label && !props.icon) {
+ return new Error('Required prop label or children or icon was not specified in ' + componentName + '.');
+ }
+ }
+}
- return _temp2 = _class = function (_Component) {
- (0, _inherits3.default)(_class, _Component);
+function getStyles(props, context, state) {
+ var _context$muiTheme = context.muiTheme,
+ baseTheme = _context$muiTheme.baseTheme,
+ button = _context$muiTheme.button,
+ raisedButton = _context$muiTheme.raisedButton;
+ var disabled = props.disabled,
+ disabledBackgroundColor = props.disabledBackgroundColor,
+ disabledLabelColor = props.disabledLabelColor,
+ fullWidth = props.fullWidth,
+ icon = props.icon,
+ label = props.label,
+ labelPosition = props.labelPosition,
+ primary = props.primary,
+ secondary = props.secondary,
+ style = props.style;
- function _class() {
- var _ref;
- var _temp, _this, _ret;
+ var amount = primary || secondary ? 0.4 : 0.08;
- (0, _classCallCheck3.default)(this, _class);
+ var backgroundColor = raisedButton.color;
+ var labelColor = raisedButton.textColor;
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
+ if (disabled) {
+ backgroundColor = disabledBackgroundColor || raisedButton.disabledColor;
+ labelColor = disabledLabelColor || raisedButton.disabledTextColor;
+ } else if (primary) {
+ backgroundColor = raisedButton.primaryColor;
+ labelColor = raisedButton.primaryTextColor;
+ } else if (secondary) {
+ backgroundColor = raisedButton.secondaryColor;
+ labelColor = raisedButton.secondaryTextColor;
+ } else {
+ if (props.backgroundColor) {
+ backgroundColor = props.backgroundColor;
+ }
+ if (props.labelColor) {
+ labelColor = props.labelColor;
+ }
+ }
+
+ var buttonHeight = style && style.height || button.height;
+ var borderRadius = 2;
+
+ return {
+ root: {
+ display: 'inline-block',
+ transition: _transitions2.default.easeOut(),
+ minWidth: fullWidth ? '100%' : button.minWidth
+ },
+ button: {
+ height: buttonHeight,
+ lineHeight: buttonHeight + 'px',
+ width: '100%',
+ padding: 0,
+ borderRadius: borderRadius,
+ transition: _transitions2.default.easeOut(),
+ backgroundColor: backgroundColor,
+ // That's the default value for a button but not a link
+ textAlign: 'center'
+ },
+ label: {
+ position: 'relative',
+ opacity: 1,
+ fontSize: raisedButton.fontSize,
+ letterSpacing: 0,
+ textTransform: raisedButton.textTransform || button.textTransform || 'uppercase',
+ fontWeight: raisedButton.fontWeight,
+ margin: 0,
+ userSelect: 'none',
+ paddingLeft: icon && labelPosition !== 'before' ? 8 : baseTheme.spacing.desktopGutterLess,
+ paddingRight: icon && labelPosition === 'before' ? 8 : baseTheme.spacing.desktopGutterLess,
+ color: labelColor
+ },
+ icon: {
+ verticalAlign: 'middle',
+ marginLeft: label && labelPosition !== 'before' ? 12 : 0,
+ marginRight: label && labelPosition === 'before' ? 12 : 0
+ },
+ overlay: {
+ height: buttonHeight,
+ borderRadius: borderRadius,
+ backgroundColor: (state.keyboardFocused || state.hovered) && !disabled && (0, _colorManipulator.fade)(labelColor, amount),
+ transition: _transitions2.default.easeOut(),
+ top: 0
+ },
+ ripple: {
+ color: labelColor,
+ opacity: !(primary || secondary) ? 0.1 : 0.16
+ }
+ };
+}
+
+var RaisedButton = function (_Component) {
+ (0, _inherits3.default)(RaisedButton, _Component);
+
+ function RaisedButton() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, RaisedButton);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RaisedButton.__proto__ || (0, _getPrototypeOf2.default)(RaisedButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ hovered: false,
+ keyboardFocused: false,
+ touched: false,
+ initialZDepth: 0,
+ zDepth: 0
+ }, _this.handleMouseDown = function (event) {
+ // only listen to left clicks
+ if (event.button === 0) {
+ _this.setState({
+ zDepth: _this.state.initialZDepth + 1
+ });
+ }
+ if (_this.props.onMouseDown) {
+ _this.props.onMouseDown(event);
+ }
+ }, _this.handleMouseUp = function (event) {
+ _this.setState({
+ zDepth: _this.state.initialZDepth
+ });
+ if (_this.props.onMouseUp) {
+ _this.props.onMouseUp(event);
+ }
+ }, _this.handleMouseLeave = function (event) {
+ if (!_this.state.keyboardFocused) {
+ _this.setState({
+ zDepth: _this.state.initialZDepth,
+ hovered: false
+ });
+ }
+ if (_this.props.onMouseLeave) {
+ _this.props.onMouseLeave(event);
+ }
+ }, _this.handleMouseEnter = function (event) {
+ if (!_this.state.keyboardFocused && !_this.state.touched) {
+ _this.setState({
+ hovered: true
+ });
+ }
+ if (_this.props.onMouseEnter) {
+ _this.props.onMouseEnter(event);
+ }
+ }, _this.handleTouchStart = function (event) {
+ _this.setState({
+ touched: true,
+ zDepth: _this.state.initialZDepth + 1
+ });
+
+ if (_this.props.onTouchStart) {
+ _this.props.onTouchStart(event);
}
+ }, _this.handleTouchEnd = function (event) {
+ _this.setState({
+ touched: true,
+ zDepth: _this.state.initialZDepth
+ });
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = _class.__proto__ || (0, _getPrototypeOf2.default)(_class)).call.apply(_ref, [this].concat(args))), _this), _this.hasSelectedDescendant = function (previousValue, child) {
- if (_react2.default.isValidElement(child) && child.props.nestedItems && child.props.nestedItems.length > 0) {
- return child.props.nestedItems.reduce(_this.hasSelectedDescendant, previousValue);
- }
- return previousValue || _this.isChildSelected(child, _this.props);
- }, _this.handleItemTouchTap = function (event, item) {
- var itemValue = item.props.value;
+ if (_this.props.onTouchEnd) {
+ _this.props.onTouchEnd(event);
+ }
+ }, _this.handleKeyboardFocus = function (event, keyboardFocused) {
+ var zDepth = keyboardFocused && !_this.props.disabled ? _this.state.initialZDepth + 1 : _this.state.initialZDepth;
+
+ _this.setState({
+ zDepth: zDepth,
+ keyboardFocused: keyboardFocused
+ });
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
+
+ (0, _createClass3.default)(RaisedButton, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ var zDepth = this.props.disabled ? 0 : 1;
+ this.setState({
+ zDepth: zDepth,
+ initialZDepth: zDepth
+ });
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ var zDepth = nextProps.disabled ? 0 : 1;
+ var nextState = {
+ zDepth: zDepth,
+ initialZDepth: zDepth
+ };
+
+ if (nextProps.disabled) {
+ nextState.hovered = false;
+ }
+
+ this.setState(nextState);
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ backgroundColor = _props.backgroundColor,
+ buttonStyle = _props.buttonStyle,
+ children = _props.children,
+ className = _props.className,
+ disabled = _props.disabled,
+ disabledBackgroundColor = _props.disabledBackgroundColor,
+ disabledLabelColor = _props.disabledLabelColor,
+ fullWidth = _props.fullWidth,
+ icon = _props.icon,
+ label = _props.label,
+ labelColor = _props.labelColor,
+ labelPosition = _props.labelPosition,
+ labelStyle = _props.labelStyle,
+ overlayStyle = _props.overlayStyle,
+ primary = _props.primary,
+ rippleStyle = _props.rippleStyle,
+ secondary = _props.secondary,
+ style = _props.style,
+ other = (0, _objectWithoutProperties3.default)(_props, ['backgroundColor', 'buttonStyle', 'children', 'className', 'disabled', 'disabledBackgroundColor', 'disabledLabelColor', 'fullWidth', 'icon', 'label', 'labelColor', 'labelPosition', 'labelStyle', 'overlayStyle', 'primary', 'rippleStyle', 'secondary', 'style']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
+
+ var styles = getStyles(this.props, this.context, this.state);
+ var mergedRippleStyles = (0, _simpleAssign2.default)({}, styles.ripple, rippleStyle);
+
+ var buttonEventHandlers = disabled ? {} : {
+ onMouseDown: this.handleMouseDown,
+ onMouseUp: this.handleMouseUp,
+ onMouseLeave: this.handleMouseLeave,
+ onMouseEnter: this.handleMouseEnter,
+ onTouchStart: this.handleTouchStart,
+ onTouchEnd: this.handleTouchEnd,
+ onKeyboardFocus: this.handleKeyboardFocus
+ };
+
+ var labelElement = label && _react2.default.createElement(
+ 'span',
+ { style: prepareStyles((0, _simpleAssign2.default)(styles.label, labelStyle)) },
+ label
+ );
+
+ var iconCloned = icon && (0, _react.cloneElement)(icon, {
+ color: icon.props.color || styles.label.color,
+ style: (0, _simpleAssign2.default)(styles.icon, icon.props.style)
+ });
+
+ // Place label before or after children.
+ var childrenFragment = labelPosition === 'before' ? {
+ labelElement: labelElement,
+ iconCloned: iconCloned,
+ children: children
+ } : {
+ children: children,
+ iconCloned: iconCloned,
+ labelElement: labelElement
+ };
+
+ var enhancedButtonChildren = (0, _childUtils.createChildFragment)(childrenFragment);
+
+ return _react2.default.createElement(
+ _Paper2.default,
+ {
+ className: className,
+ style: (0, _simpleAssign2.default)(styles.root, style),
+ zDepth: this.state.zDepth
+ },
+ _react2.default.createElement(
+ _EnhancedButton2.default,
+ (0, _extends3.default)({}, other, buttonEventHandlers, {
+ ref: 'container',
+ disabled: disabled,
+ style: (0, _simpleAssign2.default)(styles.button, buttonStyle),
+ focusRippleColor: mergedRippleStyles.color,
+ touchRippleColor: mergedRippleStyles.color,
+ focusRippleOpacity: mergedRippleStyles.opacity,
+ touchRippleOpacity: mergedRippleStyles.opacity
+ }),
+ _react2.default.createElement(
+ 'div',
+ {
+ ref: 'overlay',
+ style: prepareStyles((0, _simpleAssign2.default)(styles.overlay, overlayStyle))
+ },
+ enhancedButtonChildren
+ )
+ )
+ );
+ }
+ }]);
+ return RaisedButton;
+}(_react.Component);
+
+RaisedButton.muiName = 'RaisedButton';
+RaisedButton.defaultProps = {
+ disabled: false,
+ labelPosition: 'after',
+ fullWidth: false,
+ primary: false,
+ secondary: false
+};
+RaisedButton.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? RaisedButton.propTypes = {
+ /**
+ * Override the default background color for the button,
+ * but not the default disabled background color
+ * (use `disabledBackgroundColor` for this).
+ */
+ backgroundColor: _react.PropTypes.string,
+ /**
+ * Override the inline-styles of the button element.
+ */
+ buttonStyle: _react.PropTypes.object,
+ /**
+ * The content of the button.
+ * If a label is provided via the `label` prop, the text within the label
+ * will be displayed in addition to the content provided here.
+ */
+ children: _react.PropTypes.node,
+ /**
+ * The CSS class name of the root element.
+ */
+ className: _react.PropTypes.string,
+ /**
+ * If true, the button will be disabled.
+ */
+ disabled: _react.PropTypes.bool,
+ /**
+ * Override the default background color for the button
+ * when it is disabled.
+ */
+ disabledBackgroundColor: _react.PropTypes.string,
+ /**
+ * The color of the button's label when the button is disabled.
+ */
+ disabledLabelColor: _react.PropTypes.string,
+ /**
+ * If true, the button will take up the full width of its container.
+ */
+ fullWidth: _react.PropTypes.bool,
+ /**
+ * The URL to link to when the button is clicked.
+ */
+ href: _react.PropTypes.string,
+ /**
+ * An icon to be displayed within the button.
+ */
+ icon: _react.PropTypes.node,
+ /**
+ * The label to be displayed within the button.
+ * If content is provided via the `children` prop, that content will be
+ * displayed in addition to the label provided here.
+ */
+ label: validateLabel,
+ /**
+ * The color of the button's label.
+ */
+ labelColor: _react.PropTypes.string,
+ /**
+ * The position of the button's label relative to the button's `children`.
+ */
+ labelPosition: _react.PropTypes.oneOf(['before', 'after']),
+ /**
+ * Override the inline-styles of the button's label element.
+ */
+ labelStyle: _react.PropTypes.object,
+ /** @ignore */
+ onMouseDown: _react.PropTypes.func,
+ /** @ignore */
+ onMouseEnter: _react.PropTypes.func,
+ /** @ignore */
+ onMouseLeave: _react.PropTypes.func,
+ /** @ignore */
+ onMouseUp: _react.PropTypes.func,
+ /** @ignore */
+ onTouchEnd: _react.PropTypes.func,
+ /** @ignore */
+ onTouchStart: _react.PropTypes.func,
+ /**
+ * Override the inline style of the button overlay.
+ */
+ overlayStyle: _react.PropTypes.object,
+ /**
+ * If true, the button will use the theme's primary color.
+ */
+ primary: _react.PropTypes.bool,
+ /**
+ * Override the inline style of the ripple element.
+ */
+ rippleStyle: _react.PropTypes.object,
+ /**
+ * If true, the button will use the theme's secondary color.
+ * If both `secondary` and `primary` are true, the button will use
+ * the theme's primary color.
+ */
+ secondary: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
+} : void 0;
+exports.default = RaisedButton;
+
+/***/ }),
+/* 757 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
- if (itemValue !== _this.props.value) {
- if (_this.props.onChange) {
- _this.props.onChange(event, itemValue);
- }
- }
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
- }
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- (0, _createClass3.default)(_class, [{
- key: 'extendChild',
- value: function extendChild(child, styles, selectedItemStyle) {
- var _this2 = this;
+var _AutoComplete = __webpack_require__(758);
- if (child && child.type && child.type.muiName === 'ListItem') {
- var selected = this.isChildSelected(child, this.props);
- var selectedChildrenStyles = void 0;
- if (selected) {
- selectedChildrenStyles = (0, _simpleAssign2.default)({}, styles, selectedItemStyle);
- }
+var _AutoComplete2 = _interopRequireDefault(_AutoComplete);
- var mergedChildrenStyles = (0, _simpleAssign2.default)({}, child.props.style, selectedChildrenStyles);
+var _createComponent = __webpack_require__(41);
- this.keyIndex += 1;
+var _createComponent2 = _interopRequireDefault(_createComponent);
- return _react2.default.cloneElement(child, {
- onTouchTap: function onTouchTap(event) {
- _this2.handleItemTouchTap(event, child);
- if (child.props.onTouchTap) {
- child.props.onTouchTap(event);
- }
- },
- key: this.keyIndex,
- style: mergedChildrenStyles,
- nestedItems: child.props.nestedItems.map(function (child) {
- return _this2.extendChild(child, styles, selectedItemStyle);
- }),
- initiallyOpen: this.isInitiallyOpen(child)
- });
- } else {
- return child;
- }
- }
- }, {
- key: 'isInitiallyOpen',
- value: function isInitiallyOpen(child) {
- if (child.props.initiallyOpen) {
- return child.props.initiallyOpen;
- }
- return this.hasSelectedDescendant(false, child);
- }
- }, {
- key: 'isChildSelected',
- value: function isChildSelected(child, props) {
- return props.value === child.props.value;
- }
- }, {
- key: 'render',
- value: function render() {
- var _this3 = this;
+var _mapError = __webpack_require__(66);
- var _props = this.props,
- children = _props.children,
- selectedItemStyle = _props.selectedItemStyle,
- other = (0, _objectWithoutProperties3.default)(_props, ['children', 'selectedItemStyle']);
+var _mapError2 = _interopRequireDefault(_mapError);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- this.keyIndex = 0;
- var styles = {};
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
- if (!selectedItemStyle) {
- var textColor = this.context.muiTheme.baseTheme.palette.textColor;
- styles.backgroundColor = (0, _colorManipulator.fade)(textColor, 0.2);
- }
+exports.default = (0, _createComponent2.default)(_AutoComplete2.default, function (_ref) {
+ var _ref$input = _ref.input,
+ onChange = _ref$input.onChange,
+ value = _ref$input.value,
+ _onNewRequest = _ref.onNewRequest,
+ dataSourceConfig = _ref.dataSourceConfig,
+ props = _objectWithoutProperties(_ref, ['input', 'onNewRequest', 'dataSourceConfig']);
- return _react2.default.createElement(
- MyComponent,
- (0, _extends3.default)({}, other, this.state),
- _react.Children.map(children, function (child) {
- return _this3.extendChild(child, styles, selectedItemStyle);
- })
- );
+ return _extends({}, (0, _mapError2.default)(props), {
+ dataSourceConfig: dataSourceConfig,
+ searchText: dataSourceConfig ? value[dataSourceConfig.text] : value,
+ onNewRequest: function onNewRequest(value) {
+ onChange((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && dataSourceConfig ? value[dataSourceConfig.value] : value);
+ if (_onNewRequest) {
+ _onNewRequest(value);
}
- }]);
- return _class;
- }(_react.Component), _class.propTypes = {
- children: _react.PropTypes.node,
- onChange: _react.PropTypes.func,
- selectedItemStyle: _react.PropTypes.object,
- value: _react.PropTypes.any
- }, _class.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
- }, _temp2;
-};
-
-exports.default = makeSelectable;
+ },
+ onUpdateInput: function onUpdateInput(value) {
+ if (!dataSourceConfig) {
+ onChange(value);
+ }
+ }
+ });
+});
/***/ }),
-/* 750 */
+/* 758 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -57736,16 +61663,16 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = undefined;
-var _Drawer = __webpack_require__(751);
+var _AutoComplete = __webpack_require__(328);
-var _Drawer2 = _interopRequireDefault(_Drawer);
+var _AutoComplete2 = _interopRequireDefault(_AutoComplete);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-exports.default = _Drawer2.default;
+exports.default = _AutoComplete2.default;
/***/ }),
-/* 751 */
+/* 759 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -57755,6 +61682,14 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
+var _extends2 = __webpack_require__(7);
+
+var _extends3 = _interopRequireDefault(_extends2);
+
+var _objectWithoutProperties2 = __webpack_require__(8);
+
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
var _getPrototypeOf = __webpack_require__(3);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -57783,640 +61718,542 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactDom = __webpack_require__(19);
+var _reactDom = __webpack_require__(16);
var _reactDom2 = _interopRequireDefault(_reactDom);
-var _reactEventListener = __webpack_require__(42);
+var _shallowEqual = __webpack_require__(63);
-var _reactEventListener2 = _interopRequireDefault(_reactEventListener);
+var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
-var _keycode = __webpack_require__(30);
+var _transitions = __webpack_require__(10);
-var _keycode2 = _interopRequireDefault(_keycode);
+var _transitions2 = _interopRequireDefault(_transitions);
-var _autoPrefix = __webpack_require__(94);
+var _EnhancedTextarea = __webpack_require__(760);
-var _autoPrefix2 = _interopRequireDefault(_autoPrefix);
+var _EnhancedTextarea2 = _interopRequireDefault(_EnhancedTextarea);
-var _transitions = __webpack_require__(10);
+var _TextFieldHint = __webpack_require__(329);
-var _transitions2 = _interopRequireDefault(_transitions);
+var _TextFieldHint2 = _interopRequireDefault(_TextFieldHint);
-var _Overlay = __webpack_require__(319);
+var _TextFieldLabel = __webpack_require__(330);
-var _Overlay2 = _interopRequireDefault(_Overlay);
+var _TextFieldLabel2 = _interopRequireDefault(_TextFieldLabel);
-var _Paper = __webpack_require__(34);
+var _TextFieldUnderline = __webpack_require__(331);
-var _Paper2 = _interopRequireDefault(_Paper);
+var _TextFieldUnderline2 = _interopRequireDefault(_TextFieldUnderline);
-var _propTypes = __webpack_require__(41);
+var _warning = __webpack_require__(15);
-var _propTypes2 = _interopRequireDefault(_propTypes);
+var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var openNavEventHandler = null;
+var getStyles = function getStyles(props, context, state) {
+ var _context$muiTheme = context.muiTheme,
+ baseTheme = _context$muiTheme.baseTheme,
+ _context$muiTheme$tex = _context$muiTheme.textField,
+ floatingLabelColor = _context$muiTheme$tex.floatingLabelColor,
+ focusColor = _context$muiTheme$tex.focusColor,
+ textColor = _context$muiTheme$tex.textColor,
+ disabledTextColor = _context$muiTheme$tex.disabledTextColor,
+ backgroundColor = _context$muiTheme$tex.backgroundColor,
+ errorColor = _context$muiTheme$tex.errorColor;
-var Drawer = function (_Component) {
- (0, _inherits3.default)(Drawer, _Component);
- function Drawer() {
- var _ref;
+ var styles = {
+ root: {
+ fontSize: 16,
+ lineHeight: '24px',
+ width: props.fullWidth ? '100%' : 256,
+ height: (props.rows - 1) * 24 + (props.floatingLabelText ? 72 : 48),
+ display: 'inline-block',
+ position: 'relative',
+ backgroundColor: backgroundColor,
+ fontFamily: baseTheme.fontFamily,
+ transition: _transitions2.default.easeOut('200ms', 'height'),
+ cursor: props.disabled ? 'not-allowed' : 'auto'
+ },
+ error: {
+ position: 'relative',
+ bottom: 2,
+ fontSize: 12,
+ lineHeight: '12px',
+ color: errorColor,
+ transition: _transitions2.default.easeOut()
+ },
+ floatingLabel: {
+ color: props.disabled ? disabledTextColor : floatingLabelColor,
+ pointerEvents: 'none'
+ },
+ input: {
+ padding: 0,
+ position: 'relative',
+ width: '100%',
+ border: 'none',
+ outline: 'none',
+ backgroundColor: 'rgba(0,0,0,0)',
+ color: props.disabled ? disabledTextColor : textColor,
+ cursor: 'inherit',
+ font: 'inherit',
+ WebkitTapHighlightColor: 'rgba(0,0,0,0)' },
+ inputNative: {
+ appearance: 'textfield' }
+ };
- var _temp, _this, _ret;
+ styles.textarea = (0, _simpleAssign2.default)({}, styles.input, {
+ marginTop: props.floatingLabelText ? 36 : 12,
+ marginBottom: props.floatingLabelText ? -36 : -12,
+ boxSizing: 'border-box',
+ font: 'inherit'
+ });
- (0, _classCallCheck3.default)(this, Drawer);
+ // Do not assign a height to the textarea as he handles it on his own.
+ styles.input.height = '100%';
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
+ if (state.isFocused) {
+ styles.floatingLabel.color = focusColor;
+ }
+
+ if (props.floatingLabelText) {
+ styles.input.boxSizing = 'border-box';
+
+ if (!props.multiLine) {
+ styles.input.marginTop = 14;
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Drawer.__proto__ || (0, _getPrototypeOf2.default)(Drawer)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapOverlay = function (event) {
- event.preventDefault();
- _this.close('clickaway');
- }, _this.handleKeyUp = function (event) {
- if (_this.state.open && !_this.props.docked && (0, _keycode2.default)(event) === 'esc') {
- _this.close('escape');
- }
- }, _this.onBodyTouchStart = function (event) {
- var swipeAreaWidth = _this.props.swipeAreaWidth;
+ if (state.errorText) {
+ styles.error.bottom = !props.multiLine ? styles.error.fontSize + 3 : 3;
+ }
+ }
- var touchStartX = event.touches[0].pageX;
- var touchStartY = event.touches[0].pageY;
+ if (state.errorText) {
+ if (state.isFocused) {
+ styles.floatingLabel.color = styles.error.color;
+ }
+ }
- // Open only if swiping from far left (or right) while closed
- if (swipeAreaWidth !== null && !_this.state.open) {
- if (_this.props.openSecondary) {
- // If openSecondary is true calculate from the far right
- if (touchStartX < document.body.offsetWidth - swipeAreaWidth) return;
- } else {
- // If openSecondary is false calculate from the far left
- if (touchStartX > swipeAreaWidth) return;
- }
- }
+ return styles;
+};
- if (!_this.state.open && (openNavEventHandler !== _this.onBodyTouchStart || _this.props.disableSwipeToOpen)) {
- return;
- }
+/**
+ * Check if a value is valid to be displayed inside an input.
+ *
+ * @param The value to check.
+ * @returns True if the string provided is valid, false otherwise.
+ */
+function isValid(value) {
+ return value !== '' && value !== undefined && value !== null;
+}
- _this.maybeSwiping = true;
- _this.touchStartX = touchStartX;
- _this.touchStartY = touchStartY;
+var TextField = function (_Component) {
+ (0, _inherits3.default)(TextField, _Component);
- document.body.addEventListener('touchmove', _this.onBodyTouchMove);
- document.body.addEventListener('touchend', _this.onBodyTouchEnd);
- document.body.addEventListener('touchcancel', _this.onBodyTouchEnd);
- }, _this.onBodyTouchMove = function (event) {
- var currentX = event.touches[0].pageX;
- var currentY = event.touches[0].pageY;
+ function TextField() {
+ var _ref;
- if (_this.state.swiping) {
- event.preventDefault();
- _this.setPosition(_this.getTranslateX(currentX));
- } else if (_this.maybeSwiping) {
- var dXAbs = Math.abs(currentX - _this.touchStartX);
- var dYAbs = Math.abs(currentY - _this.touchStartY);
- // If the user has moved his thumb ten pixels in either direction,
- // we can safely make an assumption about whether he was intending
- // to swipe or scroll.
- var threshold = 10;
+ var _temp, _this, _ret;
- if (dXAbs > threshold && dYAbs <= threshold) {
- _this.swipeStartX = currentX;
- _this.setState({
- swiping: _this.state.open ? 'closing' : 'opening'
- });
- _this.setPosition(_this.getTranslateX(currentX));
- } else if (dXAbs <= threshold && dYAbs > threshold) {
- _this.onBodyTouchEnd();
- }
- }
- }, _this.onBodyTouchEnd = function (event) {
- if (_this.state.swiping) {
- var currentX = event.changedTouches[0].pageX;
- var translateRatio = _this.getTranslateX(currentX) / _this.getMaxTranslateX();
+ (0, _classCallCheck3.default)(this, TextField);
- _this.maybeSwiping = false;
- var swiping = _this.state.swiping;
- _this.setState({
- swiping: null
- });
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
- // We have to open or close after setting swiping to null,
- // because only then CSS transition is enabled.
- if (translateRatio > 0.5) {
- if (swiping === 'opening') {
- _this.setPosition(_this.getMaxTranslateX());
- } else {
- _this.close('swipe');
- }
- } else {
- if (swiping === 'opening') {
- _this.open('swipe');
- } else {
- _this.setPosition(0);
- }
- }
- } else {
- _this.maybeSwiping = false;
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TextField.__proto__ || (0, _getPrototypeOf2.default)(TextField)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ isFocused: false,
+ errorText: undefined,
+ hasValue: false
+ }, _this.handleInputBlur = function (event) {
+ _this.setState({ isFocused: false });
+ if (_this.props.onBlur) {
+ _this.props.onBlur(event);
}
-
- document.body.removeEventListener('touchmove', _this.onBodyTouchMove);
- document.body.removeEventListener('touchend', _this.onBodyTouchEnd);
- document.body.removeEventListener('touchcancel', _this.onBodyTouchEnd);
+ }, _this.handleInputChange = function (event) {
+ _this.setState({ hasValue: isValid(event.target.value) });
+ if (_this.props.onChange) {
+ _this.props.onChange(event, event.target.value);
+ }
+ }, _this.handleInputFocus = function (event) {
+ if (_this.props.disabled) {
+ return;
+ }
+ _this.setState({ isFocused: true });
+ if (_this.props.onFocus) {
+ _this.props.onFocus(event);
+ }
+ }, _this.handleHeightChange = function (event, height) {
+ var newHeight = height + 24;
+ if (_this.props.floatingLabelText) {
+ newHeight += 24;
+ }
+ _reactDom2.default.findDOMNode(_this).style.height = newHeight + 'px';
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(Drawer, [{
+ (0, _createClass3.default)(TextField, [{
key: 'componentWillMount',
value: function componentWillMount() {
- this.maybeSwiping = false;
- this.touchStartX = null;
- this.touchStartY = null;
- this.swipeStartX = null;
+ var _props = this.props,
+ children = _props.children,
+ name = _props.name,
+ hintText = _props.hintText,
+ floatingLabelText = _props.floatingLabelText,
+ id = _props.id;
+
+
+ var propsLeaf = children ? children.props : this.props;
this.setState({
- open: this.props.open !== null ? this.props.open : this.props.docked,
- swiping: null
+ errorText: this.props.errorText,
+ hasValue: isValid(propsLeaf.value) || isValid(propsLeaf.defaultValue)
});
- }
- }, {
- key: 'componentDidMount',
- value: function componentDidMount() {
- this.enableSwipeHandling();
+
+ false ? (0, _warning2.default)(name || hintText || floatingLabelText || id, 'Material-UI: We don\'t have enough information\n to build a robust unique id for the TextField component. Please provide an id or a name.') : void 0;
+
+ var uniqueId = name + '-' + hintText + '-' + floatingLabelText + '-' + Math.floor(Math.random() * 0xFFFF);
+ this.uniqueId = uniqueId.replace(/[^A-Za-z0-9-]/gi, '');
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
- // If controlled then the open prop takes precedence.
- if (nextProps.open !== null) {
- this.setState({
- open: nextProps.open
- });
- // Otherwise, if docked is changed, change the open state for when uncontrolled.
- } else if (this.props.docked !== nextProps.docked) {
+ if (nextProps.errorText !== this.props.errorText) {
this.setState({
- open: nextProps.docked
+ errorText: nextProps.errorText
});
}
- }
- }, {
- key: 'componentDidUpdate',
- value: function componentDidUpdate() {
- this.enableSwipeHandling();
- }
- }, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- this.disableSwipeHandling();
- }
- }, {
- key: 'getStyles',
- value: function getStyles() {
- var muiTheme = this.context.muiTheme;
- var theme = muiTheme.drawer;
- var x = this.getTranslateMultiplier() * (this.state.open ? 0 : this.getMaxTranslateX());
+ if (nextProps.children && nextProps.children.props) {
+ nextProps = nextProps.children.props;
+ }
- var styles = {
- root: {
- height: '100%',
- width: this.props.width || theme.width,
- position: 'fixed',
- zIndex: muiTheme.zIndex.drawer,
- left: 0,
- top: 0,
- transform: 'translate(' + x + 'px, 0)',
- transition: !this.state.swiping && _transitions2.default.easeOut(null, 'transform', null),
- backgroundColor: theme.color,
- overflow: 'auto',
- WebkitOverflowScrolling: 'touch' },
- overlay: {
- zIndex: muiTheme.zIndex.drawerOverlay,
- pointerEvents: this.state.open ? 'auto' : 'none' },
- rootWhenOpenRight: {
- left: 'auto',
- right: 0
- }
- };
+ if (nextProps.hasOwnProperty('value')) {
+ var hasValue = isValid(nextProps.value);
- return styles;
- }
- }, {
- key: 'shouldShow',
- value: function shouldShow() {
- return this.state.open || !!this.state.swiping; // component is swiping
- }
- }, {
- key: 'close',
- value: function close(reason) {
- if (this.props.open === null) this.setState({ open: false });
- if (this.props.onRequestChange) this.props.onRequestChange(false, reason);
- return this;
+ this.setState({
+ hasValue: hasValue
+ });
+ }
}
}, {
- key: 'open',
- value: function open(reason) {
- if (this.props.open === null) this.setState({ open: true });
- if (this.props.onRequestChange) this.props.onRequestChange(true, reason);
- return this;
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps, nextState, nextContext) {
+ return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext);
}
}, {
- key: 'getMaxTranslateX',
- value: function getMaxTranslateX() {
- var width = this.props.width || this.context.muiTheme.drawer.width;
- return width + 10;
+ key: 'blur',
+ value: function blur() {
+ if (this.input) {
+ this.getInputNode().blur();
+ }
}
}, {
- key: 'getTranslateMultiplier',
- value: function getTranslateMultiplier() {
- return this.props.openSecondary ? 1 : -1;
+ key: 'focus',
+ value: function focus() {
+ if (this.input) {
+ this.getInputNode().focus();
+ }
}
}, {
- key: 'enableSwipeHandling',
- value: function enableSwipeHandling() {
- if (!this.props.docked) {
- document.body.addEventListener('touchstart', this.onBodyTouchStart);
- if (!openNavEventHandler) {
- openNavEventHandler = this.onBodyTouchStart;
- }
- } else {
- this.disableSwipeHandling();
+ key: 'select',
+ value: function select() {
+ if (this.input) {
+ this.getInputNode().select();
}
}
}, {
- key: 'disableSwipeHandling',
- value: function disableSwipeHandling() {
- document.body.removeEventListener('touchstart', this.onBodyTouchStart);
- if (openNavEventHandler === this.onBodyTouchStart) {
- openNavEventHandler = null;
- }
+ key: 'getValue',
+ value: function getValue() {
+ return this.input ? this.getInputNode().value : undefined;
}
}, {
- key: 'setPosition',
- value: function setPosition(translateX) {
- var drawer = _reactDom2.default.findDOMNode(this.refs.clickAwayableElement);
- var transformCSS = 'translate(' + this.getTranslateMultiplier() * translateX + 'px, 0)';
- this.refs.overlay.setOpacity(1 - translateX / this.getMaxTranslateX());
- _autoPrefix2.default.set(drawer.style, 'transform', transformCSS);
+ key: 'getInputNode',
+ value: function getInputNode() {
+ return this.props.children || this.props.multiLine ? this.input.getInputNode() : _reactDom2.default.findDOMNode(this.input);
}
}, {
- key: 'getTranslateX',
- value: function getTranslateX(currentX) {
- return Math.min(Math.max(this.state.swiping === 'closing' ? this.getTranslateMultiplier() * (currentX - this.swipeStartX) : this.getMaxTranslateX() - this.getTranslateMultiplier() * (this.swipeStartX - currentX), 0), this.getMaxTranslateX());
+ key: '_isControlled',
+ value: function _isControlled() {
+ return this.props.hasOwnProperty('value');
}
}, {
key: 'render',
value: function render() {
- var _props = this.props,
- children = _props.children,
- className = _props.className,
- containerClassName = _props.containerClassName,
- containerStyle = _props.containerStyle,
- docked = _props.docked,
- openSecondary = _props.openSecondary,
- overlayClassName = _props.overlayClassName,
- overlayStyle = _props.overlayStyle,
- style = _props.style,
- zDepth = _props.zDepth;
+ var _this2 = this;
+ var _props2 = this.props,
+ children = _props2.children,
+ className = _props2.className,
+ disabled = _props2.disabled,
+ errorStyle = _props2.errorStyle,
+ errorText = _props2.errorText,
+ floatingLabelFixed = _props2.floatingLabelFixed,
+ floatingLabelFocusStyle = _props2.floatingLabelFocusStyle,
+ floatingLabelShrinkStyle = _props2.floatingLabelShrinkStyle,
+ floatingLabelStyle = _props2.floatingLabelStyle,
+ floatingLabelText = _props2.floatingLabelText,
+ fullWidth = _props2.fullWidth,
+ hintText = _props2.hintText,
+ hintStyle = _props2.hintStyle,
+ id = _props2.id,
+ inputStyle = _props2.inputStyle,
+ multiLine = _props2.multiLine,
+ onBlur = _props2.onBlur,
+ onChange = _props2.onChange,
+ onFocus = _props2.onFocus,
+ style = _props2.style,
+ type = _props2.type,
+ underlineDisabledStyle = _props2.underlineDisabledStyle,
+ underlineFocusStyle = _props2.underlineFocusStyle,
+ underlineShow = _props2.underlineShow,
+ underlineStyle = _props2.underlineStyle,
+ rows = _props2.rows,
+ rowsMax = _props2.rowsMax,
+ textareaStyle = _props2.textareaStyle,
+ other = (0, _objectWithoutProperties3.default)(_props2, ['children', 'className', 'disabled', 'errorStyle', 'errorText', 'floatingLabelFixed', 'floatingLabelFocusStyle', 'floatingLabelShrinkStyle', 'floatingLabelStyle', 'floatingLabelText', 'fullWidth', 'hintText', 'hintStyle', 'id', 'inputStyle', 'multiLine', 'onBlur', 'onChange', 'onFocus', 'style', 'type', 'underlineDisabledStyle', 'underlineFocusStyle', 'underlineShow', 'underlineStyle', 'rows', 'rowsMax', 'textareaStyle']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
- var styles = this.getStyles();
+ var styles = getStyles(this.props, this.context, this.state);
+ var inputId = id || this.uniqueId;
- var overlay = void 0;
- if (!docked) {
- overlay = _react2.default.createElement(_Overlay2.default, {
- ref: 'overlay',
- show: this.shouldShow(),
- className: overlayClassName,
- style: (0, _simpleAssign2.default)(styles.overlay, overlayStyle),
- transitionEnabled: !this.state.swiping,
- onTouchTap: this.handleTouchTapOverlay
- });
+ var errorTextElement = this.state.errorText && _react2.default.createElement(
+ 'div',
+ { style: prepareStyles((0, _simpleAssign2.default)(styles.error, errorStyle)) },
+ this.state.errorText
+ );
+
+ var floatingLabelTextElement = floatingLabelText && _react2.default.createElement(
+ _TextFieldLabel2.default,
+ {
+ muiTheme: this.context.muiTheme,
+ style: (0, _simpleAssign2.default)(styles.floatingLabel, floatingLabelStyle, this.state.isFocused ? floatingLabelFocusStyle : null),
+ shrinkStyle: floatingLabelShrinkStyle,
+ htmlFor: inputId,
+ shrink: this.state.hasValue || this.state.isFocused || floatingLabelFixed,
+ disabled: disabled
+ },
+ floatingLabelText
+ );
+
+ var inputProps = {
+ id: inputId,
+ ref: function ref(elem) {
+ return _this2.input = elem;
+ },
+ disabled: this.props.disabled,
+ onBlur: this.handleInputBlur,
+ onChange: this.handleInputChange,
+ onFocus: this.handleInputFocus
+ };
+
+ var childStyleMerged = (0, _simpleAssign2.default)(styles.input, inputStyle);
+
+ var inputElement = void 0;
+ if (children) {
+ inputElement = _react2.default.cloneElement(children, (0, _extends3.default)({}, inputProps, children.props, {
+ style: (0, _simpleAssign2.default)(childStyleMerged, children.props.style)
+ }));
+ } else {
+ inputElement = multiLine ? _react2.default.createElement(_EnhancedTextarea2.default, (0, _extends3.default)({
+ style: childStyleMerged,
+ textareaStyle: (0, _simpleAssign2.default)(styles.textarea, styles.inputNative, textareaStyle),
+ rows: rows,
+ rowsMax: rowsMax
+ }, other, inputProps, {
+ onHeightChange: this.handleHeightChange
+ })) : _react2.default.createElement('input', (0, _extends3.default)({
+ type: type,
+ style: prepareStyles((0, _simpleAssign2.default)(styles.inputNative, childStyleMerged))
+ }, other, inputProps));
+ }
+
+ var rootProps = {};
+
+ if (children) {
+ rootProps = other;
}
return _react2.default.createElement(
'div',
- {
+ (0, _extends3.default)({}, rootProps, {
className: className,
- style: style
- },
- _react2.default.createElement(_reactEventListener2.default, { target: 'window', onKeyUp: this.handleKeyUp }),
- overlay,
- _react2.default.createElement(
- _Paper2.default,
- {
- ref: 'clickAwayableElement',
- zDepth: zDepth,
- rounded: false,
- transitionEnabled: !this.state.swiping,
- className: containerClassName,
- style: (0, _simpleAssign2.default)(styles.root, openSecondary && styles.rootWhenOpenRight, containerStyle)
- },
- children
- )
+ style: prepareStyles((0, _simpleAssign2.default)(styles.root, style))
+ }),
+ floatingLabelTextElement,
+ hintText ? _react2.default.createElement(_TextFieldHint2.default, {
+ muiTheme: this.context.muiTheme,
+ show: !(this.state.hasValue || floatingLabelText && !this.state.isFocused) || !this.state.hasValue && floatingLabelText && floatingLabelFixed && !this.state.isFocused,
+ style: hintStyle,
+ text: hintText
+ }) : null,
+ inputElement,
+ underlineShow ? _react2.default.createElement(_TextFieldUnderline2.default, {
+ disabled: disabled,
+ disabledStyle: underlineDisabledStyle,
+ error: !!this.state.errorText,
+ errorStyle: errorStyle,
+ focus: this.state.isFocused,
+ focusStyle: underlineFocusStyle,
+ muiTheme: this.context.muiTheme,
+ style: underlineStyle
+ }) : null,
+ errorTextElement
);
}
}]);
- return Drawer;
+ return TextField;
}(_react.Component);
-Drawer.defaultProps = {
- disableSwipeToOpen: false,
- docked: true,
- open: null,
- openSecondary: false,
- swipeAreaWidth: 30,
- width: null,
- zDepth: 2
+TextField.defaultProps = {
+ disabled: false,
+ floatingLabelFixed: false,
+ multiLine: false,
+ fullWidth: false,
+ type: 'text',
+ underlineShow: true,
+ rows: 1
};
-Drawer.contextTypes = {
+TextField.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? Drawer.propTypes = {
- /**
- * The contents of the `Drawer`
- */
+ false ? TextField.propTypes = {
children: _react.PropTypes.node,
/**
- * The CSS class name of the root element.
+ * The css class name of the root element.
*/
className: _react.PropTypes.string,
/**
- * The CSS class name of the container element.
+ * The text string to use for the default value.
*/
- containerClassName: _react.PropTypes.string,
+ defaultValue: _react.PropTypes.any,
/**
- * Override the inline-styles of the container element.
+ * Disables the text field if set to true.
*/
- containerStyle: _react.PropTypes.object,
+ disabled: _react.PropTypes.bool,
/**
- * If true, swiping sideways when the `Drawer` is closed will not open it.
+ * The style object to use to override error styles.
*/
- disableSwipeToOpen: _react.PropTypes.bool,
+ errorStyle: _react.PropTypes.object,
/**
- * If true, the `Drawer` will be docked. In this state, the overlay won't show and
- * clicking on a menu item will not close the `Drawer`.
+ * The error content to display.
*/
- docked: _react.PropTypes.bool,
+ errorText: _react.PropTypes.node,
/**
- * Callback function fired when the `open` state of the `Drawer` is requested to be changed.
- *
- * @param {boolean} open If true, the `Drawer` was requested to be opened.
- * @param {string} reason The reason for the open or close request. Possible values are
- * 'swipe' for open requests; 'clickaway' (on overlay clicks),
- * 'escape' (on escape key press), and 'swipe' for close requests.
+ * If true, the floating label will float even when there is no value.
*/
- onRequestChange: _react.PropTypes.func,
+ floatingLabelFixed: _react.PropTypes.bool,
/**
- * If true, the `Drawer` is opened. Providing a value will turn the `Drawer`
- * into a controlled component.
+ * The style object to use to override floating label styles when focused.
*/
- open: _react.PropTypes.bool,
+ floatingLabelFocusStyle: _react.PropTypes.object,
/**
- * If true, the `Drawer` is positioned to open from the opposite side.
+ * The style object to use to override floating label styles when shrunk.
*/
- openSecondary: _react.PropTypes.bool,
+ floatingLabelShrinkStyle: _react.PropTypes.object,
/**
- * The CSS class name to add to the `Overlay` component that is rendered behind the `Drawer`.
+ * The style object to use to override floating label styles.
*/
- overlayClassName: _react.PropTypes.string,
+ floatingLabelStyle: _react.PropTypes.object,
/**
- * Override the inline-styles of the `Overlay` component that is rendered behind the `Drawer`.
+ * The content to use for the floating label element.
*/
- overlayStyle: _react.PropTypes.object,
+ floatingLabelText: _react.PropTypes.node,
+ /**
+ * If true, the field receives the property width 100%.
+ */
+ fullWidth: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the TextField's hint text element.
+ */
+ hintStyle: _react.PropTypes.object,
+ /**
+ * The hint content to display.
+ */
+ hintText: _react.PropTypes.node,
+ /**
+ * The id prop for the text field.
+ */
+ id: _react.PropTypes.string,
+ /**
+ * Override the inline-styles of the TextField's input element.
+ * When multiLine is false: define the style of the input element.
+ * When multiLine is true: define the style of the container of the textarea.
+ */
+ inputStyle: _react.PropTypes.object,
+ /**
+ * If true, a textarea element will be rendered.
+ * The textarea also grows and shrinks according to the number of lines.
+ */
+ multiLine: _react.PropTypes.bool,
+ /**
+ * Name applied to the input.
+ */
+ name: _react.PropTypes.string,
+ /** @ignore */
+ onBlur: _react.PropTypes.func,
+ /**
+ * Callback function that is fired when the textfield's value changes.
+ *
+ * @param {object} event Change event targeting the text field.
+ * @param {string} newValue The new value of the text field.
+ */
+ onChange: _react.PropTypes.func,
+ /** @ignore */
+ onFocus: _react.PropTypes.func,
+ /**
+ * Number of rows to display when multiLine option is set to true.
+ */
+ rows: _react.PropTypes.number,
+ /**
+ * Maximum number of rows to display when
+ * multiLine option is set to true.
+ */
+ rowsMax: _react.PropTypes.number,
/**
* Override the inline-styles of the root element.
*/
style: _react.PropTypes.object,
/**
- * The width of the left most (or right most) area in pixels where the `Drawer` can be
- * swiped open from. Setting this to `null` spans that area to the entire page
- * (**CAUTION!** Setting this property to `null` might cause issues with sliders and
- * swipeable `Tabs`: use at your own risk).
+ * Override the inline-styles of the TextField's textarea element.
+ * The TextField use either a textarea or an input,
+ * this property has effects only when multiLine is true.
*/
- swipeAreaWidth: _react.PropTypes.number,
+ textareaStyle: _react.PropTypes.object,
/**
- * The width of the `Drawer` in pixels. Defaults to using the values from theme.
+ * Specifies the type of input to display
+ * such as "password" or "text".
*/
- width: _react.PropTypes.number,
+ type: _react.PropTypes.string,
/**
- * The zDepth of the `Drawer`.
+ * Override the inline-styles of the
+ * TextField's underline element when disabled.
*/
- zDepth: _propTypes2.default.zDepth
-
-} : void 0;
-exports.default = Drawer;
-
-/***/ }),
-/* 752 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.passiveOption = exports.detachEvent = exports.attachEvent = exports.removeEventListener = exports.addEventListener = exports.canUseDOM = undefined;
-
-var _defineProperty = __webpack_require__(753);
-
-var _defineProperty2 = _interopRequireDefault(_defineProperty);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-// Inspired by https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/ExecutionEnvironment.js
-var canUseDOM = exports.canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
-
-var addEventListener = exports.addEventListener = canUseDOM && 'addEventListener' in window;
-var removeEventListener = exports.removeEventListener = canUseDOM && 'removeEventListener' in window;
-
-// IE8+ Support
-var attachEvent = exports.attachEvent = canUseDOM && 'attachEvent' in window;
-var detachEvent = exports.detachEvent = canUseDOM && 'detachEvent' in window;
-
-// Passive options
-// Inspired by https://github.com/Modernizr/Modernizr/blob/master/feature-detects/dom/passiveeventlisteners.js
-var passiveOption = exports.passiveOption = function () {
- var cache = null;
-
- return function () {
- if (cache !== null) {
- return cache;
- }
-
- var supportsPassiveOption = false;
-
- try {
- window.addEventListener('test', null, (0, _defineProperty2.default)({}, 'passive', {
- get: function get() {
- supportsPassiveOption = true;
- }
- }));
- } catch (e) {} // eslint-disable-line no-empty
-
- cache = supportsPassiveOption;
-
- return supportsPassiveOption;
- }();
-}();
-
-/***/ }),
-/* 753 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _defineProperty = __webpack_require__(185);
-
-var _defineProperty2 = _interopRequireDefault(_defineProperty);
-
-exports.default = defineProperty;
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-// weak
-
-function defineProperty(o, p, attr) {
- return (0, _defineProperty2.default)(o, p, attr);
-}
-
-/***/ }),
-/* 754 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _getPrototypeOf = __webpack_require__(3);
-
-var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-
-var _classCallCheck2 = __webpack_require__(1);
-
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
-var _createClass2 = __webpack_require__(2);
-
-var _createClass3 = _interopRequireDefault(_createClass2);
-
-var _possibleConstructorReturn2 = __webpack_require__(4);
-
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-
-var _inherits2 = __webpack_require__(5);
-
-var _inherits3 = _interopRequireDefault(_inherits2);
-
-var _react = __webpack_require__(0);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var originalBodyOverflow = null;
-var lockingCounter = 0;
-
-var AutoLockScrolling = function (_Component) {
- (0, _inherits3.default)(AutoLockScrolling, _Component);
-
- function AutoLockScrolling() {
- var _ref;
-
- var _temp, _this, _ret;
-
- (0, _classCallCheck3.default)(this, AutoLockScrolling);
-
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoLockScrolling.__proto__ || (0, _getPrototypeOf2.default)(AutoLockScrolling)).call.apply(_ref, [this].concat(args))), _this), _this.locked = false, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
- }
-
- (0, _createClass3.default)(AutoLockScrolling, [{
- key: 'componentDidMount',
- value: function componentDidMount() {
- if (this.props.lock === true) {
- this.preventScrolling();
- }
- }
- }, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- if (this.props.lock !== nextProps.lock) {
- if (nextProps.lock) {
- this.preventScrolling();
- } else {
- this.allowScrolling();
- }
- }
- }
- }, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- this.allowScrolling();
- }
-
- // force to only lock/unlock once
-
- }, {
- key: 'preventScrolling',
- value: function preventScrolling() {
- if (this.locked === true) {
- return;
- }
-
- lockingCounter = lockingCounter + 1;
- this.locked = true;
-
- // only lock the first time the component is mounted.
- if (lockingCounter === 1) {
- var body = document.getElementsByTagName('body')[0];
- originalBodyOverflow = body.style.overflow;
- body.style.overflow = 'hidden';
- }
- }
- }, {
- key: 'allowScrolling',
- value: function allowScrolling() {
- if (this.locked === true) {
- lockingCounter = lockingCounter - 1;
- this.locked = false;
- }
-
- if (lockingCounter === 0 && originalBodyOverflow !== null) {
- var body = document.getElementsByTagName('body')[0];
- body.style.overflow = originalBodyOverflow || '';
- originalBodyOverflow = null;
- }
- }
- }, {
- key: 'render',
- value: function render() {
- return null;
- }
- }]);
- return AutoLockScrolling;
-}(_react.Component);
-
- false ? AutoLockScrolling.propTypes = {
- lock: _react.PropTypes.bool.isRequired
+ underlineDisabledStyle: _react.PropTypes.object,
+ /**
+ * Override the inline-styles of the TextField's
+ * underline element when focussed.
+ */
+ underlineFocusStyle: _react.PropTypes.object,
+ /**
+ * If true, shows the underline for the text field.
+ */
+ underlineShow: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the TextField's underline element.
+ */
+ underlineStyle: _react.PropTypes.object,
+ /**
+ * The value of the text field.
+ */
+ value: _react.PropTypes.any
} : void 0;
-exports.default = AutoLockScrolling;
+exports.default = TextField;
/***/ }),
-/* 755 */
+/* 760 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58462,151 +62299,207 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _propTypes = __webpack_require__(41);
-
-var _propTypes2 = _interopRequireDefault(_propTypes);
-
-var _transitions = __webpack_require__(10);
+var _reactEventListener = __webpack_require__(40);
-var _transitions2 = _interopRequireDefault(_transitions);
+var _reactEventListener2 = _interopRequireDefault(_reactEventListener);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function getStyles(props, context) {
- var rounded = props.rounded,
- circle = props.circle,
- transitionEnabled = props.transitionEnabled,
- zDepth = props.zDepth;
- var _context$muiTheme = context.muiTheme,
- baseTheme = _context$muiTheme.baseTheme,
- paper = _context$muiTheme.paper;
-
+var rowsHeight = 24;
+function getStyles(props, context, state) {
return {
root: {
- color: paper.color,
- backgroundColor: paper.backgroundColor,
- transition: transitionEnabled && _transitions2.default.easeOut(),
- boxSizing: 'border-box',
- fontFamily: baseTheme.fontFamily,
- WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated)
- boxShadow: paper.zDepthShadows[zDepth - 1], // No shadow for 0 depth papers
- borderRadius: circle ? '50%' : rounded ? '2px' : '0px'
+ position: 'relative' },
+ textarea: {
+ height: state.height,
+ width: '100%',
+ resize: 'none',
+ font: 'inherit',
+ padding: 0,
+ cursor: 'inherit'
+ },
+ shadow: {
+ resize: 'none',
+ // Overflow also needed to here to remove the extra row
+ // added to textareas in Firefox.
+ overflow: 'hidden',
+ // Visibility needed to hide the extra text area on ipads
+ visibility: 'hidden',
+ position: 'absolute',
+ height: 'initial'
}
};
}
-var Paper = function (_Component) {
- (0, _inherits3.default)(Paper, _Component);
+var EnhancedTextarea = function (_Component) {
+ (0, _inherits3.default)(EnhancedTextarea, _Component);
- function Paper() {
- (0, _classCallCheck3.default)(this, Paper);
- return (0, _possibleConstructorReturn3.default)(this, (Paper.__proto__ || (0, _getPrototypeOf2.default)(Paper)).apply(this, arguments));
+ function EnhancedTextarea() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, EnhancedTextarea);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedTextarea.__proto__ || (0, _getPrototypeOf2.default)(EnhancedTextarea)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ height: null
+ }, _this.handleResize = function (event) {
+ _this.syncHeightWithShadow(undefined, event);
+ }, _this.handleChange = function (event) {
+ _this.syncHeightWithShadow(event.target.value);
+
+ if (_this.props.hasOwnProperty('valueLink')) {
+ _this.props.valueLink.requestChange(event.target.value);
+ }
+
+ if (_this.props.onChange) {
+ _this.props.onChange(event);
+ }
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(Paper, [{
+ (0, _createClass3.default)(EnhancedTextarea, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ this.setState({
+ height: this.props.rows * rowsHeight
+ });
+ }
+ }, {
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ this.syncHeightWithShadow();
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ if (nextProps.value !== this.props.value) {
+ this.syncHeightWithShadow(nextProps.value);
+ }
+ }
+ }, {
+ key: 'getInputNode',
+ value: function getInputNode() {
+ return this.refs.input;
+ }
+ }, {
+ key: 'setValue',
+ value: function setValue(value) {
+ this.getInputNode().value = value;
+ this.syncHeightWithShadow(value);
+ }
+ }, {
+ key: 'syncHeightWithShadow',
+ value: function syncHeightWithShadow(newValue, event) {
+ var shadow = this.refs.shadow;
+
+ if (newValue !== undefined) {
+ shadow.value = newValue;
+ }
+
+ var newHeight = shadow.scrollHeight;
+
+ // Guarding for jsdom, where scrollHeight isn't present.
+ // See https://github.com/tmpvar/jsdom/issues/1013
+ if (newHeight === undefined) return;
+
+ if (this.props.rowsMax >= this.props.rows) {
+ newHeight = Math.min(this.props.rowsMax * rowsHeight, newHeight);
+ }
+
+ newHeight = Math.max(newHeight, rowsHeight);
+
+ if (this.state.height !== newHeight) {
+ this.setState({
+ height: newHeight
+ });
+
+ if (this.props.onHeightChange) {
+ this.props.onHeightChange(event, newHeight);
+ }
+ }
+ }
+ }, {
key: 'render',
value: function render() {
var _props = this.props,
- children = _props.children,
- circle = _props.circle,
- rounded = _props.rounded,
+ onChange = _props.onChange,
+ onHeightChange = _props.onHeightChange,
+ rows = _props.rows,
+ rowsMax = _props.rowsMax,
+ shadowStyle = _props.shadowStyle,
style = _props.style,
- transitionEnabled = _props.transitionEnabled,
- zDepth = _props.zDepth,
- other = (0, _objectWithoutProperties3.default)(_props, ['children', 'circle', 'rounded', 'style', 'transitionEnabled', 'zDepth']);
+ textareaStyle = _props.textareaStyle,
+ valueLink = _props.valueLink,
+ other = (0, _objectWithoutProperties3.default)(_props, ['onChange', 'onHeightChange', 'rows', 'rowsMax', 'shadowStyle', 'style', 'textareaStyle', 'valueLink']);
var prepareStyles = this.context.muiTheme.prepareStyles;
- var styles = getStyles(this.props, this.context);
+ var styles = getStyles(this.props, this.context, this.state);
+ var rootStyles = (0, _simpleAssign2.default)(styles.root, style);
+ var textareaStyles = (0, _simpleAssign2.default)(styles.textarea, textareaStyle);
+ var shadowStyles = (0, _simpleAssign2.default)({}, textareaStyles, styles.shadow, shadowStyle);
+
+ if (this.props.hasOwnProperty('valueLink')) {
+ other.value = this.props.valueLink.value;
+ }
return _react2.default.createElement(
'div',
- (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }),
- children
+ { style: prepareStyles(rootStyles) },
+ _react2.default.createElement(_reactEventListener2.default, { target: 'window', onResize: this.handleResize }),
+ _react2.default.createElement('textarea', {
+ ref: 'shadow',
+ style: prepareStyles(shadowStyles),
+ tabIndex: '-1',
+ rows: this.props.rows,
+ defaultValue: this.props.defaultValue,
+ readOnly: true,
+ value: this.props.value,
+ valueLink: this.props.valueLink
+ }),
+ _react2.default.createElement('textarea', (0, _extends3.default)({}, other, {
+ ref: 'input',
+ rows: this.props.rows,
+ style: prepareStyles(textareaStyles),
+ onChange: this.handleChange
+ }))
);
}
}]);
- return Paper;
+ return EnhancedTextarea;
}(_react.Component);
-Paper.defaultProps = {
- circle: false,
- rounded: true,
- transitionEnabled: true,
- zDepth: 1
+EnhancedTextarea.defaultProps = {
+ rows: 1
};
-Paper.contextTypes = {
+EnhancedTextarea.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? Paper.propTypes = {
- /**
- * Children passed into the paper element.
- */
- children: _react.PropTypes.node,
- /**
- * Set to true to generate a circlular paper container.
- */
- circle: _react.PropTypes.bool,
- /**
- * By default, the paper container will have a border radius.
- * Set this to false to generate a container with sharp corners.
- */
- rounded: _react.PropTypes.bool,
+ false ? EnhancedTextarea.propTypes = {
+ defaultValue: _react.PropTypes.any,
+ disabled: _react.PropTypes.bool,
+ onChange: _react.PropTypes.func,
+ onHeightChange: _react.PropTypes.func,
+ rows: _react.PropTypes.number,
+ rowsMax: _react.PropTypes.number,
+ shadowStyle: _react.PropTypes.object,
/**
* Override the inline-styles of the root element.
*/
style: _react.PropTypes.object,
- /**
- * Set to false to disable CSS transitions for the paper element.
- */
- transitionEnabled: _react.PropTypes.bool,
- /**
- * This number represents the zDepth of the paper shadow.
- */
- zDepth: _propTypes2.default.zDepth
+ textareaStyle: _react.PropTypes.object,
+ value: _react.PropTypes.string,
+ valueLink: _react.PropTypes.object
} : void 0;
-exports.default = Paper;
-
-/***/ }),
-/* 756 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _react = __webpack_require__(0);
-
-var _react2 = _interopRequireDefault(_react);
-
-var _pure = __webpack_require__(25);
-
-var _pure2 = _interopRequireDefault(_pure);
-
-var _SvgIcon = __webpack_require__(26);
-
-var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var ActionCode = function ActionCode(props) {
- return _react2.default.createElement(
- _SvgIcon2.default,
- props,
- _react2.default.createElement('path', { d: 'M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z' })
- );
-};
-ActionCode = (0, _pure2.default)(ActionCode);
-ActionCode.displayName = 'ActionCode';
-ActionCode.muiName = 'SvgIcon';
-
-exports.default = ActionCode;
+exports.default = EnhancedTextarea;
/***/ }),
-/* 757 */
+/* 761 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58615,36 +62508,24 @@ exports.default = ActionCode;
Object.defineProperty(exports, "__esModule", {
value: true
});
+exports.default = exports.MenuItem = exports.Menu = undefined;
-var _react = __webpack_require__(0);
-
-var _react2 = _interopRequireDefault(_react);
-
-var _pure = __webpack_require__(25);
+var _Menu2 = __webpack_require__(205);
-var _pure2 = _interopRequireDefault(_pure);
+var _Menu3 = _interopRequireDefault(_Menu2);
-var _SvgIcon = __webpack_require__(26);
+var _MenuItem2 = __webpack_require__(97);
-var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
+var _MenuItem3 = _interopRequireDefault(_MenuItem2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var ActionShop = function ActionShop(props) {
- return _react2.default.createElement(
- _SvgIcon2.default,
- props,
- _react2.default.createElement('path', { d: 'M16 6V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H2v13c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6h-6zm-6-2h4v2h-4V4zM9 18V9l7.5 4L9 18z' })
- );
-};
-ActionShop = (0, _pure2.default)(ActionShop);
-ActionShop.displayName = 'ActionShop';
-ActionShop.muiName = 'SvgIcon';
-
-exports.default = ActionShop;
+exports.Menu = _Menu3.default;
+exports.MenuItem = _MenuItem3.default;
+exports.default = _Menu3.default;
/***/ }),
-/* 758 */
+/* 762 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58653,67 +62534,18 @@ exports.default = ActionShop;
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.zIndex = exports.typography = exports.transitions = exports.spacing = exports.muiThemeable = exports.getMuiTheme = exports.LightRawTheme = exports.lightBaseTheme = exports.DarkRawTheme = exports.darkBaseTheme = exports.colors = exports.MuiThemeProvider = undefined;
-
-var _MuiThemeProvider2 = __webpack_require__(301);
-
-var _MuiThemeProvider3 = _interopRequireDefault(_MuiThemeProvider2);
-
-var _colors2 = __webpack_require__(57);
-
-var _colors = _interopRequireWildcard(_colors2);
-
-var _darkBaseTheme2 = __webpack_require__(759);
-
-var _darkBaseTheme3 = _interopRequireDefault(_darkBaseTheme2);
-
-var _lightBaseTheme2 = __webpack_require__(306);
-
-var _lightBaseTheme3 = _interopRequireDefault(_lightBaseTheme2);
-
-var _getMuiTheme2 = __webpack_require__(125);
-
-var _getMuiTheme3 = _interopRequireDefault(_getMuiTheme2);
-
-var _muiThemeable2 = __webpack_require__(760);
-
-var _muiThemeable3 = _interopRequireDefault(_muiThemeable2);
-
-var _spacing2 = __webpack_require__(192);
-
-var _spacing3 = _interopRequireDefault(_spacing2);
-
-var _transitions2 = __webpack_require__(10);
-
-var _transitions3 = _interopRequireDefault(_transitions2);
-
-var _typography2 = __webpack_require__(311);
-
-var _typography3 = _interopRequireDefault(_typography2);
-
-var _zIndex2 = __webpack_require__(307);
+exports.default = undefined;
-var _zIndex3 = _interopRequireDefault(_zIndex2);
+var _Divider = __webpack_require__(763);
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+var _Divider2 = _interopRequireDefault(_Divider);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-exports.MuiThemeProvider = _MuiThemeProvider3.default;
-exports.colors = _colors;
-exports.darkBaseTheme = _darkBaseTheme3.default;
-exports.DarkRawTheme = _darkBaseTheme3.default;
-exports.lightBaseTheme = _lightBaseTheme3.default;
-exports.LightRawTheme = _lightBaseTheme3.default;
-exports.getMuiTheme = _getMuiTheme3.default;
-exports.muiThemeable = _muiThemeable3.default;
-exports.spacing = _spacing3.default;
-exports.transitions = _transitions3.default;
-exports.typography = _typography3.default;
-exports.zIndex = _zIndex3.default;
+exports.default = _Divider2.default;
/***/ }),
-/* 759 */
+/* 763 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58723,93 +62555,72 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _colors = __webpack_require__(57);
-
-var _colorManipulator = __webpack_require__(56);
-
-var _spacing = __webpack_require__(192);
-
-var _spacing2 = _interopRequireDefault(_spacing);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-exports.default = {
- spacing: _spacing2.default,
- fontFamily: 'Roboto, sans-serif',
- palette: {
- primary1Color: _colors.cyan700,
- primary2Color: _colors.cyan700,
- primary3Color: _colors.grey600,
- accent1Color: _colors.pinkA200,
- accent2Color: _colors.pinkA400,
- accent3Color: _colors.pinkA100,
- textColor: _colors.fullWhite,
- secondaryTextColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.7),
- alternateTextColor: '#303030',
- canvasColor: '#303030',
- borderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3),
- disabledColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.3),
- pickerHeaderColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12),
- clockCircleColor: (0, _colorManipulator.fade)(_colors.fullWhite, 0.12)
- }
-};
-
-/***/ }),
-/* 760 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
+var _extends2 = __webpack_require__(7);
+var _extends3 = _interopRequireDefault(_extends2);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
+var _objectWithoutProperties2 = __webpack_require__(8);
-var _extends2 = __webpack_require__(7);
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-var _extends3 = _interopRequireDefault(_extends2);
+var _simpleAssign = __webpack_require__(6);
-exports.default = muiThemeable;
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _getMuiTheme = __webpack_require__(125);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _getMuiTheme2 = _interopRequireDefault(_getMuiTheme);
+var Divider = function Divider(props, context) {
+ var inset = props.inset,
+ style = props.style,
+ other = (0, _objectWithoutProperties3.default)(props, ['inset', 'style']);
+ var _context$muiTheme = context.muiTheme,
+ baseTheme = _context$muiTheme.baseTheme,
+ prepareStyles = _context$muiTheme.prepareStyles;
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var DEFAULT_THEME = void 0;
+ var styles = {
+ root: {
+ margin: 0,
+ marginTop: -1,
+ marginLeft: inset ? 72 : 0,
+ height: 1,
+ border: 'none',
+ backgroundColor: baseTheme.palette.borderColor
+ }
+ };
-function getDefaultTheme() {
- if (!DEFAULT_THEME) {
- DEFAULT_THEME = (0, _getMuiTheme2.default)();
- }
- return DEFAULT_THEME;
-}
+ return _react2.default.createElement('hr', (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }));
+};
-function muiThemeable() {
- return function (Component) {
- var MuiComponent = function MuiComponent(props, context) {
- var _context$muiTheme = context.muiTheme,
- muiTheme = _context$muiTheme === undefined ? getDefaultTheme() : _context$muiTheme;
+Divider.muiName = 'Divider';
+ false ? Divider.propTypes = {
+ /**
+ * If true, the `Divider` will be indented.
+ */
+ inset: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
+} : void 0;
- return _react2.default.createElement(Component, (0, _extends3.default)({ muiTheme: muiTheme }, props));
- };
+Divider.defaultProps = {
+ inset: false
+};
- MuiComponent.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
- };
+Divider.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
- return MuiComponent;
- };
-}
+exports.default = Divider;
/***/ }),
-/* 761 */
+/* 764 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58819,65 +62630,43 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _react = __webpack_require__(0);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-var _react2 = _interopRequireDefault(_react);
+var _Checkbox = __webpack_require__(207);
-var _reactRedux = __webpack_require__(27);
+var _Checkbox2 = _interopRequireDefault(_Checkbox);
-var _Snackbar = __webpack_require__(762);
+var _createComponent = __webpack_require__(41);
-var _Snackbar2 = _interopRequireDefault(_Snackbar);
+var _createComponent2 = _interopRequireDefault(_createComponent);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function NotificationBar(props) {
- var notification = props.notification;
-
- return _react2.default.createElement(_Snackbar2.default, {
- open: notification.message !== null,
- message: notification.message === null ? '...' : notification.message,
- autoHideDuration: 4000,
- bodyStyle: { height: 'auto', lineHeight: '20px', padding: 24, marginLeft: 256, whiteSpace: 'pre-line' }
- });
-}
-
-NotificationBar.propTypes = {
- notification: _react.PropTypes.shape({
- message: _react.PropTypes.string
- })
-};
-
-function mapStateToProps(state) {
- return {
- notification: state.notification
- };
-}
-
-exports.default = (0, _reactRedux.connect)(mapStateToProps)(NotificationBar);
-
-/***/ }),
-/* 762 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = undefined;
-
-var _Snackbar = __webpack_require__(763);
-
-var _Snackbar2 = _interopRequireDefault(_Snackbar);
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+exports.default = (0, _createComponent2.default)(_Checkbox2.default, function (_ref) {
+ var _ref$input = _ref.input,
+ onChange = _ref$input.onChange,
+ value = _ref$input.value,
+ inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value']),
+ meta = _ref.meta,
+ _onCheck = _ref.onCheck,
+ defaultChecked = _ref.defaultChecked,
+ props = _objectWithoutProperties(_ref, ['input', 'meta', 'onCheck', 'defaultChecked']);
-exports.default = _Snackbar2.default;
+ return _extends({}, inputProps, props, {
+ checked: value ? true : false,
+ onCheck: function onCheck(event, isInputChecked) {
+ onChange(isInputChecked);
+ if (_onCheck) {
+ _onCheck(isInputChecked);
+ }
+ }
+ });
+});
/***/ }),
-/* 763 */
+/* 765 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -58923,446 +62712,257 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
+var _EnhancedSwitch = __webpack_require__(208);
+
+var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch);
+
var _transitions = __webpack_require__(10);
var _transitions2 = _interopRequireDefault(_transitions);
-var _ClickAwayListener = __webpack_require__(320);
+var _checkBoxOutlineBlank = __webpack_require__(766);
-var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener);
+var _checkBoxOutlineBlank2 = _interopRequireDefault(_checkBoxOutlineBlank);
-var _SnackbarBody = __webpack_require__(764);
+var _checkBox = __webpack_require__(767);
-var _SnackbarBody2 = _interopRequireDefault(_SnackbarBody);
+var _checkBox2 = _interopRequireDefault(_checkBox);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function getStyles(props, context, state) {
- var _context$muiTheme = context.muiTheme,
- desktopSubheaderHeight = _context$muiTheme.baseTheme.spacing.desktopSubheaderHeight,
- zIndex = _context$muiTheme.zIndex;
- var open = state.open;
+function getStyles(props, context) {
+ var checkbox = context.muiTheme.checkbox;
+ var checkboxSize = 24;
- var styles = {
- root: {
- position: 'fixed',
- left: '50%',
- display: 'flex',
- bottom: 0,
- zIndex: zIndex.snackbar,
- visibility: open ? 'visible' : 'hidden',
- transform: open ? 'translate(-50%, 0)' : 'translate(-50%, ' + desktopSubheaderHeight + 'px)',
- transition: _transitions2.default.easeOut('400ms', 'transform') + ', ' + _transitions2.default.easeOut('400ms', 'visibility')
+ return {
+ icon: {
+ height: checkboxSize,
+ width: checkboxSize
+ },
+ check: {
+ position: 'absolute',
+ opacity: 0,
+ transform: 'scale(0)',
+ transitionOrigin: '50% 50%',
+ transition: _transitions2.default.easeOut('450ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('0ms', 'transform', '450ms'),
+ fill: checkbox.checkedColor
+ },
+ checkWhenSwitched: {
+ opacity: 1,
+ transform: 'scale(1)',
+ transition: _transitions2.default.easeOut('0ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('800ms', 'transform', '0ms')
+ },
+ checkWhenDisabled: {
+ fill: checkbox.disabledColor
+ },
+ box: {
+ position: 'absolute',
+ opacity: 1,
+ fill: checkbox.boxColor,
+ transition: _transitions2.default.easeOut('1000ms', 'opacity', '200ms')
+ },
+ boxWhenSwitched: {
+ opacity: 0,
+ transition: _transitions2.default.easeOut('650ms', 'opacity', '150ms'),
+ fill: checkbox.checkedColor
+ },
+ boxWhenDisabled: {
+ fill: props.checked ? 'transparent' : checkbox.disabledColor
+ },
+ label: {
+ color: props.disabled ? checkbox.labelDisabledColor : checkbox.labelColor
}
};
-
- return styles;
}
-var Snackbar = function (_Component) {
- (0, _inherits3.default)(Snackbar, _Component);
+var Checkbox = function (_Component) {
+ (0, _inherits3.default)(Checkbox, _Component);
- function Snackbar() {
+ function Checkbox() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, Snackbar);
+ (0, _classCallCheck3.default)(this, Checkbox);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Snackbar.__proto__ || (0, _getPrototypeOf2.default)(Snackbar)).call.apply(_ref, [this].concat(args))), _this), _this.componentClickAway = function () {
- if (_this.timerTransitionId) {
- // If transitioning, don't close the snackbar.
- return;
- }
-
- if (_this.props.open !== null && _this.props.onRequestClose) {
- _this.props.onRequestClose('clickaway');
- } else {
- _this.setState({ open: false });
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Checkbox.__proto__ || (0, _getPrototypeOf2.default)(Checkbox)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ switched: false
+ }, _this.handleStateChange = function (newSwitched) {
+ _this.setState({
+ switched: newSwitched
+ });
+ }, _this.handleCheck = function (event, isInputChecked) {
+ if (_this.props.onCheck) {
+ _this.props.onCheck(event, isInputChecked);
}
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(Snackbar, [{
+ (0, _createClass3.default)(Checkbox, [{
key: 'componentWillMount',
value: function componentWillMount() {
- this.setState({
- open: this.props.open,
- message: this.props.message,
- action: this.props.action
- });
- }
- }, {
- key: 'componentDidMount',
- value: function componentDidMount() {
- if (this.state.open) {
- this.setAutoHideTimer();
- this.setTransitionTimer();
+ var _props = this.props,
+ checked = _props.checked,
+ defaultChecked = _props.defaultChecked,
+ valueLink = _props.valueLink;
+
+
+ if (checked || defaultChecked || valueLink && valueLink.value) {
+ this.setState({
+ switched: true
+ });
}
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
- var _this2 = this;
-
- if (this.props.open && nextProps.open && (nextProps.message !== this.props.message || nextProps.action !== this.props.action)) {
- this.setState({
- open: false
- });
-
- clearTimeout(this.timerOneAtTheTimeId);
- this.timerOneAtTheTimeId = setTimeout(function () {
- _this2.setState({
- message: nextProps.message,
- action: nextProps.action,
- open: true
- });
- }, 400);
- } else {
- var open = nextProps.open;
-
+ if (this.props.checked !== nextProps.checked) {
this.setState({
- open: open !== null ? open : this.state.open,
- message: nextProps.message,
- action: nextProps.action
+ switched: nextProps.checked
});
}
}
}, {
- key: 'componentDidUpdate',
- value: function componentDidUpdate(prevProps, prevState) {
- if (prevState.open !== this.state.open) {
- if (this.state.open) {
- this.setAutoHideTimer();
- this.setTransitionTimer();
- } else {
- clearTimeout(this.timerAutoHideId);
- }
- }
+ key: 'isChecked',
+ value: function isChecked() {
+ return this.refs.enhancedSwitch.isSwitched();
}
}, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- clearTimeout(this.timerAutoHideId);
- clearTimeout(this.timerTransitionId);
- clearTimeout(this.timerOneAtTheTimeId);
+ key: 'setChecked',
+ value: function setChecked(newCheckedValue) {
+ this.refs.enhancedSwitch.setSwitched(newCheckedValue);
}
}, {
- key: 'setAutoHideTimer',
-
+ key: 'render',
+ value: function render() {
+ var _props2 = this.props,
+ iconStyle = _props2.iconStyle,
+ onCheck = _props2.onCheck,
+ checkedIcon = _props2.checkedIcon,
+ uncheckedIcon = _props2.uncheckedIcon,
+ other = (0, _objectWithoutProperties3.default)(_props2, ['iconStyle', 'onCheck', 'checkedIcon', 'uncheckedIcon']);
- // Timer that controls delay before snackbar auto hides
- value: function setAutoHideTimer() {
- var _this3 = this;
+ var styles = getStyles(this.props, this.context);
+ var boxStyles = (0, _simpleAssign2.default)(styles.box, this.state.switched && styles.boxWhenSwitched, iconStyle, this.props.disabled && styles.boxWhenDisabled);
+ var checkStyles = (0, _simpleAssign2.default)(styles.check, this.state.switched && styles.checkWhenSwitched, iconStyle, this.props.disabled && styles.checkWhenDisabled);
- var autoHideDuration = this.props.autoHideDuration;
+ var checkedElement = checkedIcon ? _react2.default.cloneElement(checkedIcon, {
+ style: (0, _simpleAssign2.default)(checkStyles, checkedIcon.props.style)
+ }) : _react2.default.createElement(_checkBox2.default, {
+ style: checkStyles
+ });
- if (autoHideDuration > 0) {
- clearTimeout(this.timerAutoHideId);
- this.timerAutoHideId = setTimeout(function () {
- if (_this3.props.open !== null && _this3.props.onRequestClose) {
- _this3.props.onRequestClose('timeout');
- } else {
- _this3.setState({ open: false });
- }
- }, autoHideDuration);
- }
- }
+ var unCheckedElement = uncheckedIcon ? _react2.default.cloneElement(uncheckedIcon, {
+ style: (0, _simpleAssign2.default)(boxStyles, uncheckedIcon.props.style)
+ }) : _react2.default.createElement(_checkBoxOutlineBlank2.default, {
+ style: boxStyles
+ });
- // Timer that controls delay before click-away events are captured (based on when animation completes)
+ var checkboxElement = _react2.default.createElement(
+ 'div',
+ null,
+ unCheckedElement,
+ checkedElement
+ );
- }, {
- key: 'setTransitionTimer',
- value: function setTransitionTimer() {
- var _this4 = this;
+ var rippleColor = this.state.switched ? checkStyles.fill : boxStyles.fill;
+ var mergedIconStyle = (0, _simpleAssign2.default)(styles.icon, iconStyle);
- this.timerTransitionId = setTimeout(function () {
- _this4.timerTransitionId = undefined;
- }, 400);
- }
- }, {
- key: 'render',
- value: function render() {
- var _props = this.props,
- autoHideDuration = _props.autoHideDuration,
- contentStyle = _props.contentStyle,
- bodyStyle = _props.bodyStyle,
- messageProp = _props.message,
- onRequestClose = _props.onRequestClose,
- onActionTouchTap = _props.onActionTouchTap,
- style = _props.style,
- other = (0, _objectWithoutProperties3.default)(_props, ['autoHideDuration', 'contentStyle', 'bodyStyle', 'message', 'onRequestClose', 'onActionTouchTap', 'style']);
- var _state = this.state,
- action = _state.action,
- message = _state.message,
- open = _state.open;
- var prepareStyles = this.context.muiTheme.prepareStyles;
+ var labelStyle = (0, _simpleAssign2.default)(styles.label, this.props.labelStyle);
- var styles = getStyles(this.props, this.context, this.state);
+ var enhancedSwitchProps = {
+ ref: 'enhancedSwitch',
+ inputType: 'checkbox',
+ switched: this.state.switched,
+ switchElement: checkboxElement,
+ rippleColor: rippleColor,
+ iconStyle: mergedIconStyle,
+ onSwitch: this.handleCheck,
+ labelStyle: labelStyle,
+ onParentShouldUpdate: this.handleStateChange,
+ labelPosition: this.props.labelPosition
+ };
- return _react2.default.createElement(
- _ClickAwayListener2.default,
- { onClickAway: open ? this.componentClickAway : null },
- _react2.default.createElement(
- 'div',
- (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }),
- _react2.default.createElement(_SnackbarBody2.default, {
- action: action,
- contentStyle: contentStyle,
- message: message,
- open: open,
- onActionTouchTap: onActionTouchTap,
- style: bodyStyle
- })
- )
- );
+ return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, enhancedSwitchProps));
}
}]);
- return Snackbar;
+ return Checkbox;
}(_react.Component);
-Snackbar.contextTypes = {
+Checkbox.defaultProps = {
+ labelPosition: 'right',
+ disabled: false
+};
+Checkbox.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? Snackbar.propTypes = {
- /**
- * The label for the action on the snackbar.
- */
- action: _react.PropTypes.node,
- /**
- * The number of milliseconds to wait before automatically dismissing.
- * If no value is specified the snackbar will dismiss normally.
- * If a value is provided the snackbar can still be dismissed normally.
- * If a snackbar is dismissed before the timer expires, the timer will be cleared.
- */
- autoHideDuration: _react.PropTypes.number,
- /**
- * Override the inline-styles of the body element.
- */
- bodyStyle: _react.PropTypes.object,
- /**
- * The css class name of the root element.
- */
- className: _react.PropTypes.string,
- /**
- * Override the inline-styles of the content element.
- */
- contentStyle: _react.PropTypes.object,
+ false ? Checkbox.propTypes = {
/**
- * The message to be displayed.
- *
- * (Note: If the message is an element or array, and the `Snackbar` may re-render while it is still open,
- * ensure that the same object remains as the `message` property if you want to avoid the `Snackbar` hiding and
- * showing again)
+ * Checkbox is checked if true.
*/
- message: _react.PropTypes.node.isRequired,
+ checked: _react.PropTypes.bool,
/**
- * Fired when the action button is touchtapped.
- *
- * @param {object} event Action button event.
+ * The SvgIcon to use for the checked state.
+ * This is useful to create icon toggles.
*/
- onActionTouchTap: _react.PropTypes.func,
+ checkedIcon: _react.PropTypes.element,
/**
- * Fired when the `Snackbar` is requested to be closed by a click outside the `Snackbar`, or after the
- * `autoHideDuration` timer expires.
- *
- * Typically `onRequestClose` is used to set state in the parent component, which is used to control the `Snackbar`
- * `open` prop.
- *
- * The `reason` parameter can optionally be used to control the response to `onRequestClose`,
- * for example ignoring `clickaway`.
- *
- * @param {string} reason Can be:`"timeout"` (`autoHideDuration` expired) or: `"clickaway"`
+ * The default state of our checkbox component.
+ * **Warning:** This cannot be used in conjunction with `checked`.
+ * Decide between using a controlled or uncontrolled input element and remove one of these props.
+ * More info: https://fb.me/react-controlled-components
*/
- onRequestClose: _react.PropTypes.func,
+ defaultChecked: _react.PropTypes.bool,
/**
- * Controls whether the `Snackbar` is opened or not.
+ * Disabled if true.
*/
- open: _react.PropTypes.bool.isRequired,
+ disabled: _react.PropTypes.bool,
/**
- * Override the inline-styles of the root element.
+ * Overrides the inline-styles of the icon element.
*/
- style: _react.PropTypes.object
-} : void 0;
-exports.default = Snackbar;
-
-/***/ }),
-/* 764 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.SnackbarBody = undefined;
-
-var _extends2 = __webpack_require__(7);
-
-var _extends3 = _interopRequireDefault(_extends2);
-
-var _objectWithoutProperties2 = __webpack_require__(8);
-
-var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-
-var _simpleAssign = __webpack_require__(6);
-
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-
-var _react = __webpack_require__(0);
-
-var _react2 = _interopRequireDefault(_react);
-
-var _transitions = __webpack_require__(10);
-
-var _transitions2 = _interopRequireDefault(_transitions);
-
-var _withWidth = __webpack_require__(765);
-
-var _withWidth2 = _interopRequireDefault(_withWidth);
-
-var _FlatButton = __webpack_require__(198);
-
-var _FlatButton2 = _interopRequireDefault(_FlatButton);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function getStyles(props, context) {
- var open = props.open,
- width = props.width;
- var _context$muiTheme = context.muiTheme,
- _context$muiTheme$bas = _context$muiTheme.baseTheme,
- _context$muiTheme$bas2 = _context$muiTheme$bas.spacing,
- desktopGutter = _context$muiTheme$bas2.desktopGutter,
- desktopSubheaderHeight = _context$muiTheme$bas2.desktopSubheaderHeight,
- fontFamily = _context$muiTheme$bas.fontFamily,
- _context$muiTheme$sna = _context$muiTheme.snackbar,
- backgroundColor = _context$muiTheme$sna.backgroundColor,
- textColor = _context$muiTheme$sna.textColor,
- actionColor = _context$muiTheme$sna.actionColor;
-
-
- var isSmall = width === _withWidth.SMALL;
-
- var styles = {
- root: {
- fontFamily: fontFamily,
- backgroundColor: backgroundColor,
- padding: '0 ' + desktopGutter + 'px',
- height: desktopSubheaderHeight,
- lineHeight: desktopSubheaderHeight + 'px',
- borderRadius: isSmall ? 0 : 2,
- maxWidth: isSmall ? 'inherit' : 568,
- minWidth: isSmall ? 'inherit' : 288,
- width: isSmall ? 'calc(100vw - ' + desktopGutter * 2 + 'px)' : 'auto',
- flexGrow: isSmall ? 1 : 0
- },
- content: {
- fontSize: 14,
- color: textColor,
- opacity: open ? 1 : 0,
- transition: open ? _transitions2.default.easeOut('500ms', 'opacity', '100ms') : _transitions2.default.easeOut('400ms', 'opacity')
- },
- action: {
- color: actionColor,
- float: 'right',
- marginTop: 6,
- marginRight: -16,
- marginLeft: desktopGutter,
- backgroundColor: 'transparent'
- }
- };
-
- return styles;
-}
-
-var SnackbarBody = exports.SnackbarBody = function SnackbarBody(props, context) {
- var action = props.action,
- contentStyle = props.contentStyle,
- message = props.message,
- open = props.open,
- onActionTouchTap = props.onActionTouchTap,
- style = props.style,
- other = (0, _objectWithoutProperties3.default)(props, ['action', 'contentStyle', 'message', 'open', 'onActionTouchTap', 'style']);
- var prepareStyles = context.muiTheme.prepareStyles;
-
- var styles = getStyles(props, context);
-
- var actionButton = action && _react2.default.createElement(_FlatButton2.default, {
- style: styles.action,
- label: action,
- onTouchTap: onActionTouchTap
- });
-
- return _react2.default.createElement(
- 'div',
- (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }),
- _react2.default.createElement(
- 'div',
- { style: prepareStyles((0, _simpleAssign2.default)(styles.content, contentStyle)) },
- _react2.default.createElement(
- 'span',
- null,
- message
- ),
- actionButton
- )
- );
-};
-
- false ? SnackbarBody.propTypes = {
+ iconStyle: _react.PropTypes.object,
/**
- * The label for the action on the snackbar.
+ * Overrides the inline-styles of the input element.
*/
- action: _react.PropTypes.node,
+ inputStyle: _react.PropTypes.object,
/**
- * Override the inline-styles of the content element.
+ * Where the label will be placed next to the checkbox.
*/
- contentStyle: _react.PropTypes.object,
+ labelPosition: _react.PropTypes.oneOf(['left', 'right']),
/**
- * The message to be displayed.
- *
- * (Note: If the message is an element or array, and the `Snackbar` may re-render while it is still open,
- * ensure that the same object remains as the `message` property if you want to avoid the `Snackbar` hiding and
- * showing again)
+ * Overrides the inline-styles of the Checkbox element label.
*/
- message: _react.PropTypes.node.isRequired,
+ labelStyle: _react.PropTypes.object,
/**
- * Fired when the action button is touchtapped.
+ * Callback function that is fired when the checkbox is checked.
*
- * @param {object} event Action button event.
- */
- onActionTouchTap: _react.PropTypes.func,
- /**
- * @ignore
- * Controls whether the `Snackbar` is opened or not.
+ * @param {object} event `change` event targeting the underlying checkbox `input`.
+ * @param {boolean} isInputChecked The `checked` value of the underlying checkbox `input`.
*/
- open: _react.PropTypes.bool.isRequired,
+ onCheck: _react.PropTypes.func,
/**
* Override the inline-styles of the root element.
*/
style: _react.PropTypes.object,
/**
- * @ignore
- * Width of the screen.
+ * The SvgIcon to use for the unchecked state.
+ * This is useful to create icon toggles.
+ */
+ uncheckedIcon: _react.PropTypes.element,
+ /**
+ * ValueLink for when using controlled checkbox.
*/
- width: _react.PropTypes.number.isRequired
+ valueLink: _react.PropTypes.object
} : void 0;
-
-SnackbarBody.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
-
-exports.default = (0, _withWidth2.default)()(SnackbarBody);
+exports.default = Checkbox;
/***/ }),
-/* 765 */
+/* 766 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -59371,149 +62971,141 @@ exports.default = (0, _withWidth2.default)()(SnackbarBody);
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.LARGE = exports.MEDIUM = exports.SMALL = undefined;
-var _extends2 = __webpack_require__(7);
+var _react = __webpack_require__(0);
-var _extends3 = _interopRequireDefault(_extends2);
+var _react2 = _interopRequireDefault(_react);
-var _getPrototypeOf = __webpack_require__(3);
+var _pure = __webpack_require__(20);
-var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+var _pure2 = _interopRequireDefault(_pure);
-var _classCallCheck2 = __webpack_require__(1);
+var _SvgIcon = __webpack_require__(21);
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
-var _createClass2 = __webpack_require__(2);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _createClass3 = _interopRequireDefault(_createClass2);
+var ToggleCheckBoxOutlineBlank = function ToggleCheckBoxOutlineBlank(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z' })
+ );
+};
+ToggleCheckBoxOutlineBlank = (0, _pure2.default)(ToggleCheckBoxOutlineBlank);
+ToggleCheckBoxOutlineBlank.displayName = 'ToggleCheckBoxOutlineBlank';
+ToggleCheckBoxOutlineBlank.muiName = 'SvgIcon';
-var _possibleConstructorReturn2 = __webpack_require__(4);
+exports.default = ToggleCheckBoxOutlineBlank;
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+/***/ }),
+/* 767 */
+/***/ (function(module, exports, __webpack_require__) {
-var _inherits2 = __webpack_require__(5);
+"use strict";
-var _inherits3 = _interopRequireDefault(_inherits2);
-exports.default = withWidth;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactEventListener = __webpack_require__(42);
+var _pure = __webpack_require__(20);
-var _reactEventListener2 = _interopRequireDefault(_reactEventListener);
+var _pure2 = _interopRequireDefault(_pure);
+
+var _SvgIcon = __webpack_require__(21);
+
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var SMALL = exports.SMALL = 1;
-var MEDIUM = exports.MEDIUM = 2;
-var LARGE = exports.LARGE = 3;
+var ToggleCheckBox = function ToggleCheckBox(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z' })
+ );
+};
+ToggleCheckBox = (0, _pure2.default)(ToggleCheckBox);
+ToggleCheckBox.displayName = 'ToggleCheckBox';
+ToggleCheckBox.muiName = 'SvgIcon';
-function withWidth() {
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
- var _options$largeWidth = options.largeWidth,
- largeWidth = _options$largeWidth === undefined ? 992 : _options$largeWidth,
- _options$mediumWidth = options.mediumWidth,
- mediumWidth = _options$mediumWidth === undefined ? 768 : _options$mediumWidth,
- _options$resizeInterv = options.resizeInterval,
- resizeInterval = _options$resizeInterv === undefined ? 166 : _options$resizeInterv;
+exports.default = ToggleCheckBox;
+/***/ }),
+/* 768 */
+/***/ (function(module, exports, __webpack_require__) {
- return function (MyComponent) {
- return function (_Component) {
- (0, _inherits3.default)(WithWidth, _Component);
+"use strict";
- function WithWidth() {
- var _ref;
- var _temp, _this, _ret;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
- (0, _classCallCheck3.default)(this, WithWidth);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
+var _DatePicker = __webpack_require__(769);
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = WithWidth.__proto__ || (0, _getPrototypeOf2.default)(WithWidth)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- width: null
- }, _this.handleResize = function () {
- clearTimeout(_this.deferTimer);
- _this.deferTimer = setTimeout(function () {
- _this.updateWidth();
- }, resizeInterval);
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+var _DatePicker2 = _interopRequireDefault(_DatePicker);
+
+var _createComponent = __webpack_require__(41);
+
+var _createComponent2 = _interopRequireDefault(_createComponent);
+
+var _mapError = __webpack_require__(66);
+
+var _mapError2 = _interopRequireDefault(_mapError);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+exports.default = (0, _createComponent2.default)(_DatePicker2.default, function (_ref) {
+ var _ref$input = _ref.input,
+ onBlur = _ref$input.onBlur,
+ inputProps = _objectWithoutProperties(_ref$input, ['onBlur']),
+ defaultDate = _ref.defaultDate,
+ _onChange = _ref.onChange,
+ props = _objectWithoutProperties(_ref, ['input', 'defaultDate', 'onChange']);
+
+ return _extends({}, inputProps, (0, _mapError2.default)(props), {
+ onChange: function onChange(event, value) {
+ inputProps.onChange(value);
+ if (_onChange) {
+ _onChange(value);
}
+ }
+ });
+});
- (0, _createClass3.default)(WithWidth, [{
- key: 'componentDidMount',
- value: function componentDidMount() {
- this.updateWidth();
- }
- }, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- clearTimeout(this.deferTimer);
- }
- }, {
- key: 'updateWidth',
- value: function updateWidth() {
- var innerWidth = window.innerWidth;
- var width = void 0;
+/***/ }),
+/* 769 */
+/***/ (function(module, exports, __webpack_require__) {
- if (innerWidth >= largeWidth) {
- width = LARGE;
- } else if (innerWidth >= mediumWidth) {
- width = MEDIUM;
- } else {
- // innerWidth < 768
- width = SMALL;
- }
+"use strict";
- if (width !== this.state.width) {
- this.setState({
- width: width
- });
- }
- }
- }, {
- key: 'render',
- value: function render() {
- var width = this.state.width;
- /**
- * When rendering the component on the server,
- * we have no idea about the screen width.
- * In order to prevent blinks and help the reconciliation
- * we are not rendering the component.
- *
- * A better alternative would be to send client hints.
- * But the browser support of this API is low:
- * http://caniuse.com/#search=client%20hint
- */
- if (width === null) {
- return null;
- }
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = undefined;
- return _react2.default.createElement(
- _reactEventListener2.default,
- { target: 'window', onResize: this.handleResize },
- _react2.default.createElement(MyComponent, (0, _extends3.default)({
- width: width
- }, this.props))
- );
- }
- }]);
- return WithWidth;
- }(_react.Component);
- };
-}
+var _DatePicker = __webpack_require__(770);
+
+var _DatePicker2 = _interopRequireDefault(_DatePicker);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _DatePicker2.default;
/***/ }),
-/* 766 */
+/* 770 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -59559,291 +63151,355 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _transitions = __webpack_require__(10);
-
-var _transitions2 = _interopRequireDefault(_transitions);
-
-var _childUtils = __webpack_require__(127);
+var _dateUtils = __webpack_require__(85);
-var _colorManipulator = __webpack_require__(56);
+var _DatePickerDialog = __webpack_require__(771);
-var _EnhancedButton = __webpack_require__(59);
-
-var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton);
+var _DatePickerDialog2 = _interopRequireDefault(_DatePickerDialog);
-var _FlatButtonLabel = __webpack_require__(767);
+var _TextField = __webpack_require__(99);
-var _FlatButtonLabel2 = _interopRequireDefault(_FlatButtonLabel);
+var _TextField2 = _interopRequireDefault(_TextField);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function validateLabel(props, propName, componentName) {
- if (false) {
- if (!props.children && props.label !== 0 && !props.label && !props.icon) {
- return new Error('Required prop label or children or icon was not specified in ' + componentName + '.');
- }
- }
-}
-
-var FlatButton = function (_Component) {
- (0, _inherits3.default)(FlatButton, _Component);
+var DatePicker = function (_Component) {
+ (0, _inherits3.default)(DatePicker, _Component);
- function FlatButton() {
+ function DatePicker() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, FlatButton);
+ (0, _classCallCheck3.default)(this, DatePicker);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FlatButton.__proto__ || (0, _getPrototypeOf2.default)(FlatButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- hovered: false,
- isKeyboardFocused: false,
- touch: false
- }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) {
- _this.setState({ isKeyboardFocused: isKeyboardFocused });
- _this.props.onKeyboardFocus(event, isKeyboardFocused);
- }, _this.handleMouseEnter = function (event) {
- // Cancel hover styles for touch devices
- if (!_this.state.touch) _this.setState({ hovered: true });
- _this.props.onMouseEnter(event);
- }, _this.handleMouseLeave = function (event) {
- _this.setState({ hovered: false });
- _this.props.onMouseLeave(event);
- }, _this.handleTouchStart = function (event) {
- _this.setState({ touch: true });
- _this.props.onTouchStart(event);
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DatePicker.__proto__ || (0, _getPrototypeOf2.default)(DatePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ date: undefined
+ }, _this.handleAccept = function (date) {
+ if (!_this.isControlled()) {
+ _this.setState({
+ date: date
+ });
+ }
+ if (_this.props.onChange) {
+ _this.props.onChange(null, date);
+ }
+ }, _this.handleFocus = function (event) {
+ event.target.blur();
+ if (_this.props.onFocus) {
+ _this.props.onFocus(event);
+ }
+ }, _this.handleTouchTap = function (event) {
+ if (_this.props.onTouchTap) {
+ _this.props.onTouchTap(event);
+ }
+
+ if (!_this.props.disabled) {
+ setTimeout(function () {
+ _this.openDialog();
+ }, 0);
+ }
+ }, _this.formatDate = function (date) {
+ if (_this.props.locale) {
+ var DateTimeFormat = _this.props.DateTimeFormat || _dateUtils.dateTimeFormat;
+ return new DateTimeFormat(_this.props.locale, {
+ day: 'numeric',
+ month: 'numeric',
+ year: 'numeric'
+ }).format(date);
+ } else {
+ return (0, _dateUtils.formatIso)(date);
+ }
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(FlatButton, [{
+ (0, _createClass3.default)(DatePicker, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ this.setState({
+ date: this.isControlled() ? this.getControlledDate() : this.props.defaultDate
+ });
+ }
+ }, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
- if (nextProps.disabled) {
- this.setState({
- hovered: false
- });
+ if (this.isControlled()) {
+ var newDate = this.getControlledDate(nextProps);
+ if (!(0, _dateUtils.isEqualDate)(this.state.date, newDate)) {
+ this.setState({
+ date: newDate
+ });
+ }
}
}
}, {
- key: 'render',
- value: function render() {
- var _props = this.props,
- children = _props.children,
- disabled = _props.disabled,
- hoverColor = _props.hoverColor,
- backgroundColor = _props.backgroundColor,
- icon = _props.icon,
- label = _props.label,
- labelStyle = _props.labelStyle,
- labelPosition = _props.labelPosition,
- primary = _props.primary,
- rippleColor = _props.rippleColor,
- secondary = _props.secondary,
- style = _props.style,
- other = (0, _objectWithoutProperties3.default)(_props, ['children', 'disabled', 'hoverColor', 'backgroundColor', 'icon', 'label', 'labelStyle', 'labelPosition', 'primary', 'rippleColor', 'secondary', 'style']);
- var _context$muiTheme = this.context.muiTheme,
- _context$muiTheme$but = _context$muiTheme.button,
- buttonHeight = _context$muiTheme$but.height,
- buttonMinWidth = _context$muiTheme$but.minWidth,
- buttonTextTransform = _context$muiTheme$but.textTransform,
- _context$muiTheme$fla = _context$muiTheme.flatButton,
- buttonFilterColor = _context$muiTheme$fla.buttonFilterColor,
- buttonColor = _context$muiTheme$fla.color,
- disabledTextColor = _context$muiTheme$fla.disabledTextColor,
- fontSize = _context$muiTheme$fla.fontSize,
- fontWeight = _context$muiTheme$fla.fontWeight,
- primaryTextColor = _context$muiTheme$fla.primaryTextColor,
- secondaryTextColor = _context$muiTheme$fla.secondaryTextColor,
- textColor = _context$muiTheme$fla.textColor,
- _context$muiTheme$fla2 = _context$muiTheme$fla.textTransform,
- textTransform = _context$muiTheme$fla2 === undefined ? buttonTextTransform || 'uppercase' : _context$muiTheme$fla2;
-
- var defaultTextColor = disabled ? disabledTextColor : primary ? primaryTextColor : secondary ? secondaryTextColor : textColor;
-
- var defaultHoverColor = (0, _colorManipulator.fade)(buttonFilterColor, 0.2);
- var defaultRippleColor = buttonFilterColor;
- var buttonHoverColor = hoverColor || defaultHoverColor;
- var buttonRippleColor = rippleColor || defaultRippleColor;
- var buttonBackgroundColor = backgroundColor || buttonColor;
- var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled;
-
- var mergedRootStyles = (0, _simpleAssign2.default)({}, {
- height: buttonHeight,
- lineHeight: buttonHeight + 'px',
- minWidth: buttonMinWidth,
- color: defaultTextColor,
- transition: _transitions2.default.easeOut(),
- borderRadius: 2,
- userSelect: 'none',
- overflow: 'hidden',
- backgroundColor: hovered ? buttonHoverColor : buttonBackgroundColor,
- padding: 0,
- margin: 0,
- textAlign: 'center'
- }, style);
-
- var iconCloned = void 0;
- var labelStyleIcon = {};
+ key: 'getDate',
+ value: function getDate() {
+ return this.state.date;
+ }
- if (icon) {
- var iconStyles = (0, _simpleAssign2.default)({
- verticalAlign: 'middle',
- marginLeft: label && labelPosition !== 'before' ? 12 : 0,
- marginRight: label && labelPosition === 'before' ? 12 : 0
- }, icon.props.style);
- iconCloned = _react2.default.cloneElement(icon, {
- color: icon.props.color || mergedRootStyles.color,
- style: iconStyles
- });
+ /**
+ * Open the date-picker dialog programmatically from a parent.
+ */
- if (labelPosition === 'before') {
- labelStyleIcon.paddingRight = 8;
- } else {
- labelStyleIcon.paddingLeft = 8;
- }
+ }, {
+ key: 'openDialog',
+ value: function openDialog() {
+ /**
+ * if the date is not selected then set it to new date
+ * (get the current system date while doing so)
+ * else set it to the currently selected date
+ */
+ if (this.state.date !== undefined) {
+ this.setState({
+ dialogDate: this.getDate()
+ }, this.refs.dialogWindow.show);
+ } else {
+ this.setState({
+ dialogDate: new Date()
+ }, this.refs.dialogWindow.show);
}
+ }
- var mergedLabelStyles = (0, _simpleAssign2.default)({
- letterSpacing: 0,
- textTransform: textTransform,
- fontWeight: fontWeight,
- fontSize: fontSize
- }, labelStyleIcon, labelStyle);
+ /**
+ * Alias for `openDialog()` for an api consistent with TextField.
+ */
- var labelElement = label ? _react2.default.createElement(_FlatButtonLabel2.default, { label: label, style: mergedLabelStyles }) : undefined;
+ }, {
+ key: 'focus',
+ value: function focus() {
+ this.openDialog();
+ }
+ }, {
+ key: 'isControlled',
+ value: function isControlled() {
+ return this.props.hasOwnProperty('value');
+ }
+ }, {
+ key: 'getControlledDate',
+ value: function getControlledDate() {
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
- // Place label before or after children.
- var childrenFragment = labelPosition === 'before' ? {
- labelElement: labelElement,
- iconCloned: iconCloned,
- children: children
- } : {
- children: children,
- iconCloned: iconCloned,
- labelElement: labelElement
- };
+ if (props.value instanceof Date) {
+ return props.value;
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ DateTimeFormat = _props.DateTimeFormat,
+ autoOk = _props.autoOk,
+ cancelLabel = _props.cancelLabel,
+ className = _props.className,
+ container = _props.container,
+ defaultDate = _props.defaultDate,
+ dialogContainerStyle = _props.dialogContainerStyle,
+ disableYearSelection = _props.disableYearSelection,
+ firstDayOfWeek = _props.firstDayOfWeek,
+ formatDateProp = _props.formatDate,
+ locale = _props.locale,
+ maxDate = _props.maxDate,
+ minDate = _props.minDate,
+ mode = _props.mode,
+ okLabel = _props.okLabel,
+ onDismiss = _props.onDismiss,
+ onFocus = _props.onFocus,
+ onShow = _props.onShow,
+ onTouchTap = _props.onTouchTap,
+ shouldDisableDate = _props.shouldDisableDate,
+ style = _props.style,
+ textFieldStyle = _props.textFieldStyle,
+ other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'autoOk', 'cancelLabel', 'className', 'container', 'defaultDate', 'dialogContainerStyle', 'disableYearSelection', 'firstDayOfWeek', 'formatDate', 'locale', 'maxDate', 'minDate', 'mode', 'okLabel', 'onDismiss', 'onFocus', 'onShow', 'onTouchTap', 'shouldDisableDate', 'style', 'textFieldStyle']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
- var enhancedButtonChildren = (0, _childUtils.createChildFragment)(childrenFragment);
+ var formatDate = formatDateProp || this.formatDate;
return _react2.default.createElement(
- _EnhancedButton2.default,
- (0, _extends3.default)({}, other, {
- disabled: disabled,
- focusRippleColor: buttonRippleColor,
- focusRippleOpacity: 0.3,
- onKeyboardFocus: this.handleKeyboardFocus,
- onMouseLeave: this.handleMouseLeave,
- onMouseEnter: this.handleMouseEnter,
- onTouchStart: this.handleTouchStart,
- style: mergedRootStyles,
- touchRippleColor: buttonRippleColor,
- touchRippleOpacity: 0.3
- }),
- enhancedButtonChildren
+ 'div',
+ { className: className, style: prepareStyles((0, _simpleAssign2.default)({}, style)) },
+ _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, {
+ onFocus: this.handleFocus,
+ onTouchTap: this.handleTouchTap,
+ ref: 'input',
+ style: textFieldStyle,
+ value: this.state.date ? formatDate(this.state.date) : ''
+ })),
+ _react2.default.createElement(_DatePickerDialog2.default, {
+ DateTimeFormat: DateTimeFormat,
+ autoOk: autoOk,
+ cancelLabel: cancelLabel,
+ container: container,
+ containerStyle: dialogContainerStyle,
+ disableYearSelection: disableYearSelection,
+ firstDayOfWeek: firstDayOfWeek,
+ initialDate: this.state.dialogDate,
+ locale: locale,
+ maxDate: maxDate,
+ minDate: minDate,
+ mode: mode,
+ okLabel: okLabel,
+ onAccept: this.handleAccept,
+ onShow: onShow,
+ onDismiss: onDismiss,
+ ref: 'dialogWindow',
+ shouldDisableDate: shouldDisableDate
+ })
);
}
}]);
- return FlatButton;
+ return DatePicker;
}(_react.Component);
-FlatButton.muiName = 'FlatButton';
-FlatButton.defaultProps = {
+DatePicker.defaultProps = {
+ autoOk: false,
+ container: 'dialog',
disabled: false,
- labelStyle: {},
- labelPosition: 'after',
- onKeyboardFocus: function onKeyboardFocus() {},
- onMouseEnter: function onMouseEnter() {},
- onMouseLeave: function onMouseLeave() {},
- onTouchStart: function onTouchStart() {},
- primary: false,
- secondary: false
+ disableYearSelection: false,
+ firstDayOfWeek: 1,
+ style: {}
};
-FlatButton.contextTypes = {
+DatePicker.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? FlatButton.propTypes = {
+ false ? DatePicker.propTypes = {
/**
- * Color of button when mouse is not hovering over it.
+ * Constructor for date formatting for the specified `locale`.
+ * The constructor must follow this specification: ECMAScript Internationalization API 1.0 (ECMA-402).
+ * `Intl.DateTimeFormat` is supported by most modern browsers, see http://caniuse.com/#search=intl,
+ * otherwise https://github.com/andyearnshaw/Intl.js is a good polyfill.
+ *
+ * By default, a built-in `DateTimeFormat` is used which supports the 'en-US' `locale`.
*/
- backgroundColor: _react.PropTypes.string,
+ DateTimeFormat: _react.PropTypes.func,
/**
- * This is what will be displayed inside the button.
- * If a label is specified, the text within the label prop will
- * be displayed. Otherwise, the component will expect children
- * which will then be displayed. (In our example,
- * we are nesting an `` and a `span`
- * that acts as our label to be displayed.) This only
- * applies to flat and raised buttons.
+ * If true, automatically accept and close the picker on select a date.
*/
- children: _react.PropTypes.node,
+ autoOk: _react.PropTypes.bool,
/**
- * Disables the button if set to true.
+ * Override the default text of the 'Cancel' button.
+ */
+ cancelLabel: _react.PropTypes.node,
+ /**
+ * The css class name of the root element.
+ */
+ className: _react.PropTypes.string,
+ /**
+ * Used to control how the Date Picker will be displayed when the input field is focused.
+ * `dialog` (default) displays the DatePicker as a dialog with a modal.
+ * `inline` displays the DatePicker below the input field (similar to auto complete).
+ */
+ container: _react.PropTypes.oneOf(['dialog', 'inline']),
+ /**
+ * This is the initial date value of the component.
+ * If either `value` or `valueLink` is provided they will override this
+ * prop with `value` taking precedence.
+ */
+ defaultDate: _react.PropTypes.object,
+ /**
+ * Override the inline-styles of DatePickerDialog's Container element.
+ */
+ dialogContainerStyle: _react.PropTypes.object,
+ /**
+ * Disables the year selection in the date picker.
+ */
+ disableYearSelection: _react.PropTypes.bool,
+ /**
+ * Disables the DatePicker.
*/
disabled: _react.PropTypes.bool,
/**
- * Color of button when mouse hovers over.
+ * Used to change the first day of week. It varies from
+ * Saturday to Monday between different locales.
+ * The allowed range is 0 (Sunday) to 6 (Saturday).
+ * The default is `1`, Monday, as per ISO 8601.
*/
- hoverColor: _react.PropTypes.string,
+ firstDayOfWeek: _react.PropTypes.number,
/**
- * The URL to link to when the button is clicked.
+ * This function is called to format the date displayed in the input field, and should return a string.
+ * By default if no `locale` and `DateTimeFormat` is provided date objects are formatted to ISO 8601 YYYY-MM-DD.
+ *
+ * @param {object} date Date object to be formatted.
+ * @returns {any} The formatted date.
*/
- href: _react.PropTypes.string,
+ formatDate: _react.PropTypes.func,
/**
- * Use this property to display an icon.
+ * Locale used for formatting the `DatePicker` date strings. Other than for 'en-US', you
+ * must provide a `DateTimeFormat` that supports the chosen `locale`.
*/
- icon: _react.PropTypes.node,
+ locale: _react.PropTypes.string,
/**
- * Label for the button.
+ * The ending of a range of valid dates. The range includes the endDate.
+ * The default value is current date + 100 years.
*/
- label: validateLabel,
+ maxDate: _react.PropTypes.object,
/**
- * Place label before or after the passed children.
+ * The beginning of a range of valid dates. The range includes the startDate.
+ * The default value is current date - 100 years.
*/
- labelPosition: _react.PropTypes.oneOf(['before', 'after']),
+ minDate: _react.PropTypes.object,
/**
- * Override the inline-styles of the button's label element.
+ * Tells the component to display the picker in portrait or landscape mode.
*/
- labelStyle: _react.PropTypes.object,
+ mode: _react.PropTypes.oneOf(['portrait', 'landscape']),
/**
- * Callback function fired when the element is focused or blurred by the keyboard.
+ * Override the default text of the 'OK' button.
+ */
+ okLabel: _react.PropTypes.node,
+ /**
+ * Callback function that is fired when the date value changes.
*
- * @param {object} event `focus` or `blur` event targeting the element.
- * @param {boolean} isKeyboardFocused Indicates whether the element is focused.
+ * @param {null} null Since there is no particular event associated with the change,
+ * the first argument will always be null.
+ * @param {object} date The new date.
*/
- onKeyboardFocus: _react.PropTypes.func,
- /** @ignore */
- onMouseEnter: _react.PropTypes.func,
- /** @ignore */
- onMouseLeave: _react.PropTypes.func,
- /** @ignore */
- onTouchStart: _react.PropTypes.func,
+ onChange: _react.PropTypes.func,
/**
- * If true, colors button according to
- * primaryTextColor from the Theme.
+ * Callback function that is fired when the Date Picker's dialog is dismissed.
*/
- primary: _react.PropTypes.bool,
+ onDismiss: _react.PropTypes.func,
/**
- * Color for the ripple after button is clicked.
+ * Callback function that is fired when the Date Picker's `TextField` gains focus.
*/
- rippleColor: _react.PropTypes.string,
+ onFocus: _react.PropTypes.func,
/**
- * If true, colors button according to secondaryTextColor from the theme.
- * The primary prop has precendent if set to true.
+ * Callback function that is fired when the Date Picker's dialog is shown.
*/
- secondary: _react.PropTypes.bool,
+ onShow: _react.PropTypes.func,
+ /**
+ * Callback function that is fired when a touch tap event occurs on the Date Picker's `TextField`.
+ *
+ * @param {object} event TouchTap event targeting the `TextField`.
+ */
+ onTouchTap: _react.PropTypes.func,
+ /**
+ * Callback function used to determine if a day's entry should be disabled on the calendar.
+ *
+ * @param {object} day Date object of a day.
+ * @returns {boolean} Indicates whether the day should be disabled.
+ */
+ shouldDisableDate: _react.PropTypes.func,
/**
* Override the inline-styles of the root element.
*/
- style: _react.PropTypes.object
+ style: _react.PropTypes.object,
+ /**
+ * Override the inline-styles of DatePicker's TextField element.
+ */
+ textFieldStyle: _react.PropTypes.object,
+ /**
+ * Sets the date for the Date Picker programmatically.
+ */
+ value: _react.PropTypes.object
} : void 0;
-exports.default = FlatButton;
+exports.default = DatePicker;
/***/ }),
-/* 767 */
+/* 771 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -59853,102 +63509,13 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _getPrototypeOf = __webpack_require__(3);
-
-var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-
-var _classCallCheck2 = __webpack_require__(1);
-
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
-var _createClass2 = __webpack_require__(2);
-
-var _createClass3 = _interopRequireDefault(_createClass2);
-
-var _possibleConstructorReturn2 = __webpack_require__(4);
-
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-
-var _inherits2 = __webpack_require__(5);
-
-var _inherits3 = _interopRequireDefault(_inherits2);
-
-var _simpleAssign = __webpack_require__(6);
-
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-
-var _react = __webpack_require__(0);
-
-var _react2 = _interopRequireDefault(_react);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function getStyles(props, context) {
- var baseTheme = context.muiTheme.baseTheme;
-
-
- return {
- root: {
- position: 'relative',
- paddingLeft: baseTheme.spacing.desktopGutterLess,
- paddingRight: baseTheme.spacing.desktopGutterLess,
- verticalAlign: 'middle'
- }
- };
-}
-
-var FlatButtonLabel = function (_Component) {
- (0, _inherits3.default)(FlatButtonLabel, _Component);
-
- function FlatButtonLabel() {
- (0, _classCallCheck3.default)(this, FlatButtonLabel);
- return (0, _possibleConstructorReturn3.default)(this, (FlatButtonLabel.__proto__ || (0, _getPrototypeOf2.default)(FlatButtonLabel)).apply(this, arguments));
- }
-
- (0, _createClass3.default)(FlatButtonLabel, [{
- key: 'render',
- value: function render() {
- var _props = this.props,
- label = _props.label,
- style = _props.style;
- var prepareStyles = this.context.muiTheme.prepareStyles;
-
- var styles = getStyles(this.props, this.context);
-
- return _react2.default.createElement(
- 'span',
- { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) },
- label
- );
- }
- }]);
- return FlatButtonLabel;
-}(_react.Component);
-
-FlatButtonLabel.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? FlatButtonLabel.propTypes = {
- label: _react.PropTypes.node,
- style: _react.PropTypes.object
-} : void 0;
-exports.default = FlatButtonLabel;
-
-/***/ }),
-/* 768 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
+var _extends2 = __webpack_require__(7);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.SHOP_NAME = undefined;
+var _extends3 = _interopRequireDefault(_extends2);
-var _keys = __webpack_require__(79);
+var _objectWithoutProperties2 = __webpack_require__(8);
-var _keys2 = _interopRequireDefault(_keys);
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _getPrototypeOf = __webpack_require__(3);
@@ -59970,209 +63537,221 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
-var _react = __webpack_require__(0);
-
-var _react2 = _interopRequireDefault(_react);
-
-var _Tab = __webpack_require__(769);
-
-var _Tab2 = _interopRequireDefault(_Tab);
-
-var _reactRedux = __webpack_require__(27);
+var _simpleAssign = __webpack_require__(6);
-var _FontIcon = __webpack_require__(317);
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-var _FontIcon2 = _interopRequireDefault(_FontIcon);
+var _react = __webpack_require__(0);
-var _IconButton = __webpack_require__(95);
+var _react2 = _interopRequireDefault(_react);
-var _IconButton2 = _interopRequireDefault(_IconButton);
+var _reactEventListener = __webpack_require__(40);
-var _colors = __webpack_require__(57);
+var _reactEventListener2 = _interopRequireDefault(_reactEventListener);
-var _Menus = __webpack_require__(96);
+var _keycode = __webpack_require__(26);
-var menus = _interopRequireWildcard(_Menus);
+var _keycode2 = _interopRequireDefault(_keycode);
-var _Billing = __webpack_require__(770);
+var _Calendar = __webpack_require__(772);
-var _Billing2 = _interopRequireDefault(_Billing);
+var _Calendar2 = _interopRequireDefault(_Calendar);
-var _Options = __webpack_require__(845);
+var _Dialog = __webpack_require__(134);
-var _Options2 = _interopRequireDefault(_Options);
+var _Dialog2 = _interopRequireDefault(_Dialog);
-var _Sizes = __webpack_require__(846);
+var _Popover = __webpack_require__(133);
-var _Sizes2 = _interopRequireDefault(_Sizes);
+var _Popover2 = _interopRequireDefault(_Popover);
-var _Layout = __webpack_require__(847);
+var _PopoverAnimationVertical = __webpack_require__(332);
-var _Layout2 = _interopRequireDefault(_Layout);
+var _PopoverAnimationVertical2 = _interopRequireDefault(_PopoverAnimationVertical);
-var _menu = __webpack_require__(854);
+var _dateUtils = __webpack_require__(85);
-var _settings = __webpack_require__(855);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+var DatePickerDialog = function (_Component) {
+ (0, _inherits3.default)(DatePickerDialog, _Component);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ function DatePickerDialog() {
+ var _ref;
-var SHOP_NAME = exports.SHOP_NAME = 'Supreme';
+ var _temp, _this, _ret;
-var Supreme = function (_Component) {
- (0, _inherits3.default)(Supreme, _Component);
+ (0, _classCallCheck3.default)(this, DatePickerDialog);
- function Supreme() {
- (0, _classCallCheck3.default)(this, Supreme);
- return (0, _possibleConstructorReturn3.default)(this, (Supreme.__proto__ || (0, _getPrototypeOf2.default)(Supreme)).apply(this, arguments));
- }
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
- (0, _createClass3.default)(Supreme, [{
- key: 'getContainerForMenu',
- value: function getContainerForMenu(menu) {
- var _this2 = this;
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DatePickerDialog.__proto__ || (0, _getPrototypeOf2.default)(DatePickerDialog)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ open: false
+ }, _this.show = function () {
+ if (_this.props.onShow && !_this.state.open) {
+ _this.props.onShow();
+ }
- switch (menu) {
- case menus.MENU_BILLING:
- return _react2.default.createElement(_Billing2.default, { onSubmit: function onSubmit(data) {
- return _this2.onSubmit(menu, data);
- }, shop: SHOP_NAME });
- case menus.MENU_OPTIONS:
- return _react2.default.createElement(_Options2.default, { onSubmit: function onSubmit(data) {
- return _this2.onSubmit(menu, data);
- }, shop: SHOP_NAME });
- case menus.MENU_SIZES:
- return _react2.default.createElement(_Sizes2.default, { onSubmit: function onSubmit(data) {
- return _this2.onSubmit(menu, data);
- }, shop: SHOP_NAME });
- default:
- return null;
+ _this.setState({
+ open: true
+ });
+ }, _this.dismiss = function () {
+ if (_this.props.onDismiss && _this.state.open) {
+ _this.props.onDismiss();
}
- }
- }, {
- key: 'strToNumberReducer',
- value: function strToNumberReducer(menu, key, value) {
- // Don't process values for billing
- if (typeof value === 'string' && !isNaN(value) && menu !== menus.MENU_BILLING) {
- return +value;
+
+ _this.setState({
+ open: false
+ });
+ }, _this.handleTouchTapDay = function () {
+ if (_this.props.autoOk) {
+ setTimeout(_this.handleTouchTapOk, 300);
}
- return value;
- }
- }, {
- key: 'transform',
- value: function transform(menu, obj, reducer) {
- var keys = (0, _keys2.default)(obj);
- var newObj = {};
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- var value = obj[key];
- newObj[key] = reducer(menu, key, value);
+ }, _this.handleTouchTapCancel = function () {
+ _this.dismiss();
+ }, _this.handleRequestClose = function () {
+ _this.dismiss();
+ }, _this.handleTouchTapOk = function () {
+ if (_this.props.onAccept && !_this.refs.calendar.isSelectedDateDisabled()) {
+ _this.props.onAccept(_this.refs.calendar.getSelectedDate());
}
- return newObj;
- }
- }, {
- key: 'onSubmit',
- value: function onSubmit(menu, data) {
- var newObj = this.transform(menu, data, this.strToNumberReducer);
- this.props.updateSettings(SHOP_NAME, menu, newObj);
- }
- }, {
- key: 'componentWillMount',
- value: function componentWillMount() {
- if (this.props.menu == null) {
- this.props.changeMenu(Supreme.getDefaultMenu());
+
+ _this.setState({
+ open: false
+ });
+ }, _this.handleWindowKeyUp = function (event) {
+ switch ((0, _keycode2.default)(event)) {
+ case 'enter':
+ _this.handleTouchTapOk();
+ break;
}
- }
- }, {
- key: 'getIconForTabMenu',
- value: function getIconForTabMenu(menu) {
- var isIncomplete = !this.props.settings[SHOP_NAME] || !this.props.settings[SHOP_NAME][menu];
- var color = isIncomplete ? _colors.red300 : 'white';
- var tip = isIncomplete ? 'This tab hasn\'t been configured yet' : '';
- return _react2.default.createElement(
- _IconButton2.default,
- { iconStyle: { color: color }, tooltip: tip, tooltipPosition: 'top-center', tooltipStyles: { color: 'white' } },
- _react2.default.createElement(
- _FontIcon2.default,
- { style: { color: color }, className: 'material-icons' },
- isIncomplete ? 'error' : 'done'
- )
- );
- }
- }, {
- key: 'getTabs',
- value: function getTabs() {
- var _this3 = this;
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
- return [_react2.default.createElement(_Tab2.default, {
- label: 'Billing',
- key: 1,
- icon: this.getIconForTabMenu(menus.MENU_BILLING),
- value: menus.MENU_BILLING,
- onClick: function onClick() {
- return _this3.props.changeMenu(menus.MENU_BILLING);
- }
- }), _react2.default.createElement(_Tab2.default, {
- label: 'Options',
- key: 2,
- icon: this.getIconForTabMenu(menus.MENU_OPTIONS),
- value: menus.MENU_OPTIONS,
- onClick: function onClick() {
- return _this3.props.changeMenu(menus.MENU_OPTIONS);
- }
- }), _react2.default.createElement(_Tab2.default, {
- label: 'Sizes',
- key: 3,
- icon: this.getIconForTabMenu(menus.MENU_SIZES),
- value: menus.MENU_SIZES,
- onClick: function onClick() {
- return _this3.props.changeMenu(menus.MENU_SIZES);
- }
- })];
- }
- }, {
+ (0, _createClass3.default)(DatePickerDialog, [{
key: 'render',
value: function render() {
- var menu = this.props.menu;
+ var _props = this.props,
+ DateTimeFormat = _props.DateTimeFormat,
+ autoOk = _props.autoOk,
+ cancelLabel = _props.cancelLabel,
+ container = _props.container,
+ containerStyle = _props.containerStyle,
+ disableYearSelection = _props.disableYearSelection,
+ initialDate = _props.initialDate,
+ firstDayOfWeek = _props.firstDayOfWeek,
+ locale = _props.locale,
+ maxDate = _props.maxDate,
+ minDate = _props.minDate,
+ mode = _props.mode,
+ okLabel = _props.okLabel,
+ onAccept = _props.onAccept,
+ onDismiss = _props.onDismiss,
+ onShow = _props.onShow,
+ shouldDisableDate = _props.shouldDisableDate,
+ style = _props.style,
+ animation = _props.animation,
+ other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'autoOk', 'cancelLabel', 'container', 'containerStyle', 'disableYearSelection', 'initialDate', 'firstDayOfWeek', 'locale', 'maxDate', 'minDate', 'mode', 'okLabel', 'onAccept', 'onDismiss', 'onShow', 'shouldDisableDate', 'style', 'animation']);
+ var open = this.state.open;
+
+
+ var styles = {
+ dialogContent: {
+ width: mode === 'landscape' ? 479 : 310
+ },
+ dialogBodyContent: {
+ padding: 0,
+ minHeight: mode === 'landscape' ? 330 : 434,
+ minWidth: mode === 'landscape' ? 479 : 310
+ }
+ };
+
+ var Container = container === 'inline' ? _Popover2.default : _Dialog2.default;
return _react2.default.createElement(
- _Layout2.default,
- { title: menu || 'Loading...', tabs: this.getTabs(), currentTab: menu },
- this.getContainerForMenu(menu)
+ 'div',
+ (0, _extends3.default)({}, other, { ref: 'root' }),
+ _react2.default.createElement(
+ Container,
+ {
+ anchorEl: this.refs.root // For Popover
+ , animation: animation || _PopoverAnimationVertical2.default // For Popover
+ , bodyStyle: styles.dialogBodyContent,
+ contentStyle: styles.dialogContent,
+ ref: 'dialog',
+ repositionOnUpdate: true,
+ open: open,
+ onRequestClose: this.handleRequestClose,
+ style: (0, _simpleAssign2.default)(styles.dialogBodyContent, containerStyle)
+ },
+ _react2.default.createElement(_reactEventListener2.default, {
+ target: 'window',
+ onKeyUp: this.handleWindowKeyUp
+ }),
+ _react2.default.createElement(_Calendar2.default, {
+ autoOk: autoOk,
+ DateTimeFormat: DateTimeFormat,
+ cancelLabel: cancelLabel,
+ disableYearSelection: disableYearSelection,
+ firstDayOfWeek: firstDayOfWeek,
+ initialDate: initialDate,
+ locale: locale,
+ onTouchTapDay: this.handleTouchTapDay,
+ maxDate: maxDate,
+ minDate: minDate,
+ mode: mode,
+ open: open,
+ ref: 'calendar',
+ onTouchTapCancel: this.handleTouchTapCancel,
+ onTouchTapOk: this.handleTouchTapOk,
+ okLabel: okLabel,
+ shouldDisableDate: shouldDisableDate
+ })
+ )
);
}
- }], [{
- key: 'getDefaultMenu',
- value: function getDefaultMenu() {
- return menus.MENU_BILLING;
- }
}]);
- return Supreme;
+ return DatePickerDialog;
}(_react.Component);
-function mapStateToProps(state) {
- return {
- menu: state.menu.currentMenu,
- settings: state.settings.values
- };
-}
-
-function mapDispatchToProps(dispatch) {
- return {
- changeMenu: function changeMenu(menu) {
- return dispatch((0, _menu.changeMenu)(menu));
- },
- updateSettings: function updateSettings(shop, key, value) {
- return dispatch((0, _settings.updateSettings)(shop, key, value));
- }
- };
-}
-
-exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Supreme);
+DatePickerDialog.defaultProps = {
+ DateTimeFormat: _dateUtils.dateTimeFormat,
+ cancelLabel: 'Cancel',
+ container: 'dialog',
+ locale: 'en-US',
+ okLabel: 'OK'
+};
+DatePickerDialog.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? DatePickerDialog.propTypes = {
+ DateTimeFormat: _react.PropTypes.func,
+ animation: _react.PropTypes.func,
+ autoOk: _react.PropTypes.bool,
+ cancelLabel: _react.PropTypes.node,
+ container: _react.PropTypes.oneOf(['dialog', 'inline']),
+ containerStyle: _react.PropTypes.object,
+ disableYearSelection: _react.PropTypes.bool,
+ firstDayOfWeek: _react.PropTypes.number,
+ initialDate: _react.PropTypes.object,
+ locale: _react.PropTypes.string,
+ maxDate: _react.PropTypes.object,
+ minDate: _react.PropTypes.object,
+ mode: _react.PropTypes.oneOf(['portrait', 'landscape']),
+ okLabel: _react.PropTypes.node,
+ onAccept: _react.PropTypes.func,
+ onDismiss: _react.PropTypes.func,
+ onShow: _react.PropTypes.func,
+ open: _react.PropTypes.bool,
+ shouldDisableDate: _react.PropTypes.func,
+ style: _react.PropTypes.object
+} : void 0;
+exports.default = DatePickerDialog;
/***/ }),
-/* 769 */
+/* 772 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -60182,14 +63761,6 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _extends2 = __webpack_require__(7);
-
-var _extends3 = _interopRequireDefault(_extends2);
-
-var _objectWithoutProperties2 = __webpack_require__(8);
-
-var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-
var _getPrototypeOf = __webpack_require__(3);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -60210,186 +63781,431 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
-var _simpleAssign = __webpack_require__(6);
+var _toConsumableArray2 = __webpack_require__(95);
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _EnhancedButton = __webpack_require__(59);
+var _reactEventListener = __webpack_require__(40);
-var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton);
+var _reactEventListener2 = _interopRequireDefault(_reactEventListener);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _keycode = __webpack_require__(26);
-function getStyles(props, context) {
- var tabs = context.muiTheme.tabs;
+var _keycode2 = _interopRequireDefault(_keycode);
+var _transitions = __webpack_require__(10);
- return {
- root: {
- color: props.selected ? tabs.selectedTextColor : tabs.textColor,
- fontWeight: 500,
- fontSize: 14,
- width: props.width,
- textTransform: 'uppercase',
- padding: 0
- },
- button: {
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- justifyContent: 'center',
- height: props.label && props.icon ? 72 : 48
- }
- };
-}
+var _transitions2 = _interopRequireDefault(_transitions);
-var Tab = function (_Component) {
- (0, _inherits3.default)(Tab, _Component);
+var _CalendarActionButtons = __webpack_require__(773);
- function Tab() {
+var _CalendarActionButtons2 = _interopRequireDefault(_CalendarActionButtons);
+
+var _CalendarMonth = __webpack_require__(776);
+
+var _CalendarMonth2 = _interopRequireDefault(_CalendarMonth);
+
+var _CalendarYear = __webpack_require__(778);
+
+var _CalendarYear2 = _interopRequireDefault(_CalendarYear);
+
+var _CalendarToolbar = __webpack_require__(780);
+
+var _CalendarToolbar2 = _interopRequireDefault(_CalendarToolbar);
+
+var _DateDisplay = __webpack_require__(784);
+
+var _DateDisplay2 = _interopRequireDefault(_DateDisplay);
+
+var _SlideIn = __webpack_require__(209);
+
+var _SlideIn2 = _interopRequireDefault(_SlideIn);
+
+var _dateUtils = __webpack_require__(85);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var daysArray = [].concat((0, _toConsumableArray3.default)(Array(7)));
+
+var Calendar = function (_Component) {
+ (0, _inherits3.default)(Calendar, _Component);
+
+ function Calendar() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, Tab);
+ (0, _classCallCheck3.default)(this, Calendar);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tab.__proto__ || (0, _getPrototypeOf2.default)(Tab)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTap = function (event) {
- if (_this.props.onTouchTap) {
- _this.props.onTouchTap(_this.props.value, event, _this);
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Calendar.__proto__ || (0, _getPrototypeOf2.default)(Calendar)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ displayDate: undefined,
+ displayMonthDay: true,
+ selectedDate: undefined,
+ transitionDirection: 'left',
+ transitionEnter: true
+ }, _this.handleTouchTapDay = function (event, date) {
+ _this.setSelectedDate(date);
+ if (_this.props.onTouchTapDay) _this.props.onTouchTapDay(event, date);
+ }, _this.handleMonthChange = function (months) {
+ _this.setState({
+ transitionDirection: months >= 0 ? 'left' : 'right',
+ displayDate: (0, _dateUtils.addMonths)(_this.state.displayDate, months)
+ });
+ }, _this.handleTouchTapYear = function (event, year) {
+ var date = (0, _dateUtils.cloneDate)(_this.state.selectedDate);
+ date.setFullYear(year);
+ _this.setSelectedDate(date, event);
+ _this.handleTouchTapDateDisplayMonthDay();
+ }, _this.handleTouchTapDateDisplayMonthDay = function () {
+ _this.setState({
+ displayMonthDay: true
+ });
+ }, _this.handleTouchTapDateDisplayYear = function () {
+ _this.setState({
+ displayMonthDay: false
+ });
+ }, _this.handleWindowKeyDown = function (event) {
+ if (_this.props.open) {
+ switch ((0, _keycode2.default)(event)) {
+ case 'up':
+ if (event.altKey && event.shiftKey) {
+ _this.addSelectedYears(-1);
+ } else if (event.shiftKey) {
+ _this.addSelectedMonths(-1);
+ } else {
+ _this.addSelectedDays(-7);
+ }
+ break;
+
+ case 'down':
+ if (event.altKey && event.shiftKey) {
+ _this.addSelectedYears(1);
+ } else if (event.shiftKey) {
+ _this.addSelectedMonths(1);
+ } else {
+ _this.addSelectedDays(7);
+ }
+ break;
+
+ case 'right':
+ if (event.altKey && event.shiftKey) {
+ _this.addSelectedYears(1);
+ } else if (event.shiftKey) {
+ _this.addSelectedMonths(1);
+ } else {
+ _this.addSelectedDays(1);
+ }
+ break;
+
+ case 'left':
+ if (event.altKey && event.shiftKey) {
+ _this.addSelectedYears(-1);
+ } else if (event.shiftKey) {
+ _this.addSelectedMonths(-1);
+ } else {
+ _this.addSelectedDays(-1);
+ }
+ break;
+ }
}
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(Tab, [{
+ (0, _createClass3.default)(Calendar, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ this.setState({
+ displayDate: (0, _dateUtils.getFirstDayOfMonth)(this.props.initialDate),
+ selectedDate: this.props.initialDate
+ });
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ if (nextProps.initialDate !== this.props.initialDate) {
+ var date = nextProps.initialDate || new Date();
+ this.setState({
+ displayDate: (0, _dateUtils.getFirstDayOfMonth)(date),
+ selectedDate: date
+ });
+ }
+ }
+ }, {
+ key: 'getSelectedDate',
+ value: function getSelectedDate() {
+ return this.state.selectedDate;
+ }
+ }, {
+ key: 'isSelectedDateDisabled',
+ value: function isSelectedDateDisabled() {
+ if (!this.state.displayMonthDay) {
+ return false;
+ }
+
+ return this.refs.calendar.isSelectedDateDisabled();
+ }
+ }, {
+ key: 'addSelectedDays',
+ value: function addSelectedDays(days) {
+ this.setSelectedDate((0, _dateUtils.addDays)(this.state.selectedDate, days));
+ }
+ }, {
+ key: 'addSelectedMonths',
+ value: function addSelectedMonths(months) {
+ this.setSelectedDate((0, _dateUtils.addMonths)(this.state.selectedDate, months));
+ }
+ }, {
+ key: 'addSelectedYears',
+ value: function addSelectedYears(years) {
+ this.setSelectedDate((0, _dateUtils.addYears)(this.state.selectedDate, years));
+ }
+ }, {
+ key: 'setDisplayDate',
+ value: function setDisplayDate(date, newSelectedDate) {
+ var newDisplayDate = (0, _dateUtils.getFirstDayOfMonth)(date);
+ var direction = newDisplayDate > this.state.displayDate ? 'left' : 'right';
+
+ if (newDisplayDate !== this.state.displayDate) {
+ this.setState({
+ displayDate: newDisplayDate,
+ transitionDirection: direction,
+ selectedDate: newSelectedDate || this.state.selectedDate
+ });
+ }
+ }
+ }, {
+ key: 'setSelectedDate',
+ value: function setSelectedDate(date) {
+ var adjustedDate = date;
+ if ((0, _dateUtils.isBeforeDate)(date, this.props.minDate)) {
+ adjustedDate = this.props.minDate;
+ } else if ((0, _dateUtils.isAfterDate)(date, this.props.maxDate)) {
+ adjustedDate = this.props.maxDate;
+ }
+
+ var newDisplayDate = (0, _dateUtils.getFirstDayOfMonth)(adjustedDate);
+ if (newDisplayDate !== this.state.displayDate) {
+ this.setDisplayDate(newDisplayDate, adjustedDate);
+ } else {
+ this.setState({
+ selectedDate: adjustedDate
+ });
+ }
+ }
+ }, {
+ key: 'getToolbarInteractions',
+ value: function getToolbarInteractions() {
+ return {
+ prevMonth: (0, _dateUtils.monthDiff)(this.state.displayDate, this.props.minDate) > 0,
+ nextMonth: (0, _dateUtils.monthDiff)(this.state.displayDate, this.props.maxDate) < 0
+ };
+ }
+ }, {
+ key: 'yearSelector',
+ value: function yearSelector() {
+ if (!this.props.disableYearSelection) {
+ return _react2.default.createElement(_CalendarYear2.default, {
+ key: 'years',
+ DateTimeFormat: this.props.DateTimeFormat,
+ locale: this.props.locale,
+ onTouchTapYear: this.handleTouchTapYear,
+ selectedDate: this.state.selectedDate,
+ minDate: this.props.minDate,
+ maxDate: this.props.maxDate
+ });
+ }
+ }
+ }, {
key: 'render',
value: function render() {
- var _props = this.props,
- icon = _props.icon,
- index = _props.index,
- onActive = _props.onActive,
- onTouchTap = _props.onTouchTap,
- selected = _props.selected,
- label = _props.label,
- buttonStyle = _props.buttonStyle,
- style = _props.style,
- value = _props.value,
- width = _props.width,
- other = (0, _objectWithoutProperties3.default)(_props, ['icon', 'index', 'onActive', 'onTouchTap', 'selected', 'label', 'buttonStyle', 'style', 'value', 'width']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
+ var toolbarInteractions = this.getToolbarInteractions();
+ var isLandscape = this.props.mode === 'landscape';
+ var calendarTextColor = this.context.muiTheme.datePicker.calendarTextColor;
- var styles = getStyles(this.props, this.context);
- var iconElement = void 0;
- if (icon && _react2.default.isValidElement(icon)) {
- var iconProps = {
- style: {
- fontSize: 24,
- color: styles.root.color,
- marginBottom: label ? 5 : 0
- }
- };
- // If it's svg icon set color via props
- if (icon.type.muiName !== 'FontIcon') {
- iconProps.color = styles.root.color;
+ var styles = {
+ root: {
+ color: calendarTextColor,
+ userSelect: 'none',
+ width: isLandscape ? 479 : 310
+ },
+ calendar: {
+ display: 'flex',
+ flexDirection: 'column'
+ },
+ calendarContainer: {
+ display: 'flex',
+ alignContent: 'space-between',
+ justifyContent: 'space-between',
+ flexDirection: 'column',
+ fontSize: 12,
+ fontWeight: 400,
+ padding: '0px 8px',
+ transition: _transitions2.default.easeOut()
+ },
+ yearContainer: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ flexDirection: 'column',
+ height: 272,
+ marginTop: 10,
+ overflow: 'hidden',
+ width: 310
+ },
+ weekTitle: {
+ display: 'flex',
+ flexDirection: 'row',
+ justifyContent: 'space-between',
+ fontWeight: '500',
+ height: 20,
+ lineHeight: '15px',
+ opacity: '0.5',
+ textAlign: 'center'
+ },
+ weekTitleDay: {
+ width: 42
+ },
+ transitionSlide: {
+ height: 214
}
- iconElement = _react2.default.cloneElement(icon, iconProps);
- }
+ };
+
+ var weekTitleDayStyle = prepareStyles(styles.weekTitleDay);
+
+ var _props = this.props,
+ minDate = _props.minDate,
+ maxDate = _props.maxDate,
+ cancelLabel = _props.cancelLabel,
+ DateTimeFormat = _props.DateTimeFormat,
+ firstDayOfWeek = _props.firstDayOfWeek,
+ locale = _props.locale,
+ okLabel = _props.okLabel,
+ onTouchTapCancel = _props.onTouchTapCancel,
+ onTouchTapOk = _props.onTouchTapOk;
- var rippleOpacity = 0.3;
- var rippleColor = this.context.muiTheme.tabs.selectedTextColor;
return _react2.default.createElement(
- _EnhancedButton2.default,
- (0, _extends3.default)({}, other, {
- style: (0, _simpleAssign2.default)(styles.root, style),
- focusRippleColor: rippleColor,
- touchRippleColor: rippleColor,
- focusRippleOpacity: rippleOpacity,
- touchRippleOpacity: rippleOpacity,
- onTouchTap: this.handleTouchTap
+ 'div',
+ { style: prepareStyles(styles.root) },
+ _react2.default.createElement(_reactEventListener2.default, {
+ target: 'window',
+ onKeyDown: this.handleWindowKeyDown
+ }),
+ _react2.default.createElement(_DateDisplay2.default, {
+ DateTimeFormat: DateTimeFormat,
+ disableYearSelection: this.props.disableYearSelection,
+ onTouchTapMonthDay: this.handleTouchTapDateDisplayMonthDay,
+ onTouchTapYear: this.handleTouchTapDateDisplayYear,
+ locale: locale,
+ monthDaySelected: this.state.displayMonthDay,
+ mode: this.props.mode,
+ selectedDate: this.state.selectedDate
}),
_react2.default.createElement(
'div',
- { style: (0, _simpleAssign2.default)(styles.button, buttonStyle) },
- iconElement,
- label
- )
- );
- }
- }]);
- return Tab;
-}(_react.Component);
-
-Tab.muiName = 'Tab';
-Tab.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? Tab.propTypes = {
- /**
- * Override the inline-styles of the button element.
- */
- buttonStyle: _react.PropTypes.object,
- /**
- * The css class name of the root element.
- */
- className: _react.PropTypes.string,
- /**
- * Sets the icon of the tab, you can pass `FontIcon` or `SvgIcon` elements.
- */
- icon: _react.PropTypes.node,
- /**
- * @ignore
- */
- index: _react.PropTypes.any,
- /**
- * Sets the text value of the tab item to the string specified.
- */
- label: _react.PropTypes.node,
- /**
- * Fired when the active tab changes by touch or tap.
- * Use this event to specify any functionality when an active tab changes.
- * For example - we are using this to route to home when the third tab becomes active.
- * This function will always recieve the active tab as it\'s first argument.
- */
- onActive: _react.PropTypes.func,
- /**
- * @ignore
- * This property is overriden by the Tabs component.
- */
- onTouchTap: _react.PropTypes.func,
- /**
- * @ignore
- * Defines if the current tab is selected or not.
- * The Tabs component is responsible for setting this property.
- */
- selected: _react.PropTypes.bool,
- /**
- * Override the inline-styles of the root element.
- */
- style: _react.PropTypes.object,
- /**
- * If value prop passed to Tabs component, this value prop is also required.
- * It assigns a value to the tab so that it can be selected by the Tabs.
- */
- value: _react.PropTypes.any,
- /**
- * @ignore
- * This property is overriden by the Tabs component.
- */
- width: _react.PropTypes.string
+ { style: prepareStyles(styles.calendar) },
+ this.state.displayMonthDay && _react2.default.createElement(
+ 'div',
+ { style: prepareStyles(styles.calendarContainer) },
+ _react2.default.createElement(_CalendarToolbar2.default, {
+ DateTimeFormat: DateTimeFormat,
+ locale: locale,
+ displayDate: this.state.displayDate,
+ onMonthChange: this.handleMonthChange,
+ prevMonth: toolbarInteractions.prevMonth,
+ nextMonth: toolbarInteractions.nextMonth
+ }),
+ _react2.default.createElement(
+ 'div',
+ { style: prepareStyles(styles.weekTitle) },
+ daysArray.map(function (event, i) {
+ return _react2.default.createElement(
+ 'span',
+ { key: i, style: weekTitleDayStyle },
+ (0, _dateUtils.localizedWeekday)(DateTimeFormat, locale, i, firstDayOfWeek)
+ );
+ })
+ ),
+ _react2.default.createElement(
+ _SlideIn2.default,
+ { direction: this.state.transitionDirection, style: styles.transitionSlide },
+ _react2.default.createElement(_CalendarMonth2.default, {
+ DateTimeFormat: DateTimeFormat,
+ locale: locale,
+ displayDate: this.state.displayDate,
+ firstDayOfWeek: this.props.firstDayOfWeek,
+ key: this.state.displayDate.toDateString(),
+ minDate: minDate,
+ maxDate: maxDate,
+ onTouchTapDay: this.handleTouchTapDay,
+ ref: 'calendar',
+ selectedDate: this.state.selectedDate,
+ shouldDisableDate: this.props.shouldDisableDate
+ })
+ )
+ ),
+ !this.state.displayMonthDay && _react2.default.createElement(
+ 'div',
+ { style: prepareStyles(styles.yearContainer) },
+ this.yearSelector()
+ ),
+ okLabel && _react2.default.createElement(_CalendarActionButtons2.default, {
+ autoOk: this.props.autoOk,
+ cancelLabel: cancelLabel,
+ okLabel: okLabel,
+ onTouchTapCancel: onTouchTapCancel,
+ onTouchTapOk: onTouchTapOk
+ })
+ )
+ );
+ }
+ }]);
+ return Calendar;
+}(_react.Component);
+
+Calendar.defaultProps = {
+ DateTimeFormat: _dateUtils.dateTimeFormat,
+ disableYearSelection: false,
+ initialDate: new Date(),
+ locale: 'en-US',
+ minDate: (0, _dateUtils.addYears)(new Date(), -100),
+ maxDate: (0, _dateUtils.addYears)(new Date(), 100)
+};
+Calendar.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? Calendar.propTypes = {
+ DateTimeFormat: _react.PropTypes.func.isRequired,
+ autoOk: _react.PropTypes.bool,
+ cancelLabel: _react.PropTypes.node,
+ disableYearSelection: _react.PropTypes.bool,
+ firstDayOfWeek: _react.PropTypes.number,
+ initialDate: _react.PropTypes.object,
+ locale: _react.PropTypes.string.isRequired,
+ maxDate: _react.PropTypes.object,
+ minDate: _react.PropTypes.object,
+ mode: _react.PropTypes.oneOf(['portrait', 'landscape']),
+ okLabel: _react.PropTypes.node,
+ onTouchTapCancel: _react.PropTypes.func,
+ onTouchTapDay: _react.PropTypes.func,
+ onTouchTapOk: _react.PropTypes.func,
+ open: _react.PropTypes.bool,
+ shouldDisableDate: _react.PropTypes.func
} : void 0;
-exports.default = Tab;
+exports.default = Calendar;
/***/ }),
-/* 770 */
+/* 773 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -60399,726 +64215,433 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _react = __webpack_require__(0);
-
-var _react2 = _interopRequireDefault(_react);
-
-var _reduxForm = __webpack_require__(113);
-
-var _reactRedux = __webpack_require__(27);
-
-var _MenuItem = __webpack_require__(129);
+var _getPrototypeOf = __webpack_require__(3);
-var _MenuItem2 = _interopRequireDefault(_MenuItem);
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-var _RaisedButton = __webpack_require__(200);
+var _classCallCheck2 = __webpack_require__(1);
-var _RaisedButton2 = _interopRequireDefault(_RaisedButton);
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-var _reduxFormMaterialUi = __webpack_require__(201);
+var _createClass2 = __webpack_require__(2);
-var _Styles = __webpack_require__(80);
+var _createClass3 = _interopRequireDefault(_createClass2);
-var _Styles2 = _interopRequireDefault(_Styles);
+var _possibleConstructorReturn2 = __webpack_require__(4);
-var _Utils = __webpack_require__(329);
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-var Utils = _interopRequireWildcard(_Utils);
+var _inherits2 = __webpack_require__(5);
-var _FormValidators = __webpack_require__(204);
+var _inherits3 = _interopRequireDefault(_inherits2);
-var Validators = _interopRequireWildcard(_FormValidators);
+var _react = __webpack_require__(0);
-var _Menus = __webpack_require__(96);
+var _react2 = _interopRequireDefault(_react);
-var menus = _interopRequireWildcard(_Menus);
+var _FlatButton = __webpack_require__(100);
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+var _FlatButton2 = _interopRequireDefault(_FlatButton);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function getStatesForCountry(country) {
- switch (country) {
- case 'USA':
- return Utils.usaRegions;
- case 'JAPAN':
- return Utils.japanRegions;
- case 'CANADA':
- return Utils.canadaRegions;
- default:
- return [];
- }
-}
-
-var Billing = function Billing(props) {
- var handleSubmit = props.handleSubmit,
- pristine = props.pristine,
- submitting = props.submitting,
- country = props.country;
-
- return _react2.default.createElement(
- 'form',
- { onSubmit: handleSubmit, id: 'biling-form' },
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'order_billing_name',
- validate: Validators.fullName,
- component: _reduxFormMaterialUi.TextField,
- floatingLabelText: 'Firstname and Lastname',
- hintText: 'Firstname and Lastname',
- style: _Styles2.default.fields.text
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'order_email',
- component: _reduxFormMaterialUi.TextField,
- floatingLabelText: 'Email',
- hintText: 'Email',
- style: _Styles2.default.fields.text,
- validate: [Validators.required, Validators.email]
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'order_tel',
- component: _reduxFormMaterialUi.TextField,
- floatingLabelText: 'Phone number',
- hintText: 'Phone number',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'bo',
- component: _reduxFormMaterialUi.TextField,
- floatingLabelText: 'Address',
- hintText: 'Address',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'order_billing_city',
- component: _reduxFormMaterialUi.TextField,
- floatingLabelText: 'City',
- hintText: 'City',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(
- _reduxForm.Field,
- {
- name: 'order_billing_country',
- component: _reduxFormMaterialUi.SelectField,
- floatingLabelText: 'Country',
- hintText: 'Country',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- },
- Utils.countries.map(function (x) {
- return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text });
- })
- )
- ),
- ['JAPAN', 'USA', 'CANADA'].indexOf(country) !== -1 && _react2.default.createElement(
- _reduxForm.Field,
- {
- name: 'order_billing_state',
- component: _reduxFormMaterialUi.SelectField,
- floatingLabelText: 'State',
- hintText: 'State',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- },
- getStatesForCountry(country).map(function (x) {
- return _react2.default.createElement(_MenuItem2.default, { key: x.value, value: x.value, primaryText: x.text });
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'order_billing_zip',
- component: _reduxFormMaterialUi.TextField,
- floatingLabelText: 'Zip',
- style: _Styles2.default.fields.text
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(
- _reduxForm.Field,
- {
- name: 'credit_card_type',
- component: _reduxFormMaterialUi.SelectField,
- floatingLabelText: 'Credit card type',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- },
- _react2.default.createElement(_MenuItem2.default, { value: 'visa', primaryText: 'Visa' }),
- _react2.default.createElement(_MenuItem2.default, { value: 'american_express', primaryText: 'American Express' }),
- _react2.default.createElement(_MenuItem2.default, { value: 'master', primaryText: 'Mastercard' }),
- _react2.default.createElement(_MenuItem2.default, { value: 'solo', primaryText: 'Solo' })
- )
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'cnb',
- component: _reduxFormMaterialUi.TextField,
- floatingLabelText: 'Credit Card Number',
- hintText: 'Credit Card Number',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(
- _reduxForm.Field,
- {
- name: 'credit_card_month',
- component: _reduxFormMaterialUi.SelectField,
- floatingLabelText: 'Expiry month',
- hintText: 'Expiry month',
- validate: [Validators.required],
- style: _Styles2.default.fields.text
- },
- Array.apply(null, new Array(12)).map(function (x, i) {
- var month = ++i < 10 ? '0' + i : i;
- return _react2.default.createElement(_MenuItem2.default, { key: month, value: month, primaryText: month });
- })
- )
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(
- _reduxForm.Field,
- {
- name: 'credit_card_year',
- component: _reduxFormMaterialUi.SelectField,
- floatingLabelText: 'Expiry year',
- hintText: 'Expiry year',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- },
- Array.apply(null, new Array(5)).map(function (x, i) {
- var year = new Date().getFullYear() + i;
- return _react2.default.createElement(_MenuItem2.default, { key: year, value: year, primaryText: year });
- })
- )
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'vval',
- component: _reduxFormMaterialUi.TextField,
- hintText: 'CCV',
- floatingLabelText: 'CCV',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_RaisedButton2.default, {
- label: 'Save',
- disabled: pristine || submitting,
- type: 'submit'
- })
- )
- );
-};
-
-var BillingForm = (0, _reduxForm.reduxForm)({
- form: 'billing'
-})(Billing);
-
-Billing.propTypes = {
- shop: _react.PropTypes.string.isRequired
-};
-var selector = (0, _reduxForm.formValueSelector)('billing');
-
-function mapStateToProps(state, ownProps) {
- return {
- initialValues: (state.settings.values[ownProps.shop] || {})[menus.MENU_BILLING] || {},
- country: selector(state, 'order_billing_country')
- };
-}
-
-exports.default = (0, _reactRedux.connect)(mapStateToProps)(BillingForm);
-
-/***/ }),
-/* 771 */
-/***/ (function(module, exports, __webpack_require__) {
-
-/* WEBPACK VAR INJECTION */(function(global) {/**
- * lodash (Custom Build)
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright jQuery Foundation and other contributors
- * Released under MIT license
- * Based on Underscore.js 1.8.3
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
-
-/** Used as the `TypeError` message for "Functions" methods. */
-var FUNC_ERROR_TEXT = 'Expected a function';
-
-/** Used as references for various `Number` constants. */
-var NAN = 0 / 0;
-
-/** `Object#toString` result references. */
-var symbolTag = '[object Symbol]';
-
-/** Used to match leading and trailing whitespace. */
-var reTrim = /^\s+|\s+$/g;
-
-/** Used to detect bad signed hexadecimal string values. */
-var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
-
-/** Used to detect binary string values. */
-var reIsBinary = /^0b[01]+$/i;
-
-/** Used to detect octal string values. */
-var reIsOctal = /^0o[0-7]+$/i;
-
-/** Built-in method references without a dependency on `root`. */
-var freeParseInt = parseInt;
-
-/** Detect free variable `global` from Node.js. */
-var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
-
-/** Detect free variable `self`. */
-var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
-
-/** Used as a reference to the global object. */
-var root = freeGlobal || freeSelf || Function('return this')();
+var CalendarActionButton = function (_Component) {
+ (0, _inherits3.default)(CalendarActionButton, _Component);
-/** Used for built-in method references. */
-var objectProto = Object.prototype;
+ function CalendarActionButton() {
+ (0, _classCallCheck3.default)(this, CalendarActionButton);
+ return (0, _possibleConstructorReturn3.default)(this, (CalendarActionButton.__proto__ || (0, _getPrototypeOf2.default)(CalendarActionButton)).apply(this, arguments));
+ }
-/**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
+ (0, _createClass3.default)(CalendarActionButton, [{
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ cancelLabel = _props.cancelLabel,
+ okLabel = _props.okLabel;
-/* Built-in method references for those with the same name as other `lodash` methods. */
-var nativeMax = Math.max,
- nativeMin = Math.min;
-/**
- * Gets the timestamp of the number of milliseconds that have elapsed since
- * the Unix epoch (1 January 1970 00:00:00 UTC).
- *
- * @static
- * @memberOf _
- * @since 2.4.0
- * @category Date
- * @returns {number} Returns the timestamp.
- * @example
- *
- * _.defer(function(stamp) {
- * console.log(_.now() - stamp);
- * }, _.now());
- * // => Logs the number of milliseconds it took for the deferred invocation.
- */
-var now = function() {
- return root.Date.now();
-};
+ var styles = {
+ root: {
+ display: 'flex',
+ flexDirection: 'row',
+ justifyContent: 'flex-end',
+ margin: 0,
+ maxHeight: 48,
+ padding: 0
+ },
+ flatButtons: {
+ fontsize: 14,
+ margin: '4px 8px 8px 0px',
+ maxHeight: 36,
+ minWidth: 64,
+ padding: 0
+ }
+ };
-/**
- * Creates a debounced function that delays invoking `func` until after `wait`
- * milliseconds have elapsed since the last time the debounced function was
- * invoked. The debounced function comes with a `cancel` method to cancel
- * delayed `func` invocations and a `flush` method to immediately invoke them.
- * Provide `options` to indicate whether `func` should be invoked on the
- * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
- * with the last arguments provided to the debounced function. Subsequent
- * calls to the debounced function return the result of the last `func`
- * invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
- * invoked on the trailing edge of the timeout only if the debounced function
- * is invoked more than once during the `wait` timeout.
- *
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
- *
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
- * for details over the differences between `_.debounce` and `_.throttle`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to debounce.
- * @param {number} [wait=0] The number of milliseconds to delay.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.leading=false]
- * Specify invoking on the leading edge of the timeout.
- * @param {number} [options.maxWait]
- * The maximum time `func` is allowed to be delayed before it's invoked.
- * @param {boolean} [options.trailing=true]
- * Specify invoking on the trailing edge of the timeout.
- * @returns {Function} Returns the new debounced function.
- * @example
- *
- * // Avoid costly calculations while the window size is in flux.
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
- *
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
- * 'leading': true,
- * 'trailing': false
- * }));
- *
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
- * var source = new EventSource('/stream');
- * jQuery(source).on('message', debounced);
- *
- * // Cancel the trailing debounced invocation.
- * jQuery(window).on('popstate', debounced.cancel);
- */
-function debounce(func, wait, options) {
- var lastArgs,
- lastThis,
- maxWait,
- result,
- timerId,
- lastCallTime,
- lastInvokeTime = 0,
- leading = false,
- maxing = false,
- trailing = true;
+ return _react2.default.createElement(
+ 'div',
+ { style: styles.root },
+ _react2.default.createElement(_FlatButton2.default, {
+ label: cancelLabel,
+ onTouchTap: this.props.onTouchTapCancel,
+ primary: true,
+ style: styles.flatButtons
+ }),
+ !this.props.autoOk && _react2.default.createElement(_FlatButton2.default, {
+ disabled: this.refs.calendar !== undefined && this.refs.calendar.isSelectedDateDisabled(),
+ label: okLabel,
+ onTouchTap: this.props.onTouchTapOk,
+ primary: true,
+ style: styles.flatButtons
+ })
+ );
+ }
+ }]);
+ return CalendarActionButton;
+}(_react.Component);
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- wait = toNumber(wait) || 0;
- if (isObject(options)) {
- leading = !!options.leading;
- maxing = 'maxWait' in options;
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
+ false ? CalendarActionButton.propTypes = {
+ autoOk: _react.PropTypes.bool,
+ cancelLabel: _react.PropTypes.node,
+ okLabel: _react.PropTypes.node,
+ onTouchTapCancel: _react.PropTypes.func,
+ onTouchTapOk: _react.PropTypes.func
+} : void 0;
+exports.default = CalendarActionButton;
- function invokeFunc(time) {
- var args = lastArgs,
- thisArg = lastThis;
+/***/ }),
+/* 774 */
+/***/ (function(module, exports, __webpack_require__) {
- lastArgs = lastThis = undefined;
- lastInvokeTime = time;
- result = func.apply(thisArg, args);
- return result;
- }
+"use strict";
- function leadingEdge(time) {
- // Reset any `maxWait` timer.
- lastInvokeTime = time;
- // Start the timer for the trailing edge.
- timerId = setTimeout(timerExpired, wait);
- // Invoke the leading edge.
- return leading ? invokeFunc(time) : result;
- }
- function remainingWait(time) {
- var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime,
- result = wait - timeSinceLastCall;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
- return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
- }
+var _extends2 = __webpack_require__(7);
- function shouldInvoke(time) {
- var timeSinceLastCall = time - lastCallTime,
- timeSinceLastInvoke = time - lastInvokeTime;
+var _extends3 = _interopRequireDefault(_extends2);
- // Either this is the first call, activity has stopped and we're at the
- // trailing edge, the system time has gone backwards and we're treating
- // it as the trailing edge, or we've hit the `maxWait` limit.
- return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
- (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
- }
+var _objectWithoutProperties2 = __webpack_require__(8);
- function timerExpired() {
- var time = now();
- if (shouldInvoke(time)) {
- return trailingEdge(time);
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _simpleAssign = __webpack_require__(6);
+
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _transitions = __webpack_require__(10);
+
+var _transitions2 = _interopRequireDefault(_transitions);
+
+var _childUtils = __webpack_require__(131);
+
+var _colorManipulator = __webpack_require__(50);
+
+var _EnhancedButton = __webpack_require__(51);
+
+var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton);
+
+var _FlatButtonLabel = __webpack_require__(775);
+
+var _FlatButtonLabel2 = _interopRequireDefault(_FlatButtonLabel);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function validateLabel(props, propName, componentName) {
+ if (false) {
+ if (!props.children && props.label !== 0 && !props.label && !props.icon) {
+ return new Error('Required prop label or children or icon was not specified in ' + componentName + '.');
}
- // Restart the timer.
- timerId = setTimeout(timerExpired, remainingWait(time));
}
+}
- function trailingEdge(time) {
- timerId = undefined;
+var FlatButton = function (_Component) {
+ (0, _inherits3.default)(FlatButton, _Component);
- // Only invoke if we have `lastArgs` which means `func` has been
- // debounced at least once.
- if (trailing && lastArgs) {
- return invokeFunc(time);
+ function FlatButton() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, FlatButton);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
}
- lastArgs = lastThis = undefined;
- return result;
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = FlatButton.__proto__ || (0, _getPrototypeOf2.default)(FlatButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ hovered: false,
+ isKeyboardFocused: false,
+ touch: false
+ }, _this.handleKeyboardFocus = function (event, isKeyboardFocused) {
+ _this.setState({ isKeyboardFocused: isKeyboardFocused });
+ _this.props.onKeyboardFocus(event, isKeyboardFocused);
+ }, _this.handleMouseEnter = function (event) {
+ // Cancel hover styles for touch devices
+ if (!_this.state.touch) _this.setState({ hovered: true });
+ _this.props.onMouseEnter(event);
+ }, _this.handleMouseLeave = function (event) {
+ _this.setState({ hovered: false });
+ _this.props.onMouseLeave(event);
+ }, _this.handleTouchStart = function (event) {
+ _this.setState({ touch: true });
+ _this.props.onTouchStart(event);
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- function cancel() {
- if (timerId !== undefined) {
- clearTimeout(timerId);
+ (0, _createClass3.default)(FlatButton, [{
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ if (nextProps.disabled) {
+ this.setState({
+ hovered: false
+ });
+ }
}
- lastInvokeTime = 0;
- lastArgs = lastCallTime = lastThis = timerId = undefined;
- }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ children = _props.children,
+ disabled = _props.disabled,
+ hoverColor = _props.hoverColor,
+ backgroundColor = _props.backgroundColor,
+ icon = _props.icon,
+ label = _props.label,
+ labelStyle = _props.labelStyle,
+ labelPosition = _props.labelPosition,
+ primary = _props.primary,
+ rippleColor = _props.rippleColor,
+ secondary = _props.secondary,
+ style = _props.style,
+ other = (0, _objectWithoutProperties3.default)(_props, ['children', 'disabled', 'hoverColor', 'backgroundColor', 'icon', 'label', 'labelStyle', 'labelPosition', 'primary', 'rippleColor', 'secondary', 'style']);
+ var _context$muiTheme = this.context.muiTheme,
+ _context$muiTheme$but = _context$muiTheme.button,
+ buttonHeight = _context$muiTheme$but.height,
+ buttonMinWidth = _context$muiTheme$but.minWidth,
+ buttonTextTransform = _context$muiTheme$but.textTransform,
+ _context$muiTheme$fla = _context$muiTheme.flatButton,
+ buttonFilterColor = _context$muiTheme$fla.buttonFilterColor,
+ buttonColor = _context$muiTheme$fla.color,
+ disabledTextColor = _context$muiTheme$fla.disabledTextColor,
+ fontSize = _context$muiTheme$fla.fontSize,
+ fontWeight = _context$muiTheme$fla.fontWeight,
+ primaryTextColor = _context$muiTheme$fla.primaryTextColor,
+ secondaryTextColor = _context$muiTheme$fla.secondaryTextColor,
+ textColor = _context$muiTheme$fla.textColor,
+ _context$muiTheme$fla2 = _context$muiTheme$fla.textTransform,
+ textTransform = _context$muiTheme$fla2 === undefined ? buttonTextTransform || 'uppercase' : _context$muiTheme$fla2;
- function flush() {
- return timerId === undefined ? result : trailingEdge(now());
- }
+ var defaultTextColor = disabled ? disabledTextColor : primary ? primaryTextColor : secondary ? secondaryTextColor : textColor;
- function debounced() {
- var time = now(),
- isInvoking = shouldInvoke(time);
+ var defaultHoverColor = (0, _colorManipulator.fade)(buttonFilterColor, 0.2);
+ var defaultRippleColor = buttonFilterColor;
+ var buttonHoverColor = hoverColor || defaultHoverColor;
+ var buttonRippleColor = rippleColor || defaultRippleColor;
+ var buttonBackgroundColor = backgroundColor || buttonColor;
+ var hovered = (this.state.hovered || this.state.isKeyboardFocused) && !disabled;
- lastArgs = arguments;
- lastThis = this;
- lastCallTime = time;
+ var mergedRootStyles = (0, _simpleAssign2.default)({}, {
+ height: buttonHeight,
+ lineHeight: buttonHeight + 'px',
+ minWidth: buttonMinWidth,
+ color: defaultTextColor,
+ transition: _transitions2.default.easeOut(),
+ borderRadius: 2,
+ userSelect: 'none',
+ overflow: 'hidden',
+ backgroundColor: hovered ? buttonHoverColor : buttonBackgroundColor,
+ padding: 0,
+ margin: 0,
+ textAlign: 'center'
+ }, style);
- if (isInvoking) {
- if (timerId === undefined) {
- return leadingEdge(lastCallTime);
- }
- if (maxing) {
- // Handle invocations in a tight loop.
- timerId = setTimeout(timerExpired, wait);
- return invokeFunc(lastCallTime);
- }
- }
- if (timerId === undefined) {
- timerId = setTimeout(timerExpired, wait);
- }
- return result;
- }
- debounced.cancel = cancel;
- debounced.flush = flush;
- return debounced;
-}
+ var iconCloned = void 0;
+ var labelStyleIcon = {};
-/**
- * Creates a throttled function that only invokes `func` at most once per
- * every `wait` milliseconds. The throttled function comes with a `cancel`
- * method to cancel delayed `func` invocations and a `flush` method to
- * immediately invoke them. Provide `options` to indicate whether `func`
- * should be invoked on the leading and/or trailing edge of the `wait`
- * timeout. The `func` is invoked with the last arguments provided to the
- * throttled function. Subsequent calls to the throttled function return the
- * result of the last `func` invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is
- * invoked on the trailing edge of the timeout only if the throttled function
- * is invoked more than once during the `wait` timeout.
- *
- * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
- * until to the next tick, similar to `setTimeout` with a timeout of `0`.
- *
- * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
- * for details over the differences between `_.throttle` and `_.debounce`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Function
- * @param {Function} func The function to throttle.
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
- * @param {Object} [options={}] The options object.
- * @param {boolean} [options.leading=true]
- * Specify invoking on the leading edge of the timeout.
- * @param {boolean} [options.trailing=true]
- * Specify invoking on the trailing edge of the timeout.
- * @returns {Function} Returns the new throttled function.
- * @example
- *
- * // Avoid excessively updating the position while scrolling.
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
- *
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
- * jQuery(element).on('click', throttled);
- *
- * // Cancel the trailing throttled invocation.
- * jQuery(window).on('popstate', throttled.cancel);
- */
-function throttle(func, wait, options) {
- var leading = true,
- trailing = true;
+ if (icon) {
+ var iconStyles = (0, _simpleAssign2.default)({
+ verticalAlign: 'middle',
+ marginLeft: label && labelPosition !== 'before' ? 12 : 0,
+ marginRight: label && labelPosition === 'before' ? 12 : 0
+ }, icon.props.style);
+ iconCloned = _react2.default.cloneElement(icon, {
+ color: icon.props.color || mergedRootStyles.color,
+ style: iconStyles
+ });
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- if (isObject(options)) {
- leading = 'leading' in options ? !!options.leading : leading;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
- return debounce(func, wait, {
- 'leading': leading,
- 'maxWait': wait,
- 'trailing': trailing
- });
-}
+ if (labelPosition === 'before') {
+ labelStyleIcon.paddingRight = 8;
+ } else {
+ labelStyleIcon.paddingLeft = 8;
+ }
+ }
-/**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
-function isObject(value) {
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
-}
+ var mergedLabelStyles = (0, _simpleAssign2.default)({
+ letterSpacing: 0,
+ textTransform: textTransform,
+ fontWeight: fontWeight,
+ fontSize: fontSize
+ }, labelStyleIcon, labelStyle);
-/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
+ var labelElement = label ? _react2.default.createElement(_FlatButtonLabel2.default, { label: label, style: mergedLabelStyles }) : undefined;
-/**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
-function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
-}
+ // Place label before or after children.
+ var childrenFragment = labelPosition === 'before' ? {
+ labelElement: labelElement,
+ iconCloned: iconCloned,
+ children: children
+ } : {
+ children: children,
+ iconCloned: iconCloned,
+ labelElement: labelElement
+ };
-/**
- * Converts `value` to a number.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to process.
- * @returns {number} Returns the number.
- * @example
- *
- * _.toNumber(3.2);
- * // => 3.2
- *
- * _.toNumber(Number.MIN_VALUE);
- * // => 5e-324
- *
- * _.toNumber(Infinity);
- * // => Infinity
- *
- * _.toNumber('3.2');
- * // => 3.2
- */
-function toNumber(value) {
- if (typeof value == 'number') {
- return value;
- }
- if (isSymbol(value)) {
- return NAN;
- }
- if (isObject(value)) {
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
- value = isObject(other) ? (other + '') : other;
- }
- if (typeof value != 'string') {
- return value === 0 ? value : +value;
- }
- value = value.replace(reTrim, '');
- var isBinary = reIsBinary.test(value);
- return (isBinary || reIsOctal.test(value))
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
- : (reIsBadHex.test(value) ? NAN : +value);
-}
+ var enhancedButtonChildren = (0, _childUtils.createChildFragment)(childrenFragment);
-module.exports = throttle;
+ return _react2.default.createElement(
+ _EnhancedButton2.default,
+ (0, _extends3.default)({}, other, {
+ disabled: disabled,
+ focusRippleColor: buttonRippleColor,
+ focusRippleOpacity: 0.3,
+ onKeyboardFocus: this.handleKeyboardFocus,
+ onMouseLeave: this.handleMouseLeave,
+ onMouseEnter: this.handleMouseEnter,
+ onTouchStart: this.handleTouchStart,
+ style: mergedRootStyles,
+ touchRippleColor: buttonRippleColor,
+ touchRippleOpacity: 0.3
+ }),
+ enhancedButtonChildren
+ );
+ }
+ }]);
+ return FlatButton;
+}(_react.Component);
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47)))
+FlatButton.muiName = 'FlatButton';
+FlatButton.defaultProps = {
+ disabled: false,
+ labelStyle: {},
+ labelPosition: 'after',
+ onKeyboardFocus: function onKeyboardFocus() {},
+ onMouseEnter: function onMouseEnter() {},
+ onMouseLeave: function onMouseLeave() {},
+ onTouchStart: function onTouchStart() {},
+ primary: false,
+ secondary: false
+};
+FlatButton.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? FlatButton.propTypes = {
+ /**
+ * Color of button when mouse is not hovering over it.
+ */
+ backgroundColor: _react.PropTypes.string,
+ /**
+ * This is what will be displayed inside the button.
+ * If a label is specified, the text within the label prop will
+ * be displayed. Otherwise, the component will expect children
+ * which will then be displayed. (In our example,
+ * we are nesting an `` and a `span`
+ * that acts as our label to be displayed.) This only
+ * applies to flat and raised buttons.
+ */
+ children: _react.PropTypes.node,
+ /**
+ * Disables the button if set to true.
+ */
+ disabled: _react.PropTypes.bool,
+ /**
+ * Color of button when mouse hovers over.
+ */
+ hoverColor: _react.PropTypes.string,
+ /**
+ * The URL to link to when the button is clicked.
+ */
+ href: _react.PropTypes.string,
+ /**
+ * Use this property to display an icon.
+ */
+ icon: _react.PropTypes.node,
+ /**
+ * Label for the button.
+ */
+ label: validateLabel,
+ /**
+ * Place label before or after the passed children.
+ */
+ labelPosition: _react.PropTypes.oneOf(['before', 'after']),
+ /**
+ * Override the inline-styles of the button's label element.
+ */
+ labelStyle: _react.PropTypes.object,
+ /**
+ * Callback function fired when the element is focused or blurred by the keyboard.
+ *
+ * @param {object} event `focus` or `blur` event targeting the element.
+ * @param {boolean} isKeyboardFocused Indicates whether the element is focused.
+ */
+ onKeyboardFocus: _react.PropTypes.func,
+ /** @ignore */
+ onMouseEnter: _react.PropTypes.func,
+ /** @ignore */
+ onMouseLeave: _react.PropTypes.func,
+ /** @ignore */
+ onTouchStart: _react.PropTypes.func,
+ /**
+ * If true, colors button according to
+ * primaryTextColor from the Theme.
+ */
+ primary: _react.PropTypes.bool,
+ /**
+ * Color for the ripple after button is clicked.
+ */
+ rippleColor: _react.PropTypes.string,
+ /**
+ * If true, colors button according to secondaryTextColor from the theme.
+ * The primary prop has precendent if set to true.
+ */
+ secondary: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
+} : void 0;
+exports.default = FlatButton;
/***/ }),
-/* 772 */
+/* 775 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61152,147 +64675,65 @@ var _simpleAssign = __webpack_require__(6);
var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-var _transitions = __webpack_require__(10);
-
-var _transitions2 = _interopRequireDefault(_transitions);
-
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _propTypes = __webpack_require__(41);
-
-var _propTypes2 = _interopRequireDefault(_propTypes);
-
-var _Paper = __webpack_require__(34);
-
-var _Paper2 = _interopRequireDefault(_Paper);
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function getStyles(props, context, state) {
- var targetOrigin = props.targetOrigin;
- var open = state.open;
- var muiTheme = context.muiTheme;
+function getStyles(props, context) {
+ var baseTheme = context.muiTheme.baseTheme;
- var horizontal = targetOrigin.horizontal.replace('middle', 'vertical');
return {
root: {
- position: 'fixed',
- zIndex: muiTheme.zIndex.popover,
- opacity: open ? 1 : 0,
- transform: open ? 'scale(1, 1)' : 'scale(0, 0)',
- transformOrigin: horizontal + ' ' + targetOrigin.vertical,
- transition: _transitions2.default.easeOut('250ms', ['transform', 'opacity']),
- maxHeight: '100%'
- },
- horizontal: {
- maxHeight: '100%',
- overflowY: 'auto',
- transform: open ? 'scaleX(1)' : 'scaleX(0)',
- opacity: open ? 1 : 0,
- transformOrigin: horizontal + ' ' + targetOrigin.vertical,
- transition: _transitions2.default.easeOut('250ms', ['transform', 'opacity'])
- },
- vertical: {
- opacity: open ? 1 : 0,
- transform: open ? 'scaleY(1)' : 'scaleY(0)',
- transformOrigin: horizontal + ' ' + targetOrigin.vertical,
- transition: _transitions2.default.easeOut('500ms', ['transform', 'opacity'])
+ position: 'relative',
+ paddingLeft: baseTheme.spacing.desktopGutterLess,
+ paddingRight: baseTheme.spacing.desktopGutterLess,
+ verticalAlign: 'middle'
}
};
}
-var PopoverAnimationDefault = function (_Component) {
- (0, _inherits3.default)(PopoverAnimationDefault, _Component);
-
- function PopoverAnimationDefault() {
- var _ref;
-
- var _temp, _this, _ret;
-
- (0, _classCallCheck3.default)(this, PopoverAnimationDefault);
-
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
+var FlatButtonLabel = function (_Component) {
+ (0, _inherits3.default)(FlatButtonLabel, _Component);
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = PopoverAnimationDefault.__proto__ || (0, _getPrototypeOf2.default)(PopoverAnimationDefault)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- open: false
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ function FlatButtonLabel() {
+ (0, _classCallCheck3.default)(this, FlatButtonLabel);
+ return (0, _possibleConstructorReturn3.default)(this, (FlatButtonLabel.__proto__ || (0, _getPrototypeOf2.default)(FlatButtonLabel)).apply(this, arguments));
}
- (0, _createClass3.default)(PopoverAnimationDefault, [{
- key: 'componentDidMount',
- value: function componentDidMount() {
- this.setState({ open: true }); // eslint-disable-line react/no-did-mount-set-state
- }
- }, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- this.setState({
- open: nextProps.open
- });
- }
- }, {
+ (0, _createClass3.default)(FlatButtonLabel, [{
key: 'render',
value: function render() {
var _props = this.props,
- className = _props.className,
- style = _props.style,
- zDepth = _props.zDepth;
+ label = _props.label,
+ style = _props.style;
var prepareStyles = this.context.muiTheme.prepareStyles;
- var styles = getStyles(this.props, this.context, this.state);
+ var styles = getStyles(this.props, this.context);
return _react2.default.createElement(
- _Paper2.default,
- {
- style: (0, _simpleAssign2.default)(styles.root, style),
- zDepth: zDepth,
- className: className
- },
- _react2.default.createElement(
- 'div',
- { style: prepareStyles(styles.horizontal) },
- _react2.default.createElement(
- 'div',
- { style: prepareStyles(styles.vertical) },
- this.props.children
- )
- )
+ 'span',
+ { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) },
+ label
);
}
}]);
- return PopoverAnimationDefault;
+ return FlatButtonLabel;
}(_react.Component);
-PopoverAnimationDefault.defaultProps = {
- style: {},
- zDepth: 1
-};
-PopoverAnimationDefault.contextTypes = {
+FlatButtonLabel.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? PopoverAnimationDefault.propTypes = {
- children: _react.PropTypes.node,
- /**
- * The css class name of the root element.
- */
- className: _react.PropTypes.string,
- open: _react.PropTypes.bool.isRequired,
- /**
- * Override the inline-styles of the root element.
- */
- style: _react.PropTypes.object,
- targetOrigin: _propTypes2.default.origin.isRequired,
- zDepth: _propTypes2.default.zDepth
+ false ? FlatButtonLabel.propTypes = {
+ label: _react.PropTypes.node,
+ style: _react.PropTypes.object
} : void 0;
-exports.default = PopoverAnimationDefault;
+exports.default = FlatButtonLabel;
/***/ }),
-/* 773 */
+/* 776 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61301,69 +64742,170 @@ exports.default = PopoverAnimationDefault;
Object.defineProperty(exports, "__esModule", {
value: true
});
-/**
-* Returns a number of pixels from the top of the screen for given dom element.
-*
-* @param {object} dom element
-* @returns {number} A position from the top of the screen in pixels
-*/
-var getOffsetTop = exports.getOffsetTop = function getOffsetTop(elem) {
- var yPos = elem.offsetTop;
- var tempEl = elem.offsetParent;
- while (tempEl != null) {
- yPos += tempEl.offsetTop;
- tempEl = tempEl.offsetParent;
- }
+var _getPrototypeOf = __webpack_require__(3);
- return yPos;
-};
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-var isIOS = exports.isIOS = function isIOS() {
- return (/iPad|iPhone|iPod/.test(window.navigator.userAgent) && !window.MSStream
- );
-};
+var _classCallCheck2 = __webpack_require__(1);
-/***/ }),
-/* 774 */
-/***/ (function(module, exports, __webpack_require__) {
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-"use strict";
+var _createClass2 = __webpack_require__(2);
+var _createClass3 = _interopRequireDefault(_createClass2);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _pure = __webpack_require__(25);
+var _dateUtils = __webpack_require__(85);
-var _pure2 = _interopRequireDefault(_pure);
-
-var _SvgIcon = __webpack_require__(26);
+var _DayButton = __webpack_require__(777);
-var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
+var _DayButton2 = _interopRequireDefault(_DayButton);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var NavigationCheck = function NavigationCheck(props) {
- return _react2.default.createElement(
- _SvgIcon2.default,
- props,
- _react2.default.createElement('path', { d: 'M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z' })
- );
+var styles = {
+ root: {
+ display: 'flex',
+ flexDirection: 'column',
+ justifyContent: 'flex-start',
+ fontWeight: 400,
+ height: 228,
+ lineHeight: 2,
+ position: 'relative',
+ textAlign: 'center',
+ MozPaddingStart: 0
+ },
+ week: {
+ display: 'flex',
+ flexDirection: 'row',
+ justifyContent: 'space-around',
+ height: 34,
+ marginBottom: 2
+ }
};
-NavigationCheck = (0, _pure2.default)(NavigationCheck);
-NavigationCheck.displayName = 'NavigationCheck';
-NavigationCheck.muiName = 'SvgIcon';
-exports.default = NavigationCheck;
+var CalendarMonth = function (_Component) {
+ (0, _inherits3.default)(CalendarMonth, _Component);
+
+ function CalendarMonth() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, CalendarMonth);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarMonth.__proto__ || (0, _getPrototypeOf2.default)(CalendarMonth)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapDay = function (event, date) {
+ if (_this.props.onTouchTapDay) {
+ _this.props.onTouchTapDay(event, date);
+ }
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
+
+ (0, _createClass3.default)(CalendarMonth, [{
+ key: 'isSelectedDateDisabled',
+ value: function isSelectedDateDisabled() {
+ return this.selectedDateDisabled;
+ }
+ }, {
+ key: 'shouldDisableDate',
+ value: function shouldDisableDate(day) {
+ if (day === null) return false;
+ var disabled = !(0, _dateUtils.isBetweenDates)(day, this.props.minDate, this.props.maxDate);
+ if (!disabled && this.props.shouldDisableDate) disabled = this.props.shouldDisableDate(day);
+
+ return disabled;
+ }
+ }, {
+ key: 'getWeekElements',
+ value: function getWeekElements() {
+ var _this2 = this;
+
+ var weekArray = (0, _dateUtils.getWeekArray)(this.props.displayDate, this.props.firstDayOfWeek);
+
+ return weekArray.map(function (week, i) {
+ return _react2.default.createElement(
+ 'div',
+ { key: i, style: styles.week },
+ _this2.getDayElements(week, i)
+ );
+ }, this);
+ }
+ }, {
+ key: 'getDayElements',
+ value: function getDayElements(week, i) {
+ var _this3 = this;
+
+ var _props = this.props,
+ DateTimeFormat = _props.DateTimeFormat,
+ locale = _props.locale,
+ selectedDate = _props.selectedDate;
+
+
+ return week.map(function (day, j) {
+ var isSameDate = (0, _dateUtils.isEqualDate)(selectedDate, day);
+ var disabled = _this3.shouldDisableDate(day);
+ var selected = !disabled && isSameDate;
+
+ if (isSameDate) {
+ _this3.selectedDateDisabled = disabled;
+ }
+
+ return _react2.default.createElement(_DayButton2.default, {
+ DateTimeFormat: DateTimeFormat,
+ locale: locale,
+ date: day,
+ disabled: disabled,
+ key: 'db' + (i + j),
+ onTouchTap: _this3.handleTouchTapDay,
+ selected: selected
+ });
+ }, this);
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ return _react2.default.createElement(
+ 'div',
+ { style: styles.root },
+ this.getWeekElements()
+ );
+ }
+ }]);
+ return CalendarMonth;
+}(_react.Component);
+
+ false ? CalendarMonth.propTypes = {
+ DateTimeFormat: _react.PropTypes.func.isRequired,
+ autoOk: _react.PropTypes.bool,
+ displayDate: _react.PropTypes.object.isRequired,
+ firstDayOfWeek: _react.PropTypes.number,
+ locale: _react.PropTypes.string.isRequired,
+ maxDate: _react.PropTypes.object,
+ minDate: _react.PropTypes.object,
+ onTouchTapDay: _react.PropTypes.func,
+ selectedDate: _react.PropTypes.object.isRequired,
+ shouldDisableDate: _react.PropTypes.func
+} : void 0;
+exports.default = CalendarMonth;
/***/ }),
-/* 775 */
+/* 777 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61372,7 +64914,18 @@ exports.default = NavigationCheck;
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.HotKeyHolder = undefined;
+
+var _extends2 = __webpack_require__(7);
+
+var _extends3 = _interopRequireDefault(_extends2);
+
+var _objectWithoutProperties2 = __webpack_require__(8);
+
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
var _classCallCheck2 = __webpack_require__(1);
@@ -61382,33 +64935,178 @@ var _createClass2 = __webpack_require__(2);
var _createClass3 = _interopRequireDefault(_createClass2);
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _transitions = __webpack_require__(10);
+
+var _transitions2 = _interopRequireDefault(_transitions);
+
+var _dateUtils = __webpack_require__(85);
+
+var _EnhancedButton = __webpack_require__(51);
+
+var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton);
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var HotKeyHolder = exports.HotKeyHolder = function () {
- function HotKeyHolder() {
- var _this = this;
+function getStyles(props, context, state) {
+ var date = props.date,
+ disabled = props.disabled,
+ selected = props.selected;
+ var hover = state.hover;
+ var _context$muiTheme = context.muiTheme,
+ baseTheme = _context$muiTheme.baseTheme,
+ datePicker = _context$muiTheme.datePicker;
- (0, _classCallCheck3.default)(this, HotKeyHolder);
- this.clear = function () {
- _this.timerId = null;
- _this.lastKeys = null;
- };
- }
+ var labelColor = baseTheme.palette.textColor;
+ var buttonStateOpacity = 0;
+ var buttonStateTransform = 'scale(0)';
+
+ if (hover || selected) {
+ labelColor = datePicker.selectTextColor;
+ buttonStateOpacity = selected ? 1 : 0.6;
+ buttonStateTransform = 'scale(1)';
+ } else if ((0, _dateUtils.isEqualDate)(date, new Date())) {
+ labelColor = datePicker.color;
+ }
+
+ return {
+ root: {
+ boxSizing: 'border-box',
+ fontWeight: '400',
+ opacity: disabled && '0.4',
+ padding: '4px 0px',
+ position: 'relative',
+ WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated)
+ width: 42
+ },
+ label: {
+ color: labelColor,
+ fontWeight: '400',
+ position: 'relative'
+ },
+ buttonState: {
+ backgroundColor: datePicker.selectColor,
+ borderRadius: '50%',
+ height: 34,
+ left: 4,
+ opacity: buttonStateOpacity,
+ position: 'absolute',
+ top: 0,
+ transform: buttonStateTransform,
+ transition: _transitions2.default.easeOut(),
+ width: 34
+ }
+ };
+}
+
+var DayButton = function (_Component) {
+ (0, _inherits3.default)(DayButton, _Component);
+
+ function DayButton() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, DayButton);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DayButton.__proto__ || (0, _getPrototypeOf2.default)(DayButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ hover: false
+ }, _this.handleMouseEnter = function () {
+ if (!_this.props.disabled) {
+ _this.setState({ hover: true });
+ }
+ }, _this.handleMouseLeave = function () {
+ if (!_this.props.disabled) {
+ _this.setState({ hover: false });
+ }
+ }, _this.handleTouchTap = function (event) {
+ if (!_this.props.disabled && _this.props.onTouchTap) {
+ _this.props.onTouchTap(event, _this.props.date);
+ }
+ }, _this.handleKeyboardFocus = function (event, keyboardFocused) {
+ if (!_this.props.disabled && _this.props.onKeyboardFocus) {
+ _this.props.onKeyboardFocus(event, keyboardFocused, _this.props.date);
+ }
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
+
+ (0, _createClass3.default)(DayButton, [{
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ DateTimeFormat = _props.DateTimeFormat,
+ date = _props.date,
+ disabled = _props.disabled,
+ locale = _props.locale,
+ onTouchTap = _props.onTouchTap,
+ selected = _props.selected,
+ other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'date', 'disabled', 'locale', 'onTouchTap', 'selected']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
+
+ var styles = getStyles(this.props, this.context, this.state);
- (0, _createClass3.default)(HotKeyHolder, [{
- key: 'append',
- value: function append(key) {
- clearTimeout(this.timerId);
- this.timerId = setTimeout(this.clear, 500);
- return this.lastKeys = (this.lastKeys || '') + key;
+ return date ? _react2.default.createElement(
+ _EnhancedButton2.default,
+ (0, _extends3.default)({}, other, {
+ disabled: disabled,
+ disableFocusRipple: true,
+ disableTouchRipple: true,
+ onKeyboardFocus: this.handleKeyboardFocus,
+ onMouseEnter: this.handleMouseEnter,
+ onMouseLeave: this.handleMouseLeave,
+ onTouchTap: this.handleTouchTap,
+ style: styles.root
+ }),
+ _react2.default.createElement('div', { style: prepareStyles(styles.buttonState) }),
+ _react2.default.createElement(
+ 'span',
+ { style: prepareStyles(styles.label) },
+ new DateTimeFormat(locale, {
+ day: 'numeric'
+ }).format(date)
+ )
+ ) : _react2.default.createElement('span', { style: prepareStyles(styles.root) });
}
}]);
- return HotKeyHolder;
-}();
+ return DayButton;
+}(_react.Component);
+
+DayButton.defaultProps = {
+ selected: false,
+ disabled: false
+};
+DayButton.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? DayButton.propTypes = {
+ DateTimeFormat: _react.PropTypes.func.isRequired,
+ date: _react.PropTypes.object,
+ disabled: _react.PropTypes.bool,
+ locale: _react.PropTypes.string.isRequired,
+ onKeyboardFocus: _react.PropTypes.func,
+ onTouchTap: _react.PropTypes.func,
+ selected: _react.PropTypes.bool
+} : void 0;
+exports.default = DayButton;
/***/ }),
-/* 776 */
+/* 778 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61422,10 +65120,6 @@ var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
-var _objectWithoutProperties2 = __webpack_require__(8);
-
-var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-
var _getPrototypeOf = __webpack_require__(3);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -61446,449 +65140,168 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
-var _simpleAssign = __webpack_require__(6);
-
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _transitions = __webpack_require__(10);
-
-var _transitions2 = _interopRequireDefault(_transitions);
-
-var _colorManipulator = __webpack_require__(56);
+var _reactDom = __webpack_require__(16);
-var _childUtils = __webpack_require__(127);
-
-var _EnhancedButton = __webpack_require__(59);
+var _reactDom2 = _interopRequireDefault(_reactDom);
-var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton);
+var _YearButton = __webpack_require__(779);
-var _Paper = __webpack_require__(34);
+var _YearButton2 = _interopRequireDefault(_YearButton);
-var _Paper2 = _interopRequireDefault(_Paper);
+var _dateUtils = __webpack_require__(85);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function validateLabel(props, propName, componentName) {
- if (false) {
- if (!props.children && props.label !== 0 && !props.label && !props.icon) {
- return new Error('Required prop label or children or icon was not specified in ' + componentName + '.');
- }
- }
-}
-
-function getStyles(props, context, state) {
- var _context$muiTheme = context.muiTheme,
- baseTheme = _context$muiTheme.baseTheme,
- button = _context$muiTheme.button,
- raisedButton = _context$muiTheme.raisedButton;
- var disabled = props.disabled,
- disabledBackgroundColor = props.disabledBackgroundColor,
- disabledLabelColor = props.disabledLabelColor,
- fullWidth = props.fullWidth,
- icon = props.icon,
- label = props.label,
- labelPosition = props.labelPosition,
- primary = props.primary,
- secondary = props.secondary,
- style = props.style;
-
-
- var amount = primary || secondary ? 0.4 : 0.08;
-
- var backgroundColor = raisedButton.color;
- var labelColor = raisedButton.textColor;
-
- if (disabled) {
- backgroundColor = disabledBackgroundColor || raisedButton.disabledColor;
- labelColor = disabledLabelColor || raisedButton.disabledTextColor;
- } else if (primary) {
- backgroundColor = raisedButton.primaryColor;
- labelColor = raisedButton.primaryTextColor;
- } else if (secondary) {
- backgroundColor = raisedButton.secondaryColor;
- labelColor = raisedButton.secondaryTextColor;
- } else {
- if (props.backgroundColor) {
- backgroundColor = props.backgroundColor;
- }
- if (props.labelColor) {
- labelColor = props.labelColor;
- }
- }
-
- var buttonHeight = style && style.height || button.height;
- var borderRadius = 2;
-
- return {
- root: {
- display: 'inline-block',
- transition: _transitions2.default.easeOut(),
- minWidth: fullWidth ? '100%' : button.minWidth
- },
- button: {
- height: buttonHeight,
- lineHeight: buttonHeight + 'px',
- width: '100%',
- padding: 0,
- borderRadius: borderRadius,
- transition: _transitions2.default.easeOut(),
- backgroundColor: backgroundColor,
- // That's the default value for a button but not a link
- textAlign: 'center'
- },
- label: {
- position: 'relative',
- opacity: 1,
- fontSize: raisedButton.fontSize,
- letterSpacing: 0,
- textTransform: raisedButton.textTransform || button.textTransform || 'uppercase',
- fontWeight: raisedButton.fontWeight,
- margin: 0,
- userSelect: 'none',
- paddingLeft: icon && labelPosition !== 'before' ? 8 : baseTheme.spacing.desktopGutterLess,
- paddingRight: icon && labelPosition === 'before' ? 8 : baseTheme.spacing.desktopGutterLess,
- color: labelColor
- },
- icon: {
- verticalAlign: 'middle',
- marginLeft: label && labelPosition !== 'before' ? 12 : 0,
- marginRight: label && labelPosition === 'before' ? 12 : 0
- },
- overlay: {
- height: buttonHeight,
- borderRadius: borderRadius,
- backgroundColor: (state.keyboardFocused || state.hovered) && !disabled && (0, _colorManipulator.fade)(labelColor, amount),
- transition: _transitions2.default.easeOut(),
- top: 0
- },
- ripple: {
- color: labelColor,
- opacity: !(primary || secondary) ? 0.1 : 0.16
- }
- };
-}
-
-var RaisedButton = function (_Component) {
- (0, _inherits3.default)(RaisedButton, _Component);
+var CalendarYear = function (_Component) {
+ (0, _inherits3.default)(CalendarYear, _Component);
- function RaisedButton() {
+ function CalendarYear() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, RaisedButton);
+ (0, _classCallCheck3.default)(this, CalendarYear);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RaisedButton.__proto__ || (0, _getPrototypeOf2.default)(RaisedButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- hovered: false,
- keyboardFocused: false,
- touched: false,
- initialZDepth: 0,
- zDepth: 0
- }, _this.handleMouseDown = function (event) {
- // only listen to left clicks
- if (event.button === 0) {
- _this.setState({
- zDepth: _this.state.initialZDepth + 1
- });
- }
- if (_this.props.onMouseDown) {
- _this.props.onMouseDown(event);
- }
- }, _this.handleMouseUp = function (event) {
- _this.setState({
- zDepth: _this.state.initialZDepth
- });
- if (_this.props.onMouseUp) {
- _this.props.onMouseUp(event);
- }
- }, _this.handleMouseLeave = function (event) {
- if (!_this.state.keyboardFocused) {
- _this.setState({
- zDepth: _this.state.initialZDepth,
- hovered: false
- });
- }
- if (_this.props.onMouseLeave) {
- _this.props.onMouseLeave(event);
- }
- }, _this.handleMouseEnter = function (event) {
- if (!_this.state.keyboardFocused && !_this.state.touched) {
- _this.setState({
- hovered: true
- });
- }
- if (_this.props.onMouseEnter) {
- _this.props.onMouseEnter(event);
- }
- }, _this.handleTouchStart = function (event) {
- _this.setState({
- touched: true,
- zDepth: _this.state.initialZDepth + 1
- });
-
- if (_this.props.onTouchStart) {
- _this.props.onTouchStart(event);
- }
- }, _this.handleTouchEnd = function (event) {
- _this.setState({
- touched: true,
- zDepth: _this.state.initialZDepth
- });
-
- if (_this.props.onTouchEnd) {
- _this.props.onTouchEnd(event);
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarYear.__proto__ || (0, _getPrototypeOf2.default)(CalendarYear)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapYear = function (event, year) {
+ if (_this.props.onTouchTapYear) {
+ _this.props.onTouchTapYear(event, year);
}
- }, _this.handleKeyboardFocus = function (event, keyboardFocused) {
- var zDepth = keyboardFocused && !_this.props.disabled ? _this.state.initialZDepth + 1 : _this.state.initialZDepth;
-
- _this.setState({
- zDepth: zDepth,
- keyboardFocused: keyboardFocused
- });
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(RaisedButton, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
- var zDepth = this.props.disabled ? 0 : 1;
- this.setState({
- zDepth: zDepth,
- initialZDepth: zDepth
- });
+ (0, _createClass3.default)(CalendarYear, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ this.scrollToSelectedYear();
}
}, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- var zDepth = nextProps.disabled ? 0 : 1;
- var nextState = {
- zDepth: zDepth,
- initialZDepth: zDepth
- };
-
- if (nextProps.disabled) {
- nextState.hovered = false;
- }
-
- this.setState(nextState);
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate() {
+ this.scrollToSelectedYear();
}
}, {
- key: 'render',
- value: function render() {
+ key: 'getYears',
+ value: function getYears() {
var _props = this.props,
- backgroundColor = _props.backgroundColor,
- buttonStyle = _props.buttonStyle,
- children = _props.children,
- className = _props.className,
- disabled = _props.disabled,
- disabledBackgroundColor = _props.disabledBackgroundColor,
- disabledLabelColor = _props.disabledLabelColor,
- fullWidth = _props.fullWidth,
- icon = _props.icon,
- label = _props.label,
- labelColor = _props.labelColor,
- labelPosition = _props.labelPosition,
- labelStyle = _props.labelStyle,
- overlayStyle = _props.overlayStyle,
- primary = _props.primary,
- rippleStyle = _props.rippleStyle,
- secondary = _props.secondary,
- style = _props.style,
- other = (0, _objectWithoutProperties3.default)(_props, ['backgroundColor', 'buttonStyle', 'children', 'className', 'disabled', 'disabledBackgroundColor', 'disabledLabelColor', 'fullWidth', 'icon', 'label', 'labelColor', 'labelPosition', 'labelStyle', 'overlayStyle', 'primary', 'rippleStyle', 'secondary', 'style']);
- var prepareStyles = this.context.muiTheme.prepareStyles;
+ DateTimeFormat = _props.DateTimeFormat,
+ locale = _props.locale,
+ minDate = _props.minDate,
+ maxDate = _props.maxDate,
+ selectedDate = _props.selectedDate;
- var styles = getStyles(this.props, this.context, this.state);
- var mergedRippleStyles = (0, _simpleAssign2.default)({}, styles.ripple, rippleStyle);
- var buttonEventHandlers = disabled ? {} : {
- onMouseDown: this.handleMouseDown,
- onMouseUp: this.handleMouseUp,
- onMouseLeave: this.handleMouseLeave,
- onMouseEnter: this.handleMouseEnter,
- onTouchStart: this.handleTouchStart,
- onTouchEnd: this.handleTouchEnd,
- onKeyboardFocus: this.handleKeyboardFocus
- };
+ var minYear = minDate.getFullYear();
+ var maxYear = maxDate.getFullYear();
+ var years = [];
+ var dateCheck = (0, _dateUtils.cloneDate)(selectedDate);
- var labelElement = label && _react2.default.createElement(
- 'span',
- { style: prepareStyles((0, _simpleAssign2.default)(styles.label, labelStyle)) },
- label
- );
+ for (var year = minYear; year <= maxYear; year++) {
+ dateCheck.setFullYear(year);
+ var selected = selectedDate.getFullYear() === year;
+ var selectedProps = {};
+ if (selected) {
+ selectedProps.ref = 'selectedYearButton';
+ }
- var iconCloned = icon && (0, _react.cloneElement)(icon, {
- color: icon.props.color || styles.label.color,
- style: (0, _simpleAssign2.default)(styles.icon, icon.props.style)
- });
+ var yearFormated = new DateTimeFormat(locale, {
+ year: 'numeric'
+ }).format(dateCheck);
- // Place label before or after children.
- var childrenFragment = labelPosition === 'before' ? {
- labelElement: labelElement,
- iconCloned: iconCloned,
- children: children
- } : {
- children: children,
- iconCloned: iconCloned,
- labelElement: labelElement
- };
+ var yearButton = _react2.default.createElement(
+ _YearButton2.default,
+ (0, _extends3.default)({
+ key: 'yb' + year,
+ onTouchTap: this.handleTouchTapYear,
+ selected: selected,
+ year: year
+ }, selectedProps),
+ yearFormated
+ );
- var enhancedButtonChildren = (0, _childUtils.createChildFragment)(childrenFragment);
+ years.push(yearButton);
+ }
- return _react2.default.createElement(
- _Paper2.default,
- {
- className: className,
- style: (0, _simpleAssign2.default)(styles.root, style),
- zDepth: this.state.zDepth
- },
- _react2.default.createElement(
- _EnhancedButton2.default,
- (0, _extends3.default)({}, other, buttonEventHandlers, {
- ref: 'container',
- disabled: disabled,
- style: (0, _simpleAssign2.default)(styles.button, buttonStyle),
- focusRippleColor: mergedRippleStyles.color,
- touchRippleColor: mergedRippleStyles.color,
- focusRippleOpacity: mergedRippleStyles.opacity,
- touchRippleOpacity: mergedRippleStyles.opacity
- }),
- _react2.default.createElement(
- 'div',
- {
- ref: 'overlay',
- style: prepareStyles((0, _simpleAssign2.default)(styles.overlay, overlayStyle))
- },
- enhancedButtonChildren
- )
- )
- );
+ return years;
}
- }]);
- return RaisedButton;
-}(_react.Component);
-
-RaisedButton.muiName = 'RaisedButton';
-RaisedButton.defaultProps = {
- disabled: false,
- labelPosition: 'after',
- fullWidth: false,
- primary: false,
- secondary: false
-};
-RaisedButton.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? RaisedButton.propTypes = {
- /**
- * Override the default background color for the button,
- * but not the default disabled background color
- * (use `disabledBackgroundColor` for this).
- */
- backgroundColor: _react.PropTypes.string,
- /**
- * Override the inline-styles of the button element.
- */
- buttonStyle: _react.PropTypes.object,
- /**
- * The content of the button.
- * If a label is provided via the `label` prop, the text within the label
- * will be displayed in addition to the content provided here.
- */
- children: _react.PropTypes.node,
- /**
- * The CSS class name of the root element.
- */
- className: _react.PropTypes.string,
- /**
- * If true, the button will be disabled.
- */
- disabled: _react.PropTypes.bool,
- /**
- * Override the default background color for the button
- * when it is disabled.
- */
- disabledBackgroundColor: _react.PropTypes.string,
- /**
- * The color of the button's label when the button is disabled.
- */
- disabledLabelColor: _react.PropTypes.string,
- /**
- * If true, the button will take up the full width of its container.
- */
- fullWidth: _react.PropTypes.bool,
- /**
- * The URL to link to when the button is clicked.
- */
- href: _react.PropTypes.string,
- /**
- * An icon to be displayed within the button.
- */
- icon: _react.PropTypes.node,
- /**
- * The label to be displayed within the button.
- * If content is provided via the `children` prop, that content will be
- * displayed in addition to the label provided here.
- */
- label: validateLabel,
- /**
- * The color of the button's label.
- */
- labelColor: _react.PropTypes.string,
- /**
- * The position of the button's label relative to the button's `children`.
- */
- labelPosition: _react.PropTypes.oneOf(['before', 'after']),
- /**
- * Override the inline-styles of the button's label element.
- */
- labelStyle: _react.PropTypes.object,
- /** @ignore */
- onMouseDown: _react.PropTypes.func,
- /** @ignore */
- onMouseEnter: _react.PropTypes.func,
- /** @ignore */
- onMouseLeave: _react.PropTypes.func,
- /** @ignore */
- onMouseUp: _react.PropTypes.func,
- /** @ignore */
- onTouchEnd: _react.PropTypes.func,
- /** @ignore */
- onTouchStart: _react.PropTypes.func,
- /**
- * Override the inline style of the button overlay.
- */
- overlayStyle: _react.PropTypes.object,
- /**
- * If true, the button will use the theme's primary color.
- */
- primary: _react.PropTypes.bool,
- /**
- * Override the inline style of the ripple element.
- */
- rippleStyle: _react.PropTypes.object,
- /**
- * If true, the button will use the theme's secondary color.
- * If both `secondary` and `primary` are true, the button will use
- * the theme's primary color.
- */
- secondary: _react.PropTypes.bool,
- /**
- * Override the inline-styles of the root element.
- */
- style: _react.PropTypes.object
+ }, {
+ key: 'scrollToSelectedYear',
+ value: function scrollToSelectedYear() {
+ if (this.refs.selectedYearButton === undefined) {
+ return;
+ }
+
+ var container = _reactDom2.default.findDOMNode(this);
+ var yearButtonNode = _reactDom2.default.findDOMNode(this.refs.selectedYearButton);
+
+ var containerHeight = container.clientHeight;
+ var yearButtonNodeHeight = yearButtonNode.clientHeight || 32;
+
+ var scrollYOffset = yearButtonNode.offsetTop + yearButtonNodeHeight / 2 - containerHeight / 2;
+ container.scrollTop = scrollYOffset;
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _context$muiTheme = this.context.muiTheme,
+ prepareStyles = _context$muiTheme.prepareStyles,
+ calendarYearBackgroundColor = _context$muiTheme.datePicker.calendarYearBackgroundColor;
+
+
+ var styles = {
+ root: {
+ backgroundColor: calendarYearBackgroundColor,
+ height: 'inherit',
+ lineHeight: '35px',
+ overflowX: 'hidden',
+ overflowY: 'scroll',
+ position: 'relative'
+ },
+ child: {
+ display: 'flex',
+ flexDirection: 'column',
+ justifyContent: 'center',
+ minHeight: '100%'
+ }
+ };
+
+ return _react2.default.createElement(
+ 'div',
+ { style: prepareStyles(styles.root) },
+ _react2.default.createElement(
+ 'div',
+ { style: prepareStyles(styles.child) },
+ this.getYears()
+ )
+ );
+ }
+ }]);
+ return CalendarYear;
+}(_react.Component);
+
+CalendarYear.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? CalendarYear.propTypes = {
+ DateTimeFormat: _react.PropTypes.func.isRequired,
+ locale: _react.PropTypes.string.isRequired,
+ maxDate: _react.PropTypes.object.isRequired,
+ minDate: _react.PropTypes.object.isRequired,
+ onTouchTapYear: _react.PropTypes.func,
+ selectedDate: _react.PropTypes.object.isRequired,
+ wordings: _react.PropTypes.object
} : void 0;
-exports.default = RaisedButton;
+exports.default = CalendarYear;
/***/ }),
-/* 777 */
+/* 779 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61898,73 +65311,157 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+var _extends2 = __webpack_require__(7);
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+var _extends3 = _interopRequireDefault(_extends2);
-var _AutoComplete = __webpack_require__(778);
+var _objectWithoutProperties2 = __webpack_require__(8);
-var _AutoComplete2 = _interopRequireDefault(_AutoComplete);
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-var _createComponent = __webpack_require__(43);
+var _getPrototypeOf = __webpack_require__(3);
-var _createComponent2 = _interopRequireDefault(_createComponent);
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-var _mapError = __webpack_require__(60);
+var _classCallCheck2 = __webpack_require__(1);
-var _mapError2 = _interopRequireDefault(_mapError);
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _EnhancedButton = __webpack_require__(51);
+
+var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+function getStyles(props, context, state) {
+ var selected = props.selected,
+ year = props.year;
+ var _context$muiTheme = context.muiTheme,
+ baseTheme = _context$muiTheme.baseTheme,
+ datePicker = _context$muiTheme.datePicker;
+ var hover = state.hover;
-exports.default = (0, _createComponent2.default)(_AutoComplete2.default, function (_ref) {
- var _ref$input = _ref.input,
- onChange = _ref$input.onChange,
- value = _ref$input.value,
- _onNewRequest = _ref.onNewRequest,
- dataSourceConfig = _ref.dataSourceConfig,
- props = _objectWithoutProperties(_ref, ['input', 'onNewRequest', 'dataSourceConfig']);
- return _extends({}, (0, _mapError2.default)(props), {
- dataSourceConfig: dataSourceConfig,
- searchText: dataSourceConfig ? value[dataSourceConfig.text] : value,
- onNewRequest: function onNewRequest(value) {
- onChange((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && dataSourceConfig ? value[dataSourceConfig.value] : value);
- if (_onNewRequest) {
- _onNewRequest(value);
- }
- },
- onUpdateInput: function onUpdateInput(value) {
- if (!dataSourceConfig) {
- onChange(value);
- }
+ return {
+ root: {
+ boxSizing: 'border-box',
+ color: year === new Date().getFullYear() && datePicker.color,
+ display: 'block',
+ fontSize: 14,
+ margin: '0 auto',
+ position: 'relative',
+ textAlign: 'center',
+ lineHeight: 'inherit',
+ WebkitTapHighlightColor: 'rgba(0,0,0,0)' },
+ label: {
+ alignSelf: 'center',
+ color: hover || selected ? datePicker.color : baseTheme.palette.textColor,
+ fontSize: selected ? 26 : 17,
+ fontWeight: hover ? 450 : selected ? 500 : 400,
+ position: 'relative',
+ top: -1
}
- });
-});
+ };
+}
-/***/ }),
-/* 778 */
-/***/ (function(module, exports, __webpack_require__) {
+var YearButton = function (_Component) {
+ (0, _inherits3.default)(YearButton, _Component);
-"use strict";
+ function YearButton() {
+ var _ref;
+ var _temp, _this, _ret;
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = undefined;
+ (0, _classCallCheck3.default)(this, YearButton);
-var _AutoComplete = __webpack_require__(779);
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
-var _AutoComplete2 = _interopRequireDefault(_AutoComplete);
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = YearButton.__proto__ || (0, _getPrototypeOf2.default)(YearButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ hover: false
+ }, _this.handleMouseEnter = function () {
+ _this.setState({ hover: true });
+ }, _this.handleMouseLeave = function () {
+ _this.setState({ hover: false });
+ }, _this.handleTouchTap = function (event) {
+ if (_this.props.onTouchTap) {
+ _this.props.onTouchTap(event, _this.props.year);
+ }
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ (0, _createClass3.default)(YearButton, [{
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ children = _props.children,
+ className = _props.className,
+ onTouchTap = _props.onTouchTap,
+ selected = _props.selected,
+ year = _props.year,
+ other = (0, _objectWithoutProperties3.default)(_props, ['children', 'className', 'onTouchTap', 'selected', 'year']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
-exports.default = _AutoComplete2.default;
+ var styles = getStyles(this.props, this.context, this.state);
+
+ return _react2.default.createElement(
+ _EnhancedButton2.default,
+ (0, _extends3.default)({}, other, {
+ disableFocusRipple: true,
+ disableTouchRipple: true,
+ onMouseEnter: this.handleMouseEnter,
+ onMouseLeave: this.handleMouseLeave,
+ onTouchTap: this.handleTouchTap,
+ style: styles.root
+ }),
+ _react2.default.createElement(
+ 'span',
+ { style: prepareStyles(styles.label) },
+ children
+ )
+ );
+ }
+ }]);
+ return YearButton;
+}(_react.Component);
+
+YearButton.defaultProps = {
+ selected: false
+};
+YearButton.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? YearButton.propTypes = {
+ children: _react.PropTypes.node.isRequired,
+ /**
+ * The css class name of the root element.
+ */
+ className: _react.PropTypes.string,
+ onTouchTap: _react.PropTypes.func,
+ selected: _react.PropTypes.bool,
+ year: _react.PropTypes.number.isRequired
+} : void 0;
+exports.default = YearButton;
/***/ }),
-/* 779 */
+/* 780 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -61974,18 +65471,6 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _extends2 = __webpack_require__(7);
-
-var _extends3 = _interopRequireDefault(_extends2);
-
-var _typeof2 = __webpack_require__(92);
-
-var _typeof3 = _interopRequireDefault(_typeof2);
-
-var _objectWithoutProperties2 = __webpack_require__(8);
-
-var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-
var _getPrototypeOf = __webpack_require__(3);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -62006,648 +65491,381 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
-var _simpleAssign = __webpack_require__(6);
-
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactDom = __webpack_require__(19);
+var _IconButton = __webpack_require__(64);
-var _reactDom2 = _interopRequireDefault(_reactDom);
+var _IconButton2 = _interopRequireDefault(_IconButton);
-var _keycode = __webpack_require__(30);
+var _chevronLeft = __webpack_require__(781);
-var _keycode2 = _interopRequireDefault(_keycode);
+var _chevronLeft2 = _interopRequireDefault(_chevronLeft);
-var _TextField = __webpack_require__(97);
+var _chevronRight = __webpack_require__(782);
-var _TextField2 = _interopRequireDefault(_TextField);
+var _chevronRight2 = _interopRequireDefault(_chevronRight);
-var _Menu = __webpack_require__(785);
+var _SlideIn = __webpack_require__(209);
-var _Menu2 = _interopRequireDefault(_Menu);
+var _SlideIn2 = _interopRequireDefault(_SlideIn);
-var _MenuItem = __webpack_require__(129);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _MenuItem2 = _interopRequireDefault(_MenuItem);
+var styles = {
+ root: {
+ display: 'flex',
+ justifyContent: 'space-between',
+ backgroundColor: 'inherit',
+ height: 48
+ },
+ titleDiv: {
+ fontSize: 14,
+ fontWeight: '500',
+ textAlign: 'center',
+ width: '100%'
+ },
+ titleText: {
+ height: 'inherit',
+ paddingTop: 12
+ }
+};
-var _Divider = __webpack_require__(786);
+var CalendarToolbar = function (_Component) {
+ (0, _inherits3.default)(CalendarToolbar, _Component);
-var _Divider2 = _interopRequireDefault(_Divider);
+ function CalendarToolbar() {
+ var _ref;
-var _Popover = __webpack_require__(130);
+ var _temp, _this, _ret;
-var _Popover2 = _interopRequireDefault(_Popover);
+ (0, _classCallCheck3.default)(this, CalendarToolbar);
-var _propTypes = __webpack_require__(41);
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
-var _propTypes2 = _interopRequireDefault(_propTypes);
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarToolbar.__proto__ || (0, _getPrototypeOf2.default)(CalendarToolbar)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ transitionDirection: 'up'
+ }, _this.handleTouchTapPrevMonth = function () {
+ if (_this.props.onMonthChange) {
+ _this.props.onMonthChange(-1);
+ }
+ }, _this.handleTouchTapNextMonth = function () {
+ if (_this.props.onMonthChange) {
+ _this.props.onMonthChange(1);
+ }
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ (0, _createClass3.default)(CalendarToolbar, [{
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ if (nextProps.displayDate !== this.props.displayDate) {
+ var direction = nextProps.displayDate > this.props.displayDate ? 'left' : 'right';
+ this.setState({
+ transitionDirection: direction
+ });
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ DateTimeFormat = _props.DateTimeFormat,
+ locale = _props.locale,
+ displayDate = _props.displayDate;
-function getStyles(props, context, state) {
- var anchorEl = state.anchorEl;
- var fullWidth = props.fullWidth;
+ var dateTimeFormatted = new DateTimeFormat(locale, {
+ month: 'long',
+ year: 'numeric'
+ }).format(displayDate);
- var styles = {
- root: {
- display: 'inline-block',
- position: 'relative',
- width: fullWidth ? '100%' : 256
- },
- menu: {
- width: '100%'
- },
- list: {
- display: 'block',
- width: fullWidth ? '100%' : 256
- },
- innerDiv: {
- overflow: 'hidden'
+ return _react2.default.createElement(
+ 'div',
+ { style: styles.root },
+ _react2.default.createElement(
+ _IconButton2.default,
+ {
+ disabled: !this.props.prevMonth,
+ onTouchTap: this.handleTouchTapPrevMonth
+ },
+ _react2.default.createElement(_chevronLeft2.default, null)
+ ),
+ _react2.default.createElement(
+ _SlideIn2.default,
+ {
+ direction: this.state.transitionDirection,
+ style: styles.titleDiv
+ },
+ _react2.default.createElement(
+ 'div',
+ { key: dateTimeFormatted, style: styles.titleText },
+ dateTimeFormatted
+ )
+ ),
+ _react2.default.createElement(
+ _IconButton2.default,
+ {
+ disabled: !this.props.nextMonth,
+ onTouchTap: this.handleTouchTapNextMonth
+ },
+ _react2.default.createElement(_chevronRight2.default, null)
+ )
+ );
}
- };
+ }]);
+ return CalendarToolbar;
+}(_react.Component);
- if (anchorEl && fullWidth) {
- styles.popover = {
- width: anchorEl.clientWidth
- };
- }
+CalendarToolbar.defaultProps = {
+ nextMonth: true,
+ prevMonth: true
+};
+ false ? CalendarToolbar.propTypes = {
+ DateTimeFormat: _react.PropTypes.func.isRequired,
+ displayDate: _react.PropTypes.object.isRequired,
+ locale: _react.PropTypes.string.isRequired,
+ nextMonth: _react.PropTypes.bool,
+ onMonthChange: _react.PropTypes.func,
+ prevMonth: _react.PropTypes.bool
+} : void 0;
+exports.default = CalendarToolbar;
- return styles;
-}
+/***/ }),
+/* 781 */
+/***/ (function(module, exports, __webpack_require__) {
-var AutoComplete = function (_Component) {
- (0, _inherits3.default)(AutoComplete, _Component);
+"use strict";
- function AutoComplete() {
- var _ref;
- var _temp, _this, _ret;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
- (0, _classCallCheck3.default)(this, AutoComplete);
+var _react = __webpack_require__(0);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
+var _react2 = _interopRequireDefault(_react);
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AutoComplete.__proto__ || (0, _getPrototypeOf2.default)(AutoComplete)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- anchorEl: null,
- focusTextField: true,
- open: false,
- searchText: undefined
- }, _this.handleRequestClose = function () {
- // Only take into account the Popover clickAway when we are
- // not focusing the TextField.
- if (!_this.state.focusTextField) {
- _this.close();
- }
- }, _this.handleMouseDown = function (event) {
- // Keep the TextField focused
- event.preventDefault();
- }, _this.handleItemTouchTap = function (event, child) {
- var dataSource = _this.props.dataSource;
+var _pure = __webpack_require__(20);
- var index = parseInt(child.key, 10);
- var chosenRequest = dataSource[index];
- var searchText = _this.chosenRequestText(chosenRequest);
+var _pure2 = _interopRequireDefault(_pure);
- _this.setState({
- searchText: searchText
- }, function () {
- _this.props.onUpdateInput(searchText, _this.props.dataSource, {
- source: 'touchTap'
- });
+var _SvgIcon = __webpack_require__(21);
- _this.timerTouchTapCloseId = setTimeout(function () {
- _this.timerTouchTapCloseId = null;
- _this.close();
- _this.props.onNewRequest(chosenRequest, index);
- }, _this.props.menuCloseDelay);
- });
- }, _this.chosenRequestText = function (chosenRequest) {
- if (typeof chosenRequest === 'string') {
- return chosenRequest;
- } else {
- return chosenRequest[_this.props.dataSourceConfig.text];
- }
- }, _this.handleEscKeyDown = function () {
- _this.close();
- }, _this.handleKeyDown = function (event) {
- if (_this.props.onKeyDown) _this.props.onKeyDown(event);
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var NavigationChevronLeft = function NavigationChevronLeft(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z' })
+ );
+};
+NavigationChevronLeft = (0, _pure2.default)(NavigationChevronLeft);
+NavigationChevronLeft.displayName = 'NavigationChevronLeft';
+NavigationChevronLeft.muiName = 'SvgIcon';
+
+exports.default = NavigationChevronLeft;
+
+/***/ }),
+/* 782 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _pure = __webpack_require__(20);
+
+var _pure2 = _interopRequireDefault(_pure);
+
+var _SvgIcon = __webpack_require__(21);
+
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var NavigationChevronRight = function NavigationChevronRight(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z' })
+ );
+};
+NavigationChevronRight = (0, _pure2.default)(NavigationChevronRight);
+NavigationChevronRight.displayName = 'NavigationChevronRight';
+NavigationChevronRight.muiName = 'SvgIcon';
+
+exports.default = NavigationChevronRight;
- switch ((0, _keycode2.default)(event)) {
- case 'enter':
- _this.close();
- var searchText = _this.state.searchText;
- if (searchText !== '') {
- _this.props.onNewRequest(searchText, -1);
- }
- break;
+/***/ }),
+/* 783 */
+/***/ (function(module, exports, __webpack_require__) {
- case 'esc':
- _this.close();
- break;
+"use strict";
- case 'down':
- event.preventDefault();
- _this.setState({
- open: true,
- focusTextField: false,
- anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField)
- });
- break;
- default:
- break;
- }
- }, _this.handleChange = function (event) {
- var searchText = event.target.value;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
- // Make sure that we have a new searchText.
- // Fix an issue with a Cordova Webview
- if (searchText === _this.state.searchText) {
- return;
- }
+var _extends2 = __webpack_require__(7);
- _this.setState({
- searchText: searchText,
- open: true,
- anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField)
- }, function () {
- _this.props.onUpdateInput(searchText, _this.props.dataSource, {
- source: 'change'
- });
- });
- }, _this.handleBlur = function (event) {
- if (_this.state.focusTextField && _this.timerTouchTapCloseId === null) {
- _this.timerBlurClose = setTimeout(function () {
- _this.close();
- }, 0);
- }
+var _extends3 = _interopRequireDefault(_extends2);
- if (_this.props.onBlur) {
- _this.props.onBlur(event);
- }
- }, _this.handleFocus = function (event) {
- if (!_this.state.open && _this.props.openOnFocus) {
- _this.setState({
- open: true,
- anchorEl: _reactDom2.default.findDOMNode(_this.refs.searchTextField)
- });
- }
+var _objectWithoutProperties2 = __webpack_require__(8);
- _this.setState({
- focusTextField: true
- });
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
- if (_this.props.onFocus) {
- _this.props.onFocus(event);
- }
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
- }
+var _getPrototypeOf = __webpack_require__(3);
- (0, _createClass3.default)(AutoComplete, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
- this.requestsList = [];
- this.setState({
- open: this.props.open,
- searchText: this.props.searchText
- });
- this.timerTouchTapCloseId = null;
- }
- }, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- if (this.props.searchText !== nextProps.searchText) {
- this.setState({
- searchText: nextProps.searchText
- });
- }
- }
- }, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- clearTimeout(this.timerTouchTapCloseId);
- clearTimeout(this.timerBlurClose);
- }
- }, {
- key: 'close',
- value: function close() {
- this.setState({
- open: false,
- anchorEl: null
- });
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
- if (this.props.onClose) {
- this.props.onClose();
- }
- }
- }, {
- key: 'blur',
- value: function blur() {
- this.refs.searchTextField.blur();
- }
- }, {
- key: 'focus',
- value: function focus() {
- this.refs.searchTextField.focus();
- }
- }, {
- key: 'render',
- value: function render() {
- var _this2 = this;
+var _classCallCheck2 = __webpack_require__(1);
- var _props = this.props,
- anchorOrigin = _props.anchorOrigin,
- animated = _props.animated,
- animation = _props.animation,
- dataSource = _props.dataSource,
- dataSourceConfig = _props.dataSourceConfig,
- disableFocusRipple = _props.disableFocusRipple,
- errorStyle = _props.errorStyle,
- floatingLabelText = _props.floatingLabelText,
- filter = _props.filter,
- fullWidth = _props.fullWidth,
- style = _props.style,
- hintText = _props.hintText,
- maxSearchResults = _props.maxSearchResults,
- menuCloseDelay = _props.menuCloseDelay,
- textFieldStyle = _props.textFieldStyle,
- menuStyle = _props.menuStyle,
- menuProps = _props.menuProps,
- listStyle = _props.listStyle,
- targetOrigin = _props.targetOrigin,
- onClose = _props.onClose,
- onNewRequest = _props.onNewRequest,
- onUpdateInput = _props.onUpdateInput,
- openOnFocus = _props.openOnFocus,
- popoverProps = _props.popoverProps,
- searchTextProp = _props.searchText,
- other = (0, _objectWithoutProperties3.default)(_props, ['anchorOrigin', 'animated', 'animation', 'dataSource', 'dataSourceConfig', 'disableFocusRipple', 'errorStyle', 'floatingLabelText', 'filter', 'fullWidth', 'style', 'hintText', 'maxSearchResults', 'menuCloseDelay', 'textFieldStyle', 'menuStyle', 'menuProps', 'listStyle', 'targetOrigin', 'onClose', 'onNewRequest', 'onUpdateInput', 'openOnFocus', 'popoverProps', 'searchText']);
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _ref2 = popoverProps || {},
- popoverStyle = _ref2.style,
- popoverOther = (0, _objectWithoutProperties3.default)(_ref2, ['style']);
+var _createClass2 = __webpack_require__(2);
- var _state = this.state,
- open = _state.open,
- anchorEl = _state.anchorEl,
- searchText = _state.searchText,
- focusTextField = _state.focusTextField;
- var prepareStyles = this.context.muiTheme.prepareStyles;
+var _createClass3 = _interopRequireDefault(_createClass2);
- var styles = getStyles(this.props, this.context, this.state);
+var _possibleConstructorReturn2 = __webpack_require__(4);
- var requestsList = [];
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- dataSource.every(function (item, index) {
- switch (typeof item === 'undefined' ? 'undefined' : (0, _typeof3.default)(item)) {
- case 'string':
- if (filter(searchText, item, item)) {
- requestsList.push({
- text: item,
- value: _react2.default.createElement(_MenuItem2.default, {
- innerDivStyle: styles.innerDiv,
- value: item,
- primaryText: item,
- disableFocusRipple: disableFocusRipple,
- key: index
- })
- });
- }
- break;
+var _inherits2 = __webpack_require__(5);
- case 'object':
- if (item && typeof item[_this2.props.dataSourceConfig.text] === 'string') {
- var itemText = item[_this2.props.dataSourceConfig.text];
- if (!_this2.props.filter(searchText, itemText, item)) break;
+var _inherits3 = _interopRequireDefault(_inherits2);
- var itemValue = item[_this2.props.dataSourceConfig.value];
- if (itemValue.type && (itemValue.type.muiName === _MenuItem2.default.muiName || itemValue.type.muiName === _Divider2.default.muiName)) {
- requestsList.push({
- text: itemText,
- value: _react2.default.cloneElement(itemValue, {
- key: index,
- disableFocusRipple: disableFocusRipple
- })
- });
- } else {
- requestsList.push({
- text: itemText,
- value: _react2.default.createElement(_MenuItem2.default, {
- innerDivStyle: styles.innerDiv,
- primaryText: itemText,
- disableFocusRipple: disableFocusRipple,
- key: index
- })
- });
- }
- }
- break;
+var _simpleAssign = __webpack_require__(6);
- default:
- // Do nothing
- }
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
- return !(maxSearchResults && maxSearchResults > 0 && requestsList.length === maxSearchResults);
- });
+var _react = __webpack_require__(0);
- this.requestsList = requestsList;
+var _react2 = _interopRequireDefault(_react);
- var menu = open && requestsList.length > 0 && _react2.default.createElement(
- _Menu2.default,
- (0, _extends3.default)({}, menuProps, {
- ref: 'menu',
- autoWidth: false,
- disableAutoFocus: focusTextField,
- onEscKeyDown: this.handleEscKeyDown,
- initiallyKeyboardFocused: true,
- onItemTouchTap: this.handleItemTouchTap,
- onMouseDown: this.handleMouseDown,
- style: (0, _simpleAssign2.default)(styles.menu, menuStyle),
- listStyle: (0, _simpleAssign2.default)(styles.list, listStyle)
- }),
- requestsList.map(function (i) {
- return i.value;
- })
- );
+var _reactDom = __webpack_require__(16);
- return _react2.default.createElement(
- 'div',
- { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) },
- _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, {
- ref: 'searchTextField',
- autoComplete: 'off',
- value: searchText,
- onChange: this.handleChange,
- onBlur: this.handleBlur,
- onFocus: this.handleFocus,
- onKeyDown: this.handleKeyDown,
- floatingLabelText: floatingLabelText,
- hintText: hintText,
- fullWidth: fullWidth,
- multiLine: false,
- errorStyle: errorStyle,
- style: textFieldStyle
- })),
- _react2.default.createElement(
- _Popover2.default,
- (0, _extends3.default)({
- style: (0, _simpleAssign2.default)({}, styles.popover, popoverStyle),
- canAutoPosition: false,
- anchorOrigin: anchorOrigin,
- targetOrigin: targetOrigin,
- open: open,
- anchorEl: anchorEl,
- useLayerForClickAway: false,
- onRequestClose: this.handleRequestClose,
- animated: animated,
- animation: animation
- }, popoverOther),
- menu
- )
- );
- }
- }]);
- return AutoComplete;
-}(_react.Component);
+var _reactDom2 = _interopRequireDefault(_reactDom);
-AutoComplete.defaultProps = {
- anchorOrigin: {
- vertical: 'bottom',
- horizontal: 'left'
- },
- animated: true,
- dataSourceConfig: {
- text: 'text',
- value: 'value'
- },
- disableFocusRipple: true,
- filter: function filter(searchText, key) {
- return searchText !== '' && key.indexOf(searchText) !== -1;
- },
- fullWidth: false,
- open: false,
- openOnFocus: false,
- onUpdateInput: function onUpdateInput() {},
- onNewRequest: function onNewRequest() {},
- searchText: '',
- menuCloseDelay: 300,
- targetOrigin: {
- vertical: 'top',
- horizontal: 'left'
- }
-};
-AutoComplete.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? AutoComplete.propTypes = {
- /**
- * Location of the anchor for the auto complete.
- */
- anchorOrigin: _propTypes2.default.origin,
- /**
- * If true, the auto complete is animated as it is toggled.
- */
- animated: _react.PropTypes.bool,
- /**
- * Override the default animation component used.
- */
- animation: _react.PropTypes.func,
- /**
- * Array of strings or nodes used to populate the list.
- */
- dataSource: _react.PropTypes.array.isRequired,
- /**
- * Config for objects list dataSource.
- *
- * @typedef {Object} dataSourceConfig
- *
- * @property {string} text `dataSource` element key used to find a string to be matched for search
- * and shown as a `TextField` input value after choosing the result.
- * @property {string} value `dataSource` element key used to find a string to be shown in search results.
- */
- dataSourceConfig: _react.PropTypes.object,
- /**
- * Disables focus ripple when true.
- */
- disableFocusRipple: _react.PropTypes.bool,
- /**
- * Override style prop for error.
- */
- errorStyle: _react.PropTypes.object,
- /**
- * The error content to display.
- */
- errorText: _react.PropTypes.node,
- /**
- * Callback function used to filter the auto complete.
- *
- * @param {string} searchText The text to search for within `dataSource`.
- * @param {string} key `dataSource` element, or `text` property on that element if it's not a string.
- * @returns {boolean} `true` indicates the auto complete list will include `key` when the input is `searchText`.
- */
- filter: _react.PropTypes.func,
- /**
- * The content to use for adding floating label element.
- */
- floatingLabelText: _react.PropTypes.node,
- /**
- * If true, the field receives the property `width: 100%`.
- */
- fullWidth: _react.PropTypes.bool,
- /**
- * The hint content to display.
- */
- hintText: _react.PropTypes.node,
- /**
- * Override style for list.
- */
- listStyle: _react.PropTypes.object,
- /**
- * The max number of search results to be shown.
- * By default it shows all the items which matches filter.
- */
- maxSearchResults: _react.PropTypes.number,
- /**
- * Delay for closing time of the menu.
- */
- menuCloseDelay: _react.PropTypes.number,
- /**
- * Props to be passed to menu.
- */
- menuProps: _react.PropTypes.object,
- /**
- * Override style for menu.
- */
- menuStyle: _react.PropTypes.object,
- /** @ignore */
- onBlur: _react.PropTypes.func,
- /**
- * Callback function fired when the menu is closed.
- */
- onClose: _react.PropTypes.func,
- /** @ignore */
- onFocus: _react.PropTypes.func,
- /** @ignore */
- onKeyDown: _react.PropTypes.func,
- /**
- * Callback function that is fired when a list item is selected, or enter is pressed in the `TextField`.
- *
- * @param {string} chosenRequest Either the `TextField` input value, if enter is pressed in the `TextField`,
- * or the text value of the corresponding list item that was selected.
- * @param {number} index The index in `dataSource` of the list item selected, or `-1` if enter is pressed in the
- * `TextField`.
- */
- onNewRequest: _react.PropTypes.func,
- /**
- * Callback function that is fired when the user updates the `TextField`.
- *
- * @param {string} searchText The auto-complete's `searchText` value.
- * @param {array} dataSource The auto-complete's `dataSource` array.
- * @param {object} params Additional information linked the update.
- */
- onUpdateInput: _react.PropTypes.func,
- /**
- * Auto complete menu is open if true.
- */
- open: _react.PropTypes.bool,
- /**
- * If true, the list item is showed when a focus event triggers.
- */
- openOnFocus: _react.PropTypes.bool,
- /**
- * Props to be passed to popover.
- */
- popoverProps: _react.PropTypes.object,
- /**
- * Text being input to auto complete.
- */
- searchText: _react.PropTypes.string,
- /**
- * Override the inline-styles of the root element.
- */
- style: _react.PropTypes.object,
- /**
- * Origin for location of target.
- */
- targetOrigin: _propTypes2.default.origin,
- /**
- * Override the inline-styles of AutoComplete's TextField element.
- */
- textFieldStyle: _react.PropTypes.object
-} : void 0;
+var _autoPrefix = __webpack_require__(96);
+var _autoPrefix2 = _interopRequireDefault(_autoPrefix);
-AutoComplete.levenshteinDistance = function (searchText, key) {
- var current = [];
- var prev = void 0;
- var value = void 0;
+var _transitions = __webpack_require__(10);
- for (var i = 0; i <= key.length; i++) {
- for (var j = 0; j <= searchText.length; j++) {
- if (i && j) {
- if (searchText.charAt(j - 1) === key.charAt(i - 1)) value = prev;else value = Math.min(current[j], current[j - 1], prev) + 1;
- } else {
- value = i + j;
- }
- prev = current[j];
- current[j] = value;
- }
+var _transitions2 = _interopRequireDefault(_transitions);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var SlideInChild = function (_Component) {
+ (0, _inherits3.default)(SlideInChild, _Component);
+
+ function SlideInChild() {
+ (0, _classCallCheck3.default)(this, SlideInChild);
+ return (0, _possibleConstructorReturn3.default)(this, (SlideInChild.__proto__ || (0, _getPrototypeOf2.default)(SlideInChild)).apply(this, arguments));
}
- return current.pop();
-};
-AutoComplete.noFilter = function () {
- return true;
-};
+ (0, _createClass3.default)(SlideInChild, [{
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ clearTimeout(this.enterTimer);
+ clearTimeout(this.leaveTimer);
+ }
+ }, {
+ key: 'componentWillEnter',
+ value: function componentWillEnter(callback) {
+ var style = _reactDom2.default.findDOMNode(this).style;
+ var x = this.props.direction === 'left' ? '100%' : this.props.direction === 'right' ? '-100%' : '0';
+ var y = this.props.direction === 'up' ? '100%' : this.props.direction === 'down' ? '-100%' : '0';
-AutoComplete.defaultFilter = AutoComplete.caseSensitiveFilter = function (searchText, key) {
- return searchText !== '' && key.indexOf(searchText) !== -1;
-};
+ style.opacity = '0';
+ _autoPrefix2.default.set(style, 'transform', 'translate(' + x + ', ' + y + ')');
-AutoComplete.caseInsensitiveFilter = function (searchText, key) {
- return key.toLowerCase().indexOf(searchText.toLowerCase()) !== -1;
-};
+ this.enterTimer = setTimeout(callback, this.props.enterDelay);
+ }
+ }, {
+ key: 'componentDidEnter',
+ value: function componentDidEnter() {
+ var style = _reactDom2.default.findDOMNode(this).style;
+ style.opacity = '1';
+ _autoPrefix2.default.set(style, 'transform', 'translate(0,0)');
+ }
+ }, {
+ key: 'componentWillLeave',
+ value: function componentWillLeave(callback) {
+ var style = _reactDom2.default.findDOMNode(this).style;
+ var direction = this.props.getLeaveDirection();
+ var x = direction === 'left' ? '-100%' : direction === 'right' ? '100%' : '0';
+ var y = direction === 'up' ? '-100%' : direction === 'down' ? '100%' : '0';
-AutoComplete.levenshteinDistanceFilter = function (distanceLessThan) {
- if (distanceLessThan === undefined) {
- return AutoComplete.levenshteinDistance;
- } else if (typeof distanceLessThan !== 'number') {
- throw 'Error: AutoComplete.levenshteinDistanceFilter is a filter generator, not a filter!';
- }
+ style.opacity = '0';
+ _autoPrefix2.default.set(style, 'transform', 'translate(' + x + ', ' + y + ')');
- return function (s, k) {
- return AutoComplete.levenshteinDistance(s, k) < distanceLessThan;
- };
-};
+ this.leaveTimer = setTimeout(callback, 450);
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ children = _props.children,
+ enterDelay = _props.enterDelay,
+ getLeaveDirection = _props.getLeaveDirection,
+ style = _props.style,
+ other = (0, _objectWithoutProperties3.default)(_props, ['children', 'enterDelay', 'getLeaveDirection', 'style']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
-AutoComplete.fuzzyFilter = function (searchText, key) {
- var compareString = key.toLowerCase();
- searchText = searchText.toLowerCase();
- var searchTextIndex = 0;
- for (var index = 0; index < key.length; index++) {
- if (compareString[index] === searchText[searchTextIndex]) {
- searchTextIndex += 1;
+ var mergedRootStyles = (0, _simpleAssign2.default)({}, {
+ position: 'absolute',
+ height: '100%',
+ width: '100%',
+ top: 0,
+ left: 0,
+ transition: _transitions2.default.easeOut(null, ['transform', 'opacity'])
+ }, style);
+
+ return _react2.default.createElement(
+ 'div',
+ (0, _extends3.default)({}, other, { style: prepareStyles(mergedRootStyles) }),
+ children
+ );
}
- }
+ }]);
+ return SlideInChild;
+}(_react.Component);
- return searchTextIndex === searchText.length;
+SlideInChild.defaultProps = {
+ enterDelay: 0
};
-
-AutoComplete.Item = _MenuItem2.default;
-AutoComplete.Divider = _Divider2.default;
-
-exports.default = AutoComplete;
+SlideInChild.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? SlideInChild.propTypes = {
+ children: _react.PropTypes.node,
+ direction: _react.PropTypes.string,
+ enterDelay: _react.PropTypes.number,
+ // This callback is needed bacause the direction could change when leaving the DOM
+ getLeaveDirection: _react.PropTypes.func.isRequired,
+ style: _react.PropTypes.object
+} : void 0;
+exports.default = SlideInChild;
/***/ }),
-/* 780 */
+/* 784 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62685,550 +65903,212 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
-var _simpleAssign = __webpack_require__(6);
-
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactDom = __webpack_require__(19);
-
-var _reactDom2 = _interopRequireDefault(_reactDom);
-
-var _shallowEqual = __webpack_require__(58);
-
-var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
-
var _transitions = __webpack_require__(10);
var _transitions2 = _interopRequireDefault(_transitions);
-var _EnhancedTextarea = __webpack_require__(781);
-
-var _EnhancedTextarea2 = _interopRequireDefault(_EnhancedTextarea);
-
-var _TextFieldHint = __webpack_require__(782);
-
-var _TextFieldHint2 = _interopRequireDefault(_TextFieldHint);
-
-var _TextFieldLabel = __webpack_require__(783);
-
-var _TextFieldLabel2 = _interopRequireDefault(_TextFieldLabel);
-
-var _TextFieldUnderline = __webpack_require__(784);
-
-var _TextFieldUnderline2 = _interopRequireDefault(_TextFieldUnderline);
+var _SlideIn = __webpack_require__(209);
-var _warning = __webpack_require__(17);
-
-var _warning2 = _interopRequireDefault(_warning);
+var _SlideIn2 = _interopRequireDefault(_SlideIn);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var getStyles = function getStyles(props, context, state) {
- var _context$muiTheme = context.muiTheme,
- baseTheme = _context$muiTheme.baseTheme,
- _context$muiTheme$tex = _context$muiTheme.textField,
- floatingLabelColor = _context$muiTheme$tex.floatingLabelColor,
- focusColor = _context$muiTheme$tex.focusColor,
- textColor = _context$muiTheme$tex.textColor,
- disabledTextColor = _context$muiTheme$tex.disabledTextColor,
- backgroundColor = _context$muiTheme$tex.backgroundColor,
- errorColor = _context$muiTheme$tex.errorColor;
+function getStyles(props, context, state) {
+ var datePicker = context.muiTheme.datePicker;
+ var selectedYear = state.selectedYear;
+ var isLandscape = props.mode === 'landscape';
var styles = {
root: {
- fontSize: 16,
- lineHeight: '24px',
- width: props.fullWidth ? '100%' : 256,
- height: (props.rows - 1) * 24 + (props.floatingLabelText ? 72 : 48),
+ width: isLandscape ? 165 : '100%',
+ height: isLandscape ? 330 : 'auto',
+ float: isLandscape ? 'left' : 'none',
+ fontWeight: 700,
display: 'inline-block',
- position: 'relative',
- backgroundColor: backgroundColor,
- fontFamily: baseTheme.fontFamily,
- transition: _transitions2.default.easeOut('200ms', 'height'),
- cursor: props.disabled ? 'not-allowed' : 'auto'
- },
- error: {
- position: 'relative',
- bottom: 2,
- fontSize: 12,
- lineHeight: '12px',
- color: errorColor,
- transition: _transitions2.default.easeOut()
+ backgroundColor: datePicker.selectColor,
+ borderTopLeftRadius: 2,
+ borderTopRightRadius: isLandscape ? 0 : 2,
+ borderBottomLeftRadius: isLandscape ? 2 : 0,
+ color: datePicker.textColor,
+ padding: 20,
+ boxSizing: 'border-box'
},
- floatingLabel: {
- color: props.disabled ? disabledTextColor : floatingLabelColor,
- pointerEvents: 'none'
+ monthDay: {
+ display: 'block',
+ fontSize: 36,
+ lineHeight: '36px',
+ height: props.mode === 'landscape' ? '100%' : 38,
+ opacity: selectedYear ? 0.7 : 1,
+ transition: _transitions2.default.easeOut(),
+ width: '100%',
+ fontWeight: '500'
},
- input: {
- padding: 0,
- position: 'relative',
+ monthDayTitle: {
+ cursor: !selectedYear ? 'default' : 'pointer',
width: '100%',
- border: 'none',
- outline: 'none',
- backgroundColor: 'rgba(0,0,0,0)',
- color: props.disabled ? disabledTextColor : textColor,
- cursor: 'inherit',
- font: 'inherit',
- WebkitTapHighlightColor: 'rgba(0,0,0,0)' },
- inputNative: {
- appearance: 'textfield' }
- };
-
- styles.textarea = (0, _simpleAssign2.default)({}, styles.input, {
- marginTop: props.floatingLabelText ? 36 : 12,
- marginBottom: props.floatingLabelText ? -36 : -12,
- boxSizing: 'border-box',
- font: 'inherit'
- });
-
- // Do not assign a height to the textarea as he handles it on his own.
- styles.input.height = '100%';
-
- if (state.isFocused) {
- styles.floatingLabel.color = focusColor;
- }
-
- if (props.floatingLabelText) {
- styles.input.boxSizing = 'border-box';
-
- if (!props.multiLine) {
- styles.input.marginTop = 14;
- }
-
- if (state.errorText) {
- styles.error.bottom = !props.multiLine ? styles.error.fontSize + 3 : 3;
- }
- }
-
- if (state.errorText) {
- if (state.isFocused) {
- styles.floatingLabel.color = styles.error.color;
+ display: 'block'
+ },
+ year: {
+ margin: 0,
+ fontSize: 16,
+ fontWeight: '500',
+ lineHeight: '16px',
+ height: 16,
+ opacity: selectedYear ? 1 : 0.7,
+ transition: _transitions2.default.easeOut(),
+ marginBottom: 10
+ },
+ yearTitle: {
+ cursor: props.disableYearSelection ? 'not-allowed' : !selectedYear ? 'pointer' : 'default'
}
- }
+ };
return styles;
-};
-
-/**
- * Check if a value is valid to be displayed inside an input.
- *
- * @param The value to check.
- * @returns True if the string provided is valid, false otherwise.
- */
-function isValid(value) {
- return value !== '' && value !== undefined && value !== null;
}
-var TextField = function (_Component) {
- (0, _inherits3.default)(TextField, _Component);
+var DateDisplay = function (_Component) {
+ (0, _inherits3.default)(DateDisplay, _Component);
- function TextField() {
+ function DateDisplay() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, TextField);
+ (0, _classCallCheck3.default)(this, DateDisplay);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TextField.__proto__ || (0, _getPrototypeOf2.default)(TextField)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- isFocused: false,
- errorText: undefined,
- hasValue: false
- }, _this.handleInputBlur = function (event) {
- _this.setState({ isFocused: false });
- if (_this.props.onBlur) {
- _this.props.onBlur(event);
- }
- }, _this.handleInputChange = function (event) {
- _this.setState({ hasValue: isValid(event.target.value) });
- if (_this.props.onChange) {
- _this.props.onChange(event, event.target.value);
- }
- }, _this.handleInputFocus = function (event) {
- if (_this.props.disabled) {
- return;
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DateDisplay.__proto__ || (0, _getPrototypeOf2.default)(DateDisplay)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ selectedYear: false,
+ transitionDirection: 'up'
+ }, _this.handleTouchTapMonthDay = function () {
+ if (_this.props.onTouchTapMonthDay && _this.state.selectedYear) {
+ _this.props.onTouchTapMonthDay();
}
- _this.setState({ isFocused: true });
- if (_this.props.onFocus) {
- _this.props.onFocus(event);
+
+ _this.setState({ selectedYear: false });
+ }, _this.handleTouchTapYear = function () {
+ if (_this.props.onTouchTapYear && !_this.props.disableYearSelection && !_this.state.selectedYear) {
+ _this.props.onTouchTapYear();
}
- }, _this.handleHeightChange = function (event, height) {
- var newHeight = height + 24;
- if (_this.props.floatingLabelText) {
- newHeight += 24;
+
+ if (!_this.props.disableYearSelection) {
+ _this.setState({ selectedYear: true });
}
- _reactDom2.default.findDOMNode(_this).style.height = newHeight + 'px';
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(TextField, [{
+ (0, _createClass3.default)(DateDisplay, [{
key: 'componentWillMount',
value: function componentWillMount() {
- var _props = this.props,
- children = _props.children,
- name = _props.name,
- hintText = _props.hintText,
- floatingLabelText = _props.floatingLabelText,
- id = _props.id;
-
-
- var propsLeaf = children ? children.props : this.props;
-
- this.setState({
- errorText: this.props.errorText,
- hasValue: isValid(propsLeaf.value) || isValid(propsLeaf.defaultValue)
- });
-
- false ? (0, _warning2.default)(name || hintText || floatingLabelText || id, 'Material-UI: We don\'t have enough information\n to build a robust unique id for the TextField component. Please provide an id or a name.') : void 0;
-
- var uniqueId = name + '-' + hintText + '-' + floatingLabelText + '-' + Math.floor(Math.random() * 0xFFFF);
- this.uniqueId = uniqueId.replace(/[^A-Za-z0-9-]/gi, '');
+ if (!this.props.monthDaySelected) {
+ this.setState({ selectedYear: true });
+ }
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
- if (nextProps.errorText !== this.props.errorText) {
+ if (nextProps.selectedDate !== this.props.selectedDate) {
+ var direction = nextProps.selectedDate > this.props.selectedDate ? 'up' : 'down';
this.setState({
- errorText: nextProps.errorText
+ transitionDirection: direction
});
}
- if (nextProps.children && nextProps.children.props) {
- nextProps = nextProps.children.props;
- }
-
- if (nextProps.hasOwnProperty('value')) {
- var hasValue = isValid(nextProps.value);
-
+ if (nextProps.monthDaySelected !== undefined) {
this.setState({
- hasValue: hasValue
+ selectedYear: !nextProps.monthDaySelected
});
}
}
- }, {
- key: 'shouldComponentUpdate',
- value: function shouldComponentUpdate(nextProps, nextState, nextContext) {
- return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext);
- }
- }, {
- key: 'blur',
- value: function blur() {
- if (this.input) {
- this.getInputNode().blur();
- }
- }
- }, {
- key: 'focus',
- value: function focus() {
- if (this.input) {
- this.getInputNode().focus();
- }
- }
- }, {
- key: 'select',
- value: function select() {
- if (this.input) {
- this.getInputNode().select();
- }
- }
- }, {
- key: 'getValue',
- value: function getValue() {
- return this.input ? this.getInputNode().value : undefined;
- }
- }, {
- key: 'getInputNode',
- value: function getInputNode() {
- return this.props.children || this.props.multiLine ? this.input.getInputNode() : _reactDom2.default.findDOMNode(this.input);
- }
- }, {
- key: '_isControlled',
- value: function _isControlled() {
- return this.props.hasOwnProperty('value');
- }
}, {
key: 'render',
value: function render() {
- var _this2 = this;
-
- var _props2 = this.props,
- children = _props2.children,
- className = _props2.className,
- disabled = _props2.disabled,
- errorStyle = _props2.errorStyle,
- errorText = _props2.errorText,
- floatingLabelFixed = _props2.floatingLabelFixed,
- floatingLabelFocusStyle = _props2.floatingLabelFocusStyle,
- floatingLabelShrinkStyle = _props2.floatingLabelShrinkStyle,
- floatingLabelStyle = _props2.floatingLabelStyle,
- floatingLabelText = _props2.floatingLabelText,
- fullWidth = _props2.fullWidth,
- hintText = _props2.hintText,
- hintStyle = _props2.hintStyle,
- id = _props2.id,
- inputStyle = _props2.inputStyle,
- multiLine = _props2.multiLine,
- onBlur = _props2.onBlur,
- onChange = _props2.onChange,
- onFocus = _props2.onFocus,
- style = _props2.style,
- type = _props2.type,
- underlineDisabledStyle = _props2.underlineDisabledStyle,
- underlineFocusStyle = _props2.underlineFocusStyle,
- underlineShow = _props2.underlineShow,
- underlineStyle = _props2.underlineStyle,
- rows = _props2.rows,
- rowsMax = _props2.rowsMax,
- textareaStyle = _props2.textareaStyle,
- other = (0, _objectWithoutProperties3.default)(_props2, ['children', 'className', 'disabled', 'errorStyle', 'errorText', 'floatingLabelFixed', 'floatingLabelFocusStyle', 'floatingLabelShrinkStyle', 'floatingLabelStyle', 'floatingLabelText', 'fullWidth', 'hintText', 'hintStyle', 'id', 'inputStyle', 'multiLine', 'onBlur', 'onChange', 'onFocus', 'style', 'type', 'underlineDisabledStyle', 'underlineFocusStyle', 'underlineShow', 'underlineStyle', 'rows', 'rowsMax', 'textareaStyle']);
+ var _props = this.props,
+ DateTimeFormat = _props.DateTimeFormat,
+ disableYearSelection = _props.disableYearSelection,
+ locale = _props.locale,
+ mode = _props.mode,
+ monthDaySelected = _props.monthDaySelected,
+ onTouchTapMonthDay = _props.onTouchTapMonthDay,
+ onTouchTapYear = _props.onTouchTapYear,
+ selectedDate = _props.selectedDate,
+ style = _props.style,
+ other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'disableYearSelection', 'locale', 'mode', 'monthDaySelected', 'onTouchTapMonthDay', 'onTouchTapYear', 'selectedDate', 'style']);
var prepareStyles = this.context.muiTheme.prepareStyles;
var styles = getStyles(this.props, this.context, this.state);
- var inputId = id || this.uniqueId;
-
- var errorTextElement = this.state.errorText && _react2.default.createElement(
- 'div',
- { style: prepareStyles((0, _simpleAssign2.default)(styles.error, errorStyle)) },
- this.state.errorText
- );
-
- var floatingLabelTextElement = floatingLabelText && _react2.default.createElement(
- _TextFieldLabel2.default,
- {
- muiTheme: this.context.muiTheme,
- style: (0, _simpleAssign2.default)(styles.floatingLabel, floatingLabelStyle, this.state.isFocused ? floatingLabelFocusStyle : null),
- shrinkStyle: floatingLabelShrinkStyle,
- htmlFor: inputId,
- shrink: this.state.hasValue || this.state.isFocused || floatingLabelFixed,
- disabled: disabled
- },
- floatingLabelText
- );
-
- var inputProps = {
- id: inputId,
- ref: function ref(elem) {
- return _this2.input = elem;
- },
- disabled: this.props.disabled,
- onBlur: this.handleInputBlur,
- onChange: this.handleInputChange,
- onFocus: this.handleInputFocus
- };
-
- var childStyleMerged = (0, _simpleAssign2.default)(styles.input, inputStyle);
-
- var inputElement = void 0;
- if (children) {
- inputElement = _react2.default.cloneElement(children, (0, _extends3.default)({}, inputProps, children.props, {
- style: (0, _simpleAssign2.default)(childStyleMerged, children.props.style)
- }));
- } else {
- inputElement = multiLine ? _react2.default.createElement(_EnhancedTextarea2.default, (0, _extends3.default)({
- style: childStyleMerged,
- textareaStyle: (0, _simpleAssign2.default)(styles.textarea, styles.inputNative, textareaStyle),
- rows: rows,
- rowsMax: rowsMax
- }, other, inputProps, {
- onHeightChange: this.handleHeightChange
- })) : _react2.default.createElement('input', (0, _extends3.default)({
- type: type,
- style: prepareStyles((0, _simpleAssign2.default)(styles.inputNative, childStyleMerged))
- }, other, inputProps));
- }
- var rootProps = {};
+ var year = new DateTimeFormat(locale, {
+ year: 'numeric'
+ }).format(selectedDate);
- if (children) {
- rootProps = other;
- }
+ var dateTime = new DateTimeFormat(locale, {
+ month: 'short',
+ weekday: 'short',
+ day: '2-digit'
+ }).format(selectedDate);
return _react2.default.createElement(
'div',
- (0, _extends3.default)({}, rootProps, {
- className: className,
- style: prepareStyles((0, _simpleAssign2.default)(styles.root, style))
- }),
- floatingLabelTextElement,
- hintText ? _react2.default.createElement(_TextFieldHint2.default, {
- muiTheme: this.context.muiTheme,
- show: !(this.state.hasValue || floatingLabelText && !this.state.isFocused) || !this.state.hasValue && floatingLabelText && floatingLabelFixed && !this.state.isFocused,
- style: hintStyle,
- text: hintText
- }) : null,
- inputElement,
- underlineShow ? _react2.default.createElement(_TextFieldUnderline2.default, {
- disabled: disabled,
- disabledStyle: underlineDisabledStyle,
- error: !!this.state.errorText,
- errorStyle: errorStyle,
- focus: this.state.isFocused,
- focusStyle: underlineFocusStyle,
- muiTheme: this.context.muiTheme,
- style: underlineStyle
- }) : null,
- errorTextElement
+ (0, _extends3.default)({}, other, { style: prepareStyles(styles.root, style) }),
+ _react2.default.createElement(
+ _SlideIn2.default,
+ { style: styles.year, direction: this.state.transitionDirection },
+ _react2.default.createElement(
+ 'div',
+ { key: year, style: styles.yearTitle, onTouchTap: this.handleTouchTapYear },
+ year
+ )
+ ),
+ _react2.default.createElement(
+ _SlideIn2.default,
+ { style: styles.monthDay, direction: this.state.transitionDirection },
+ _react2.default.createElement(
+ 'div',
+ {
+ key: dateTime,
+ onTouchTap: this.handleTouchTapMonthDay,
+ style: styles.monthDayTitle
+ },
+ dateTime
+ )
+ )
);
}
- }]);
- return TextField;
-}(_react.Component);
-
-TextField.defaultProps = {
- disabled: false,
- floatingLabelFixed: false,
- multiLine: false,
- fullWidth: false,
- type: 'text',
- underlineShow: true,
- rows: 1
+ }]);
+ return DateDisplay;
+}(_react.Component);
+
+DateDisplay.defaultProps = {
+ disableYearSelection: false,
+ monthDaySelected: true
};
-TextField.contextTypes = {
+DateDisplay.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? TextField.propTypes = {
- children: _react.PropTypes.node,
- /**
- * The css class name of the root element.
- */
- className: _react.PropTypes.string,
- /**
- * The text string to use for the default value.
- */
- defaultValue: _react.PropTypes.any,
- /**
- * Disables the text field if set to true.
- */
- disabled: _react.PropTypes.bool,
- /**
- * The style object to use to override error styles.
- */
- errorStyle: _react.PropTypes.object,
- /**
- * The error content to display.
- */
- errorText: _react.PropTypes.node,
- /**
- * If true, the floating label will float even when there is no value.
- */
- floatingLabelFixed: _react.PropTypes.bool,
- /**
- * The style object to use to override floating label styles when focused.
- */
- floatingLabelFocusStyle: _react.PropTypes.object,
- /**
- * The style object to use to override floating label styles when shrunk.
- */
- floatingLabelShrinkStyle: _react.PropTypes.object,
- /**
- * The style object to use to override floating label styles.
- */
- floatingLabelStyle: _react.PropTypes.object,
- /**
- * The content to use for the floating label element.
- */
- floatingLabelText: _react.PropTypes.node,
- /**
- * If true, the field receives the property width 100%.
- */
- fullWidth: _react.PropTypes.bool,
- /**
- * Override the inline-styles of the TextField's hint text element.
- */
- hintStyle: _react.PropTypes.object,
- /**
- * The hint content to display.
- */
- hintText: _react.PropTypes.node,
- /**
- * The id prop for the text field.
- */
- id: _react.PropTypes.string,
- /**
- * Override the inline-styles of the TextField's input element.
- * When multiLine is false: define the style of the input element.
- * When multiLine is true: define the style of the container of the textarea.
- */
- inputStyle: _react.PropTypes.object,
- /**
- * If true, a textarea element will be rendered.
- * The textarea also grows and shrinks according to the number of lines.
- */
- multiLine: _react.PropTypes.bool,
- /**
- * Name applied to the input.
- */
- name: _react.PropTypes.string,
- /** @ignore */
- onBlur: _react.PropTypes.func,
- /**
- * Callback function that is fired when the textfield's value changes.
- *
- * @param {object} event Change event targeting the text field.
- * @param {string} newValue The new value of the text field.
- */
- onChange: _react.PropTypes.func,
- /** @ignore */
- onFocus: _react.PropTypes.func,
- /**
- * Number of rows to display when multiLine option is set to true.
- */
- rows: _react.PropTypes.number,
- /**
- * Maximum number of rows to display when
- * multiLine option is set to true.
- */
- rowsMax: _react.PropTypes.number,
- /**
- * Override the inline-styles of the root element.
- */
- style: _react.PropTypes.object,
- /**
- * Override the inline-styles of the TextField's textarea element.
- * The TextField use either a textarea or an input,
- * this property has effects only when multiLine is true.
- */
- textareaStyle: _react.PropTypes.object,
- /**
- * Specifies the type of input to display
- * such as "password" or "text".
- */
- type: _react.PropTypes.string,
- /**
- * Override the inline-styles of the
- * TextField's underline element when disabled.
- */
- underlineDisabledStyle: _react.PropTypes.object,
- /**
- * Override the inline-styles of the TextField's
- * underline element when focussed.
- */
- underlineFocusStyle: _react.PropTypes.object,
- /**
- * If true, shows the underline for the text field.
- */
- underlineShow: _react.PropTypes.bool,
- /**
- * Override the inline-styles of the TextField's underline element.
- */
- underlineStyle: _react.PropTypes.object,
- /**
- * The value of the text field.
- */
- value: _react.PropTypes.any
+ false ? DateDisplay.propTypes = {
+ DateTimeFormat: _react.PropTypes.func.isRequired,
+ disableYearSelection: _react.PropTypes.bool,
+ locale: _react.PropTypes.string.isRequired,
+ mode: _react.PropTypes.oneOf(['portrait', 'landscape']),
+ monthDaySelected: _react.PropTypes.bool,
+ onTouchTapMonthDay: _react.PropTypes.func,
+ onTouchTapYear: _react.PropTypes.func,
+ selectedDate: _react.PropTypes.object.isRequired,
+ style: _react.PropTypes.object
} : void 0;
-exports.default = TextField;
+exports.default = DateDisplay;
/***/ }),
-/* 781 */
+/* 785 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -63274,546 +66154,554 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactEventListener = __webpack_require__(42);
+var _reactDom = __webpack_require__(16);
+
+var _reactDom2 = _interopRequireDefault(_reactDom);
+
+var _reactEventListener = __webpack_require__(40);
var _reactEventListener2 = _interopRequireDefault(_reactEventListener);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _keycode = __webpack_require__(26);
-var rowsHeight = 24;
+var _keycode2 = _interopRequireDefault(_keycode);
-function getStyles(props, context, state) {
- return {
- root: {
- position: 'relative' },
- textarea: {
- height: state.height,
- width: '100%',
- resize: 'none',
- font: 'inherit',
- padding: 0,
- cursor: 'inherit'
- },
- shadow: {
- resize: 'none',
- // Overflow also needed to here to remove the extra row
- // added to textareas in Firefox.
- overflow: 'hidden',
- // Visibility needed to hide the extra text area on ipads
- visibility: 'hidden',
- position: 'absolute',
- height: 'initial'
- }
- };
-}
+var _transitions = __webpack_require__(10);
-var EnhancedTextarea = function (_Component) {
- (0, _inherits3.default)(EnhancedTextarea, _Component);
+var _transitions2 = _interopRequireDefault(_transitions);
- function EnhancedTextarea() {
+var _Overlay = __webpack_require__(324);
+
+var _Overlay2 = _interopRequireDefault(_Overlay);
+
+var _RenderToLayer = __webpack_require__(327);
+
+var _RenderToLayer2 = _interopRequireDefault(_RenderToLayer);
+
+var _Paper = __webpack_require__(32);
+
+var _Paper2 = _interopRequireDefault(_Paper);
+
+var _reactAddonsTransitionGroup = __webpack_require__(132);
+
+var _reactAddonsTransitionGroup2 = _interopRequireDefault(_reactAddonsTransitionGroup);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var TransitionItem = function (_Component) {
+ (0, _inherits3.default)(TransitionItem, _Component);
+
+ function TransitionItem() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, EnhancedTextarea);
+ (0, _classCallCheck3.default)(this, TransitionItem);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedTextarea.__proto__ || (0, _getPrototypeOf2.default)(EnhancedTextarea)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- height: null
- }, _this.handleResize = function (event) {
- _this.syncHeightWithShadow(undefined, event);
- }, _this.handleChange = function (event) {
- _this.syncHeightWithShadow(event.target.value);
-
- if (_this.props.hasOwnProperty('valueLink')) {
- _this.props.valueLink.requestChange(event.target.value);
- }
-
- if (_this.props.onChange) {
- _this.props.onChange(event);
- }
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TransitionItem.__proto__ || (0, _getPrototypeOf2.default)(TransitionItem)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ style: {}
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(EnhancedTextarea, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
+ (0, _createClass3.default)(TransitionItem, [{
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ clearTimeout(this.enterTimeout);
+ clearTimeout(this.leaveTimeout);
+ }
+ }, {
+ key: 'componentWillEnter',
+ value: function componentWillEnter(callback) {
+ this.componentWillAppear(callback);
+ }
+ }, {
+ key: 'componentWillAppear',
+ value: function componentWillAppear(callback) {
+ var spacing = this.context.muiTheme.baseTheme.spacing;
+
this.setState({
- height: this.props.rows * rowsHeight
+ style: {
+ opacity: 1,
+ transform: 'translate(0, ' + spacing.desktopKeylineIncrement + 'px)'
+ }
});
+
+ this.enterTimeout = setTimeout(callback, 450); // matches transition duration
}
}, {
- key: 'componentDidMount',
- value: function componentDidMount() {
- this.syncHeightWithShadow();
+ key: 'componentWillLeave',
+ value: function componentWillLeave(callback) {
+ this.setState({
+ style: {
+ opacity: 0,
+ transform: 'translate(0, 0)'
+ }
+ });
+
+ this.leaveTimeout = setTimeout(callback, 450); // matches transition duration
}
}, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- if (nextProps.value !== this.props.value) {
- this.syncHeightWithShadow(nextProps.value);
- }
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ style = _props.style,
+ children = _props.children,
+ other = (0, _objectWithoutProperties3.default)(_props, ['style', 'children']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
+
+
+ return _react2.default.createElement(
+ 'div',
+ (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)({}, this.state.style, style)) }),
+ children
+ );
}
- }, {
- key: 'getInputNode',
- value: function getInputNode() {
- return this.refs.input;
+ }]);
+ return TransitionItem;
+}(_react.Component);
+
+TransitionItem.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? TransitionItem.propTypes = {
+ children: _react.PropTypes.node,
+ style: _react.PropTypes.object
+} : void 0;
+
+
+function getStyles(props, context) {
+ var autoScrollBodyContent = props.autoScrollBodyContent,
+ open = props.open;
+ var _context$muiTheme = context.muiTheme,
+ _context$muiTheme$bas = _context$muiTheme.baseTheme,
+ spacing = _context$muiTheme$bas.spacing,
+ palette = _context$muiTheme$bas.palette,
+ dialog = _context$muiTheme.dialog,
+ zIndex = _context$muiTheme.zIndex;
+
+
+ var gutter = spacing.desktopGutter;
+ var borderScroll = '1px solid ' + palette.borderColor;
+
+ return {
+ root: {
+ position: 'fixed',
+ boxSizing: 'border-box',
+ WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated)
+ zIndex: zIndex.dialog,
+ top: 0,
+ left: open ? 0 : -10000,
+ width: '100%',
+ height: '100%',
+ transition: open ? _transitions2.default.easeOut('0ms', 'left', '0ms') : _transitions2.default.easeOut('0ms', 'left', '450ms')
+ },
+ content: {
+ boxSizing: 'border-box',
+ WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated)
+ transition: _transitions2.default.easeOut(),
+ position: 'relative',
+ width: '75%',
+ maxWidth: spacing.desktopKeylineIncrement * 12,
+ margin: '0 auto',
+ zIndex: zIndex.dialog
+ },
+ actionsContainer: {
+ boxSizing: 'border-box',
+ WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated)
+ padding: 8,
+ width: '100%',
+ textAlign: 'right',
+ marginTop: autoScrollBodyContent ? -1 : 0,
+ borderTop: autoScrollBodyContent ? borderScroll : 'none'
+ },
+ overlay: {
+ zIndex: zIndex.dialogOverlay
+ },
+ title: {
+ margin: 0,
+ padding: gutter + 'px ' + gutter + 'px 20px ' + gutter + 'px',
+ color: palette.textColor,
+ fontSize: dialog.titleFontSize,
+ lineHeight: '32px',
+ fontWeight: 400,
+ marginBottom: autoScrollBodyContent ? -1 : 0,
+ borderBottom: autoScrollBodyContent ? borderScroll : 'none'
+ },
+ body: {
+ fontSize: dialog.bodyFontSize,
+ color: dialog.bodyColor,
+ padding: (props.title ? 0 : gutter) + 'px ' + gutter + 'px ' + gutter + 'px',
+ boxSizing: 'border-box',
+ overflowY: autoScrollBodyContent ? 'auto' : 'hidden'
+ }
+ };
+}
+
+var DialogInline = function (_Component2) {
+ (0, _inherits3.default)(DialogInline, _Component2);
+
+ function DialogInline() {
+ var _ref2;
+
+ var _temp2, _this2, _ret2;
+
+ (0, _classCallCheck3.default)(this, DialogInline);
+
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ args[_key2] = arguments[_key2];
+ }
+
+ return _ret2 = (_temp2 = (_this2 = (0, _possibleConstructorReturn3.default)(this, (_ref2 = DialogInline.__proto__ || (0, _getPrototypeOf2.default)(DialogInline)).call.apply(_ref2, [this].concat(args))), _this2), _this2.handleTouchTapOverlay = function () {
+ _this2.requestClose(false);
+ }, _this2.handleKeyUp = function (event) {
+ if ((0, _keycode2.default)(event) === 'esc') {
+ _this2.requestClose(false);
+ }
+ }, _this2.handleResize = function () {
+ _this2.positionDialog();
+ }, _temp2), (0, _possibleConstructorReturn3.default)(_this2, _ret2);
+ }
+
+ (0, _createClass3.default)(DialogInline, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ this.positionDialog();
}
}, {
- key: 'setValue',
- value: function setValue(value) {
- this.getInputNode().value = value;
- this.syncHeightWithShadow(value);
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate() {
+ this.positionDialog();
}
}, {
- key: 'syncHeightWithShadow',
- value: function syncHeightWithShadow(newValue, event) {
- var shadow = this.refs.shadow;
+ key: 'positionDialog',
+ value: function positionDialog() {
+ var _props2 = this.props,
+ actions = _props2.actions,
+ autoDetectWindowHeight = _props2.autoDetectWindowHeight,
+ autoScrollBodyContent = _props2.autoScrollBodyContent,
+ bodyStyle = _props2.bodyStyle,
+ open = _props2.open,
+ repositionOnUpdate = _props2.repositionOnUpdate,
+ title = _props2.title;
- if (newValue !== undefined) {
- shadow.value = newValue;
+
+ if (!open) {
+ return;
}
- var newHeight = shadow.scrollHeight;
+ var clientHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
+ var container = _reactDom2.default.findDOMNode(this);
+ var dialogWindow = _reactDom2.default.findDOMNode(this.refs.dialogWindow);
+ var dialogContent = _reactDom2.default.findDOMNode(this.refs.dialogContent);
+ var minPaddingTop = 16;
- // Guarding for jsdom, where scrollHeight isn't present.
- // See https://github.com/tmpvar/jsdom/issues/1013
- if (newHeight === undefined) return;
+ // Reset the height in case the window was resized.
+ dialogWindow.style.height = '';
+ dialogContent.style.height = '';
- if (this.props.rowsMax >= this.props.rows) {
- newHeight = Math.min(this.props.rowsMax * rowsHeight, newHeight);
+ var dialogWindowHeight = dialogWindow.offsetHeight;
+ var paddingTop = (clientHeight - dialogWindowHeight) / 2 - 64;
+ if (paddingTop < minPaddingTop) paddingTop = minPaddingTop;
+
+ // Vertically center the dialog window, but make sure it doesn't
+ // transition to that position.
+ if (repositionOnUpdate || !container.style.paddingTop) {
+ container.style.paddingTop = paddingTop + 'px';
}
- newHeight = Math.max(newHeight, rowsHeight);
+ // Force a height if the dialog is taller than clientHeight
+ if (autoDetectWindowHeight || autoScrollBodyContent) {
+ var styles = getStyles(this.props, this.context);
+ styles.body = (0, _simpleAssign2.default)(styles.body, bodyStyle);
+ var maxDialogContentHeight = clientHeight - 2 * 64;
- if (this.state.height !== newHeight) {
- this.setState({
- height: newHeight
- });
+ if (title) maxDialogContentHeight -= dialogContent.previousSibling.offsetHeight;
- if (this.props.onHeightChange) {
- this.props.onHeightChange(event, newHeight);
+ if (_react2.default.Children.count(actions)) {
+ maxDialogContentHeight -= dialogContent.nextSibling.offsetHeight;
}
+
+ dialogContent.style.maxHeight = maxDialogContentHeight + 'px';
+ }
+ }
+ }, {
+ key: 'requestClose',
+ value: function requestClose(buttonClicked) {
+ if (!buttonClicked && this.props.modal) {
+ return;
+ }
+
+ if (this.props.onRequestClose) {
+ this.props.onRequestClose(!!buttonClicked);
}
}
}, {
key: 'render',
value: function render() {
- var _props = this.props,
- onChange = _props.onChange,
- onHeightChange = _props.onHeightChange,
- rows = _props.rows,
- rowsMax = _props.rowsMax,
- shadowStyle = _props.shadowStyle,
- style = _props.style,
- textareaStyle = _props.textareaStyle,
- valueLink = _props.valueLink,
- other = (0, _objectWithoutProperties3.default)(_props, ['onChange', 'onHeightChange', 'rows', 'rowsMax', 'shadowStyle', 'style', 'textareaStyle', 'valueLink']);
+ var _props3 = this.props,
+ actions = _props3.actions,
+ actionsContainerClassName = _props3.actionsContainerClassName,
+ actionsContainerStyle = _props3.actionsContainerStyle,
+ bodyClassName = _props3.bodyClassName,
+ bodyStyle = _props3.bodyStyle,
+ children = _props3.children,
+ className = _props3.className,
+ contentClassName = _props3.contentClassName,
+ contentStyle = _props3.contentStyle,
+ overlayClassName = _props3.overlayClassName,
+ overlayStyle = _props3.overlayStyle,
+ open = _props3.open,
+ titleClassName = _props3.titleClassName,
+ titleStyle = _props3.titleStyle,
+ title = _props3.title,
+ style = _props3.style;
var prepareStyles = this.context.muiTheme.prepareStyles;
- var styles = getStyles(this.props, this.context, this.state);
- var rootStyles = (0, _simpleAssign2.default)(styles.root, style);
- var textareaStyles = (0, _simpleAssign2.default)(styles.textarea, textareaStyle);
- var shadowStyles = (0, _simpleAssign2.default)({}, textareaStyles, styles.shadow, shadowStyle);
+ var styles = getStyles(this.props, this.context);
+
+ styles.root = (0, _simpleAssign2.default)(styles.root, style);
+ styles.content = (0, _simpleAssign2.default)(styles.content, contentStyle);
+ styles.body = (0, _simpleAssign2.default)(styles.body, bodyStyle);
+ styles.actionsContainer = (0, _simpleAssign2.default)(styles.actionsContainer, actionsContainerStyle);
+ styles.overlay = (0, _simpleAssign2.default)(styles.overlay, overlayStyle);
+ styles.title = (0, _simpleAssign2.default)(styles.title, titleStyle);
+
+ var actionsContainer = _react2.default.Children.count(actions) > 0 && _react2.default.createElement(
+ 'div',
+ { className: actionsContainerClassName, style: prepareStyles(styles.actionsContainer) },
+ _react2.default.Children.toArray(actions)
+ );
- if (this.props.hasOwnProperty('valueLink')) {
- other.value = this.props.valueLink.value;
+ var titleElement = title;
+ if (_react2.default.isValidElement(title)) {
+ titleElement = _react2.default.cloneElement(title, {
+ className: title.props.className || titleClassName,
+ style: prepareStyles((0, _simpleAssign2.default)(styles.title, title.props.style))
+ });
+ } else if (typeof title === 'string') {
+ titleElement = _react2.default.createElement(
+ 'h3',
+ { className: titleClassName, style: prepareStyles(styles.title) },
+ title
+ );
}
return _react2.default.createElement(
'div',
- { style: prepareStyles(rootStyles) },
- _react2.default.createElement(_reactEventListener2.default, { target: 'window', onResize: this.handleResize }),
- _react2.default.createElement('textarea', {
- ref: 'shadow',
- style: prepareStyles(shadowStyles),
- tabIndex: '-1',
- rows: this.props.rows,
- defaultValue: this.props.defaultValue,
- readOnly: true,
- value: this.props.value,
- valueLink: this.props.valueLink
+ { className: className, style: prepareStyles(styles.root) },
+ open && _react2.default.createElement(_reactEventListener2.default, {
+ target: 'window',
+ onKeyUp: this.handleKeyUp,
+ onResize: this.handleResize
}),
- _react2.default.createElement('textarea', (0, _extends3.default)({}, other, {
- ref: 'input',
- rows: this.props.rows,
- style: prepareStyles(textareaStyles),
- onChange: this.handleChange
- }))
+ _react2.default.createElement(
+ _reactAddonsTransitionGroup2.default,
+ {
+ component: 'div',
+ ref: 'dialogWindow',
+ transitionAppear: true,
+ transitionAppearTimeout: 450,
+ transitionEnter: true,
+ transitionEnterTimeout: 450
+ },
+ open && _react2.default.createElement(
+ TransitionItem,
+ {
+ className: contentClassName,
+ style: styles.content
+ },
+ _react2.default.createElement(
+ _Paper2.default,
+ { zDepth: 4 },
+ titleElement,
+ _react2.default.createElement(
+ 'div',
+ {
+ ref: 'dialogContent',
+ className: bodyClassName,
+ style: prepareStyles(styles.body)
+ },
+ children
+ ),
+ actionsContainer
+ )
+ )
+ ),
+ _react2.default.createElement(_Overlay2.default, {
+ show: open,
+ className: overlayClassName,
+ style: styles.overlay,
+ onTouchTap: this.handleTouchTapOverlay
+ })
);
}
}]);
- return EnhancedTextarea;
+ return DialogInline;
}(_react.Component);
-EnhancedTextarea.defaultProps = {
- rows: 1
-};
-EnhancedTextarea.contextTypes = {
+DialogInline.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? EnhancedTextarea.propTypes = {
- defaultValue: _react.PropTypes.any,
- disabled: _react.PropTypes.bool,
- onChange: _react.PropTypes.func,
- onHeightChange: _react.PropTypes.func,
- rows: _react.PropTypes.number,
- rowsMax: _react.PropTypes.number,
- shadowStyle: _react.PropTypes.object,
- /**
- * Override the inline-styles of the root element.
- */
+ false ? DialogInline.propTypes = {
+ actions: _react.PropTypes.node,
+ actionsContainerClassName: _react.PropTypes.string,
+ actionsContainerStyle: _react.PropTypes.object,
+ autoDetectWindowHeight: _react.PropTypes.bool,
+ autoScrollBodyContent: _react.PropTypes.bool,
+ bodyClassName: _react.PropTypes.string,
+ bodyStyle: _react.PropTypes.object,
+ children: _react.PropTypes.node,
+ className: _react.PropTypes.string,
+ contentClassName: _react.PropTypes.string,
+ contentStyle: _react.PropTypes.object,
+ modal: _react.PropTypes.bool,
+ onRequestClose: _react.PropTypes.func,
+ open: _react.PropTypes.bool.isRequired,
+ overlayClassName: _react.PropTypes.string,
+ overlayStyle: _react.PropTypes.object,
+ repositionOnUpdate: _react.PropTypes.bool,
style: _react.PropTypes.object,
- textareaStyle: _react.PropTypes.object,
- value: _react.PropTypes.string,
- valueLink: _react.PropTypes.object
+ title: _react.PropTypes.node,
+ titleClassName: _react.PropTypes.string,
+ titleStyle: _react.PropTypes.object
} : void 0;
-exports.default = EnhancedTextarea;
-
-/***/ }),
-/* 782 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
+var Dialog = function (_Component3) {
+ (0, _inherits3.default)(Dialog, _Component3);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _simpleAssign = __webpack_require__(6);
-
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-
-var _react = __webpack_require__(0);
-
-var _react2 = _interopRequireDefault(_react);
-
-var _transitions = __webpack_require__(10);
-
-var _transitions2 = _interopRequireDefault(_transitions);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ function Dialog() {
+ var _ref3;
-function getStyles(props) {
- var hintColor = props.muiTheme.textField.hintColor,
- show = props.show;
+ var _temp3, _this3, _ret3;
+ (0, _classCallCheck3.default)(this, Dialog);
- return {
- root: {
- position: 'absolute',
- opacity: show ? 1 : 0,
- color: hintColor,
- transition: _transitions2.default.easeOut(),
- bottom: 12
+ for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
+ args[_key3] = arguments[_key3];
}
- };
-}
-
-var TextFieldHint = function TextFieldHint(props) {
- var prepareStyles = props.muiTheme.prepareStyles,
- style = props.style,
- text = props.text;
+ return _ret3 = (_temp3 = (_this3 = (0, _possibleConstructorReturn3.default)(this, (_ref3 = Dialog.__proto__ || (0, _getPrototypeOf2.default)(Dialog)).call.apply(_ref3, [this].concat(args))), _this3), _this3.renderLayer = function () {
+ return _react2.default.createElement(DialogInline, _this3.props);
+ }, _temp3), (0, _possibleConstructorReturn3.default)(_this3, _ret3);
+ }
- var styles = getStyles(props);
+ (0, _createClass3.default)(Dialog, [{
+ key: 'render',
+ value: function render() {
+ return _react2.default.createElement(_RenderToLayer2.default, { render: this.renderLayer, open: true, useLayerForClickAway: false });
+ }
+ }]);
+ return Dialog;
+}(_react.Component);
- return _react2.default.createElement(
- 'div',
- { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) },
- text
- );
+Dialog.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
};
-
- false ? TextFieldHint.propTypes = {
+Dialog.defaultProps = {
+ autoDetectWindowHeight: true,
+ autoScrollBodyContent: false,
+ modal: false,
+ repositionOnUpdate: true
+};
+ false ? Dialog.propTypes = {
/**
- * @ignore
- * The material-ui theme applied to this component.
+ * Action buttons to display below the Dialog content (`children`).
+ * This property accepts either a React element, or an array of React elements.
*/
- muiTheme: _react.PropTypes.object.isRequired,
+ actions: _react.PropTypes.node,
/**
- * True if the hint text should be visible.
+ * The `className` to add to the actions container's root element.
*/
- show: _react.PropTypes.bool,
+ actionsContainerClassName: _react.PropTypes.string,
/**
- * Override the inline-styles of the root element.
+ * Overrides the inline-styles of the actions container's root element.
*/
- style: _react.PropTypes.object,
+ actionsContainerStyle: _react.PropTypes.object,
/**
- * The hint text displayed.
+ * If set to true, the height of the `Dialog` will be auto detected. A max height
+ * will be enforced so that the content does not extend beyond the viewport.
*/
- text: _react.PropTypes.node
-} : void 0;
-
-TextFieldHint.defaultProps = {
- show: true
-};
-
-exports.default = TextFieldHint;
-
-/***/ }),
-/* 783 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _simpleAssign = __webpack_require__(6);
-
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-
-var _react = __webpack_require__(0);
-
-var _react2 = _interopRequireDefault(_react);
-
-var _transitions = __webpack_require__(10);
-
-var _transitions2 = _interopRequireDefault(_transitions);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function getStyles(props) {
- var defaultStyles = {
- position: 'absolute',
- lineHeight: '22px',
- top: 38,
- transition: _transitions2.default.easeOut(),
- zIndex: 1, // Needed to display label above Chrome's autocomplete field background
- transform: 'scale(1) translate(0, 0)',
- transformOrigin: 'left top',
- pointerEvents: 'auto',
- userSelect: 'none'
- };
-
- var shrinkStyles = props.shrink ? (0, _simpleAssign2.default)({
- transform: 'scale(0.75) translate(0, -28px)',
- pointerEvents: 'none'
- }, props.shrinkStyle) : null;
-
- return {
- root: (0, _simpleAssign2.default)(defaultStyles, props.style, shrinkStyles)
- };
-}
-
-var TextFieldLabel = function TextFieldLabel(props) {
- var muiTheme = props.muiTheme,
- className = props.className,
- children = props.children,
- htmlFor = props.htmlFor,
- onTouchTap = props.onTouchTap;
- var prepareStyles = muiTheme.prepareStyles;
-
- var styles = getStyles(props);
-
- return _react2.default.createElement(
- 'label',
- {
- className: className,
- style: prepareStyles(styles.root),
- htmlFor: htmlFor,
- onTouchTap: onTouchTap
- },
- children
- );
-};
-
- false ? TextFieldLabel.propTypes = {
+ autoDetectWindowHeight: _react.PropTypes.bool,
/**
- * The label contents.
+ * If set to true, the body content of the `Dialog` will be scrollable.
*/
- children: _react.PropTypes.node,
+ autoScrollBodyContent: _react.PropTypes.bool,
/**
- * The css class name of the root element.
+ * The `className` to add to the content's root element under the title.
*/
- className: _react.PropTypes.string,
+ bodyClassName: _react.PropTypes.string,
/**
- * Disables the label if set to true.
+ * Overrides the inline-styles of the content's root element under the title.
*/
- disabled: _react.PropTypes.bool,
+ bodyStyle: _react.PropTypes.object,
/**
- * The id of the target element that this label should refer to.
+ * The contents of the `Dialog`.
*/
- htmlFor: _react.PropTypes.string,
+ children: _react.PropTypes.node,
/**
- * @ignore
- * The material-ui theme applied to this component.
+ * The css class name of the root element.
*/
- muiTheme: _react.PropTypes.object.isRequired,
+ className: _react.PropTypes.string,
/**
- * Callback function for when the label is selected via a touch tap.
- *
- * @param {object} event TouchTap event targeting the text field label.
+ * The `className` to add to the content container.
*/
- onTouchTap: _react.PropTypes.func,
+ contentClassName: _react.PropTypes.string,
/**
- * True if the floating label should shrink.
+ * Overrides the inline-styles of the content container.
*/
- shrink: _react.PropTypes.bool,
+ contentStyle: _react.PropTypes.object,
/**
- * Override the inline-styles of the root element when shrunk.
+ * Force the user to use one of the actions in the `Dialog`.
+ * Clicking outside the `Dialog` will not trigger the `onRequestClose`.
*/
- shrinkStyle: _react.PropTypes.object,
+ modal: _react.PropTypes.bool,
/**
- * Override the inline-styles of the root element.
+ * Fired when the `Dialog` is requested to be closed by a click outside the `Dialog` or on the buttons.
+ *
+ * @param {bool} buttonClicked Determines whether a button click triggered this request.
*/
- style: _react.PropTypes.object
-} : void 0;
-
-TextFieldLabel.defaultProps = {
- disabled: false,
- shrink: false
-};
-
-exports.default = TextFieldLabel;
-
-/***/ }),
-/* 784 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _simpleAssign = __webpack_require__(6);
-
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-
-var _react = __webpack_require__(0);
-
-var _react2 = _interopRequireDefault(_react);
-
-var _transitions = __webpack_require__(10);
-
-var _transitions2 = _interopRequireDefault(_transitions);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var propTypes = {
+ onRequestClose: _react.PropTypes.func,
/**
- * True if the parent `TextField` is disabled.
+ * Controls whether the Dialog is opened or not.
*/
- disabled: _react.PropTypes.bool,
+ open: _react.PropTypes.bool.isRequired,
/**
- * Override the inline-styles of the underline when parent `TextField` is disabled.
+ * The `className` to add to the `Overlay` component that is rendered behind the `Dialog`.
*/
- disabledStyle: _react.PropTypes.object,
+ overlayClassName: _react.PropTypes.string,
/**
- * True if the parent `TextField` has an error.
+ * Overrides the inline-styles of the `Overlay` component that is rendered behind the `Dialog`.
*/
- error: _react.PropTypes.bool,
+ overlayStyle: _react.PropTypes.object,
/**
- * Override the inline-styles of the underline when parent `TextField` has an error.
+ * Determines whether the `Dialog` should be repositioned when it's contents are updated.
*/
- errorStyle: _react.PropTypes.object,
+ repositionOnUpdate: _react.PropTypes.bool,
/**
- * True if the parent `TextField` is focused.
+ * Override the inline-styles of the root element.
*/
- focus: _react.PropTypes.bool,
+ style: _react.PropTypes.object,
/**
- * Override the inline-styles of the underline when parent `TextField` is focused.
+ * The title to display on the `Dialog`. Could be number, string, element or an array containing these types.
*/
- focusStyle: _react.PropTypes.object,
+ title: _react.PropTypes.node,
/**
- * @ignore
- * The material-ui theme applied to this component.
+ * The `className` to add to the title's root container element.
*/
- muiTheme: _react.PropTypes.object.isRequired,
+ titleClassName: _react.PropTypes.string,
/**
- * Override the inline-styles of the root element.
+ * Overrides the inline-styles of the title's root container element.
*/
- style: _react.PropTypes.object
-};
-
-var defaultProps = {
- disabled: false,
- disabledStyle: {},
- error: false,
- errorStyle: {},
- focus: false,
- focusStyle: {},
- style: {}
-};
-
-var TextFieldUnderline = function TextFieldUnderline(props) {
- var disabled = props.disabled,
- disabledStyle = props.disabledStyle,
- error = props.error,
- errorStyle = props.errorStyle,
- focus = props.focus,
- focusStyle = props.focusStyle,
- muiTheme = props.muiTheme,
- style = props.style;
- var errorStyleColor = errorStyle.color;
- var prepareStyles = muiTheme.prepareStyles,
- _muiTheme$textField = muiTheme.textField,
- borderColor = _muiTheme$textField.borderColor,
- disabledTextColor = _muiTheme$textField.disabledTextColor,
- errorColor = _muiTheme$textField.errorColor,
- focusColor = _muiTheme$textField.focusColor;
-
-
- var styles = {
- root: {
- borderTop: 'none',
- borderLeft: 'none',
- borderRight: 'none',
- borderBottom: 'solid 1px',
- borderColor: borderColor,
- bottom: 8,
- boxSizing: 'content-box',
- margin: 0,
- position: 'absolute',
- width: '100%'
- },
- disabled: {
- borderBottom: 'dotted 2px',
- borderColor: disabledTextColor
- },
- focus: {
- borderBottom: 'solid 2px',
- borderColor: focusColor,
- transform: 'scaleX(0)',
- transition: _transitions2.default.easeOut()
- },
- error: {
- borderColor: errorStyleColor ? errorStyleColor : errorColor,
- transform: 'scaleX(1)'
- }
- };
-
- var underline = (0, _simpleAssign2.default)({}, styles.root, style);
- var focusedUnderline = (0, _simpleAssign2.default)({}, underline, styles.focus, focusStyle);
-
- if (disabled) underline = (0, _simpleAssign2.default)({}, underline, styles.disabled, disabledStyle);
- if (focus) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, { transform: 'scaleX(1)' });
- if (error) focusedUnderline = (0, _simpleAssign2.default)({}, focusedUnderline, styles.error);
-
- return _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement('hr', { style: prepareStyles(underline) }),
- _react2.default.createElement('hr', { style: prepareStyles(focusedUnderline) })
- );
-};
-
- false ? TextFieldUnderline.propTypes = propTypes : void 0;
-TextFieldUnderline.defaultProps = defaultProps;
-
-exports.default = TextFieldUnderline;
+ titleStyle: _react.PropTypes.object
+} : void 0;
+exports.default = Dialog;
/***/ }),
-/* 785 */
+/* 786 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -63822,41 +66710,33 @@ exports.default = TextFieldUnderline;
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.default = exports.MenuItem = exports.Menu = undefined;
-
-var _Menu2 = __webpack_require__(199);
-
-var _Menu3 = _interopRequireDefault(_Menu2);
-
-var _MenuItem2 = __webpack_require__(129);
-
-var _MenuItem3 = _interopRequireDefault(_MenuItem2);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-exports.Menu = _Menu3.default;
-exports.MenuItem = _MenuItem3.default;
-exports.default = _Menu3.default;
-
-/***/ }),
-/* 786 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+var _RadioButton = __webpack_require__(333);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = undefined;
+var _createComponent = __webpack_require__(41);
-var _Divider = __webpack_require__(787);
+var _createComponent2 = _interopRequireDefault(_createComponent);
-var _Divider2 = _interopRequireDefault(_Divider);
+var _mapError = __webpack_require__(66);
+
+var _mapError2 = _interopRequireDefault(_mapError);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-exports.default = _Divider2.default;
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+var mapValueToValueSelected = function mapValueToValueSelected(_ref, errorProp) {
+ var inputProps = _objectWithoutProperties(_ref.input, []),
+ props = _objectWithoutProperties(_ref, ['input']);
+
+ return (0, _mapError2.default)(_extends({}, props, {
+ input: _extends({}, inputProps, { valueSelected: inputProps.value })
+ }), errorProp);
+};
+
+exports.default = (0, _createComponent2.default)(_RadioButton.RadioButtonGroup, mapValueToValueSelected);
/***/ }),
/* 787 */
@@ -63877,6 +66757,26 @@ var _objectWithoutProperties2 = __webpack_require__(8);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
var _simpleAssign = __webpack_require__(6);
var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
@@ -63885,53 +66785,235 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
+var _transitions = __webpack_require__(10);
+
+var _transitions2 = _interopRequireDefault(_transitions);
+
+var _EnhancedSwitch = __webpack_require__(208);
+
+var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch);
+
+var _radioButtonUnchecked = __webpack_require__(788);
+
+var _radioButtonUnchecked2 = _interopRequireDefault(_radioButtonUnchecked);
+
+var _radioButtonChecked = __webpack_require__(789);
+
+var _radioButtonChecked2 = _interopRequireDefault(_radioButtonChecked);
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var Divider = function Divider(props, context) {
- var inset = props.inset,
- style = props.style,
- other = (0, _objectWithoutProperties3.default)(props, ['inset', 'style']);
- var _context$muiTheme = context.muiTheme,
- baseTheme = _context$muiTheme.baseTheme,
- prepareStyles = _context$muiTheme.prepareStyles;
+function getStyles(props, context) {
+ var radioButton = context.muiTheme.radioButton;
- var styles = {
- root: {
- margin: 0,
- marginTop: -1,
- marginLeft: inset ? 72 : 0,
- height: 1,
- border: 'none',
- backgroundColor: baseTheme.palette.borderColor
+ return {
+ icon: {
+ height: radioButton.size,
+ width: radioButton.size
+ },
+ target: {
+ transition: _transitions2.default.easeOut(),
+ position: 'absolute',
+ opacity: 1,
+ transform: 'scale(1)',
+ fill: radioButton.borderColor
+ },
+ fill: {
+ position: 'absolute',
+ opacity: 1,
+ transform: 'scale(0)',
+ transformOrigin: '50% 50%',
+ transition: _transitions2.default.easeOut(),
+ fill: radioButton.checkedColor
+ },
+ targetWhenChecked: {
+ opacity: 0,
+ transform: 'scale(0)'
+ },
+ fillWhenChecked: {
+ opacity: 1,
+ transform: 'scale(1)'
+ },
+ targetWhenDisabled: {
+ fill: radioButton.disabledColor
+ },
+ fillWhenDisabled: {
+ fill: radioButton.disabledColor
+ },
+ label: {
+ color: props.disabled ? radioButton.labelDisabledColor : radioButton.labelColor
+ },
+ ripple: {
+ color: props.checked ? radioButton.checkedColor : radioButton.borderColor
}
};
+}
- return _react2.default.createElement('hr', (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }));
-};
+var RadioButton = function (_Component) {
+ (0, _inherits3.default)(RadioButton, _Component);
-Divider.muiName = 'Divider';
+ function RadioButton() {
+ var _ref;
- false ? Divider.propTypes = {
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, RadioButton);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RadioButton.__proto__ || (0, _getPrototypeOf2.default)(RadioButton)).call.apply(_ref, [this].concat(args))), _this), _this.handleSwitch = function (event) {
+ if (_this.props.onCheck) {
+ _this.props.onCheck(event, _this.props.value);
+ }
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
+
+ // Only called when selected, not when unselected.
+
+
+ (0, _createClass3.default)(RadioButton, [{
+ key: 'isChecked',
+ value: function isChecked() {
+ return this.refs.enhancedSwitch.isSwitched();
+ }
+
+ // Use RadioButtonGroup.setSelectedValue(newSelectionValue) to set a
+ // RadioButton's checked value.
+
+ }, {
+ key: 'setChecked',
+ value: function setChecked(newCheckedValue) {
+ this.refs.enhancedSwitch.setSwitched(newCheckedValue);
+ }
+ }, {
+ key: 'getValue',
+ value: function getValue() {
+ return this.refs.enhancedSwitch.getValue();
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ checkedIcon = _props.checkedIcon,
+ checked = _props.checked,
+ iconStyle = _props.iconStyle,
+ labelStyle = _props.labelStyle,
+ labelPosition = _props.labelPosition,
+ onCheck = _props.onCheck,
+ uncheckedIcon = _props.uncheckedIcon,
+ disabled = _props.disabled,
+ other = (0, _objectWithoutProperties3.default)(_props, ['checkedIcon', 'checked', 'iconStyle', 'labelStyle', 'labelPosition', 'onCheck', 'uncheckedIcon', 'disabled']);
+
+
+ var styles = getStyles(this.props, this.context);
+
+ var uncheckedStyles = (0, _simpleAssign2.default)(styles.target, checked && styles.targetWhenChecked, iconStyle, disabled && styles.targetWhenDisabled);
+
+ var checkedStyles = (0, _simpleAssign2.default)(styles.fill, checked && styles.fillWhenChecked, iconStyle, disabled && styles.fillWhenDisabled);
+
+ var uncheckedElement = _react2.default.isValidElement(uncheckedIcon) ? _react2.default.cloneElement(uncheckedIcon, {
+ style: (0, _simpleAssign2.default)(uncheckedStyles, uncheckedIcon.props.style)
+ }) : _react2.default.createElement(_radioButtonUnchecked2.default, { style: uncheckedStyles });
+
+ var checkedElement = _react2.default.isValidElement(checkedIcon) ? _react2.default.cloneElement(checkedIcon, {
+ style: (0, _simpleAssign2.default)(checkedStyles, checkedIcon.props.style)
+ }) : _react2.default.createElement(_radioButtonChecked2.default, { style: checkedStyles });
+
+ var mergedIconStyle = (0, _simpleAssign2.default)(styles.icon, iconStyle);
+ var mergedLabelStyle = (0, _simpleAssign2.default)(styles.label, labelStyle);
+
+ return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, {
+ ref: 'enhancedSwitch',
+ inputType: 'radio',
+ checked: checked,
+ switched: checked,
+ disabled: disabled,
+ rippleColor: styles.ripple.color,
+ iconStyle: mergedIconStyle,
+ labelStyle: mergedLabelStyle,
+ labelPosition: labelPosition,
+ onSwitch: this.handleSwitch,
+ switchElement: _react2.default.createElement(
+ 'div',
+ null,
+ uncheckedElement,
+ checkedElement
+ )
+ }));
+ }
+ }]);
+ return RadioButton;
+}(_react.Component);
+
+RadioButton.defaultProps = {
+ checked: false,
+ disabled: false,
+ labelPosition: 'right'
+};
+RadioButton.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? RadioButton.propTypes = {
/**
- * If true, the `Divider` will be indented.
+ * @ignore
+ * checked if true
+ * Used internally by `RadioButtonGroup`.
*/
- inset: _react.PropTypes.bool,
+ checked: _react.PropTypes.bool,
+ /**
+ * The icon element to show when the radio button is checked.
+ */
+ checkedIcon: _react.PropTypes.element,
+ /**
+ * If true, the radio button is disabled.
+ */
+ disabled: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the icon element.
+ */
+ iconStyle: _react.PropTypes.object,
+ /**
+ * Override the inline-styles of the input element.
+ */
+ inputStyle: _react.PropTypes.object,
+ /**
+ * @ignore
+ * Used internally by `RadioButtonGroup`. Use the `labelPosition` property of `RadioButtonGroup` instead.
+ * Where the label will be placed next to the radio button.
+ */
+ labelPosition: _react.PropTypes.oneOf(['left', 'right']),
+ /**
+ * Override the inline-styles of the label element.
+ */
+ labelStyle: _react.PropTypes.object,
+ /**
+ * @ignore
+ * Callback function fired when the radio button is checked. Note that this
+ * function will not be called if the radio button is part of a
+ * radio button group: in this case, use the `onChange` property of
+ * `RadioButtonGroup`.
+ *
+ * @param {object} event `change` event targeting the element.
+ * @param {string} value The element's `value`.
+ */
+ onCheck: _react.PropTypes.func,
/**
* Override the inline-styles of the root element.
*/
- style: _react.PropTypes.object
+ style: _react.PropTypes.object,
+ /**
+ * The icon element to show when the radio button is unchecked.
+ */
+ uncheckedIcon: _react.PropTypes.element,
+ /**
+ * The value of the radio button.
+ */
+ value: _react.PropTypes.any
} : void 0;
-
-Divider.defaultProps = {
- inset: false
-};
-
-Divider.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
-
-exports.default = Divider;
+exports.default = RadioButton;
/***/ }),
/* 788 */
@@ -63944,40 +67026,32 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+var _react = __webpack_require__(0);
-var _Checkbox = __webpack_require__(789);
+var _react2 = _interopRequireDefault(_react);
-var _Checkbox2 = _interopRequireDefault(_Checkbox);
+var _pure = __webpack_require__(20);
-var _createComponent = __webpack_require__(43);
+var _pure2 = _interopRequireDefault(_pure);
-var _createComponent2 = _interopRequireDefault(_createComponent);
+var _SvgIcon = __webpack_require__(21);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
-function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-exports.default = (0, _createComponent2.default)(_Checkbox2.default, function (_ref) {
- var _ref$input = _ref.input,
- onChange = _ref$input.onChange,
- value = _ref$input.value,
- inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value']),
- meta = _ref.meta,
- _onCheck = _ref.onCheck,
- defaultChecked = _ref.defaultChecked,
- props = _objectWithoutProperties(_ref, ['input', 'meta', 'onCheck', 'defaultChecked']);
+var ToggleRadioButtonUnchecked = function ToggleRadioButtonUnchecked(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z' })
+ );
+};
+ToggleRadioButtonUnchecked = (0, _pure2.default)(ToggleRadioButtonUnchecked);
+ToggleRadioButtonUnchecked.displayName = 'ToggleRadioButtonUnchecked';
+ToggleRadioButtonUnchecked.muiName = 'SvgIcon';
- return _extends({}, inputProps, props, {
- checked: value ? true : false,
- onCheck: function onCheck(event, isInputChecked) {
- onChange(isInputChecked);
- if (_onCheck) {
- _onCheck(isInputChecked);
- }
- }
- });
-});
+exports.default = ToggleRadioButtonUnchecked;
/***/ }),
/* 789 */
@@ -63989,15 +67063,33 @@ exports.default = (0, _createComponent2.default)(_Checkbox2.default, function (_
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.default = undefined;
-var _Checkbox = __webpack_require__(790);
+var _react = __webpack_require__(0);
-var _Checkbox2 = _interopRequireDefault(_Checkbox);
+var _react2 = _interopRequireDefault(_react);
+
+var _pure = __webpack_require__(20);
+
+var _pure2 = _interopRequireDefault(_pure);
+
+var _SvgIcon = __webpack_require__(21);
+
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-exports.default = _Checkbox2.default;
+var ToggleRadioButtonChecked = function ToggleRadioButtonChecked(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z' })
+ );
+};
+ToggleRadioButtonChecked = (0, _pure2.default)(ToggleRadioButtonChecked);
+ToggleRadioButtonChecked.displayName = 'ToggleRadioButtonChecked';
+ToggleRadioButtonChecked.muiName = 'SvgIcon';
+
+exports.default = ToggleRadioButtonChecked;
/***/ }),
/* 790 */
@@ -64046,254 +67138,199 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _EnhancedSwitch = __webpack_require__(202);
-
-var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch);
-
-var _transitions = __webpack_require__(10);
-
-var _transitions2 = _interopRequireDefault(_transitions);
-
-var _checkBoxOutlineBlank = __webpack_require__(791);
+var _RadioButton = __webpack_require__(333);
-var _checkBoxOutlineBlank2 = _interopRequireDefault(_checkBoxOutlineBlank);
+var _RadioButton2 = _interopRequireDefault(_RadioButton);
-var _checkBox = __webpack_require__(792);
+var _warning = __webpack_require__(15);
-var _checkBox2 = _interopRequireDefault(_checkBox);
+var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function getStyles(props, context) {
- var checkbox = context.muiTheme.checkbox;
-
- var checkboxSize = 24;
-
- return {
- icon: {
- height: checkboxSize,
- width: checkboxSize
- },
- check: {
- position: 'absolute',
- opacity: 0,
- transform: 'scale(0)',
- transitionOrigin: '50% 50%',
- transition: _transitions2.default.easeOut('450ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('0ms', 'transform', '450ms'),
- fill: checkbox.checkedColor
- },
- checkWhenSwitched: {
- opacity: 1,
- transform: 'scale(1)',
- transition: _transitions2.default.easeOut('0ms', 'opacity', '0ms') + ', ' + _transitions2.default.easeOut('800ms', 'transform', '0ms')
- },
- checkWhenDisabled: {
- fill: checkbox.disabledColor
- },
- box: {
- position: 'absolute',
- opacity: 1,
- fill: checkbox.boxColor,
- transition: _transitions2.default.easeOut('1000ms', 'opacity', '200ms')
- },
- boxWhenSwitched: {
- opacity: 0,
- transition: _transitions2.default.easeOut('650ms', 'opacity', '150ms'),
- fill: checkbox.checkedColor
- },
- boxWhenDisabled: {
- fill: props.checked ? 'transparent' : checkbox.disabledColor
- },
- label: {
- color: props.disabled ? checkbox.labelDisabledColor : checkbox.labelColor
- }
- };
-}
-
-var Checkbox = function (_Component) {
- (0, _inherits3.default)(Checkbox, _Component);
+var RadioButtonGroup = function (_Component) {
+ (0, _inherits3.default)(RadioButtonGroup, _Component);
- function Checkbox() {
+ function RadioButtonGroup() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, Checkbox);
+ (0, _classCallCheck3.default)(this, RadioButtonGroup);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Checkbox.__proto__ || (0, _getPrototypeOf2.default)(Checkbox)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- switched: false
- }, _this.handleStateChange = function (newSwitched) {
- _this.setState({
- switched: newSwitched
- });
- }, _this.handleCheck = function (event, isInputChecked) {
- if (_this.props.onCheck) {
- _this.props.onCheck(event, isInputChecked);
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = RadioButtonGroup.__proto__ || (0, _getPrototypeOf2.default)(RadioButtonGroup)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ numberCheckedRadioButtons: 0,
+ selected: ''
+ }, _this.handleChange = function (event, newSelection) {
+ _this.updateRadioButtons(newSelection);
+
+ // Successful update
+ if (_this.state.numberCheckedRadioButtons === 0) {
+ if (_this.props.onChange) _this.props.onChange(event, newSelection);
}
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(Checkbox, [{
+ (0, _createClass3.default)(RadioButtonGroup, [{
key: 'componentWillMount',
value: function componentWillMount() {
- var _props = this.props,
- checked = _props.checked,
- defaultChecked = _props.defaultChecked,
- valueLink = _props.valueLink;
+ var _this2 = this;
+ var cnt = 0;
+ var selected = '';
+ var _props = this.props,
+ valueSelected = _props.valueSelected,
+ defaultSelected = _props.defaultSelected;
- if (checked || defaultChecked || valueLink && valueLink.value) {
- this.setState({
- switched: true
- });
+ if (valueSelected !== undefined) {
+ selected = valueSelected;
+ } else if (defaultSelected !== undefined) {
+ selected = defaultSelected;
}
+
+ _react2.default.Children.forEach(this.props.children, function (option) {
+ if (_this2.hasCheckAttribute(option)) cnt++;
+ }, this);
+
+ this.setState({
+ numberCheckedRadioButtons: cnt,
+ selected: selected
+ });
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
- if (this.props.checked !== nextProps.checked) {
+ if (nextProps.hasOwnProperty('valueSelected')) {
this.setState({
- switched: nextProps.checked
+ selected: nextProps.valueSelected
});
}
}
}, {
- key: 'isChecked',
- value: function isChecked() {
- return this.refs.enhancedSwitch.isSwitched();
+ key: 'hasCheckAttribute',
+ value: function hasCheckAttribute(radioButton) {
+ return radioButton.props.hasOwnProperty('checked') && radioButton.props.checked;
}
}, {
- key: 'setChecked',
- value: function setChecked(newCheckedValue) {
- this.refs.enhancedSwitch.setSwitched(newCheckedValue);
+ key: 'updateRadioButtons',
+ value: function updateRadioButtons(newSelection) {
+ if (this.state.numberCheckedRadioButtons === 0) {
+ this.setState({ selected: newSelection });
+ } else {
+ false ? (0, _warning2.default)(false, 'Material-UI: Cannot select a different radio button while another radio button\n has the \'checked\' property set to true.') : void 0;
+ }
+ }
+ }, {
+ key: 'getSelectedValue',
+ value: function getSelectedValue() {
+ return this.state.selected;
+ }
+ }, {
+ key: 'setSelectedValue',
+ value: function setSelectedValue(newSelectionValue) {
+ this.updateRadioButtons(newSelectionValue);
+ }
+ }, {
+ key: 'clearValue',
+ value: function clearValue() {
+ this.setSelectedValue('');
}
}, {
key: 'render',
value: function render() {
- var _props2 = this.props,
- iconStyle = _props2.iconStyle,
- onCheck = _props2.onCheck,
- checkedIcon = _props2.checkedIcon,
- uncheckedIcon = _props2.uncheckedIcon,
- other = (0, _objectWithoutProperties3.default)(_props2, ['iconStyle', 'onCheck', 'checkedIcon', 'uncheckedIcon']);
-
- var styles = getStyles(this.props, this.context);
- var boxStyles = (0, _simpleAssign2.default)(styles.box, this.state.switched && styles.boxWhenSwitched, iconStyle, this.props.disabled && styles.boxWhenDisabled);
- var checkStyles = (0, _simpleAssign2.default)(styles.check, this.state.switched && styles.checkWhenSwitched, iconStyle, this.props.disabled && styles.checkWhenDisabled);
-
- var checkedElement = checkedIcon ? _react2.default.cloneElement(checkedIcon, {
- style: (0, _simpleAssign2.default)(checkStyles, checkedIcon.props.style)
- }) : _react2.default.createElement(_checkBox2.default, {
- style: checkStyles
- });
-
- var unCheckedElement = uncheckedIcon ? _react2.default.cloneElement(uncheckedIcon, {
- style: (0, _simpleAssign2.default)(boxStyles, uncheckedIcon.props.style)
- }) : _react2.default.createElement(_checkBoxOutlineBlank2.default, {
- style: boxStyles
- });
+ var _this3 = this;
- var checkboxElement = _react2.default.createElement(
- 'div',
- null,
- unCheckedElement,
- checkedElement
- );
+ var prepareStyles = this.context.muiTheme.prepareStyles;
- var rippleColor = this.state.switched ? checkStyles.fill : boxStyles.fill;
- var mergedIconStyle = (0, _simpleAssign2.default)(styles.icon, iconStyle);
- var labelStyle = (0, _simpleAssign2.default)(styles.label, this.props.labelStyle);
+ var options = _react2.default.Children.map(this.props.children, function (option) {
+ var _option$props = option.props,
+ name = _option$props.name,
+ value = _option$props.value,
+ label = _option$props.label,
+ onCheck = _option$props.onCheck,
+ other = (0, _objectWithoutProperties3.default)(_option$props, ['name', 'value', 'label', 'onCheck']);
- var enhancedSwitchProps = {
- ref: 'enhancedSwitch',
- inputType: 'checkbox',
- switched: this.state.switched,
- switchElement: checkboxElement,
- rippleColor: rippleColor,
- iconStyle: mergedIconStyle,
- onSwitch: this.handleCheck,
- labelStyle: labelStyle,
- onParentShouldUpdate: this.handleStateChange,
- labelPosition: this.props.labelPosition
- };
- return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, enhancedSwitchProps));
+ return _react2.default.createElement(_RadioButton2.default, (0, _extends3.default)({}, other, {
+ ref: option.props.value,
+ name: _this3.props.name,
+ key: option.props.value,
+ value: option.props.value,
+ label: option.props.label,
+ labelPosition: _this3.props.labelPosition,
+ onCheck: _this3.handleChange,
+ checked: option.props.value === _this3.state.selected
+ }));
+ }, this);
+
+ return _react2.default.createElement(
+ 'div',
+ {
+ style: prepareStyles((0, _simpleAssign2.default)({}, this.props.style)),
+ className: this.props.className
+ },
+ options
+ );
}
}]);
- return Checkbox;
+ return RadioButtonGroup;
}(_react.Component);
-Checkbox.defaultProps = {
- labelPosition: 'right',
- disabled: false
+RadioButtonGroup.defaultProps = {
+ style: {}
};
-Checkbox.contextTypes = {
+RadioButtonGroup.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? Checkbox.propTypes = {
- /**
- * Checkbox is checked if true.
- */
- checked: _react.PropTypes.bool,
- /**
- * The SvgIcon to use for the checked state.
- * This is useful to create icon toggles.
- */
- checkedIcon: _react.PropTypes.element,
- /**
- * The default state of our checkbox component.
- * **Warning:** This cannot be used in conjunction with `checked`.
- * Decide between using a controlled or uncontrolled input element and remove one of these props.
- * More info: https://fb.me/react-controlled-components
- */
- defaultChecked: _react.PropTypes.bool,
+ false ? RadioButtonGroup.propTypes = {
/**
- * Disabled if true.
+ * Should be used to pass `RadioButton` components.
*/
- disabled: _react.PropTypes.bool,
+ children: _react.PropTypes.node,
/**
- * Overrides the inline-styles of the icon element.
+ * The CSS class name of the root element.
*/
- iconStyle: _react.PropTypes.object,
+ className: _react.PropTypes.string,
/**
- * Overrides the inline-styles of the input element.
+ * The `value` property of the radio button that will be
+ * selected by default. This takes precedence over the `checked` property
+ * of the `RadioButton` elements.
*/
- inputStyle: _react.PropTypes.object,
+ defaultSelected: _react.PropTypes.any,
/**
- * Where the label will be placed next to the checkbox.
+ * Where the label will be placed for all child radio buttons.
+ * This takes precedence over the `labelPosition` property of the
+ * `RadioButton` elements.
*/
labelPosition: _react.PropTypes.oneOf(['left', 'right']),
/**
- * Overrides the inline-styles of the Checkbox element label.
+ * The name that will be applied to all child radio buttons.
*/
- labelStyle: _react.PropTypes.object,
+ name: _react.PropTypes.string.isRequired,
/**
- * Callback function that is fired when the checkbox is checked.
+ * Callback function that is fired when a radio button has
+ * been checked.
*
- * @param {object} event `change` event targeting the underlying checkbox `input`.
- * @param {boolean} isInputChecked The `checked` value of the underlying checkbox `input`.
+ * @param {object} event `change` event targeting the selected
+ * radio button.
+ * @param {*} value The `value` of the selected radio button.
*/
- onCheck: _react.PropTypes.func,
+ onChange: _react.PropTypes.func,
/**
* Override the inline-styles of the root element.
*/
style: _react.PropTypes.object,
/**
- * The SvgIcon to use for the unchecked state.
- * This is useful to create icon toggles.
- */
- uncheckedIcon: _react.PropTypes.element,
- /**
- * ValueLink for when using controlled checkbox.
+ * The `value` of the currently selected radio button.
*/
- valueLink: _react.PropTypes.object
+ valueSelected: _react.PropTypes.any
} : void 0;
-exports.default = Checkbox;
+exports.default = RadioButtonGroup;
/***/ }),
/* 791 */
@@ -64302,97 +67339,21 @@ exports.default = Checkbox;
"use strict";
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _react = __webpack_require__(0);
-
-var _react2 = _interopRequireDefault(_react);
-
-var _pure = __webpack_require__(25);
-
-var _pure2 = _interopRequireDefault(_pure);
-
-var _SvgIcon = __webpack_require__(26);
-
-var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var ToggleCheckBoxOutlineBlank = function ToggleCheckBoxOutlineBlank(props) {
- return _react2.default.createElement(
- _SvgIcon2.default,
- props,
- _react2.default.createElement('path', { d: 'M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z' })
- );
-};
-ToggleCheckBoxOutlineBlank = (0, _pure2.default)(ToggleCheckBoxOutlineBlank);
-ToggleCheckBoxOutlineBlank.displayName = 'ToggleCheckBoxOutlineBlank';
-ToggleCheckBoxOutlineBlank.muiName = 'SvgIcon';
-
-exports.default = ToggleCheckBoxOutlineBlank;
-
-/***/ }),
-/* 792 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _react = __webpack_require__(0);
-
-var _react2 = _interopRequireDefault(_react);
-
-var _pure = __webpack_require__(25);
-
-var _pure2 = _interopRequireDefault(_pure);
-
-var _SvgIcon = __webpack_require__(26);
-
-var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var ToggleCheckBox = function ToggleCheckBox(props) {
- return _react2.default.createElement(
- _SvgIcon2.default,
- props,
- _react2.default.createElement('path', { d: 'M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z' })
- );
-};
-ToggleCheckBox = (0, _pure2.default)(ToggleCheckBox);
-ToggleCheckBox.displayName = 'ToggleCheckBox';
-ToggleCheckBox.muiName = 'SvgIcon';
-
-exports.default = ToggleCheckBox;
-
-/***/ }),
-/* 793 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-var _DatePicker = __webpack_require__(794);
+var _SelectField = __webpack_require__(792);
-var _DatePicker2 = _interopRequireDefault(_DatePicker);
+var _SelectField2 = _interopRequireDefault(_SelectField);
-var _createComponent = __webpack_require__(43);
+var _createComponent = __webpack_require__(41);
var _createComponent2 = _interopRequireDefault(_createComponent);
-var _mapError = __webpack_require__(60);
+var _mapError = __webpack_require__(66);
var _mapError2 = _interopRequireDefault(_mapError);
@@ -64400,26 +67361,31 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-exports.default = (0, _createComponent2.default)(_DatePicker2.default, function (_ref) {
+exports.default = (0, _createComponent2.default)(_SelectField2.default, function (_ref) {
var _ref$input = _ref.input,
- onBlur = _ref$input.onBlur,
- inputProps = _objectWithoutProperties(_ref$input, ['onBlur']),
- defaultDate = _ref.defaultDate,
- _onChange = _ref.onChange,
- props = _objectWithoutProperties(_ref, ['input', 'defaultDate', 'onChange']);
+ _onChange = _ref$input.onChange,
+ value = _ref$input.value,
+ _onBlur = _ref$input.onBlur,
+ inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value', 'onBlur']),
+ onChangeFromField = _ref.onChange,
+ props = _objectWithoutProperties(_ref, ['input', 'onChange']);
- return _extends({}, inputProps, (0, _mapError2.default)(props), {
- onChange: function onChange(event, value) {
- inputProps.onChange(value);
- if (_onChange) {
- _onChange(value);
+ return _extends({}, (0, _mapError2.default)(props), inputProps, {
+ value: value,
+ onChange: function onChange(event, index, value) {
+ _onChange(value);
+ if (onChangeFromField) {
+ onChangeFromField(value);
}
+ },
+ onBlur: function onBlur() {
+ return _onBlur(value);
}
});
});
/***/ }),
-/* 794 */
+/* 792 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -64430,16 +67396,16 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = undefined;
-var _DatePicker = __webpack_require__(795);
+var _SelectField = __webpack_require__(793);
-var _DatePicker2 = _interopRequireDefault(_DatePicker);
+var _SelectField2 = _interopRequireDefault(_SelectField);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-exports.default = _DatePicker2.default;
+exports.default = _SelectField2.default;
/***/ }),
-/* 795 */
+/* 793 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -64485,355 +67451,252 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _dateUtils = __webpack_require__(81);
-
-var _DatePickerDialog = __webpack_require__(796);
-
-var _DatePickerDialog2 = _interopRequireDefault(_DatePickerDialog);
-
-var _TextField = __webpack_require__(97);
+var _TextField = __webpack_require__(99);
var _TextField2 = _interopRequireDefault(_TextField);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var DatePicker = function (_Component) {
- (0, _inherits3.default)(DatePicker, _Component);
-
- function DatePicker() {
- var _ref;
+var _DropDownMenu = __webpack_require__(794);
- var _temp, _this, _ret;
+var _DropDownMenu2 = _interopRequireDefault(_DropDownMenu);
- (0, _classCallCheck3.default)(this, DatePicker);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
+function getStyles(props) {
+ return {
+ label: {
+ paddingLeft: 0,
+ top: props.floatingLabelText ? 6 : -4
+ },
+ icon: {
+ right: 0,
+ top: props.floatingLabelText ? 8 : 0
+ },
+ hideDropDownUnderline: {
+ borderTop: 'none'
+ },
+ dropDownMenu: {
+ display: 'block'
}
+ };
+}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DatePicker.__proto__ || (0, _getPrototypeOf2.default)(DatePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- date: undefined
- }, _this.handleAccept = function (date) {
- if (!_this.isControlled()) {
- _this.setState({
- date: date
- });
- }
- if (_this.props.onChange) {
- _this.props.onChange(null, date);
- }
- }, _this.handleFocus = function (event) {
- event.target.blur();
- if (_this.props.onFocus) {
- _this.props.onFocus(event);
- }
- }, _this.handleTouchTap = function (event) {
- if (_this.props.onTouchTap) {
- _this.props.onTouchTap(event);
- }
+var SelectField = function (_Component) {
+ (0, _inherits3.default)(SelectField, _Component);
- if (!_this.props.disabled) {
- setTimeout(function () {
- _this.openDialog();
- }, 0);
- }
- }, _this.formatDate = function (date) {
- if (_this.props.locale) {
- var DateTimeFormat = _this.props.DateTimeFormat || _dateUtils.dateTimeFormat;
- return new DateTimeFormat(_this.props.locale, {
- day: 'numeric',
- month: 'numeric',
- year: 'numeric'
- }).format(date);
- } else {
- return (0, _dateUtils.formatIso)(date);
- }
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ function SelectField() {
+ (0, _classCallCheck3.default)(this, SelectField);
+ return (0, _possibleConstructorReturn3.default)(this, (SelectField.__proto__ || (0, _getPrototypeOf2.default)(SelectField)).apply(this, arguments));
}
- (0, _createClass3.default)(DatePicker, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
- this.setState({
- date: this.isControlled() ? this.getControlledDate() : this.props.defaultDate
- });
- }
- }, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- if (this.isControlled()) {
- var newDate = this.getControlledDate(nextProps);
- if (!(0, _dateUtils.isEqualDate)(this.state.date, newDate)) {
- this.setState({
- date: newDate
- });
- }
- }
- }
- }, {
- key: 'getDate',
- value: function getDate() {
- return this.state.date;
- }
-
- /**
- * Open the date-picker dialog programmatically from a parent.
- */
-
- }, {
- key: 'openDialog',
- value: function openDialog() {
- /**
- * if the date is not selected then set it to new date
- * (get the current system date while doing so)
- * else set it to the currently selected date
- */
- if (this.state.date !== undefined) {
- this.setState({
- dialogDate: this.getDate()
- }, this.refs.dialogWindow.show);
- } else {
- this.setState({
- dialogDate: new Date()
- }, this.refs.dialogWindow.show);
- }
- }
-
- /**
- * Alias for `openDialog()` for an api consistent with TextField.
- */
-
- }, {
- key: 'focus',
- value: function focus() {
- this.openDialog();
- }
- }, {
- key: 'isControlled',
- value: function isControlled() {
- return this.props.hasOwnProperty('value');
- }
- }, {
- key: 'getControlledDate',
- value: function getControlledDate() {
- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
-
- if (props.value instanceof Date) {
- return props.value;
- }
- }
- }, {
+ (0, _createClass3.default)(SelectField, [{
key: 'render',
value: function render() {
var _props = this.props,
- DateTimeFormat = _props.DateTimeFormat,
- autoOk = _props.autoOk,
- cancelLabel = _props.cancelLabel,
- className = _props.className,
- container = _props.container,
- defaultDate = _props.defaultDate,
- dialogContainerStyle = _props.dialogContainerStyle,
- disableYearSelection = _props.disableYearSelection,
- firstDayOfWeek = _props.firstDayOfWeek,
- formatDateProp = _props.formatDate,
- locale = _props.locale,
- maxDate = _props.maxDate,
- minDate = _props.minDate,
- mode = _props.mode,
- okLabel = _props.okLabel,
- onDismiss = _props.onDismiss,
- onFocus = _props.onFocus,
- onShow = _props.onShow,
- onTouchTap = _props.onTouchTap,
- shouldDisableDate = _props.shouldDisableDate,
+ autoWidth = _props.autoWidth,
+ children = _props.children,
style = _props.style,
- textFieldStyle = _props.textFieldStyle,
- other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'autoOk', 'cancelLabel', 'className', 'container', 'defaultDate', 'dialogContainerStyle', 'disableYearSelection', 'firstDayOfWeek', 'formatDate', 'locale', 'maxDate', 'minDate', 'mode', 'okLabel', 'onDismiss', 'onFocus', 'onShow', 'onTouchTap', 'shouldDisableDate', 'style', 'textFieldStyle']);
- var prepareStyles = this.context.muiTheme.prepareStyles;
+ labelStyle = _props.labelStyle,
+ iconStyle = _props.iconStyle,
+ id = _props.id,
+ underlineDisabledStyle = _props.underlineDisabledStyle,
+ underlineFocusStyle = _props.underlineFocusStyle,
+ menuItemStyle = _props.menuItemStyle,
+ selectedMenuItemStyle = _props.selectedMenuItemStyle,
+ underlineStyle = _props.underlineStyle,
+ errorStyle = _props.errorStyle,
+ disabled = _props.disabled,
+ floatingLabelFixed = _props.floatingLabelFixed,
+ floatingLabelText = _props.floatingLabelText,
+ floatingLabelStyle = _props.floatingLabelStyle,
+ hintStyle = _props.hintStyle,
+ hintText = _props.hintText,
+ fullWidth = _props.fullWidth,
+ errorText = _props.errorText,
+ listStyle = _props.listStyle,
+ maxHeight = _props.maxHeight,
+ menuStyle = _props.menuStyle,
+ onFocus = _props.onFocus,
+ onBlur = _props.onBlur,
+ onChange = _props.onChange,
+ value = _props.value,
+ other = (0, _objectWithoutProperties3.default)(_props, ['autoWidth', 'children', 'style', 'labelStyle', 'iconStyle', 'id', 'underlineDisabledStyle', 'underlineFocusStyle', 'menuItemStyle', 'selectedMenuItemStyle', 'underlineStyle', 'errorStyle', 'disabled', 'floatingLabelFixed', 'floatingLabelText', 'floatingLabelStyle', 'hintStyle', 'hintText', 'fullWidth', 'errorText', 'listStyle', 'maxHeight', 'menuStyle', 'onFocus', 'onBlur', 'onChange', 'value']);
- var formatDate = formatDateProp || this.formatDate;
+
+ var styles = getStyles(this.props, this.context);
return _react2.default.createElement(
- 'div',
- { className: className, style: prepareStyles((0, _simpleAssign2.default)({}, style)) },
- _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, {
- onFocus: this.handleFocus,
- onTouchTap: this.handleTouchTap,
- ref: 'input',
- style: textFieldStyle,
- value: this.state.date ? formatDate(this.state.date) : ''
- })),
- _react2.default.createElement(_DatePickerDialog2.default, {
- DateTimeFormat: DateTimeFormat,
- autoOk: autoOk,
- cancelLabel: cancelLabel,
- container: container,
- containerStyle: dialogContainerStyle,
- disableYearSelection: disableYearSelection,
- firstDayOfWeek: firstDayOfWeek,
- initialDate: this.state.dialogDate,
- locale: locale,
- maxDate: maxDate,
- minDate: minDate,
- mode: mode,
- okLabel: okLabel,
- onAccept: this.handleAccept,
- onShow: onShow,
- onDismiss: onDismiss,
- ref: 'dialogWindow',
- shouldDisableDate: shouldDisableDate
- })
+ _TextField2.default,
+ (0, _extends3.default)({}, other, {
+ style: style,
+ disabled: disabled,
+ floatingLabelFixed: floatingLabelFixed,
+ floatingLabelText: floatingLabelText,
+ floatingLabelStyle: floatingLabelStyle,
+ hintStyle: hintStyle,
+ hintText: !hintText && !floatingLabelText ? ' ' : hintText,
+ fullWidth: fullWidth,
+ errorText: errorText,
+ underlineStyle: underlineStyle,
+ errorStyle: errorStyle,
+ onFocus: onFocus,
+ onBlur: onBlur,
+ id: id,
+ underlineDisabledStyle: underlineDisabledStyle,
+ underlineFocusStyle: underlineFocusStyle
+ }),
+ _react2.default.createElement(
+ _DropDownMenu2.default,
+ {
+ disabled: disabled,
+ style: (0, _simpleAssign2.default)(styles.dropDownMenu, menuStyle),
+ labelStyle: (0, _simpleAssign2.default)(styles.label, labelStyle),
+ iconStyle: (0, _simpleAssign2.default)(styles.icon, iconStyle),
+ menuItemStyle: menuItemStyle,
+ selectedMenuItemStyle: selectedMenuItemStyle,
+ underlineStyle: styles.hideDropDownUnderline,
+ listStyle: listStyle,
+ autoWidth: autoWidth,
+ value: value,
+ onChange: onChange,
+ maxHeight: maxHeight
+ },
+ children
+ )
);
}
}]);
- return DatePicker;
+ return SelectField;
}(_react.Component);
-DatePicker.defaultProps = {
- autoOk: false,
- container: 'dialog',
+SelectField.defaultProps = {
+ autoWidth: false,
disabled: false,
- disableYearSelection: false,
- firstDayOfWeek: 1,
- style: {}
+ fullWidth: false
};
-DatePicker.contextTypes = {
+SelectField.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? DatePicker.propTypes = {
+ false ? SelectField.propTypes = {
/**
- * Constructor for date formatting for the specified `locale`.
- * The constructor must follow this specification: ECMAScript Internationalization API 1.0 (ECMA-402).
- * `Intl.DateTimeFormat` is supported by most modern browsers, see http://caniuse.com/#search=intl,
- * otherwise https://github.com/andyearnshaw/Intl.js is a good polyfill.
- *
- * By default, a built-in `DateTimeFormat` is used which supports the 'en-US' `locale`.
+ * If true, the width will automatically be set according to the
+ * items inside the menu.
+ * To control the width in CSS instead, leave this prop set to `false`.
*/
- DateTimeFormat: _react.PropTypes.func,
+ autoWidth: _react.PropTypes.bool,
/**
- * If true, automatically accept and close the picker on select a date.
+ * The `MenuItem` elements to populate the select field with.
+ * If the menu items have a `label` prop, that value will
+ * represent the selected menu item in the rendered select field.
*/
- autoOk: _react.PropTypes.bool,
+ children: _react.PropTypes.node,
/**
- * Override the default text of the 'Cancel' button.
+ * If true, the select field will be disabled.
*/
- cancelLabel: _react.PropTypes.node,
+ disabled: _react.PropTypes.bool,
/**
- * The css class name of the root element.
+ * Override the inline-styles of the error element.
*/
- className: _react.PropTypes.string,
+ errorStyle: _react.PropTypes.object,
/**
- * Used to control how the Date Picker will be displayed when the input field is focused.
- * `dialog` (default) displays the DatePicker as a dialog with a modal.
- * `inline` displays the DatePicker below the input field (similar to auto complete).
+ * The error content to display.
*/
- container: _react.PropTypes.oneOf(['dialog', 'inline']),
+ errorText: _react.PropTypes.node,
/**
- * This is the initial date value of the component.
- * If either `value` or `valueLink` is provided they will override this
- * prop with `value` taking precedence.
+ * If true, the floating label will float even when no value is selected.
*/
- defaultDate: _react.PropTypes.object,
+ floatingLabelFixed: _react.PropTypes.bool,
/**
- * Override the inline-styles of DatePickerDialog's Container element.
+ * Override the inline-styles of the floating label.
*/
- dialogContainerStyle: _react.PropTypes.object,
+ floatingLabelStyle: _react.PropTypes.object,
/**
- * Disables the year selection in the date picker.
+ * The content of the floating label.
*/
- disableYearSelection: _react.PropTypes.bool,
+ floatingLabelText: _react.PropTypes.node,
/**
- * Disables the DatePicker.
+ * If true, the select field will take up the full width of its container.
*/
- disabled: _react.PropTypes.bool,
+ fullWidth: _react.PropTypes.bool,
/**
- * Used to change the first day of week. It varies from
- * Saturday to Monday between different locales.
- * The allowed range is 0 (Sunday) to 6 (Saturday).
- * The default is `1`, Monday, as per ISO 8601.
+ * Override the inline-styles of the hint element.
*/
- firstDayOfWeek: _react.PropTypes.number,
+ hintStyle: _react.PropTypes.object,
/**
- * This function is called to format the date displayed in the input field, and should return a string.
- * By default if no `locale` and `DateTimeFormat` is provided date objects are formatted to ISO 8601 YYYY-MM-DD.
- *
- * @param {object} date Date object to be formatted.
- * @returns {any} The formatted date.
+ * The hint content to display.
*/
- formatDate: _react.PropTypes.func,
+ hintText: _react.PropTypes.node,
/**
- * Locale used for formatting the `DatePicker` date strings. Other than for 'en-US', you
- * must provide a `DateTimeFormat` that supports the chosen `locale`.
+ * Override the inline-styles of the icon element.
*/
- locale: _react.PropTypes.string,
+ iconStyle: _react.PropTypes.object,
/**
- * The ending of a range of valid dates. The range includes the endDate.
- * The default value is current date + 100 years.
+ * The id prop for the text field.
*/
- maxDate: _react.PropTypes.object,
+ id: _react.PropTypes.string,
/**
- * The beginning of a range of valid dates. The range includes the startDate.
- * The default value is current date - 100 years.
+ * Override the label style when the select field is inactive.
*/
- minDate: _react.PropTypes.object,
+ labelStyle: _react.PropTypes.object,
/**
- * Tells the component to display the picker in portrait or landscape mode.
+ * Override the inline-styles of the underlying `List` element.
*/
- mode: _react.PropTypes.oneOf(['portrait', 'landscape']),
+ listStyle: _react.PropTypes.object,
/**
- * Override the default text of the 'OK' button.
+ * Override the default max-height of the underlying `DropDownMenu` element.
*/
- okLabel: _react.PropTypes.node,
+ maxHeight: _react.PropTypes.number,
/**
- * Callback function that is fired when the date value changes.
- *
- * @param {null} null Since there is no particular event associated with the change,
- * the first argument will always be null.
- * @param {object} date The new date.
+ * Override the inline-styles of menu items.
*/
- onChange: _react.PropTypes.func,
+ menuItemStyle: _react.PropTypes.object,
/**
- * Callback function that is fired when the Date Picker's dialog is dismissed.
+ * Override the inline-styles of the underlying `DropDownMenu` element.
*/
- onDismiss: _react.PropTypes.func,
+ menuStyle: _react.PropTypes.object,
+ /** @ignore */
+ onBlur: _react.PropTypes.func,
/**
- * Callback function that is fired when the Date Picker's `TextField` gains focus.
+ * Callback function fired when a menu item is selected.
+ *
+ * @param {object} event TouchTap event targeting the menu item
+ * that was selected.
+ * @param {number} key The index of the selected menu item.
+ * @param {any} payload The `value` prop of the selected menu item.
*/
+ onChange: _react.PropTypes.func,
+ /** @ignore */
onFocus: _react.PropTypes.func,
/**
- * Callback function that is fired when the Date Picker's dialog is shown.
+ * Override the inline-styles of selected menu items.
*/
- onShow: _react.PropTypes.func,
+ selectedMenuItemStyle: _react.PropTypes.object,
/**
- * Callback function that is fired when a touch tap event occurs on the Date Picker's `TextField`.
- *
- * @param {object} event TouchTap event targeting the `TextField`.
+ * Override the inline-styles of the root element.
*/
- onTouchTap: _react.PropTypes.func,
+ style: _react.PropTypes.object,
/**
- * Callback function used to determine if a day's entry should be disabled on the calendar.
- *
- * @param {object} day Date object of a day.
- * @returns {boolean} Indicates whether the day should be disabled.
+ * Override the inline-styles of the underline element when the select
+ * field is disabled.
*/
- shouldDisableDate: _react.PropTypes.func,
+ underlineDisabledStyle: _react.PropTypes.object,
/**
- * Override the inline-styles of the root element.
+ * Override the inline-styles of the underline element when the select field
+ * is focused.
*/
- style: _react.PropTypes.object,
+ underlineFocusStyle: _react.PropTypes.object,
/**
- * Override the inline-styles of DatePicker's TextField element.
+ * Override the inline-styles of the underline element.
*/
- textFieldStyle: _react.PropTypes.object,
+ underlineStyle: _react.PropTypes.object,
/**
- * Sets the date for the Date Picker programmatically.
+ * The value that is currently selected.
*/
- value: _react.PropTypes.object
+ value: _react.PropTypes.any
} : void 0;
-exports.default = DatePicker;
+exports.default = SelectField;
/***/ }),
-/* 796 */
+/* 794 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -64842,250 +67705,24 @@ exports.default = DatePicker;
Object.defineProperty(exports, "__esModule", {
value: true
});
+exports.default = exports.MenuItem = exports.DropDownMenu = undefined;
-var _extends2 = __webpack_require__(7);
-
-var _extends3 = _interopRequireDefault(_extends2);
-
-var _objectWithoutProperties2 = __webpack_require__(8);
-
-var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-
-var _getPrototypeOf = __webpack_require__(3);
-
-var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-
-var _classCallCheck2 = __webpack_require__(1);
-
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
-var _createClass2 = __webpack_require__(2);
-
-var _createClass3 = _interopRequireDefault(_createClass2);
-
-var _possibleConstructorReturn2 = __webpack_require__(4);
-
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-
-var _inherits2 = __webpack_require__(5);
-
-var _inherits3 = _interopRequireDefault(_inherits2);
-
-var _simpleAssign = __webpack_require__(6);
-
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-
-var _react = __webpack_require__(0);
-
-var _react2 = _interopRequireDefault(_react);
-
-var _reactEventListener = __webpack_require__(42);
-
-var _reactEventListener2 = _interopRequireDefault(_reactEventListener);
-
-var _keycode = __webpack_require__(30);
-
-var _keycode2 = _interopRequireDefault(_keycode);
-
-var _Calendar = __webpack_require__(797);
-
-var _Calendar2 = _interopRequireDefault(_Calendar);
-
-var _Dialog = __webpack_require__(323);
-
-var _Dialog2 = _interopRequireDefault(_Dialog);
-
-var _Popover = __webpack_require__(130);
-
-var _Popover2 = _interopRequireDefault(_Popover);
+var _DropDownMenu2 = __webpack_require__(795);
-var _PopoverAnimationVertical = __webpack_require__(324);
+var _DropDownMenu3 = _interopRequireDefault(_DropDownMenu2);
-var _PopoverAnimationVertical2 = _interopRequireDefault(_PopoverAnimationVertical);
+var _MenuItem2 = __webpack_require__(326);
-var _dateUtils = __webpack_require__(81);
+var _MenuItem3 = _interopRequireDefault(_MenuItem2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var DatePickerDialog = function (_Component) {
- (0, _inherits3.default)(DatePickerDialog, _Component);
-
- function DatePickerDialog() {
- var _ref;
-
- var _temp, _this, _ret;
-
- (0, _classCallCheck3.default)(this, DatePickerDialog);
-
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DatePickerDialog.__proto__ || (0, _getPrototypeOf2.default)(DatePickerDialog)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- open: false
- }, _this.show = function () {
- if (_this.props.onShow && !_this.state.open) {
- _this.props.onShow();
- }
-
- _this.setState({
- open: true
- });
- }, _this.dismiss = function () {
- if (_this.props.onDismiss && _this.state.open) {
- _this.props.onDismiss();
- }
-
- _this.setState({
- open: false
- });
- }, _this.handleTouchTapDay = function () {
- if (_this.props.autoOk) {
- setTimeout(_this.handleTouchTapOk, 300);
- }
- }, _this.handleTouchTapCancel = function () {
- _this.dismiss();
- }, _this.handleRequestClose = function () {
- _this.dismiss();
- }, _this.handleTouchTapOk = function () {
- if (_this.props.onAccept && !_this.refs.calendar.isSelectedDateDisabled()) {
- _this.props.onAccept(_this.refs.calendar.getSelectedDate());
- }
-
- _this.setState({
- open: false
- });
- }, _this.handleWindowKeyUp = function (event) {
- switch ((0, _keycode2.default)(event)) {
- case 'enter':
- _this.handleTouchTapOk();
- break;
- }
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
- }
-
- (0, _createClass3.default)(DatePickerDialog, [{
- key: 'render',
- value: function render() {
- var _props = this.props,
- DateTimeFormat = _props.DateTimeFormat,
- autoOk = _props.autoOk,
- cancelLabel = _props.cancelLabel,
- container = _props.container,
- containerStyle = _props.containerStyle,
- disableYearSelection = _props.disableYearSelection,
- initialDate = _props.initialDate,
- firstDayOfWeek = _props.firstDayOfWeek,
- locale = _props.locale,
- maxDate = _props.maxDate,
- minDate = _props.minDate,
- mode = _props.mode,
- okLabel = _props.okLabel,
- onAccept = _props.onAccept,
- onDismiss = _props.onDismiss,
- onShow = _props.onShow,
- shouldDisableDate = _props.shouldDisableDate,
- style = _props.style,
- animation = _props.animation,
- other = (0, _objectWithoutProperties3.default)(_props, ['DateTimeFormat', 'autoOk', 'cancelLabel', 'container', 'containerStyle', 'disableYearSelection', 'initialDate', 'firstDayOfWeek', 'locale', 'maxDate', 'minDate', 'mode', 'okLabel', 'onAccept', 'onDismiss', 'onShow', 'shouldDisableDate', 'style', 'animation']);
- var open = this.state.open;
-
-
- var styles = {
- dialogContent: {
- width: mode === 'landscape' ? 479 : 310
- },
- dialogBodyContent: {
- padding: 0,
- minHeight: mode === 'landscape' ? 330 : 434,
- minWidth: mode === 'landscape' ? 479 : 310
- }
- };
-
- var Container = container === 'inline' ? _Popover2.default : _Dialog2.default;
-
- return _react2.default.createElement(
- 'div',
- (0, _extends3.default)({}, other, { ref: 'root' }),
- _react2.default.createElement(
- Container,
- {
- anchorEl: this.refs.root // For Popover
- , animation: animation || _PopoverAnimationVertical2.default // For Popover
- , bodyStyle: styles.dialogBodyContent,
- contentStyle: styles.dialogContent,
- ref: 'dialog',
- repositionOnUpdate: true,
- open: open,
- onRequestClose: this.handleRequestClose,
- style: (0, _simpleAssign2.default)(styles.dialogBodyContent, containerStyle)
- },
- _react2.default.createElement(_reactEventListener2.default, {
- target: 'window',
- onKeyUp: this.handleWindowKeyUp
- }),
- _react2.default.createElement(_Calendar2.default, {
- autoOk: autoOk,
- DateTimeFormat: DateTimeFormat,
- cancelLabel: cancelLabel,
- disableYearSelection: disableYearSelection,
- firstDayOfWeek: firstDayOfWeek,
- initialDate: initialDate,
- locale: locale,
- onTouchTapDay: this.handleTouchTapDay,
- maxDate: maxDate,
- minDate: minDate,
- mode: mode,
- open: open,
- ref: 'calendar',
- onTouchTapCancel: this.handleTouchTapCancel,
- onTouchTapOk: this.handleTouchTapOk,
- okLabel: okLabel,
- shouldDisableDate: shouldDisableDate
- })
- )
- );
- }
- }]);
- return DatePickerDialog;
-}(_react.Component);
-
-DatePickerDialog.defaultProps = {
- DateTimeFormat: _dateUtils.dateTimeFormat,
- cancelLabel: 'Cancel',
- container: 'dialog',
- locale: 'en-US',
- okLabel: 'OK'
-};
-DatePickerDialog.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? DatePickerDialog.propTypes = {
- DateTimeFormat: _react.PropTypes.func,
- animation: _react.PropTypes.func,
- autoOk: _react.PropTypes.bool,
- cancelLabel: _react.PropTypes.node,
- container: _react.PropTypes.oneOf(['dialog', 'inline']),
- containerStyle: _react.PropTypes.object,
- disableYearSelection: _react.PropTypes.bool,
- firstDayOfWeek: _react.PropTypes.number,
- initialDate: _react.PropTypes.object,
- locale: _react.PropTypes.string,
- maxDate: _react.PropTypes.object,
- minDate: _react.PropTypes.object,
- mode: _react.PropTypes.oneOf(['portrait', 'landscape']),
- okLabel: _react.PropTypes.node,
- onAccept: _react.PropTypes.func,
- onDismiss: _react.PropTypes.func,
- onShow: _react.PropTypes.func,
- open: _react.PropTypes.bool,
- shouldDisableDate: _react.PropTypes.func,
- style: _react.PropTypes.object
-} : void 0;
-exports.default = DatePickerDialog;
+exports.DropDownMenu = _DropDownMenu3.default;
+exports.MenuItem = _MenuItem3.default;
+exports.default = _DropDownMenu3.default;
/***/ }),
-/* 797 */
+/* 795 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -65095,6 +67732,14 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
+var _extends2 = __webpack_require__(7);
+
+var _extends3 = _interopRequireDefault(_extends2);
+
+var _objectWithoutProperties2 = __webpack_require__(8);
+
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
var _getPrototypeOf = __webpack_require__(3);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -65115,431 +67760,469 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
-var _toConsumableArray2 = __webpack_require__(189);
+var _simpleAssign = __webpack_require__(6);
-var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactEventListener = __webpack_require__(42);
+var _reactDom = __webpack_require__(16);
-var _reactEventListener2 = _interopRequireDefault(_reactEventListener);
-
-var _keycode = __webpack_require__(30);
-
-var _keycode2 = _interopRequireDefault(_keycode);
+var _reactDom2 = _interopRequireDefault(_reactDom);
var _transitions = __webpack_require__(10);
var _transitions2 = _interopRequireDefault(_transitions);
-var _CalendarActionButtons = __webpack_require__(798);
+var _arrowDropDown = __webpack_require__(796);
-var _CalendarActionButtons2 = _interopRequireDefault(_CalendarActionButtons);
+var _arrowDropDown2 = _interopRequireDefault(_arrowDropDown);
-var _CalendarMonth = __webpack_require__(799);
+var _Menu = __webpack_require__(205);
-var _CalendarMonth2 = _interopRequireDefault(_CalendarMonth);
+var _Menu2 = _interopRequireDefault(_Menu);
-var _CalendarYear = __webpack_require__(801);
+var _ClearFix = __webpack_require__(797);
-var _CalendarYear2 = _interopRequireDefault(_CalendarYear);
+var _ClearFix2 = _interopRequireDefault(_ClearFix);
-var _CalendarToolbar = __webpack_require__(803);
+var _Popover = __webpack_require__(133);
-var _CalendarToolbar2 = _interopRequireDefault(_CalendarToolbar);
+var _Popover2 = _interopRequireDefault(_Popover);
-var _DateDisplay = __webpack_require__(807);
+var _PopoverAnimationVertical = __webpack_require__(332);
-var _DateDisplay2 = _interopRequireDefault(_DateDisplay);
+var _PopoverAnimationVertical2 = _interopRequireDefault(_PopoverAnimationVertical);
-var _SlideIn = __webpack_require__(203);
+var _keycode = __webpack_require__(26);
-var _SlideIn2 = _interopRequireDefault(_SlideIn);
+var _keycode2 = _interopRequireDefault(_keycode);
+
+var _events = __webpack_require__(203);
+
+var _events2 = _interopRequireDefault(_events);
-var _dateUtils = __webpack_require__(81);
+var _IconButton = __webpack_require__(64);
+
+var _IconButton2 = _interopRequireDefault(_IconButton);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var daysArray = [].concat((0, _toConsumableArray3.default)(Array(7)));
+var anchorOrigin = {
+ vertical: 'top',
+ horizontal: 'left'
+};
-var Calendar = function (_Component) {
- (0, _inherits3.default)(Calendar, _Component);
+function getStyles(props, context) {
+ var disabled = props.disabled;
- function Calendar() {
+ var spacing = context.muiTheme.baseTheme.spacing;
+ var palette = context.muiTheme.baseTheme.palette;
+ var accentColor = context.muiTheme.dropDownMenu.accentColor;
+ return {
+ control: {
+ cursor: disabled ? 'not-allowed' : 'pointer',
+ height: '100%',
+ position: 'relative',
+ width: '100%'
+ },
+ icon: {
+ fill: accentColor,
+ position: 'absolute',
+ right: spacing.desktopGutterLess,
+ top: (spacing.iconSize - 24) / 2 + spacing.desktopGutterMini / 2
+ },
+ iconChildren: {
+ fill: 'inherit'
+ },
+ label: {
+ color: disabled ? palette.disabledColor : palette.textColor,
+ lineHeight: spacing.desktopToolbarHeight + 'px',
+ overflow: 'hidden',
+ opacity: 1,
+ position: 'relative',
+ paddingLeft: spacing.desktopGutter,
+ paddingRight: spacing.iconSize * 2 + spacing.desktopGutterMini,
+ textOverflow: 'ellipsis',
+ top: 0,
+ whiteSpace: 'nowrap'
+ },
+ labelWhenOpen: {
+ opacity: 0,
+ top: spacing.desktopToolbarHeight / 8
+ },
+ root: {
+ display: 'inline-block',
+ fontSize: spacing.desktopDropDownMenuFontSize,
+ height: spacing.desktopSubheaderHeight,
+ fontFamily: context.muiTheme.baseTheme.fontFamily,
+ outline: 'none',
+ position: 'relative',
+ transition: _transitions2.default.easeOut()
+ },
+ rootWhenOpen: {
+ opacity: 1
+ },
+ underline: {
+ borderTop: 'solid 1px ' + accentColor,
+ bottom: 1,
+ left: 0,
+ margin: '-1px ' + spacing.desktopGutter + 'px',
+ right: 0,
+ position: 'absolute'
+ }
+ };
+}
+
+var DropDownMenu = function (_Component) {
+ (0, _inherits3.default)(DropDownMenu, _Component);
+
+ function DropDownMenu() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, Calendar);
-
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
+ (0, _classCallCheck3.default)(this, DropDownMenu);
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Calendar.__proto__ || (0, _getPrototypeOf2.default)(Calendar)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- displayDate: undefined,
- displayMonthDay: true,
- selectedDate: undefined,
- transitionDirection: 'left',
- transitionEnter: true
- }, _this.handleTouchTapDay = function (event, date) {
- _this.setSelectedDate(date);
- if (_this.props.onTouchTapDay) _this.props.onTouchTapDay(event, date);
- }, _this.handleMonthChange = function (months) {
- _this.setState({
- transitionDirection: months >= 0 ? 'left' : 'right',
- displayDate: (0, _dateUtils.addMonths)(_this.state.displayDate, months)
- });
- }, _this.handleTouchTapYear = function (event, year) {
- var date = (0, _dateUtils.cloneDate)(_this.state.selectedDate);
- date.setFullYear(year);
- _this.setSelectedDate(date, event);
- _this.handleTouchTapDateDisplayMonthDay();
- }, _this.handleTouchTapDateDisplayMonthDay = function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = DropDownMenu.__proto__ || (0, _getPrototypeOf2.default)(DropDownMenu)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ open: false
+ }, _this.rootNode = undefined, _this.arrowNode = undefined, _this.handleTouchTapControl = function (event) {
+ event.preventDefault();
+ if (!_this.props.disabled) {
+ _this.setState({
+ open: !_this.state.open,
+ anchorEl: _this.rootNode
+ });
+ }
+ }, _this.handleRequestCloseMenu = function () {
+ _this.close(false);
+ }, _this.handleEscKeyDownMenu = function () {
+ _this.close(true);
+ }, _this.handleKeyDown = function (event) {
+ switch ((0, _keycode2.default)(event)) {
+ case 'up':
+ case 'down':
+ case 'space':
+ case 'enter':
+ event.preventDefault();
+ _this.setState({
+ open: true,
+ anchorEl: _this.rootNode
+ });
+ break;
+ }
+ }, _this.handleItemTouchTap = function (event, child, index) {
+ event.persist();
_this.setState({
- displayMonthDay: true
+ open: false
+ }, function () {
+ if (_this.props.onChange) {
+ _this.props.onChange(event, index, child.props.value);
+ }
+
+ _this.close(_events2.default.isKeyboard(event));
});
- }, _this.handleTouchTapDateDisplayYear = function () {
+ }, _this.close = function (isKeyboard) {
_this.setState({
- displayMonthDay: false
- });
- }, _this.handleWindowKeyDown = function (event) {
- if (_this.props.open) {
- switch ((0, _keycode2.default)(event)) {
- case 'up':
- if (event.altKey && event.shiftKey) {
- _this.addSelectedYears(-1);
- } else if (event.shiftKey) {
- _this.addSelectedMonths(-1);
- } else {
- _this.addSelectedDays(-7);
- }
- break;
-
- case 'down':
- if (event.altKey && event.shiftKey) {
- _this.addSelectedYears(1);
- } else if (event.shiftKey) {
- _this.addSelectedMonths(1);
- } else {
- _this.addSelectedDays(7);
- }
- break;
-
- case 'right':
- if (event.altKey && event.shiftKey) {
- _this.addSelectedYears(1);
- } else if (event.shiftKey) {
- _this.addSelectedMonths(1);
- } else {
- _this.addSelectedDays(1);
- }
- break;
+ open: false
+ }, function () {
+ if (_this.props.onClose) {
+ _this.props.onClose();
+ }
- case 'left':
- if (event.altKey && event.shiftKey) {
- _this.addSelectedYears(-1);
- } else if (event.shiftKey) {
- _this.addSelectedMonths(-1);
- } else {
- _this.addSelectedDays(-1);
- }
- break;
+ if (isKeyboard) {
+ var dropArrow = _this.arrowNode;
+ var dropNode = _reactDom2.default.findDOMNode(dropArrow);
+ dropNode.focus();
+ dropArrow.setKeyboardFocus(true);
}
- }
+ });
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(Calendar, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
- this.setState({
- displayDate: (0, _dateUtils.getFirstDayOfMonth)(this.props.initialDate),
- selectedDate: this.props.initialDate
- });
+ // The nested styles for drop-down-menu are modified by toolbar and possibly
+ // other user components, so it will give full access to its js styles rather
+ // than just the parent.
+
+
+ (0, _createClass3.default)(DropDownMenu, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var _this2 = this;
+
+ if (this.props.autoWidth) {
+ this.setWidth();
+ }
+ if (this.props.openImmediately) {
+ // TODO: Temporary fix to make openImmediately work with popover.
+ /* eslint-disable react/no-did-mount-set-state */
+ setTimeout(function () {
+ return _this2.setState({
+ open: true,
+ anchorEl: _this2.rootNode
+ });
+ }, 0);
+ /* eslint-enable react/no-did-mount-set-state */
+ }
}
}, {
key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- if (nextProps.initialDate !== this.props.initialDate) {
- var date = nextProps.initialDate || new Date();
- this.setState({
- displayDate: (0, _dateUtils.getFirstDayOfMonth)(date),
- selectedDate: date
- });
+ value: function componentWillReceiveProps() {
+ if (this.props.autoWidth) {
+ this.setWidth();
}
}
}, {
- key: 'getSelectedDate',
- value: function getSelectedDate() {
- return this.state.selectedDate;
- }
- }, {
- key: 'isSelectedDateDisabled',
- value: function isSelectedDateDisabled() {
- if (!this.state.displayMonthDay) {
- return false;
- }
+ key: 'getInputNode',
- return this.refs.calendar.isSelectedDateDisabled();
- }
- }, {
- key: 'addSelectedDays',
- value: function addSelectedDays(days) {
- this.setSelectedDate((0, _dateUtils.addDays)(this.state.selectedDate, days));
- }
- }, {
- key: 'addSelectedMonths',
- value: function addSelectedMonths(months) {
- this.setSelectedDate((0, _dateUtils.addMonths)(this.state.selectedDate, months));
- }
- }, {
- key: 'addSelectedYears',
- value: function addSelectedYears(years) {
- this.setSelectedDate((0, _dateUtils.addYears)(this.state.selectedDate, years));
- }
- }, {
- key: 'setDisplayDate',
- value: function setDisplayDate(date, newSelectedDate) {
- var newDisplayDate = (0, _dateUtils.getFirstDayOfMonth)(date);
- var direction = newDisplayDate > this.state.displayDate ? 'left' : 'right';
- if (newDisplayDate !== this.state.displayDate) {
- this.setState({
- displayDate: newDisplayDate,
- transitionDirection: direction,
- selectedDate: newSelectedDate || this.state.selectedDate
- });
- }
- }
- }, {
- key: 'setSelectedDate',
- value: function setSelectedDate(date) {
- var adjustedDate = date;
- if ((0, _dateUtils.isBeforeDate)(date, this.props.minDate)) {
- adjustedDate = this.props.minDate;
- } else if ((0, _dateUtils.isAfterDate)(date, this.props.maxDate)) {
- adjustedDate = this.props.maxDate;
- }
+ /**
+ * This method is deprecated but still here because the TextField
+ * need it in order to work. TODO: That will be addressed later.
+ */
+ value: function getInputNode() {
+ var _this3 = this;
- var newDisplayDate = (0, _dateUtils.getFirstDayOfMonth)(adjustedDate);
- if (newDisplayDate !== this.state.displayDate) {
- this.setDisplayDate(newDisplayDate, adjustedDate);
- } else {
- this.setState({
- selectedDate: adjustedDate
- });
- }
- }
- }, {
- key: 'getToolbarInteractions',
- value: function getToolbarInteractions() {
- return {
- prevMonth: (0, _dateUtils.monthDiff)(this.state.displayDate, this.props.minDate) > 0,
- nextMonth: (0, _dateUtils.monthDiff)(this.state.displayDate, this.props.maxDate) < 0
+ var rootNode = this.rootNode;
+
+ rootNode.focus = function () {
+ if (!_this3.props.disabled) {
+ _this3.setState({
+ open: !_this3.state.open,
+ anchorEl: _this3.rootNode
+ });
+ }
};
+
+ return rootNode;
}
}, {
- key: 'yearSelector',
- value: function yearSelector() {
- if (!this.props.disableYearSelection) {
- return _react2.default.createElement(_CalendarYear2.default, {
- key: 'years',
- DateTimeFormat: this.props.DateTimeFormat,
- locale: this.props.locale,
- onTouchTapYear: this.handleTouchTapYear,
- selectedDate: this.state.selectedDate,
- minDate: this.props.minDate,
- maxDate: this.props.maxDate
- });
+ key: 'setWidth',
+ value: function setWidth() {
+ var el = this.rootNode;
+ if (!this.props.style || !this.props.style.hasOwnProperty('width')) {
+ el.style.width = 'auto';
}
}
}, {
key: 'render',
value: function render() {
- var prepareStyles = this.context.muiTheme.prepareStyles;
+ var _this4 = this;
- var toolbarInteractions = this.getToolbarInteractions();
- var isLandscape = this.props.mode === 'landscape';
- var calendarTextColor = this.context.muiTheme.datePicker.calendarTextColor;
+ var _props = this.props,
+ animated = _props.animated,
+ animation = _props.animation,
+ autoWidth = _props.autoWidth,
+ children = _props.children,
+ className = _props.className,
+ iconStyle = _props.iconStyle,
+ labelStyle = _props.labelStyle,
+ listStyle = _props.listStyle,
+ maxHeight = _props.maxHeight,
+ menuStyleProp = _props.menuStyle,
+ onClose = _props.onClose,
+ openImmediately = _props.openImmediately,
+ menuItemStyle = _props.menuItemStyle,
+ selectedMenuItemStyle = _props.selectedMenuItemStyle,
+ style = _props.style,
+ underlineStyle = _props.underlineStyle,
+ value = _props.value,
+ other = (0, _objectWithoutProperties3.default)(_props, ['animated', 'animation', 'autoWidth', 'children', 'className', 'iconStyle', 'labelStyle', 'listStyle', 'maxHeight', 'menuStyle', 'onClose', 'openImmediately', 'menuItemStyle', 'selectedMenuItemStyle', 'style', 'underlineStyle', 'value']);
+ var _state = this.state,
+ anchorEl = _state.anchorEl,
+ open = _state.open;
+ var prepareStyles = this.context.muiTheme.prepareStyles;
+ var styles = getStyles(this.props, this.context);
- var styles = {
- root: {
- color: calendarTextColor,
- userSelect: 'none',
- width: isLandscape ? 479 : 310
- },
- calendar: {
- display: 'flex',
- flexDirection: 'column'
- },
- calendarContainer: {
- display: 'flex',
- alignContent: 'space-between',
- justifyContent: 'space-between',
- flexDirection: 'column',
- fontSize: 12,
- fontWeight: 400,
- padding: '0px 8px',
- transition: _transitions2.default.easeOut()
- },
- yearContainer: {
- display: 'flex',
- justifyContent: 'space-between',
- flexDirection: 'column',
- height: 272,
- marginTop: 10,
- overflow: 'hidden',
- width: 310
- },
- weekTitle: {
- display: 'flex',
- flexDirection: 'row',
- justifyContent: 'space-between',
- fontWeight: '500',
- height: 20,
- lineHeight: '15px',
- opacity: '0.5',
- textAlign: 'center'
- },
- weekTitleDay: {
- width: 42
- },
- transitionSlide: {
- height: 214
+ var displayValue = '';
+ _react2.default.Children.forEach(children, function (child) {
+ if (child && value === child.props.value) {
+ // This will need to be improved (in case primaryText is a node)
+ displayValue = child.props.label || child.props.primaryText;
}
- };
-
- var weekTitleDayStyle = prepareStyles(styles.weekTitleDay);
-
- var _props = this.props,
- minDate = _props.minDate,
- maxDate = _props.maxDate,
- cancelLabel = _props.cancelLabel,
- DateTimeFormat = _props.DateTimeFormat,
- firstDayOfWeek = _props.firstDayOfWeek,
- locale = _props.locale,
- okLabel = _props.okLabel,
- onTouchTapCancel = _props.onTouchTapCancel,
- onTouchTapOk = _props.onTouchTapOk;
+ });
+ var menuStyle = void 0;
+ if (anchorEl && !autoWidth) {
+ menuStyle = (0, _simpleAssign2.default)({
+ width: anchorEl.clientWidth
+ }, menuStyleProp);
+ } else {
+ menuStyle = menuStyleProp;
+ }
return _react2.default.createElement(
'div',
- { style: prepareStyles(styles.root) },
- _react2.default.createElement(_reactEventListener2.default, {
- target: 'window',
- onKeyDown: this.handleWindowKeyDown
- }),
- _react2.default.createElement(_DateDisplay2.default, {
- DateTimeFormat: DateTimeFormat,
- disableYearSelection: this.props.disableYearSelection,
- onTouchTapMonthDay: this.handleTouchTapDateDisplayMonthDay,
- onTouchTapYear: this.handleTouchTapDateDisplayYear,
- locale: locale,
- monthDaySelected: this.state.displayMonthDay,
- mode: this.props.mode,
- selectedDate: this.state.selectedDate
+ (0, _extends3.default)({}, other, {
+ ref: function ref(node) {
+ _this4.rootNode = node;
+ },
+ className: className,
+ style: prepareStyles((0, _simpleAssign2.default)({}, styles.root, open && styles.rootWhenOpen, style))
}),
_react2.default.createElement(
- 'div',
- { style: prepareStyles(styles.calendar) },
- this.state.displayMonthDay && _react2.default.createElement(
+ _ClearFix2.default,
+ { style: styles.control, onTouchTap: this.handleTouchTapControl },
+ _react2.default.createElement(
'div',
- { style: prepareStyles(styles.calendarContainer) },
- _react2.default.createElement(_CalendarToolbar2.default, {
- DateTimeFormat: DateTimeFormat,
- locale: locale,
- displayDate: this.state.displayDate,
- onMonthChange: this.handleMonthChange,
- prevMonth: toolbarInteractions.prevMonth,
- nextMonth: toolbarInteractions.nextMonth
- }),
- _react2.default.createElement(
- 'div',
- { style: prepareStyles(styles.weekTitle) },
- daysArray.map(function (event, i) {
- return _react2.default.createElement(
- 'span',
- { key: i, style: weekTitleDayStyle },
- (0, _dateUtils.localizedWeekday)(DateTimeFormat, locale, i, firstDayOfWeek)
- );
- })
- ),
- _react2.default.createElement(
- _SlideIn2.default,
- { direction: this.state.transitionDirection, style: styles.transitionSlide },
- _react2.default.createElement(_CalendarMonth2.default, {
- DateTimeFormat: DateTimeFormat,
- locale: locale,
- displayDate: this.state.displayDate,
- firstDayOfWeek: this.props.firstDayOfWeek,
- key: this.state.displayDate.toDateString(),
- minDate: minDate,
- maxDate: maxDate,
- onTouchTapDay: this.handleTouchTapDay,
- ref: 'calendar',
- selectedDate: this.state.selectedDate,
- shouldDisableDate: this.props.shouldDisableDate
- })
- )
+ { style: prepareStyles((0, _simpleAssign2.default)({}, styles.label, open && styles.labelWhenOpen, labelStyle)) },
+ displayValue
),
- !this.state.displayMonthDay && _react2.default.createElement(
- 'div',
- { style: prepareStyles(styles.yearContainer) },
- this.yearSelector()
+ _react2.default.createElement(
+ _IconButton2.default,
+ {
+ tabIndex: this.props.disabled ? -1 : undefined,
+ onKeyDown: this.handleKeyDown,
+ ref: function ref(node) {
+ _this4.arrowNode = node;
+ },
+ style: (0, _simpleAssign2.default)({}, styles.icon, iconStyle),
+ iconStyle: styles.iconChildren
+ },
+ _react2.default.createElement(_arrowDropDown2.default, null)
),
- okLabel && _react2.default.createElement(_CalendarActionButtons2.default, {
- autoOk: this.props.autoOk,
- cancelLabel: cancelLabel,
- okLabel: okLabel,
- onTouchTapCancel: onTouchTapCancel,
- onTouchTapOk: onTouchTapOk
- })
+ _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.underline, underlineStyle)) })
+ ),
+ _react2.default.createElement(
+ _Popover2.default,
+ {
+ anchorOrigin: anchorOrigin,
+ anchorEl: anchorEl,
+ animation: animation || _PopoverAnimationVertical2.default,
+ open: open,
+ animated: animated,
+ onRequestClose: this.handleRequestCloseMenu
+ },
+ _react2.default.createElement(
+ _Menu2.default,
+ {
+ maxHeight: maxHeight,
+ desktop: true,
+ value: value,
+ onEscKeyDown: this.handleEscKeyDownMenu,
+ style: menuStyle,
+ listStyle: listStyle,
+ onItemTouchTap: this.handleItemTouchTap,
+ menuItemStyle: menuItemStyle,
+ selectedMenuItemStyle: selectedMenuItemStyle
+ },
+ children
+ )
)
);
}
}]);
- return Calendar;
+ return DropDownMenu;
}(_react.Component);
-Calendar.defaultProps = {
- DateTimeFormat: _dateUtils.dateTimeFormat,
- disableYearSelection: false,
- initialDate: new Date(),
- locale: 'en-US',
- minDate: (0, _dateUtils.addYears)(new Date(), -100),
- maxDate: (0, _dateUtils.addYears)(new Date(), 100)
+DropDownMenu.muiName = 'DropDownMenu';
+DropDownMenu.defaultProps = {
+ animated: true,
+ autoWidth: true,
+ disabled: false,
+ openImmediately: false,
+ maxHeight: 500
};
-Calendar.contextTypes = {
+DropDownMenu.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? Calendar.propTypes = {
- DateTimeFormat: _react.PropTypes.func.isRequired,
- autoOk: _react.PropTypes.bool,
- cancelLabel: _react.PropTypes.node,
- disableYearSelection: _react.PropTypes.bool,
- firstDayOfWeek: _react.PropTypes.number,
- initialDate: _react.PropTypes.object,
- locale: _react.PropTypes.string.isRequired,
- maxDate: _react.PropTypes.object,
- minDate: _react.PropTypes.object,
- mode: _react.PropTypes.oneOf(['portrait', 'landscape']),
- okLabel: _react.PropTypes.node,
- onTouchTapCancel: _react.PropTypes.func,
- onTouchTapDay: _react.PropTypes.func,
- onTouchTapOk: _react.PropTypes.func,
- open: _react.PropTypes.bool,
- shouldDisableDate: _react.PropTypes.func
+ false ? DropDownMenu.propTypes = {
+ /**
+ * If true, the popover will apply transitions when
+ * it gets added to the DOM.
+ */
+ animated: _react.PropTypes.bool,
+ /**
+ * Override the default animation component used.
+ */
+ animation: _react.PropTypes.func,
+ /**
+ * The width will automatically be set according to the items inside the menu.
+ * To control this width in css instead, set this prop to `false`.
+ */
+ autoWidth: _react.PropTypes.bool,
+ /**
+ * The `MenuItem`s to populate the `Menu` with. If the `MenuItems` have the
+ * prop `label` that value will be used to render the representation of that
+ * item within the field.
+ */
+ children: _react.PropTypes.node,
+ /**
+ * The css class name of the root element.
+ */
+ className: _react.PropTypes.string,
+ /**
+ * Disables the menu.
+ */
+ disabled: _react.PropTypes.bool,
+ /**
+ * Overrides the styles of icon element.
+ */
+ iconStyle: _react.PropTypes.object,
+ /**
+ * Overrides the styles of label when the `DropDownMenu` is inactive.
+ */
+ labelStyle: _react.PropTypes.object,
+ /**
+ * The style object to use to override underlying list style.
+ */
+ listStyle: _react.PropTypes.object,
+ /**
+ * The maximum height of the `Menu` when it is displayed.
+ */
+ maxHeight: _react.PropTypes.number,
+ /**
+ * Override the inline-styles of menu items.
+ */
+ menuItemStyle: _react.PropTypes.object,
+ /**
+ * Overrides the styles of `Menu` when the `DropDownMenu` is displayed.
+ */
+ menuStyle: _react.PropTypes.object,
+ /**
+ * Callback function fired when a menu item is clicked, other than the one currently selected.
+ *
+ * @param {object} event TouchTap event targeting the menu item that was clicked.
+ * @param {number} key The index of the clicked menu item in the `children` collection.
+ * @param {any} payload The `value` prop of the clicked menu item.
+ */
+ onChange: _react.PropTypes.func,
+ /**
+ * Callback function fired when the menu is closed.
+ */
+ onClose: _react.PropTypes.func,
+ /**
+ * Set to true to have the `DropDownMenu` automatically open on mount.
+ */
+ openImmediately: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of selected menu items.
+ */
+ selectedMenuItemStyle: _react.PropTypes.object,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object,
+ /**
+ * Overrides the inline-styles of the underline.
+ */
+ underlineStyle: _react.PropTypes.object,
+ /**
+ * The value that is currently selected.
+ */
+ value: _react.PropTypes.any
} : void 0;
-exports.default = Calendar;
+exports.default = DropDownMenu;
/***/ }),
-/* 798 */
+/* 796 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -65549,103 +68232,35 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _getPrototypeOf = __webpack_require__(3);
-
-var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-
-var _classCallCheck2 = __webpack_require__(1);
-
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
-var _createClass2 = __webpack_require__(2);
-
-var _createClass3 = _interopRequireDefault(_createClass2);
-
-var _possibleConstructorReturn2 = __webpack_require__(4);
-
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-
-var _inherits2 = __webpack_require__(5);
-
-var _inherits3 = _interopRequireDefault(_inherits2);
-
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _FlatButton = __webpack_require__(198);
-
-var _FlatButton2 = _interopRequireDefault(_FlatButton);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var CalendarActionButton = function (_Component) {
- (0, _inherits3.default)(CalendarActionButton, _Component);
+var _pure = __webpack_require__(20);
- function CalendarActionButton() {
- (0, _classCallCheck3.default)(this, CalendarActionButton);
- return (0, _possibleConstructorReturn3.default)(this, (CalendarActionButton.__proto__ || (0, _getPrototypeOf2.default)(CalendarActionButton)).apply(this, arguments));
- }
+var _pure2 = _interopRequireDefault(_pure);
- (0, _createClass3.default)(CalendarActionButton, [{
- key: 'render',
- value: function render() {
- var _props = this.props,
- cancelLabel = _props.cancelLabel,
- okLabel = _props.okLabel;
+var _SvgIcon = __webpack_require__(21);
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
- var styles = {
- root: {
- display: 'flex',
- flexDirection: 'row',
- justifyContent: 'flex-end',
- margin: 0,
- maxHeight: 48,
- padding: 0
- },
- flatButtons: {
- fontsize: 14,
- margin: '4px 8px 8px 0px',
- maxHeight: 36,
- minWidth: 64,
- padding: 0
- }
- };
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- return _react2.default.createElement(
- 'div',
- { style: styles.root },
- _react2.default.createElement(_FlatButton2.default, {
- label: cancelLabel,
- onTouchTap: this.props.onTouchTapCancel,
- primary: true,
- style: styles.flatButtons
- }),
- !this.props.autoOk && _react2.default.createElement(_FlatButton2.default, {
- disabled: this.refs.calendar !== undefined && this.refs.calendar.isSelectedDateDisabled(),
- label: okLabel,
- onTouchTap: this.props.onTouchTapOk,
- primary: true,
- style: styles.flatButtons
- })
- );
- }
- }]);
- return CalendarActionButton;
-}(_react.Component);
+var NavigationArrowDropDown = function NavigationArrowDropDown(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M7 10l5 5 5-5z' })
+ );
+};
+NavigationArrowDropDown = (0, _pure2.default)(NavigationArrowDropDown);
+NavigationArrowDropDown.displayName = 'NavigationArrowDropDown';
+NavigationArrowDropDown.muiName = 'SvgIcon';
- false ? CalendarActionButton.propTypes = {
- autoOk: _react.PropTypes.bool,
- cancelLabel: _react.PropTypes.node,
- okLabel: _react.PropTypes.node,
- onTouchTapCancel: _react.PropTypes.func,
- onTouchTapOk: _react.PropTypes.func
-} : void 0;
-exports.default = CalendarActionButton;
+exports.default = NavigationArrowDropDown;
/***/ }),
-/* 799 */
+/* 797 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -65655,169 +68270,65 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _getPrototypeOf = __webpack_require__(3);
-
-var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-
-var _classCallCheck2 = __webpack_require__(1);
-
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
-var _createClass2 = __webpack_require__(2);
-
-var _createClass3 = _interopRequireDefault(_createClass2);
-
-var _possibleConstructorReturn2 = __webpack_require__(4);
+var _extends2 = __webpack_require__(7);
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+var _extends3 = _interopRequireDefault(_extends2);
-var _inherits2 = __webpack_require__(5);
+var _objectWithoutProperties2 = __webpack_require__(8);
-var _inherits3 = _interopRequireDefault(_inherits2);
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _dateUtils = __webpack_require__(81);
-
-var _DayButton = __webpack_require__(800);
+var _BeforeAfterWrapper = __webpack_require__(798);
-var _DayButton2 = _interopRequireDefault(_DayButton);
+var _BeforeAfterWrapper2 = _interopRequireDefault(_BeforeAfterWrapper);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var styles = {
- root: {
- display: 'flex',
- flexDirection: 'column',
- justifyContent: 'flex-start',
- fontWeight: 400,
- height: 228,
- lineHeight: 2,
- position: 'relative',
- textAlign: 'center',
- MozPaddingStart: 0
+ before: {
+ content: "' '",
+ display: 'table'
},
- week: {
- display: 'flex',
- flexDirection: 'row',
- justifyContent: 'space-around',
- height: 34,
- marginBottom: 2
+ after: {
+ content: "' '",
+ clear: 'both',
+ display: 'table'
}
};
-var CalendarMonth = function (_Component) {
- (0, _inherits3.default)(CalendarMonth, _Component);
-
- function CalendarMonth() {
- var _ref;
-
- var _temp, _this, _ret;
-
- (0, _classCallCheck3.default)(this, CalendarMonth);
-
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = CalendarMonth.__proto__ || (0, _getPrototypeOf2.default)(CalendarMonth)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapDay = function (event, date) {
- if (_this.props.onTouchTapDay) {
- _this.props.onTouchTapDay(event, date);
- }
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
- }
-
- (0, _createClass3.default)(CalendarMonth, [{
- key: 'isSelectedDateDisabled',
- value: function isSelectedDateDisabled() {
- return this.selectedDateDisabled;
- }
- }, {
- key: 'shouldDisableDate',
- value: function shouldDisableDate(day) {
- if (day === null) return false;
- var disabled = !(0, _dateUtils.isBetweenDates)(day, this.props.minDate, this.props.maxDate);
- if (!disabled && this.props.shouldDisableDate) disabled = this.props.shouldDisableDate(day);
-
- return disabled;
- }
- }, {
- key: 'getWeekElements',
- value: function getWeekElements() {
- var _this2 = this;
-
- var weekArray = (0, _dateUtils.getWeekArray)(this.props.displayDate, this.props.firstDayOfWeek);
-
- return weekArray.map(function (week, i) {
- return _react2.default.createElement(
- 'div',
- { key: i, style: styles.week },
- _this2.getDayElements(week, i)
- );
- }, this);
- }
- }, {
- key: 'getDayElements',
- value: function getDayElements(week, i) {
- var _this3 = this;
-
- var _props = this.props,
- DateTimeFormat = _props.DateTimeFormat,
- locale = _props.locale,
- selectedDate = _props.selectedDate;
-
-
- return week.map(function (day, j) {
- var isSameDate = (0, _dateUtils.isEqualDate)(selectedDate, day);
- var disabled = _this3.shouldDisableDate(day);
- var selected = !disabled && isSameDate;
-
- if (isSameDate) {
- _this3.selectedDateDisabled = disabled;
- }
+var ClearFix = function ClearFix(_ref) {
+ var style = _ref.style,
+ children = _ref.children,
+ other = (0, _objectWithoutProperties3.default)(_ref, ['style', 'children']);
+ return _react2.default.createElement(
+ _BeforeAfterWrapper2.default,
+ (0, _extends3.default)({}, other, {
+ beforeStyle: styles.before,
+ afterStyle: styles.after,
+ style: style
+ }),
+ children
+ );
+};
- return _react2.default.createElement(_DayButton2.default, {
- DateTimeFormat: DateTimeFormat,
- locale: locale,
- date: day,
- disabled: disabled,
- key: 'db' + (i + j),
- onTouchTap: _this3.handleTouchTapDay,
- selected: selected
- });
- }, this);
- }
- }, {
- key: 'render',
- value: function render() {
- return _react2.default.createElement(
- 'div',
- { style: styles.root },
- this.getWeekElements()
- );
- }
- }]);
- return CalendarMonth;
-}(_react.Component);
+ClearFix.muiName = 'ClearFix';
- false ? CalendarMonth.propTypes = {
- DateTimeFormat: _react.PropTypes.func.isRequired,
- autoOk: _react.PropTypes.bool,
- displayDate: _react.PropTypes.object.isRequired,
- firstDayOfWeek: _react.PropTypes.number,
- locale: _react.PropTypes.string.isRequired,
- maxDate: _react.PropTypes.object,
- minDate: _react.PropTypes.object,
- onTouchTapDay: _react.PropTypes.func,
- selectedDate: _react.PropTypes.object.isRequired,
- shouldDisableDate: _react.PropTypes.func
+ false ? ClearFix.propTypes = {
+ children: _react.PropTypes.node,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
} : void 0;
-exports.default = CalendarMonth;
+
+exports.default = ClearFix;
/***/ }),
-/* 800 */
+/* 798 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -65827,10 +68338,6 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _extends2 = __webpack_require__(7);
-
-var _extends3 = _interopRequireDefault(_extends2);
-
var _objectWithoutProperties2 = __webpack_require__(8);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
@@ -65855,167 +68362,194 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
+var _simpleAssign = __webpack_require__(6);
+
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _transitions = __webpack_require__(10);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _transitions2 = _interopRequireDefault(_transitions);
+/**
+ * BeforeAfterWrapper
+ * An alternative for the ::before and ::after css pseudo-elements for
+ * components whose styles are defined in javascript instead of css.
+ *
+ * Usage: For the element that we want to apply before and after elements to,
+ * wrap its children with BeforeAfterWrapper. For example:
+ *
+ *
+ *
// See notice
+ * renders // before element
+ * [children of paper] ------> [children of paper]
+ * // after element
+ *
+ *
+ *
+ * Notice: Notice that this div bundles together our elements. If the element
+ * that we want to apply before and after elements is a HTML tag (i.e. a
+ * div, p, or button tag), we can avoid this extra nesting by passing using
+ * the BeforeAfterWrapper in place of said tag like so:
+ *
+ *
+ * do this instead
+ * [children of p] ------> [children of p]
+ *
+ *
// See notice
- * renders // before element
- * [children of paper] ------> [children of paper]
- * // after element
- *
- *
- *
- * Notice: Notice that this div bundles together our elements. If the element
- * that we want to apply before and after elements is a HTML tag (i.e. a
- * div, p, or button tag), we can avoid this extra nesting by passing using
- * the BeforeAfterWrapper in place of said tag like so:
- *
- *
- * do this instead
- * [children of p] ------> [children of p]
- *
- *
- *
- * BeforeAfterWrapper features spread functionality. This means that we can
- * pass HTML tag properties directly into the BeforeAfterWrapper tag.
- *
- * When using BeforeAfterWrapper, ensure that the parent of the beforeElement
- * and afterElement have a defined style position.
- */
+function getStyles(props, context) {
+ var _context$muiTheme = context.muiTheme,
+ baseTheme = _context$muiTheme.baseTheme,
+ table = _context$muiTheme.table;
-var styles = {
- box: {
- boxSizing: 'border-box'
- }
-};
-var BeforeAfterWrapper = function (_Component) {
- (0, _inherits3.default)(BeforeAfterWrapper, _Component);
+ return {
+ root: {
+ backgroundColor: table.backgroundColor,
+ width: '100%',
+ borderCollapse: 'collapse',
+ borderSpacing: 0,
+ tableLayout: 'fixed',
+ fontFamily: baseTheme.fontFamily
+ },
+ bodyTable: {
+ height: props.fixedHeader || props.fixedFooter ? props.height : 'auto',
+ overflowX: 'hidden',
+ overflowY: 'auto'
+ },
+ tableWrapper: {
+ height: props.fixedHeader || props.fixedFooter ? 'auto' : props.height,
+ overflow: 'auto'
+ }
+ };
+}
- function BeforeAfterWrapper() {
- (0, _classCallCheck3.default)(this, BeforeAfterWrapper);
- return (0, _possibleConstructorReturn3.default)(this, (BeforeAfterWrapper.__proto__ || (0, _getPrototypeOf2.default)(BeforeAfterWrapper)).apply(this, arguments));
+var Table = function (_Component) {
+ (0, _inherits3.default)(Table, _Component);
+
+ function Table() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, Table);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Table.__proto__ || (0, _getPrototypeOf2.default)(Table)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ allRowsSelected: false
+ }, _this.onCellClick = function (rowNumber, columnNumber, event) {
+ if (_this.props.onCellClick) _this.props.onCellClick(rowNumber, columnNumber, event);
+ }, _this.onCellHover = function (rowNumber, columnNumber, event) {
+ if (_this.props.onCellHover) _this.props.onCellHover(rowNumber, columnNumber, event);
+ }, _this.onCellHoverExit = function (rowNumber, columnNumber, event) {
+ if (_this.props.onCellHoverExit) _this.props.onCellHoverExit(rowNumber, columnNumber, event);
+ }, _this.onRowHover = function (rowNumber) {
+ if (_this.props.onRowHover) _this.props.onRowHover(rowNumber);
+ }, _this.onRowHoverExit = function (rowNumber) {
+ if (_this.props.onRowHoverExit) _this.props.onRowHoverExit(rowNumber);
+ }, _this.onRowSelection = function (selectedRows) {
+ if (_this.state.allRowsSelected) _this.setState({ allRowsSelected: false });
+ if (_this.props.onRowSelection) _this.props.onRowSelection(selectedRows);
+ }, _this.onSelectAll = function () {
+ if (_this.props.onRowSelection) {
+ if (!_this.state.allRowsSelected) {
+ _this.props.onRowSelection('all');
+ } else {
+ _this.props.onRowSelection('none');
+ }
+ }
+
+ _this.setState({ allRowsSelected: !_this.state.allRowsSelected });
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(BeforeAfterWrapper, [{
+ (0, _createClass3.default)(Table, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ if (this.props.allRowsSelected) {
+ this.setState({ allRowsSelected: true });
+ }
+ }
+ }, {
+ key: 'isScrollbarVisible',
+ value: function isScrollbarVisible() {
+ var tableDivHeight = this.refs.tableDiv.clientHeight;
+ var tableBodyHeight = this.refs.tableBody.clientHeight;
+
+ return tableBodyHeight > tableDivHeight;
+ }
+ }, {
+ key: 'createTableHeader',
+ value: function createTableHeader(base) {
+ return _react2.default.cloneElement(base, {
+ enableSelectAll: base.props.enableSelectAll && this.props.selectable && this.props.multiSelectable,
+ onSelectAll: this.onSelectAll,
+ selectAllSelected: this.state.allRowsSelected
+ });
+ }
+ }, {
+ key: 'createTableBody',
+ value: function createTableBody(base) {
+ return _react2.default.cloneElement(base, {
+ allRowsSelected: this.state.allRowsSelected,
+ multiSelectable: this.props.multiSelectable,
+ onCellClick: this.onCellClick,
+ onCellHover: this.onCellHover,
+ onCellHoverExit: this.onCellHoverExit,
+ onRowHover: this.onRowHover,
+ onRowHoverExit: this.onRowHoverExit,
+ onRowSelection: this.onRowSelection,
+ selectable: this.props.selectable,
+ style: (0, _simpleAssign2.default)({ height: this.props.height }, base.props.style)
+ });
+ }
+ }, {
+ key: 'createTableFooter',
+ value: function createTableFooter(base) {
+ return base;
+ }
+ }, {
key: 'render',
value: function render() {
+ var _this2 = this;
+
var _props = this.props,
- beforeStyle = _props.beforeStyle,
- afterStyle = _props.afterStyle,
- beforeElementType = _props.beforeElementType,
- afterElementType = _props.afterElementType,
- elementType = _props.elementType,
- other = (0, _objectWithoutProperties3.default)(_props, ['beforeStyle', 'afterStyle', 'beforeElementType', 'afterElementType', 'elementType']);
+ children = _props.children,
+ className = _props.className,
+ fixedFooter = _props.fixedFooter,
+ fixedHeader = _props.fixedHeader,
+ style = _props.style,
+ wrapperStyle = _props.wrapperStyle,
+ headerStyle = _props.headerStyle,
+ bodyStyle = _props.bodyStyle,
+ footerStyle = _props.footerStyle;
var prepareStyles = this.context.muiTheme.prepareStyles;
+ var styles = getStyles(this.props, this.context);
- var beforeElement = void 0;
- var afterElement = void 0;
+ var tHead = void 0;
+ var tFoot = void 0;
+ var tBody = void 0;
- if (beforeStyle) {
- beforeElement = _react2.default.createElement(this.props.beforeElementType, {
- style: prepareStyles((0, _simpleAssign2.default)({}, styles.box, beforeStyle)),
- key: '::before'
- });
- }
+ _react2.default.Children.forEach(children, function (child) {
+ if (!_react2.default.isValidElement(child)) return;
- if (afterStyle) {
- afterElement = _react2.default.createElement(this.props.afterElementType, {
- style: prepareStyles((0, _simpleAssign2.default)({}, styles.box, afterStyle)),
- key: '::after'
- });
- }
+ var muiName = child.type.muiName;
- var children = [beforeElement, this.props.children, afterElement];
+ if (muiName === 'TableBody') {
+ tBody = _this2.createTableBody(child);
+ } else if (muiName === 'TableHeader') {
+ tHead = _this2.createTableHeader(child);
+ } else if (muiName === 'TableFooter') {
+ tFoot = _this2.createTableFooter(child);
+ } else {
+ false ? (0, _warning2.default)(false, 'Material-UI: Children of the Table component must be TableBody or TableHeader or TableFooter.\n Nothing is rendered.') : void 0;
+ }
+ });
- var props = other;
- props.style = prepareStyles((0, _simpleAssign2.default)({}, this.props.style));
+ // If we could not find a table-header and a table-body, do not attempt to display anything.
+ if (!tBody && !tHead) return null;
- return _react2.default.createElement(this.props.elementType, props, children);
+ var mergedTableStyle = (0, _simpleAssign2.default)(styles.root, style);
+ var headerTable = void 0;
+ var footerTable = void 0;
+ var inlineHeader = void 0;
+ var inlineFooter = void 0;
+
+ if (fixedHeader) {
+ headerTable = _react2.default.createElement(
+ 'div',
+ { style: prepareStyles((0, _simpleAssign2.default)({}, headerStyle)) },
+ _react2.default.createElement(
+ 'table',
+ { className: className, style: mergedTableStyle },
+ tHead
+ )
+ );
+ } else {
+ inlineHeader = tHead;
+ }
+
+ if (tFoot !== undefined) {
+ if (fixedFooter) {
+ footerTable = _react2.default.createElement(
+ 'div',
+ { style: prepareStyles((0, _simpleAssign2.default)({}, footerStyle)) },
+ _react2.default.createElement(
+ 'table',
+ { className: className, style: prepareStyles(mergedTableStyle) },
+ tFoot
+ )
+ );
+ } else {
+ inlineFooter = tFoot;
+ }
+ }
+
+ return _react2.default.createElement(
+ 'div',
+ { style: prepareStyles((0, _simpleAssign2.default)(styles.tableWrapper, wrapperStyle)) },
+ headerTable,
+ _react2.default.createElement(
+ 'div',
+ { style: prepareStyles((0, _simpleAssign2.default)(styles.bodyTable, bodyStyle)), ref: 'tableDiv' },
+ _react2.default.createElement(
+ 'table',
+ { className: className, style: mergedTableStyle, ref: 'tableBody' },
+ inlineHeader,
+ inlineFooter,
+ tBody
+ )
+ ),
+ footerTable
+ );
}
}]);
- return BeforeAfterWrapper;
+ return Table;
}(_react.Component);
-BeforeAfterWrapper.defaultProps = {
- beforeElementType: 'div',
- afterElementType: 'div',
- elementType: 'div'
+Table.defaultProps = {
+ allRowsSelected: false,
+ fixedFooter: true,
+ fixedHeader: true,
+ height: 'inherit',
+ multiSelectable: false,
+ selectable: true
};
-BeforeAfterWrapper.contextTypes = {
+Table.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? BeforeAfterWrapper.propTypes = {
- afterElementType: _react.PropTypes.string,
- afterStyle: _react.PropTypes.object,
- beforeElementType: _react.PropTypes.string,
- beforeStyle: _react.PropTypes.object,
+ false ? Table.propTypes = {
+ /**
+ * Set to true to indicate that all rows should be selected.
+ */
+ allRowsSelected: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the body's table element.
+ */
+ bodyStyle: _react.PropTypes.object,
+ /**
+ * Children passed to table.
+ */
children: _react.PropTypes.node,
- elementType: _react.PropTypes.string,
+ /**
+ * The css class name of the root element.
+ */
+ className: _react.PropTypes.string,
+ /**
+ * If true, the footer will appear fixed below the table.
+ * The default value is true.
+ */
+ fixedFooter: _react.PropTypes.bool,
+ /**
+ * If true, the header will appear fixed above the table.
+ * The default value is true.
+ */
+ fixedHeader: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the footer's table element.
+ */
+ footerStyle: _react.PropTypes.object,
+ /**
+ * Override the inline-styles of the header's table element.
+ */
+ headerStyle: _react.PropTypes.object,
+ /**
+ * The height of the table.
+ */
+ height: _react.PropTypes.string,
+ /**
+ * If true, multiple table rows can be selected.
+ * CTRL/CMD+Click and SHIFT+Click are valid actions.
+ * The default value is false.
+ */
+ multiSelectable: _react.PropTypes.bool,
+ /**
+ * Called when a row cell is clicked.
+ * rowNumber is the row number and columnId is
+ * the column number or the column key.
+ */
+ onCellClick: _react.PropTypes.func,
+ /**
+ * Called when a table cell is hovered.
+ * rowNumber is the row number of the hovered row
+ * and columnId is the column number or the column key of the cell.
+ */
+ onCellHover: _react.PropTypes.func,
+ /**
+ * Called when a table cell is no longer hovered.
+ * rowNumber is the row number of the row and columnId
+ * is the column number or the column key of the cell.
+ */
+ onCellHoverExit: _react.PropTypes.func,
+ /**
+ * Called when a table row is hovered.
+ * rowNumber is the row number of the hovered row.
+ */
+ onRowHover: _react.PropTypes.func,
+ /**
+ * Called when a table row is no longer hovered.
+ * rowNumber is the row number of the row that is no longer hovered.
+ */
+ onRowHoverExit: _react.PropTypes.func,
+ /**
+ * Called when a row is selected.
+ * selectedRows is an array of all row selections.
+ * IF all rows have been selected, the string "all"
+ * will be returned instead to indicate that all rows have been selected.
+ */
+ onRowSelection: _react.PropTypes.func,
+ /**
+ * If true, table rows can be selected.
+ * If multiple row selection is desired, enable multiSelectable.
+ * The default value is true.
+ */
+ selectable: _react.PropTypes.bool,
/**
* Override the inline-styles of the root element.
*/
- style: _react.PropTypes.object
+ style: _react.PropTypes.object,
+ /**
+ * Override the inline-styles of the table's wrapper element.
+ */
+ wrapperStyle: _react.PropTypes.object
} : void 0;
-exports.default = BeforeAfterWrapper;
-
-/***/ }),
-/* 822 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _Slider = __webpack_require__(823);
-
-var _Slider2 = _interopRequireDefault(_Slider);
-
-var _createComponent = __webpack_require__(43);
-
-var _createComponent2 = _interopRequireDefault(_createComponent);
-
-var _mapError = __webpack_require__(60);
-
-var _mapError2 = _interopRequireDefault(_mapError);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
-exports.default = (0, _createComponent2.default)(_Slider2.default, function (_ref) {
- var _ref$input = _ref.input,
- onDragStart = _ref$input.onDragStart,
- _onChange = _ref$input.onChange,
- inputProps = _objectWithoutProperties(_ref$input, ['onDragStart', 'onChange']),
- onChangeFromField = _ref.onChange,
- defaultValue = _ref.defaultValue,
- props = _objectWithoutProperties(_ref, ['input', 'onChange', 'defaultValue']);
-
- return _extends({}, (0, _mapError2.default)(_extends({}, props, { input: inputProps }), 'error'), {
- onChange: function onChange(event, value) {
- _onChange(value);
- if (onChangeFromField) {
- onChangeFromField(value);
- }
- }
- });
-});
+exports.default = Table;
/***/ }),
-/* 823 */
+/* 824 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -69453,35 +72583,23 @@ exports.default = (0, _createComponent2.default)(_Slider2.default, function (_re
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.default = undefined;
-
-var _Slider = __webpack_require__(824);
-var _Slider2 = _interopRequireDefault(_Slider);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _getIterator2 = __webpack_require__(335);
-exports.default = _Slider2.default;
+var _getIterator3 = _interopRequireDefault(_getIterator2);
-/***/ }),
-/* 824 */
-/***/ (function(module, exports, __webpack_require__) {
+var _toConsumableArray2 = __webpack_require__(95);
-"use strict";
+var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
+var _typeof2 = __webpack_require__(61);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
+var _typeof3 = _interopRequireDefault(_typeof2);
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
-var _objectWithoutProperties2 = __webpack_require__(8);
-
-var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-
var _getPrototypeOf = __webpack_require__(3);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -69502,10 +72620,6 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
-var _defineProperty2 = __webpack_require__(825);
-
-var _defineProperty3 = _interopRequireDefault(_defineProperty2);
-
var _simpleAssign = __webpack_require__(6);
var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
@@ -69514,808 +72628,482 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _keycode = __webpack_require__(30);
-
-var _keycode2 = _interopRequireDefault(_keycode);
-
-var _warning = __webpack_require__(17);
-
-var _warning2 = _interopRequireDefault(_warning);
-
-var _transitions = __webpack_require__(10);
+var _Checkbox = __webpack_require__(207);
-var _transitions2 = _interopRequireDefault(_transitions);
+var _Checkbox2 = _interopRequireDefault(_Checkbox);
-var _FocusRipple = __webpack_require__(197);
+var _TableRowColumn = __webpack_require__(211);
-var _FocusRipple2 = _interopRequireDefault(_FocusRipple);
+var _TableRowColumn2 = _interopRequireDefault(_TableRowColumn);
-var _deprecatedPropType = __webpack_require__(826);
+var _ClickAwayListener = __webpack_require__(206);
-var _deprecatedPropType2 = _interopRequireDefault(_deprecatedPropType);
+var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-/**
- * Verifies min/max range.
- * @param {Object} props Properties of the React component.
- * @param {String} propName Name of the property to validate.
- * @param {String} componentName Name of the component whose property is being validated.
- * @returns {Object} Returns an Error if min >= max otherwise null.
- */
-var minMaxPropType = function minMaxPropType(props, propName, componentName) {
- for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
- rest[_key - 3] = arguments[_key];
- }
-
- var error = _react.PropTypes.number.apply(_react.PropTypes, [props, propName, componentName].concat(rest));
- if (error !== null) {
- return error;
- }
-
- if (props.min >= props.max) {
- var errorMsg = propName === 'min' ? 'min should be less than max' : 'max should be greater than min';
- return new Error(errorMsg);
- }
-};
-
-/**
- * Verifies value is within the min/max range.
- * @param {Object} props Properties of the React component.
- * @param {String} propName Name of the property to validate.
- * @param {String} componentName Name of the component whose property is being validated.
- * @returns {Object} Returns an Error if the value is not within the range otherwise null.
- */
-var valueInRangePropType = function valueInRangePropType(props, propName, componentName) {
- for (var _len2 = arguments.length, rest = Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) {
- rest[_key2 - 3] = arguments[_key2];
- }
-
- var error = _react.PropTypes.number.apply(_react.PropTypes, [props, propName, componentName].concat(rest));
- if (error !== null) {
- return error;
- }
-
- var value = props[propName];
- if (value < props.min || props.max < value) {
- return new Error(propName + ' should be within the range specified by min and max');
- }
-};
-
-var crossAxisProperty = {
- x: 'height',
- 'x-reverse': 'height',
- y: 'width',
- 'y-reverse': 'width'
-};
-
-var crossAxisOffsetProperty = {
- x: 'top',
- 'x-reverse': 'top',
- y: 'left',
- 'y-reverse': 'left'
-};
-
-var mainAxisProperty = {
- x: 'width',
- 'x-reverse': 'width',
- y: 'height',
- 'y-reverse': 'height'
-};
-
-var mainAxisMarginFromEnd = {
- x: 'marginRight',
- 'x-reverse': 'marginLeft',
- y: 'marginTop',
- 'y-reverse': 'marginBottom'
-};
-
-var mainAxisMarginFromStart = {
- x: 'marginLeft',
- 'x-reverse': 'marginRight',
- y: 'marginBottom',
- 'y-reverse': 'marginTop'
-};
-
-var mainAxisOffsetProperty = {
- x: 'left',
- 'x-reverse': 'right',
- y: 'bottom',
- 'y-reverse': 'top'
-};
-
-var mainAxisClientProperty = {
- x: 'clientWidth',
- 'x-reverse': 'clientWidth',
- y: 'clientHeight',
- 'y-reverse': 'clientHeight'
-};
-
-var mainAxisClientOffsetProperty = {
- x: 'clientX',
- 'x-reverse': 'clientX',
- y: 'clientY',
- 'y-reverse': 'clientY'
-};
-
-var reverseMainAxisOffsetProperty = {
- x: 'right',
- 'x-reverse': 'left',
- y: 'top',
- 'y-reverse': 'bottom'
-};
-
-var isMouseControlInverted = function isMouseControlInverted(axis) {
- return axis === 'x-reverse' || axis === 'y';
-};
-
-function getPercent(value, min, max) {
- var percent = (value - min) / (max - min);
- if (isNaN(percent)) {
- percent = 0;
- }
-
- return percent;
-}
-
-var getStyles = function getStyles(props, context, state) {
- var _slider, _track, _filledAndRemaining, _handle, _objectAssign2, _objectAssign3;
-
- var axis = props.axis,
- disabled = props.disabled,
- max = props.max,
- min = props.min;
- var _context$muiTheme$sli = context.muiTheme.slider,
- handleColorZero = _context$muiTheme$sli.handleColorZero,
- handleFillColor = _context$muiTheme$sli.handleFillColor,
- handleSize = _context$muiTheme$sli.handleSize,
- handleSizeDisabled = _context$muiTheme$sli.handleSizeDisabled,
- handleSizeActive = _context$muiTheme$sli.handleSizeActive,
- trackSize = _context$muiTheme$sli.trackSize,
- trackColor = _context$muiTheme$sli.trackColor,
- trackColorSelected = _context$muiTheme$sli.trackColorSelected,
- rippleColor = _context$muiTheme$sli.rippleColor,
- selectionColor = _context$muiTheme$sli.selectionColor;
-
-
- var fillGutter = handleSize / 2;
- var disabledGutter = trackSize + handleSizeDisabled / 2;
- var calcDisabledSpacing = disabled ? ' - ' + disabledGutter + 'px' : '';
- var percent = getPercent(state.value, min, max);
-
- var styles = {
- slider: (_slider = {
- touchCallout: 'none',
- userSelect: 'none',
- cursor: 'default'
- }, (0, _defineProperty3.default)(_slider, crossAxisProperty[axis], handleSizeActive), (0, _defineProperty3.default)(_slider, mainAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_slider, 'position', 'relative'), (0, _defineProperty3.default)(_slider, 'marginTop', 24), (0, _defineProperty3.default)(_slider, 'marginBottom', 48), _slider),
- track: (_track = {
- position: 'absolute'
- }, (0, _defineProperty3.default)(_track, crossAxisOffsetProperty[axis], (handleSizeActive - trackSize) / 2), (0, _defineProperty3.default)(_track, mainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_track, mainAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_track, crossAxisProperty[axis], trackSize), _track),
- filledAndRemaining: (_filledAndRemaining = {
- position: 'absolute'
- }, (0, _defineProperty3.default)(_filledAndRemaining, crossAxisOffsetProperty, 0), (0, _defineProperty3.default)(_filledAndRemaining, crossAxisProperty[axis], '100%'), (0, _defineProperty3.default)(_filledAndRemaining, 'transition', _transitions2.default.easeOut(null, 'margin')), _filledAndRemaining),
- handle: (_handle = {
- boxSizing: 'border-box',
- position: 'absolute',
- cursor: 'pointer',
- pointerEvents: 'inherit'
- }, (0, _defineProperty3.default)(_handle, crossAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_handle, mainAxisOffsetProperty[axis], percent === 0 ? '0%' : percent * 100 + '%'), (0, _defineProperty3.default)(_handle, 'zIndex', 1), (0, _defineProperty3.default)(_handle, 'margin', {
- x: trackSize / 2 + 'px 0 0 0',
- 'x-reverse': trackSize / 2 + 'px 0 0 0',
- y: '0 0 0 ' + trackSize / 2 + 'px',
- 'y-reverse': '0 0 0 ' + trackSize / 2 + 'px'
- }[axis]), (0, _defineProperty3.default)(_handle, 'width', handleSize), (0, _defineProperty3.default)(_handle, 'height', handleSize), (0, _defineProperty3.default)(_handle, 'backgroundColor', selectionColor), (0, _defineProperty3.default)(_handle, 'backgroundClip', 'padding-box'), (0, _defineProperty3.default)(_handle, 'border', '0px solid transparent'), (0, _defineProperty3.default)(_handle, 'borderRadius', '50%'), (0, _defineProperty3.default)(_handle, 'transform', {
- x: 'translate(-50%, -50%)',
- 'x-reverse': 'translate(50%, -50%)',
- y: 'translate(-50%, 50%)',
- 'y-reverse': 'translate(-50%, -50%)'
- }[axis]), (0, _defineProperty3.default)(_handle, 'transition', _transitions2.default.easeOut('450ms', 'background') + ', ' + _transitions2.default.easeOut('450ms', 'border-color') + ', ' + _transitions2.default.easeOut('450ms', 'width') + ', ' + _transitions2.default.easeOut('450ms', 'height')), (0, _defineProperty3.default)(_handle, 'overflow', 'visible'), (0, _defineProperty3.default)(_handle, 'outline', 'none'), _handle),
- handleWhenDisabled: {
- boxSizing: 'content-box',
- cursor: 'not-allowed',
- backgroundColor: trackColor,
- width: handleSizeDisabled,
- height: handleSizeDisabled,
- border: 'none'
- },
- handleWhenPercentZero: {
- border: trackSize + 'px solid ' + handleColorZero,
- backgroundColor: handleFillColor,
- boxShadow: 'none'
- },
- handleWhenPercentZeroAndDisabled: {
- cursor: 'not-allowed',
- width: handleSizeDisabled,
- height: handleSizeDisabled
- },
- handleWhenPercentZeroAndFocused: {
- border: trackSize + 'px solid ' + trackColorSelected
- },
- handleWhenActive: {
- width: handleSizeActive,
- height: handleSizeActive
- },
- ripple: {
- height: handleSize,
- width: handleSize,
- overflow: 'visible'
- },
- rippleWhenPercentZero: {
- top: -trackSize,
- left: -trackSize
- },
- rippleInner: {
- height: '300%',
- width: '300%',
- top: -handleSize,
- left: -handleSize
- },
- rippleColor: {
- fill: percent === 0 ? handleColorZero : rippleColor
- }
- };
- styles.filled = (0, _simpleAssign2.default)({}, styles.filledAndRemaining, (_objectAssign2 = {}, (0, _defineProperty3.default)(_objectAssign2, mainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_objectAssign2, 'backgroundColor', disabled ? trackColor : selectionColor), (0, _defineProperty3.default)(_objectAssign2, mainAxisMarginFromEnd[axis], fillGutter), (0, _defineProperty3.default)(_objectAssign2, mainAxisProperty[axis], 'calc(' + percent * 100 + '%' + calcDisabledSpacing + ')'), _objectAssign2));
- styles.remaining = (0, _simpleAssign2.default)({}, styles.filledAndRemaining, (_objectAssign3 = {}, (0, _defineProperty3.default)(_objectAssign3, reverseMainAxisOffsetProperty[axis], 0), (0, _defineProperty3.default)(_objectAssign3, 'backgroundColor', (state.hovered || state.focused) && !disabled ? trackColorSelected : trackColor), (0, _defineProperty3.default)(_objectAssign3, mainAxisMarginFromStart[axis], fillGutter), (0, _defineProperty3.default)(_objectAssign3, mainAxisProperty[axis], 'calc(' + (1 - percent) * 100 + '%' + calcDisabledSpacing + ')'), _objectAssign3));
-
- return styles;
-};
-
-var Slider = function (_Component) {
- (0, _inherits3.default)(Slider, _Component);
+var TableBody = function (_Component) {
+ (0, _inherits3.default)(TableBody, _Component);
- function Slider() {
+ function TableBody() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, Slider);
-
- for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
- args[_key3] = arguments[_key3];
- }
-
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Slider.__proto__ || (0, _getPrototypeOf2.default)(Slider)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- active: false,
- dragging: false,
- focused: false,
- hovered: false,
- value: 0
- }, _this.track = null, _this.handle = null, _this.handleKeyDown = function (event) {
- var _this$props = _this.props,
- axis = _this$props.axis,
- min = _this$props.min,
- max = _this$props.max,
- step = _this$props.step;
-
-
- var action = void 0;
-
- switch ((0, _keycode2.default)(event)) {
- case 'page down':
- case 'down':
- if (axis === 'y-reverse') {
- action = 'increase';
- } else {
- action = 'decrease';
- }
- break;
- case 'left':
- if (axis === 'x-reverse') {
- action = 'increase';
- } else {
- action = 'decrease';
- }
- break;
- case 'page up':
- case 'up':
- if (axis === 'y-reverse') {
- action = 'decrease';
- } else {
- action = 'increase';
- }
- break;
- case 'right':
- if (axis === 'x-reverse') {
- action = 'decrease';
- } else {
- action = 'increase';
- }
- break;
- case 'home':
- action = 'min';
- break;
- case 'end':
- action = 'max';
- break;
- }
-
- if (action) {
- var newValue = void 0;
-
- // Cancel scroll
- event.preventDefault();
-
- switch (action) {
- case 'decrease':
- newValue = _this.state.value - step;
- break;
- case 'increase':
- newValue = _this.state.value + step;
- break;
- case 'min':
- newValue = min;
- break;
- case 'max':
- newValue = max;
- break;
- }
-
- // We need to use toFixed() because of float point errors.
- // For example, 0.01 + 0.06 = 0.06999999999999999
- newValue = parseFloat(newValue.toFixed(5));
-
- if (newValue > max) {
- newValue = max;
- } else if (newValue < min) {
- newValue = min;
- }
-
- if (_this.state.value !== newValue) {
- _this.setState({
- value: newValue
- });
-
- if (_this.props.onChange) {
- _this.props.onChange(event, newValue);
- }
- }
- }
- }, _this.handleDragMouseMove = function (event) {
- _this.onDragUpdate(event, 'mouse');
- }, _this.handleTouchMove = function (event) {
- _this.onDragUpdate(event, 'touch');
- }, _this.handleMouseEnd = function (event) {
- document.removeEventListener('mousemove', _this.handleDragMouseMove);
- document.removeEventListener('mouseup', _this.handleMouseEnd);
-
- _this.onDragStop(event);
- }, _this.handleTouchEnd = function (event) {
- document.removeEventListener('touchmove', _this.handleTouchMove);
- document.removeEventListener('touchup', _this.handleTouchEnd);
- document.removeEventListener('touchend', _this.handleTouchEnd);
- document.removeEventListener('touchcancel', _this.handleTouchEnd);
-
- _this.onDragStop(event);
- }, _this.handleTouchStart = function (event) {
- if (_this.props.disabled) {
- return;
- }
-
- var position = void 0;
- if (isMouseControlInverted(_this.props.axis)) {
- position = _this.getTrackOffset() - event.touches[0][mainAxisClientOffsetProperty[_this.props.axis]];
- } else {
- position = event.touches[0][mainAxisClientOffsetProperty[_this.props.axis]] - _this.getTrackOffset();
- }
- _this.setValueFromPosition(event, position);
-
- document.addEventListener('touchmove', _this.handleTouchMove);
- document.addEventListener('touchup', _this.handleTouchEnd);
- document.addEventListener('touchend', _this.handleTouchEnd);
- document.addEventListener('touchcancel', _this.handleTouchEnd);
-
- _this.onDragStart(event);
-
- // Cancel scroll and context menu
- event.preventDefault();
- }, _this.handleFocus = function (event) {
- _this.setState({
- focused: true
- });
-
- if (_this.props.onFocus) {
- _this.props.onFocus(event);
- }
- }, _this.handleBlur = function (event) {
- _this.setState({
- focused: false,
- active: false
- });
-
- if (_this.props.onBlur) {
- _this.props.onBlur(event);
- }
- }, _this.handleMouseDown = function (event) {
- if (_this.props.disabled) {
- return;
- }
-
- var position = void 0;
- if (isMouseControlInverted(_this.props.axis)) {
- position = _this.getTrackOffset() - event[mainAxisClientOffsetProperty[_this.props.axis]];
- } else {
- position = event[mainAxisClientOffsetProperty[_this.props.axis]] - _this.getTrackOffset();
- }
- _this.setValueFromPosition(event, position);
-
- document.addEventListener('mousemove', _this.handleDragMouseMove);
- document.addEventListener('mouseup', _this.handleMouseEnd);
-
- // Cancel text selection
- event.preventDefault();
-
- // Set focus manually since we called preventDefault()
- _this.handle.focus();
+ (0, _classCallCheck3.default)(this, TableBody);
- _this.onDragStart(event);
- }, _this.handleMouseUp = function () {
- if (!_this.props.disabled) {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableBody.__proto__ || (0, _getPrototypeOf2.default)(TableBody)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ selectedRows: []
+ }, _this.handleClickAway = function () {
+ if (_this.props.deselectOnClickaway && _this.state.selectedRows.length) {
_this.setState({
- active: false
+ selectedRows: []
});
+ if (_this.props.onRowSelection) {
+ _this.props.onRowSelection([]);
+ }
+ }
+ }, _this.onRowClick = function (event, rowNumber) {
+ event.stopPropagation();
+
+ if (_this.props.selectable) {
+ // Prevent text selection while selecting rows.
+ window.getSelection().removeAllRanges();
+ _this.processRowSelection(event, rowNumber);
+ }
+ }, _this.onCellClick = function (event, rowNumber, columnNumber) {
+ event.stopPropagation();
+ if (_this.props.onCellClick) {
+ _this.props.onCellClick(rowNumber, _this.getColumnId(columnNumber), event);
+ }
+ }, _this.onCellHover = function (event, rowNumber, columnNumber) {
+ if (_this.props.onCellHover) {
+ _this.props.onCellHover(rowNumber, _this.getColumnId(columnNumber), event);
+ }
+ _this.onRowHover(event, rowNumber);
+ }, _this.onCellHoverExit = function (event, rowNumber, columnNumber) {
+ if (_this.props.onCellHoverExit) {
+ _this.props.onCellHoverExit(rowNumber, _this.getColumnId(columnNumber), event);
+ }
+ _this.onRowHoverExit(event, rowNumber);
+ }, _this.onRowHover = function (event, rowNumber) {
+ if (_this.props.onRowHover) {
+ _this.props.onRowHover(rowNumber);
+ }
+ }, _this.onRowHoverExit = function (event, rowNumber) {
+ if (_this.props.onRowHoverExit) {
+ _this.props.onRowHoverExit(rowNumber);
}
- }, _this.handleMouseEnter = function () {
- _this.setState({
- hovered: true
- });
- }, _this.handleMouseLeave = function () {
- _this.setState({
- hovered: false
- });
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(Slider, [{
+ (0, _createClass3.default)(TableBody, [{
key: 'componentWillMount',
value: function componentWillMount() {
- var _props = this.props,
- valueProp = _props.value,
- defaultValue = _props.defaultValue,
- min = _props.min,
- max = _props.max;
-
-
- var value = valueProp;
- if (value === undefined) {
- value = defaultValue !== undefined ? defaultValue : min;
- }
-
- if (value > max) {
- value = max;
- } else if (value < min) {
- value = min;
- }
-
- this.setState({
- value: value
- });
+ this.setState({ selectedRows: this.calculatePreselectedRows(this.props) });
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
- if (nextProps.value !== undefined && !this.state.dragging) {
- this.setState({
- value: nextProps.value
- });
+ if (this.props.allRowsSelected !== nextProps.allRowsSelected) {
+ if (!nextProps.allRowsSelected) {
+ this.setState({
+ selectedRows: []
+ });
+ } else {
+ this.setState({
+ selectedRows: this.calculatePreselectedRows(nextProps)
+ });
+ }
}
}
}, {
- key: 'getValue',
- value: function getValue() {
- false ? (0, _warning2.default)(false, 'Material-UI Slider: getValue() method is deprecated.\n Use the onChange callbacks instead.\n It will be removed with v0.17.0.') : void 0;
+ key: 'createRows',
+ value: function createRows() {
+ var _this2 = this;
- return this.state.value;
+ var numChildren = _react2.default.Children.count(this.props.children);
+ var rowNumber = 0;
+ var handlers = {
+ onCellClick: this.onCellClick,
+ onCellHover: this.onCellHover,
+ onCellHoverExit: this.onCellHoverExit,
+ onRowHover: this.onRowHover,
+ onRowHoverExit: this.onRowHoverExit,
+ onRowClick: this.onRowClick
+ };
+
+ return _react2.default.Children.map(this.props.children, function (child) {
+ if (_react2.default.isValidElement(child)) {
+ var _ret2 = function () {
+ var props = {
+ hoverable: _this2.props.showRowHover,
+ selected: _this2.isRowSelected(rowNumber),
+ striped: _this2.props.stripedRows && rowNumber % 2 === 0,
+ rowNumber: rowNumber++
+ };
+
+ if (rowNumber === numChildren) {
+ props.displayBorder = false;
+ }
+
+ var children = [_this2.createRowCheckboxColumn(props)];
+
+ _react2.default.Children.forEach(child.props.children, function (child) {
+ children.push(child);
+ });
+
+ return {
+ v: _react2.default.cloneElement(child, (0, _extends3.default)({}, props, handlers), children)
+ };
+ }();
+
+ if ((typeof _ret2 === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret2)) === "object") return _ret2.v;
+ }
+ });
}
}, {
- key: 'clearValue',
- value: function clearValue() {
- false ? (0, _warning2.default)(false, 'Material-UI Slider: clearValue() method is deprecated.\n Use the value property to control the component instead.\n It will be removed with v0.17.0.') : void 0;
+ key: 'createRowCheckboxColumn',
+ value: function createRowCheckboxColumn(rowProps) {
+ if (!this.props.displayRowCheckbox) {
+ return null;
+ }
- this.setState({
- value: this.props.min
+ var key = rowProps.rowNumber + '-cb';
+ var disabled = !this.props.selectable;
+ var checkbox = _react2.default.createElement(_Checkbox2.default, {
+ ref: 'rowSelectCB',
+ name: key,
+ value: 'selected',
+ disabled: disabled,
+ checked: rowProps.selected
});
+
+ return _react2.default.createElement(
+ _TableRowColumn2.default,
+ {
+ key: key,
+ columnNumber: 0,
+ style: {
+ width: 24,
+ cursor: disabled ? 'not-allowed' : 'inherit'
+ }
+ },
+ checkbox
+ );
}
}, {
- key: 'getTrackOffset',
- value: function getTrackOffset() {
- return this.track.getBoundingClientRect()[mainAxisOffsetProperty[this.props.axis]];
+ key: 'calculatePreselectedRows',
+ value: function calculatePreselectedRows(props) {
+ // Determine what rows are 'pre-selected'.
+ var preSelectedRows = [];
+
+ if (props.selectable && props.preScanRows) {
+ (function () {
+ var index = 0;
+ _react2.default.Children.forEach(props.children, function (child) {
+ if (_react2.default.isValidElement(child)) {
+ if (child.props.selected && (preSelectedRows.length === 0 || props.multiSelectable)) {
+ preSelectedRows.push(index);
+ }
+
+ index++;
+ }
+ });
+ })();
+ }
+
+ return preSelectedRows;
}
}, {
- key: 'onDragStart',
- value: function onDragStart(event) {
- this.setState({
- dragging: true,
- active: true
- });
+ key: 'isRowSelected',
+ value: function isRowSelected(rowNumber) {
+ if (this.props.allRowsSelected) {
+ return true;
+ }
- if (this.props.onDragStart) {
- this.props.onDragStart(event);
+ for (var i = 0; i < this.state.selectedRows.length; i++) {
+ var selection = this.state.selectedRows[i];
+
+ if ((typeof selection === 'undefined' ? 'undefined' : (0, _typeof3.default)(selection)) === 'object') {
+ if (this.isValueInRange(rowNumber, selection)) return true;
+ } else {
+ if (selection === rowNumber) return true;
+ }
}
+
+ return false;
}
}, {
- key: 'onDragUpdate',
- value: function onDragUpdate(event, type) {
- var _this2 = this;
+ key: 'isValueInRange',
+ value: function isValueInRange(value, range) {
+ if (!range) return false;
- if (this.dragRunning) {
- return;
+ if (range.start <= value && value <= range.end || range.end <= value && value <= range.start) {
+ return true;
}
- this.dragRunning = true;
- requestAnimationFrame(function () {
- _this2.dragRunning = false;
+ return false;
+ }
+ }, {
+ key: 'processRowSelection',
+ value: function processRowSelection(event, rowNumber) {
+ var selectedRows = this.state.selectedRows;
- var source = type === 'touch' ? event.touches[0] : event;
+ if (event.shiftKey && this.props.multiSelectable && selectedRows.length) {
+ var lastIndex = selectedRows.length - 1;
+ var lastSelection = selectedRows[lastIndex];
- var position = void 0;
- if (isMouseControlInverted(_this2.props.axis)) {
- position = _this2.getTrackOffset() - source[mainAxisClientOffsetProperty[_this2.props.axis]];
+ if ((typeof lastSelection === 'undefined' ? 'undefined' : (0, _typeof3.default)(lastSelection)) === 'object') {
+ lastSelection.end = rowNumber;
} else {
- position = source[mainAxisClientOffsetProperty[_this2.props.axis]] - _this2.getTrackOffset();
+ selectedRows.splice(lastIndex, 1, { start: lastSelection, end: rowNumber });
}
+ } else if ((event.ctrlKey && !event.metaKey || event.metaKey && !event.ctrlKey) && this.props.multiSelectable) {
+ var idx = selectedRows.indexOf(rowNumber);
+ if (idx < 0) {
+ var foundRange = false;
+ for (var i = 0; i < selectedRows.length; i++) {
+ var range = selectedRows[i];
+ if ((typeof range === 'undefined' ? 'undefined' : (0, _typeof3.default)(range)) !== 'object') continue;
+
+ if (this.isValueInRange(rowNumber, range)) {
+ var _selectedRows;
+
+ foundRange = true;
+ var values = this.splitRange(range, rowNumber);
+ (_selectedRows = selectedRows).splice.apply(_selectedRows, [i, 1].concat((0, _toConsumableArray3.default)(values)));
+ }
+ }
- if (!_this2.props.disabled) {
- _this2.setValueFromPosition(event, position);
+ if (!foundRange) selectedRows.push(rowNumber);
+ } else {
+ selectedRows.splice(idx, 1);
}
- });
+ } else {
+ if (selectedRows.length === 1 && selectedRows[0] === rowNumber) {
+ selectedRows = [];
+ } else {
+ selectedRows = [rowNumber];
+ }
+ }
+
+ this.setState({ selectedRows: selectedRows });
+ if (this.props.onRowSelection) this.props.onRowSelection(this.flattenRanges(selectedRows));
}
}, {
- key: 'onDragStop',
- value: function onDragStop(event) {
- this.setState({
- dragging: false,
- active: false
- });
+ key: 'splitRange',
+ value: function splitRange(range, splitPoint) {
+ var splitValues = [];
+ var startOffset = range.start - splitPoint;
+ var endOffset = range.end - splitPoint;
- if (this.props.onDragStop) {
- this.props.onDragStop(event);
- }
+ // Process start half
+ splitValues.push.apply(splitValues, (0, _toConsumableArray3.default)(this.genRangeOfValues(splitPoint, startOffset)));
+
+ // Process end half
+ splitValues.push.apply(splitValues, (0, _toConsumableArray3.default)(this.genRangeOfValues(splitPoint, endOffset)));
+
+ return splitValues;
}
}, {
- key: 'setValueFromPosition',
- value: function setValueFromPosition(event, position) {
- var positionMax = this.track[mainAxisClientProperty[this.props.axis]];
- if (position < 0) {
- position = 0;
- } else if (position > positionMax) {
- position = positionMax;
+ key: 'genRangeOfValues',
+ value: function genRangeOfValues(start, offset) {
+ var values = [];
+ var dir = offset > 0 ? -1 : 1; // This forces offset to approach 0 from either direction.
+ while (offset !== 0) {
+ values.push(start + offset);
+ offset += dir;
}
- var _props2 = this.props,
- step = _props2.step,
- min = _props2.min,
- max = _props2.max;
-
+ return values;
+ }
+ }, {
+ key: 'flattenRanges',
+ value: function flattenRanges(selectedRows) {
+ var rows = [];
+ var _iteratorNormalCompletion = true;
+ var _didIteratorError = false;
+ var _iteratorError = undefined;
- var value = void 0;
- value = position / positionMax * (max - min);
- value = Math.round(value / step) * step + min;
- value = parseFloat(value.toFixed(5));
+ try {
+ for (var _iterator = (0, _getIterator3.default)(selectedRows), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
+ var selection = _step.value;
- if (value > max) {
- value = max;
- } else if (value < min) {
- value = min;
+ if ((typeof selection === 'undefined' ? 'undefined' : (0, _typeof3.default)(selection)) === 'object') {
+ var values = this.genRangeOfValues(selection.end, selection.start - selection.end);
+ rows.push.apply(rows, [selection.end].concat((0, _toConsumableArray3.default)(values)));
+ } else {
+ rows.push(selection);
+ }
+ }
+ } catch (err) {
+ _didIteratorError = true;
+ _iteratorError = err;
+ } finally {
+ try {
+ if (!_iteratorNormalCompletion && _iterator.return) {
+ _iterator.return();
+ }
+ } finally {
+ if (_didIteratorError) {
+ throw _iteratorError;
+ }
+ }
}
- if (this.state.value !== value) {
- this.setState({
- value: value
- });
-
- if (this.props.onChange) {
- this.props.onChange(event, value);
- }
+ return rows.sort();
+ }
+ }, {
+ key: 'getColumnId',
+ value: function getColumnId(columnNumber) {
+ var columnId = columnNumber;
+ if (this.props.displayRowCheckbox) {
+ columnId--;
}
+
+ return columnId;
}
}, {
key: 'render',
value: function render() {
- var _this3 = this;
-
- var _props3 = this.props,
- axis = _props3.axis,
- description = _props3.description,
- disabled = _props3.disabled,
- disableFocusRipple = _props3.disableFocusRipple,
- error = _props3.error,
- max = _props3.max,
- min = _props3.min,
- name = _props3.name,
- onBlur = _props3.onBlur,
- onChange = _props3.onChange,
- onDragStart = _props3.onDragStart,
- onDragStop = _props3.onDragStop,
- onFocus = _props3.onFocus,
- required = _props3.required,
- sliderStyle = _props3.sliderStyle,
- step = _props3.step,
- style = _props3.style,
- other = (0, _objectWithoutProperties3.default)(_props3, ['axis', 'description', 'disabled', 'disableFocusRipple', 'error', 'max', 'min', 'name', 'onBlur', 'onChange', 'onDragStart', 'onDragStop', 'onFocus', 'required', 'sliderStyle', 'step', 'style']);
- var _state = this.state,
- active = _state.active,
- focused = _state.focused,
- hovered = _state.hovered,
- value = _state.value;
+ var _props = this.props,
+ className = _props.className,
+ style = _props.style;
var prepareStyles = this.context.muiTheme.prepareStyles;
- var styles = getStyles(this.props, this.context, this.state);
- var percent = getPercent(value, min, max);
-
- var handleStyles = {};
- if (percent === 0) {
- handleStyles = (0, _simpleAssign2.default)({}, styles.handle, styles.handleWhenPercentZero, active && styles.handleWhenActive, (hovered || focused) && !disabled && styles.handleWhenPercentZeroAndFocused, disabled && styles.handleWhenPercentZeroAndDisabled);
- } else {
- handleStyles = (0, _simpleAssign2.default)({}, styles.handle, active && styles.handleWhenActive, disabled && styles.handleWhenDisabled);
- }
-
- var rippleStyle = (0, _simpleAssign2.default)({}, styles.ripple, percent === 0 && styles.rippleWhenPercentZero);
return _react2.default.createElement(
- 'div',
- (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)({}, style)) }),
- _react2.default.createElement(
- 'span',
- null,
- description
- ),
- _react2.default.createElement(
- 'span',
- null,
- error
- ),
+ _ClickAwayListener2.default,
+ { onClickAway: this.handleClickAway },
_react2.default.createElement(
- 'div',
- {
- style: prepareStyles((0, _simpleAssign2.default)({}, styles.slider, sliderStyle)),
- onFocus: this.handleFocus,
- onBlur: this.handleBlur,
- onMouseDown: this.handleMouseDown,
- onMouseEnter: this.handleMouseEnter,
- onMouseLeave: this.handleMouseLeave,
- onMouseUp: this.handleMouseUp,
- onTouchStart: this.handleTouchStart,
- onKeyDown: !disabled && this.handleKeyDown
- },
- _react2.default.createElement(
- 'div',
- { ref: function ref(node) {
- return _this3.track = node;
- }, style: prepareStyles(styles.track) },
- _react2.default.createElement('div', { style: prepareStyles(styles.filled) }),
- _react2.default.createElement('div', { style: prepareStyles(styles.remaining) }),
- _react2.default.createElement(
- 'div',
- {
- ref: function ref(node) {
- return _this3.handle = node;
- },
- style: prepareStyles(handleStyles),
- tabIndex: 0
- },
- !disabled && !disableFocusRipple && _react2.default.createElement(_FocusRipple2.default, {
- style: rippleStyle,
- innerStyle: styles.rippleInner,
- show: (hovered || focused) && !active,
- color: styles.rippleColor.fill
- })
- )
- )
- ),
- _react2.default.createElement('input', {
- type: 'hidden',
- name: name,
- value: value,
- required: required,
- min: min,
- max: max,
- step: step
- })
+ 'tbody',
+ { className: className, style: prepareStyles((0, _simpleAssign2.default)({}, style)) },
+ this.createRows()
+ )
);
}
}]);
- return Slider;
+ return TableBody;
}(_react.Component);
-Slider.defaultProps = {
- axis: 'x',
- disabled: false,
- disableFocusRipple: false,
- max: 1,
- min: 0,
- required: true,
- step: 0.01,
+TableBody.muiName = 'TableBody';
+TableBody.defaultProps = {
+ allRowsSelected: false,
+ deselectOnClickaway: true,
+ displayRowCheckbox: true,
+ multiSelectable: false,
+ preScanRows: true,
+ selectable: true,
style: {}
};
-Slider.contextTypes = {
+TableBody.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? Slider.propTypes = {
+ false ? TableBody.propTypes = {
/**
- * The axis on which the slider will slide.
+ * @ignore
+ * Set to true to indicate that all rows should be selected.
*/
- axis: _react.PropTypes.oneOf(['x', 'x-reverse', 'y', 'y-reverse']),
+ allRowsSelected: _react.PropTypes.bool,
/**
- * The default value of the slider.
+ * Children passed to table body.
*/
- defaultValue: valueInRangePropType,
+ children: _react.PropTypes.node,
/**
- * Describe the slider.
+ * The css class name of the root element.
*/
- description: (0, _deprecatedPropType2.default)(_react.PropTypes.node, 'Use a sibling node element instead. It will be removed with v0.17.0.'),
+ className: _react.PropTypes.string,
/**
- * Disables focus ripple if set to true.
+ * Controls whether or not to deselect all selected
+ * rows after clicking outside the table.
*/
- disableFocusRipple: _react.PropTypes.bool,
+ deselectOnClickaway: _react.PropTypes.bool,
/**
- * If true, the slider will not be interactable.
+ * Controls the display of the row checkbox. The default value is true.
*/
- disabled: _react.PropTypes.bool,
+ displayRowCheckbox: _react.PropTypes.bool,
/**
- * An error message for the slider.
+ * @ignore
+ * If true, multiple table rows can be selected.
+ * CTRL/CMD+Click and SHIFT+Click are valid actions.
+ * The default value is false.
*/
- error: (0, _deprecatedPropType2.default)(_react.PropTypes.node, 'Use a sibling node element instead. It will be removed with v0.17.0.'),
+ multiSelectable: _react.PropTypes.bool,
/**
- * The maximum value the slider can slide to on
- * a scale from 0 to 1 inclusive. Cannot be equal to min.
+ * @ignore
+ * Callback function for when a cell is clicked.
*/
- max: minMaxPropType,
+ onCellClick: _react.PropTypes.func,
/**
- * The minimum value the slider can slide to on a scale
- * from 0 to 1 inclusive. Cannot be equal to max.
+ * @ignore
+ * Called when a table cell is hovered. rowNumber
+ * is the row number of the hovered row and columnId
+ * is the column number or the column key of the cell.
*/
- min: minMaxPropType,
+ onCellHover: _react.PropTypes.func,
/**
- * The name of the slider. Behaves like the name attribute
- * of an input element.
+ * @ignore
+ * Called when a table cell is no longer hovered.
+ * rowNumber is the row number of the row and columnId
+ * is the column number or the column key of the cell.
*/
- name: _react.PropTypes.string,
- /** @ignore */
- onBlur: _react.PropTypes.func,
+ onCellHoverExit: _react.PropTypes.func,
/**
- * Callback function that is fired when the slider's value changed.
- *
- * @param {object} event KeyDown event targeting the slider.
- * @param {number} newValue The new value of the slider.
+ * @ignore
+ * Called when a table row is hovered.
+ * rowNumber is the row number of the hovered row.
*/
- onChange: _react.PropTypes.func,
+ onRowHover: _react.PropTypes.func,
/**
- * Callback function that is fired when the slider has begun to move.
- *
- * @param {object} event MouseDown or TouchStart event targeting the slider.
+ * @ignore
+ * Called when a table row is no longer
+ * hovered. rowNumber is the row number of the row
+ * that is no longer hovered.
*/
- onDragStart: _react.PropTypes.func,
+ onRowHoverExit: _react.PropTypes.func,
/**
- * Callback function that is fired when the slide has stopped moving.
- *
- * @param {object} event MouseEnd or TouchEnd event targeting the slider.
+ * @ignore
+ * Called when a row is selected. selectedRows is an
+ * array of all row selections. IF all rows have been selected,
+ * the string "all" will be returned instead to indicate that
+ * all rows have been selected.
*/
- onDragStop: _react.PropTypes.func,
- /** @ignore */
- onFocus: _react.PropTypes.func,
+ onRowSelection: _react.PropTypes.func,
/**
- * Whether or not the slider is required in a form.
+ * Controls whether or not the rows are pre-scanned to determine
+ * initial state. If your table has a large number of rows and
+ * you are experiencing a delay in rendering, turn off this property.
*/
- required: _react.PropTypes.bool,
+ preScanRows: _react.PropTypes.bool,
/**
- * Override the inline-styles of the inner slider element.
+ * @ignore
+ * If true, table rows can be selected. If multiple
+ * row selection is desired, enable multiSelectable.
+ * The default value is true.
*/
- sliderStyle: _react.PropTypes.object,
+ selectable: _react.PropTypes.bool,
/**
- * The granularity the slider can step through values.
+ * If true, table rows will be highlighted when
+ * the cursor is hovering over the row. The default
+ * value is false.
*/
- step: _react.PropTypes.number,
+ showRowHover: _react.PropTypes.bool,
/**
- * Override the inline-styles of the root element.
+ * If true, every other table row starting
+ * with the first row will be striped. The default value is false.
*/
- style: _react.PropTypes.object,
+ stripedRows: _react.PropTypes.bool,
/**
- * The value of the slider.
+ * Override the inline-styles of the root element.
*/
- value: valueInRangePropType
+ style: _react.PropTypes.object
} : void 0;
-exports.default = Slider;
+exports.default = TableBody;
/***/ }),
/* 825 */
@@ -70324,75 +73112,157 @@ exports.default = Slider;
"use strict";
-exports.__esModule = true;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
-var _defineProperty = __webpack_require__(185);
+var _extends2 = __webpack_require__(7);
-var _defineProperty2 = _interopRequireDefault(_defineProperty);
+var _extends3 = _interopRequireDefault(_extends2);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _toConsumableArray2 = __webpack_require__(95);
-exports.default = function (obj, key, value) {
- if (key in obj) {
- (0, _defineProperty2.default)(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- } else {
- obj[key] = value;
- }
+var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
- return obj;
-};
+var _objectWithoutProperties2 = __webpack_require__(8);
-/***/ }),
-/* 826 */
-/***/ (function(module, exports, __webpack_require__) {
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-"use strict";
+var _getPrototypeOf = __webpack_require__(3);
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = deprecated;
+var _classCallCheck2 = __webpack_require__(1);
-var _warning = __webpack_require__(17);
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-var _warning2 = _interopRequireDefault(_warning);
+var _createClass2 = __webpack_require__(2);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _createClass3 = _interopRequireDefault(_createClass2);
-var warned = {}; /**
- * This module is taken from https://github.com/react-bootstrap/react-prop-types.
- * It's not a dependency to reduce build size / install time.
- * It should be pretty stable.
- */
-function deprecated(validator, reason) {
- return function validate(props, propName, componentName, location, propFullName) {
- var componentNameSafe = componentName || '<>';
- var propFullNameSafe = propFullName || propName;
+var _possibleConstructorReturn2 = __webpack_require__(4);
- if (props[propName] != null) {
- var messageKey = componentName + '.' + propName;
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- false ? (0, _warning2.default)(warned[messageKey], 'The ' + location + ' `' + propFullNameSafe + '` of ' + ('`' + componentNameSafe + '` is deprecated. ' + reason)) : void 0;
+var _inherits2 = __webpack_require__(5);
- warned[messageKey] = true;
- }
+var _inherits3 = _interopRequireDefault(_inherits2);
- for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {
- args[_key - 5] = arguments[_key];
- }
+var _simpleAssign = __webpack_require__(6);
- return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _TableRowColumn = __webpack_require__(211);
+
+var _TableRowColumn2 = _interopRequireDefault(_TableRowColumn);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function getStyles(props, context) {
+ var tableFooter = context.muiTheme.tableFooter;
+
+
+ return {
+ cell: {
+ borderTop: '1px solid ' + tableFooter.borderColor,
+ verticalAlign: 'bottom',
+ padding: 20,
+ textAlign: 'left',
+ whiteSpace: 'nowrap'
+ }
};
}
+var TableFooter = function (_Component) {
+ (0, _inherits3.default)(TableFooter, _Component);
+
+ function TableFooter() {
+ (0, _classCallCheck3.default)(this, TableFooter);
+ return (0, _possibleConstructorReturn3.default)(this, (TableFooter.__proto__ || (0, _getPrototypeOf2.default)(TableFooter)).apply(this, arguments));
+ }
+
+ (0, _createClass3.default)(TableFooter, [{
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ adjustForCheckbox = _props.adjustForCheckbox,
+ children = _props.children,
+ className = _props.className,
+ style = _props.style,
+ other = (0, _objectWithoutProperties3.default)(_props, ['adjustForCheckbox', 'children', 'className', 'style']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
+
+ var styles = getStyles(this.props, this.context);
+
+ var footerRows = _react2.default.Children.map(children, function (child, rowNumber) {
+ var newChildProps = {
+ displayBorder: false,
+ key: 'f-' + rowNumber,
+ rowNumber: rowNumber,
+ style: (0, _simpleAssign2.default)({}, styles.cell, child.props.style)
+ };
+
+ var newDescendants = void 0;
+
+ if (adjustForCheckbox) {
+ newDescendants = [_react2.default.createElement(_TableRowColumn2.default, { key: 'fpcb' + rowNumber, style: { width: 24 } })].concat((0, _toConsumableArray3.default)(_react2.default.Children.toArray(child.props.children)));
+ } else {
+ newDescendants = child.props.children;
+ }
+
+ return _react2.default.cloneElement(child, newChildProps, newDescendants);
+ });
+
+ return _react2.default.createElement(
+ 'tfoot',
+ (0, _extends3.default)({ className: className, style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, other),
+ footerRows
+ );
+ }
+ }]);
+ return TableFooter;
+}(_react.Component);
+
+TableFooter.muiName = 'TableFooter';
+TableFooter.defaultProps = {
+ adjustForCheckbox: true,
+ style: {}
+};
+TableFooter.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? TableFooter.propTypes = {
+ /**
+ * @ignore
+ * Controls whether or not header rows should be adjusted
+ * for a checkbox column. If the select all checkbox is true,
+ * this property will not influence the number of columns.
+ * This is mainly useful for "super header" rows so that
+ * the checkbox column does not create an offset that needs
+ * to be accounted for manually.
+ */
+ adjustForCheckbox: _react.PropTypes.bool,
+ /**
+ * Children passed to table footer.
+ */
+ children: _react.PropTypes.node,
+ /**
+ * The css class name of the root element.
+ */
+ className: _react.PropTypes.string,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
+} : void 0;
+exports.default = TableFooter;
+
/***/ }),
-/* 827 */
+/* 826 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -70402,98 +73272,251 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _TextField = __webpack_require__(97);
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-var _TextField2 = _interopRequireDefault(_TextField);
+var _inherits2 = __webpack_require__(5);
-var _createComponent = __webpack_require__(43);
+var _inherits3 = _interopRequireDefault(_inherits2);
-var _createComponent2 = _interopRequireDefault(_createComponent);
+var _simpleAssign = __webpack_require__(6);
-var _mapError = __webpack_require__(60);
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-var _mapError2 = _interopRequireDefault(_mapError);
+var _react = __webpack_require__(0);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _react2 = _interopRequireDefault(_react);
-function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+var _Checkbox = __webpack_require__(207);
-exports.default = (0, _createComponent2.default)(_TextField2.default, function (_ref) {
- var defaultValue = _ref.defaultValue,
- props = _objectWithoutProperties(_ref, ['defaultValue']);
+var _Checkbox2 = _interopRequireDefault(_Checkbox);
- return (0, _mapError2.default)(props);
-});
+var _TableHeaderColumn = __webpack_require__(340);
-/***/ }),
-/* 828 */
-/***/ (function(module, exports, __webpack_require__) {
+var _TableHeaderColumn2 = _interopRequireDefault(_TableHeaderColumn);
-"use strict";
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+function getStyles(props, context) {
+ var tableHeader = context.muiTheme.tableHeader;
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+ return {
+ root: {
+ borderBottom: '1px solid ' + tableHeader.borderColor
+ }
+ };
+}
-var _TimePicker = __webpack_require__(829);
+var TableHeader = function (_Component) {
+ (0, _inherits3.default)(TableHeader, _Component);
-var _TimePicker2 = _interopRequireDefault(_TimePicker);
+ function TableHeader() {
+ var _ref;
-var _createComponent = __webpack_require__(43);
+ var _temp, _this, _ret;
-var _createComponent2 = _interopRequireDefault(_createComponent);
+ (0, _classCallCheck3.default)(this, TableHeader);
-var _mapError = __webpack_require__(60);
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
-var _mapError2 = _interopRequireDefault(_mapError);
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableHeader.__proto__ || (0, _getPrototypeOf2.default)(TableHeader)).call.apply(_ref, [this].concat(args))), _this), _this.handleCheckAll = function (event, checked) {
+ if (_this.props.onSelectAll) {
+ _this.props.onSelectAll(checked);
+ }
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ (0, _createClass3.default)(TableHeader, [{
+ key: 'createSuperHeaderRows',
+ value: function createSuperHeaderRows() {
+ var numChildren = _react2.default.Children.count(this.props.children);
+ if (numChildren === 1) return undefined;
-function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+ var superHeaders = [];
+ for (var index = 0; index < numChildren - 1; index++) {
+ var child = this.props.children[index];
-exports.default = (0, _createComponent2.default)(_TimePicker2.default, function (_ref) {
- var _ref$input = _ref.input,
- onBlur = _ref$input.onBlur,
- inputProps = _objectWithoutProperties(_ref$input, ['onBlur']),
- defaultTime = _ref.defaultTime,
- _onChange = _ref.onChange,
- props = _objectWithoutProperties(_ref, ['input', 'defaultTime', 'onChange']);
+ if (!_react2.default.isValidElement(child)) continue;
- return _extends({}, inputProps, (0, _mapError2.default)(props), {
- onChange: function onChange(event, value) {
- inputProps.onChange(value);
- if (_onChange) {
- _onChange(value);
+ var props = {
+ key: 'sh' + index,
+ rowNumber: index
+ };
+ superHeaders.push(this.createSuperHeaderRow(child, props));
}
- }
- });
-});
-/***/ }),
-/* 829 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (superHeaders.length) return superHeaders;
+ }
+ }, {
+ key: 'createSuperHeaderRow',
+ value: function createSuperHeaderRow(child, props) {
+ var children = [];
+ if (this.props.adjustForCheckbox) {
+ children.push(this.getCheckboxPlaceholder(props));
+ }
+ _react2.default.Children.forEach(child.props.children, function (child) {
+ children.push(child);
+ });
-"use strict";
+ return _react2.default.cloneElement(child, props, children);
+ }
+ }, {
+ key: 'createBaseHeaderRow',
+ value: function createBaseHeaderRow() {
+ var numChildren = _react2.default.Children.count(this.props.children);
+ var child = numChildren === 1 ? this.props.children : this.props.children[numChildren - 1];
+ var props = {
+ key: 'h' + numChildren,
+ rowNumber: numChildren
+ };
+ var children = [this.getSelectAllCheckboxColumn(props)];
+ _react2.default.Children.forEach(child.props.children, function (child) {
+ children.push(child);
+ });
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = undefined;
+ return _react2.default.cloneElement(child, props, children);
+ }
+ }, {
+ key: 'getCheckboxPlaceholder',
+ value: function getCheckboxPlaceholder(props) {
+ if (!this.props.adjustForCheckbox) return null;
+
+ var disabled = !this.props.enableSelectAll;
+ var key = 'hpcb' + props.rowNumber;
+ return _react2.default.createElement(_TableHeaderColumn2.default, {
+ key: key,
+ style: {
+ width: 24,
+ cursor: disabled ? 'not-allowed' : 'inherit'
+ }
+ });
+ }
+ }, {
+ key: 'getSelectAllCheckboxColumn',
+ value: function getSelectAllCheckboxColumn(props) {
+ if (!this.props.displaySelectAll) return this.getCheckboxPlaceholder(props);
+
+ var disabled = !this.props.enableSelectAll;
+ var checkbox = _react2.default.createElement(_Checkbox2.default, {
+ key: 'selectallcb',
+ name: 'selectallcb',
+ value: 'selected',
+ disabled: disabled,
+ checked: this.props.selectAllSelected,
+ onCheck: this.handleCheckAll
+ });
-var _TimePicker = __webpack_require__(830);
+ var key = 'hpcb' + props.rowNumber;
+ return _react2.default.createElement(
+ _TableHeaderColumn2.default,
+ {
+ key: key,
+ style: {
+ width: 24,
+ cursor: disabled ? 'not-allowed' : 'inherit'
+ }
+ },
+ checkbox
+ );
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ className = _props.className,
+ style = _props.style;
+ var prepareStyles = this.context.muiTheme.prepareStyles;
-var _TimePicker2 = _interopRequireDefault(_TimePicker);
+ var styles = getStyles(this.props, this.context);
+ var superHeaderRows = this.createSuperHeaderRows();
+ var baseHeaderRow = this.createBaseHeaderRow();
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ return _react2.default.createElement(
+ 'thead',
+ { className: className, style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) },
+ superHeaderRows,
+ baseHeaderRow
+ );
+ }
+ }]);
+ return TableHeader;
+}(_react.Component);
-exports.default = _TimePicker2.default;
+TableHeader.muiName = 'TableHeader';
+TableHeader.defaultProps = {
+ adjustForCheckbox: true,
+ displaySelectAll: true,
+ enableSelectAll: true,
+ selectAllSelected: false
+};
+TableHeader.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? TableHeader.propTypes = {
+ /**
+ * Controls whether or not header rows should be
+ * adjusted for a checkbox column. If the select all
+ * checkbox is true, this property will not influence
+ * the number of columns. This is mainly useful for
+ * "super header" rows so that the checkbox column
+ * does not create an offset that needs to be accounted
+ * for manually.
+ */
+ adjustForCheckbox: _react.PropTypes.bool,
+ /**
+ * Children passed to table header.
+ */
+ children: _react.PropTypes.node,
+ /**
+ * The css class name of the root element.
+ */
+ className: _react.PropTypes.string,
+ /**
+ * Controls whether or not the select all checkbox is displayed.
+ */
+ displaySelectAll: _react.PropTypes.bool,
+ /**
+ * If set to true, the select all button will be interactable.
+ * If set to false, the button will not be interactable.
+ * To hide the checkbox, set displaySelectAll to false.
+ */
+ enableSelectAll: _react.PropTypes.bool,
+ /**
+ * @ignore
+ * Callback when select all has been checked.
+ */
+ onSelectAll: _react.PropTypes.func,
+ /**
+ * @ignore
+ * True when select all has been checked.
+ */
+ selectAllSelected: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
+} : void 0;
+exports.default = TableHeader;
/***/ }),
-/* 830 */
+/* 827 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -70539,260 +73562,541 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _TimePickerDialog = __webpack_require__(831);
-
-var _TimePickerDialog2 = _interopRequireDefault(_TimePickerDialog);
-
-var _TextField = __webpack_require__(97);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _TextField2 = _interopRequireDefault(_TextField);
+function getStyles(props, context, state) {
+ var tableRow = context.muiTheme.tableRow;
-var _timeUtils = __webpack_require__(98);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ var cellBgColor = 'inherit';
+ if (props.hovered || state.hovered) {
+ cellBgColor = tableRow.hoverColor;
+ } else if (props.selected) {
+ cellBgColor = tableRow.selectedColor;
+ } else if (props.striped) {
+ cellBgColor = tableRow.stripeColor;
+ }
-var emptyTime = new Date();
-emptyTime.setHours(0);
-emptyTime.setMinutes(0);
-emptyTime.setSeconds(0);
-emptyTime.setMilliseconds(0);
+ return {
+ root: {
+ borderBottom: props.displayBorder && '1px solid ' + tableRow.borderColor,
+ color: tableRow.textColor,
+ height: tableRow.height
+ },
+ cell: {
+ backgroundColor: cellBgColor
+ }
+ };
+}
-var TimePicker = function (_Component) {
- (0, _inherits3.default)(TimePicker, _Component);
+var TableRow = function (_Component) {
+ (0, _inherits3.default)(TableRow, _Component);
- function TimePicker() {
+ function TableRow() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, TimePicker);
+ (0, _classCallCheck3.default)(this, TableRow);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimePicker.__proto__ || (0, _getPrototypeOf2.default)(TimePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- time: null,
- dialogTime: new Date()
- }, _this.handleAcceptDialog = function (time) {
- _this.setState({
- time: time
- });
- if (_this.props.onChange) _this.props.onChange(null, time);
- }, _this.handleFocusInput = function (event) {
- event.target.blur();
- if (_this.props.onFocus) {
- _this.props.onFocus(event);
- }
- }, _this.handleTouchTapInput = function (event) {
- event.preventDefault();
-
- if (!_this.props.disabled) {
- _this.openDialog();
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TableRow.__proto__ || (0, _getPrototypeOf2.default)(TableRow)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ hovered: false
+ }, _this.onCellClick = function (event, columnIndex) {
+ if (_this.props.selectable && _this.props.onCellClick) {
+ _this.props.onCellClick(event, _this.props.rowNumber, columnIndex);
+ }
+ event.ctrlKey = true;
+ _this.onRowClick(event);
+ }, _this.onCellHover = function (event, columnIndex) {
+ if (_this.props.hoverable) {
+ _this.setState({ hovered: true });
+ if (_this.props.onCellHover) _this.props.onCellHover(event, _this.props.rowNumber, columnIndex);
+ _this.onRowHover(event);
}
-
- if (_this.props.onTouchTap) {
- _this.props.onTouchTap(event);
+ }, _this.onCellHoverExit = function (event, columnIndex) {
+ if (_this.props.hoverable) {
+ _this.setState({ hovered: false });
+ if (_this.props.onCellHoverExit) _this.props.onCellHoverExit(event, _this.props.rowNumber, columnIndex);
+ _this.onRowHoverExit(event);
}
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(TimePicker, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
- this.setState({
- time: this.isControlled() ? this.getControlledTime() : this.props.defaultTime
- });
- }
- }, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- if (nextProps.value !== this.props.value) {
- this.setState({
- time: this.getControlledTime(nextProps)
- });
- }
- }
-
- /**
- * Alias for `openDialog()` for an api consistent with TextField.
- */
-
- }, {
- key: 'focus',
- value: function focus() {
- this.openDialog();
- }
- }, {
- key: 'openDialog',
- value: function openDialog() {
- this.setState({
- dialogTime: this.state.time
- });
- this.refs.dialogWindow.show();
+ (0, _createClass3.default)(TableRow, [{
+ key: 'onRowClick',
+ value: function onRowClick(event) {
+ if (this.props.selectable && this.props.onRowClick) this.props.onRowClick(event, this.props.rowNumber);
}
}, {
- key: 'isControlled',
- value: function isControlled() {
- return this.props.value !== null;
+ key: 'onRowHover',
+ value: function onRowHover(event) {
+ if (this.props.onRowHover) this.props.onRowHover(event, this.props.rowNumber);
}
}, {
- key: 'getControlledTime',
- value: function getControlledTime() {
- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
-
- var result = null;
- if (props.value instanceof Date) {
- result = props.value;
- }
- return result;
+ key: 'onRowHoverExit',
+ value: function onRowHoverExit(event) {
+ if (this.props.onRowHoverExit) this.props.onRowHoverExit(event, this.props.rowNumber);
}
}, {
key: 'render',
value: function render() {
+ var _this2 = this;
+
var _props = this.props,
- autoOk = _props.autoOk,
- cancelLabel = _props.cancelLabel,
- defaultTime = _props.defaultTime,
- dialogBodyStyle = _props.dialogBodyStyle,
- dialogStyle = _props.dialogStyle,
- format = _props.format,
- okLabel = _props.okLabel,
- onFocus = _props.onFocus,
- onTouchTap = _props.onTouchTap,
- onShow = _props.onShow,
- onDismiss = _props.onDismiss,
- pedantic = _props.pedantic,
+ className = _props.className,
+ displayBorder = _props.displayBorder,
+ hoverable = _props.hoverable,
+ hovered = _props.hovered,
+ onCellClick = _props.onCellClick,
+ onCellHover = _props.onCellHover,
+ onCellHoverExit = _props.onCellHoverExit,
+ onRowClick = _props.onRowClick,
+ onRowHover = _props.onRowHover,
+ onRowHoverExit = _props.onRowHoverExit,
+ rowNumber = _props.rowNumber,
+ selectable = _props.selectable,
+ selected = _props.selected,
+ striped = _props.striped,
style = _props.style,
- textFieldStyle = _props.textFieldStyle,
- other = (0, _objectWithoutProperties3.default)(_props, ['autoOk', 'cancelLabel', 'defaultTime', 'dialogBodyStyle', 'dialogStyle', 'format', 'okLabel', 'onFocus', 'onTouchTap', 'onShow', 'onDismiss', 'pedantic', 'style', 'textFieldStyle']);
+ other = (0, _objectWithoutProperties3.default)(_props, ['className', 'displayBorder', 'hoverable', 'hovered', 'onCellClick', 'onCellHover', 'onCellHoverExit', 'onRowClick', 'onRowHover', 'onRowHoverExit', 'rowNumber', 'selectable', 'selected', 'striped', 'style']);
var prepareStyles = this.context.muiTheme.prepareStyles;
- var time = this.state.time;
+ var styles = getStyles(this.props, this.context, this.state);
+
+ var rowColumns = _react2.default.Children.map(this.props.children, function (child, columnNumber) {
+ if (_react2.default.isValidElement(child)) {
+ return _react2.default.cloneElement(child, {
+ columnNumber: columnNumber,
+ hoverable: _this2.props.hoverable,
+ key: _this2.props.rowNumber + '-' + columnNumber,
+ onClick: _this2.onCellClick,
+ onHover: _this2.onCellHover,
+ onHoverExit: _this2.onCellHoverExit,
+ style: (0, _simpleAssign2.default)({}, styles.cell, child.props.style)
+ });
+ }
+ });
return _react2.default.createElement(
- 'div',
- { style: prepareStyles((0, _simpleAssign2.default)({}, style)) },
- _react2.default.createElement(_TextField2.default, (0, _extends3.default)({}, other, {
- style: textFieldStyle,
- ref: 'input',
- value: time === emptyTime ? null : (0, _timeUtils.formatTime)(time, format, pedantic),
- onFocus: this.handleFocusInput,
- onTouchTap: this.handleTouchTapInput
- })),
- _react2.default.createElement(_TimePickerDialog2.default, {
- ref: 'dialogWindow',
- bodyStyle: dialogBodyStyle,
- initialTime: this.state.dialogTime,
- onAccept: this.handleAcceptDialog,
- onShow: onShow,
- onDismiss: onDismiss,
- format: format,
- okLabel: okLabel,
- cancelLabel: cancelLabel,
- autoOk: autoOk,
- style: dialogStyle
- })
+ 'tr',
+ (0, _extends3.default)({
+ className: className,
+ style: prepareStyles((0, _simpleAssign2.default)(styles.root, style))
+ }, other),
+ rowColumns
);
}
}]);
- return TimePicker;
+ return TableRow;
}(_react.Component);
-TimePicker.defaultProps = {
- autoOk: false,
- cancelLabel: 'Cancel',
- defaultTime: null,
- disabled: false,
- format: 'ampm',
- okLabel: 'OK',
- pedantic: false,
- style: {},
- value: null
+TableRow.defaultProps = {
+ displayBorder: true,
+ hoverable: false,
+ hovered: false,
+ selectable: true,
+ selected: false,
+ striped: false
};
-TimePicker.contextTypes = {
+TableRow.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? TimePicker.propTypes = {
- /**
- * If true, automatically accept and close the picker on set minutes.
- */
- autoOk: _react.PropTypes.bool,
+ false ? TableRow.propTypes = {
/**
- * Override the label of the 'Cancel' button.
+ * Children passed to table row.
*/
- cancelLabel: _react.PropTypes.node,
+ children: _react.PropTypes.node,
/**
- * The initial time value of the TimePicker.
+ * The css class name of the root element.
*/
- defaultTime: _react.PropTypes.object,
+ className: _react.PropTypes.string,
/**
- * Override the inline-styles of TimePickerDialog's body element.
+ * If true, row border will be displayed for the row.
+ * If false, no border will be drawn.
*/
- dialogBodyStyle: _react.PropTypes.object,
+ displayBorder: _react.PropTypes.bool,
/**
- * Override the inline-styles of TimePickerDialog's root element.
+ * Controls whether or not the row reponseds to hover events.
*/
- dialogStyle: _react.PropTypes.object,
+ hoverable: _react.PropTypes.bool,
/**
- * If true, the TimePicker is disabled.
+ * Controls whether or not the row should be rendered as being
+ * hovered. This property is evaluated in addition to this.state.hovered
+ * and can be used to synchronize the hovered state with some other
+ * external events.
*/
- disabled: _react.PropTypes.bool,
+ hovered: _react.PropTypes.bool,
/**
- * Tells the component to display the picker in `ampm` (12hr) format or `24hr` format.
+ * @ignore
+ * Called when a row cell is clicked.
+ * rowNumber is the row number and columnId is
+ * the column number or the column key.
*/
- format: _react.PropTypes.oneOf(['ampm', '24hr']),
+ onCellClick: _react.PropTypes.func,
/**
- * Override the label of the 'OK' button.
+ * @ignore
+ * Called when a table cell is hovered.
+ * rowNumber is the row number of the hovered row
+ * and columnId is the column number or the column key of the cell.
*/
- okLabel: _react.PropTypes.node,
+ onCellHover: _react.PropTypes.func,
/**
- * Callback function that is fired when the time value changes. The time value is passed in a Date Object.
- * Since there is no particular event associated with the change the first argument will always be null
- * and the second argument will be the new Date instance.
+ * @ignore
+ * Called when a table cell is no longer hovered.
+ * rowNumber is the row number of the row and columnId
+ * is the column number or the column key of the cell.
*/
- onChange: _react.PropTypes.func,
+ onCellHoverExit: _react.PropTypes.func,
/**
- * Callback function fired when the TimePicker dialog is dismissed.
+ * @ignore
+ * Called when row is clicked.
*/
- onDismiss: _react.PropTypes.func,
+ onRowClick: _react.PropTypes.func,
/**
- * Callback function fired when the TimePicker `TextField` gains focus.
+ * @ignore
+ * Called when a table row is hovered.
+ * rowNumber is the row number of the hovered row.
*/
- onFocus: _react.PropTypes.func,
+ onRowHover: _react.PropTypes.func,
/**
- * Callback function fired when the TimePicker dialog is shown.
+ * @ignore
+ * Called when a table row is no longer hovered.
+ * rowNumber is the row number of the row that is no longer hovered.
*/
- onShow: _react.PropTypes.func,
+ onRowHoverExit: _react.PropTypes.func,
/**
- * Callback function fired when the TimePicker is tapped or clicked.
+ * Number to identify the row. This property is
+ * automatically populated when used with the TableBody component.
*/
- onTouchTap: _react.PropTypes.func,
+ rowNumber: _react.PropTypes.number,
/**
- * If true, uses ("noon" / "midnight") instead of ("12 a.m." / "12 p.m.").
- *
- * It's technically more correct to refer to "12 noon" and "12 midnight" rather than "12 a.m." and "12 p.m."
- * and it avoids confusion between different locales. By default (for compatibility reasons) TimePicker uses
- * ("12 a.m." / "12 p.m.").
+ * If true, table rows can be selected. If multiple row
+ * selection is desired, enable multiSelectable.
+ * The default value is true.
*/
- pedantic: _react.PropTypes.bool,
+ selectable: _react.PropTypes.bool,
/**
- * Override the inline-styles of the root element.
+ * Indicates that a particular row is selected.
+ * This property can be used to programmatically select rows.
*/
- style: _react.PropTypes.object,
+ selected: _react.PropTypes.bool,
/**
- * Override the inline-styles of TimePicker's TextField element.
+ * Indicates whether or not the row is striped.
*/
- textFieldStyle: _react.PropTypes.object,
+ striped: _react.PropTypes.bool,
/**
- * Sets the time for the Time Picker programmatically.
+ * Override the inline-styles of the root element.
*/
- value: _react.PropTypes.object
+ style: _react.PropTypes.object
} : void 0;
-exports.default = TimePicker;
+exports.default = TableRow;
+
+/***/ }),
+/* 828 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.addAtcProduct = addAtcProduct;
+exports.removeAtcProduct = removeAtcProduct;
+exports.setAtcProductEnabled = setAtcProductEnabled;
+
+var _ActionTypes = __webpack_require__(49);
+
+var types = _interopRequireWildcard(_ActionTypes);
+
+var _notification = __webpack_require__(342);
+
+var _notification2 = _interopRequireDefault(_notification);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function addAtcProduct(data) {
+ return function (dispatch) {
+ dispatch((0, _notification2.default)('Atc product ' + data.name + ' added'));
+ dispatch({
+ type: types.ATC_PRODUCT_ADD,
+ name: name,
+ data: data
+ });
+ };
+}
+
+function removeAtcProduct(name) {
+ return function (dispatch) {
+ dispatch((0, _notification2.default)('Atc product ' + name + ' removed'));
+ dispatch({
+ type: types.ATC_PRODUCT_REMOVE,
+ name: name
+ });
+ };
+}
+
+function setAtcProductEnabled(name) {
+ var enabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
+
+ return {
+ type: types.ATC_SET_PRODUCT_ENABLED,
+ name: name,
+ enabled: enabled
+ };
+}
+
+/***/ }),
+/* 829 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _extends2 = __webpack_require__(7);
+
+var _extends3 = _interopRequireDefault(_extends2);
+
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _reduxForm = __webpack_require__(82);
+
+var _reactRedux = __webpack_require__(19);
+
+var _materialUiChipInput = __webpack_require__(830);
+
+var _materialUiChipInput2 = _interopRequireDefault(_materialUiChipInput);
+
+var _MenuItem = __webpack_require__(97);
+
+var _MenuItem2 = _interopRequireDefault(_MenuItem);
+
+var _reduxFormMaterialUi = __webpack_require__(98);
+
+var _RaisedButton = __webpack_require__(65);
+
+var _RaisedButton2 = _interopRequireDefault(_RaisedButton);
+
+var _FlatButton = __webpack_require__(100);
+
+var _FlatButton2 = _interopRequireDefault(_FlatButton);
+
+var _FormValidators = __webpack_require__(102);
+
+var Validators = _interopRequireWildcard(_FormValidators);
+
+var _Styles = __webpack_require__(52);
+
+var _Styles2 = _interopRequireDefault(_Styles);
+
+var _Utils = __webpack_require__(210);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var AtcCreateForm = function (_Component) {
+ (0, _inherits3.default)(AtcCreateForm, _Component);
+
+ function AtcCreateForm() {
+ (0, _classCallCheck3.default)(this, AtcCreateForm);
+ return (0, _possibleConstructorReturn3.default)(this, (AtcCreateForm.__proto__ || (0, _getPrototypeOf2.default)(AtcCreateForm)).apply(this, arguments));
+ }
+
+ (0, _createClass3.default)(AtcCreateForm, [{
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ handleSubmit = _props.handleSubmit,
+ pristine = _props.pristine,
+ submitting = _props.submitting,
+ onRequestClose = _props.onRequestClose,
+ atcProducts = _props.atcProducts;
+
+ var renderChip = function renderChip(_ref) {
+ var input = _ref.input,
+ hintText = _ref.hintText,
+ floatingLabelText = _ref.floatingLabelText,
+ _ref$meta = _ref.meta,
+ touched = _ref$meta.touched,
+ error = _ref$meta.error;
+ return _react2.default.createElement(_materialUiChipInput2.default, (0, _extends3.default)({}, input, {
+ chipContainerStyle: _Styles2.default.fields.text,
+ fullWidth: true,
+ value: input.value || [],
+ onRequestAdd: function onRequestAdd(addedChip) {
+ var values = input.value || [];
+ values = values.slice();
+ values.push(addedChip);
+ input.onChange(values);
+ },
+ onRequestDelete: function onRequestDelete(deletedChip) {
+ var values = input.value || [];
+ values = values.filter(function (v) {
+ return v !== deletedChip;
+ });
+ input.onChange(values);
+ },
+ onBlur: function onBlur() {
+ return input.onBlur();
+ },
+ hintText: hintText,
+ floatingLabelText: floatingLabelText,
+ errorText: touched && error ? error : ''
+ }));
+ };
+ var buttonStyle = {
+ margin: 6,
+ float: 'right'
+ };
+
+ return _react2.default.createElement(
+ 'form',
+ { onSubmit: handleSubmit, id: 'atc-form' },
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_reduxForm.Field, {
+ name: 'name',
+ validate: [Validators.required, Validators.unique(atcProducts.map(function (x) {
+ return x.name;
+ }))],
+ component: _reduxFormMaterialUi.TextField,
+ floatingLabelText: 'Name',
+ hintText: 'Name',
+ style: _Styles2.default.fields.text
+ })
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_reduxForm.Field, {
+ name: 'keywords',
+ component: renderChip,
+ floatingLabelText: 'Product keywords, press enter to validate a keyword',
+ hintText: 'Product keywords',
+ style: _Styles2.default.fields.text,
+ labelStyle: _Styles2.default.fields.text,
+ validate: [Validators.required, Validators.notEmpty]
+ })
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_reduxForm.Field, {
+ name: 'color',
+ component: _reduxFormMaterialUi.TextField,
+ floatingLabelText: 'Color',
+ hintText: 'Color',
+ style: _Styles2.default.fields.text
+ })
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(
+ _reduxForm.Field,
+ {
+ name: 'category',
+ component: _reduxFormMaterialUi.SelectField,
+ floatingLabelText: 'Product category',
+ style: _Styles2.default.fields.text,
+ validate: [Validators.required]
+ },
+ _Utils.categories.map(function (x) {
+ return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x });
+ })
+ )
+ ),
+ _react2.default.createElement('br', null),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_reduxForm.Field, {
+ name: 'enabled',
+ component: _reduxFormMaterialUi.Toggle,
+ label: 'Enabled',
+ style: _Styles2.default.fields.text
+ })
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_RaisedButton2.default, {
+ label: 'Add',
+ style: buttonStyle,
+ disabled: pristine || submitting,
+ type: 'submit'
+ }),
+ _react2.default.createElement(_FlatButton2.default, {
+ label: 'Cancel',
+ style: buttonStyle,
+ onTouchTap: function onTouchTap() {
+ if (onRequestClose) {
+ onRequestClose();
+ }
+ }
+ })
+ )
+ );
+ }
+ }]);
+ return AtcCreateForm;
+}(_react.Component);
+
+AtcCreateForm.propTypes = {
+ onRequestClose: _react.PropTypes.function
+};
+
+var Form = (0, _reduxForm.reduxForm)({
+ form: 'atc-form'
+})(AtcCreateForm);
+
+function mapStateToProps(state) {
+ return {
+ atcProducts: state.atc.atcProducts,
+ initialValues: {
+ enabled: true
+ }
+ };
+}
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps)(Form);
/***/ }),
-/* 831 */
+/* 830 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -70802,446 +74106,823 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _extends2 = __webpack_require__(7);
-
-var _extends3 = _interopRequireDefault(_extends2);
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-var _objectWithoutProperties2 = __webpack_require__(8);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /**
+ * Notice: Some code was adapted from Material-UI's text field.
+ * Copyright (c) 2014 Call-Em-All (https://github.com/callemall/material-ui)
+ */
-var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-var _getPrototypeOf = __webpack_require__(3);
+var _react = __webpack_require__(0);
-var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+var _react2 = _interopRequireDefault(_react);
-var _classCallCheck2 = __webpack_require__(1);
+var _propTypes = __webpack_require__(831);
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+var _propTypes2 = _interopRequireDefault(_propTypes);
-var _createClass2 = __webpack_require__(2);
+var _TextFieldUnderline = __webpack_require__(331);
-var _createClass3 = _interopRequireDefault(_createClass2);
+var _TextFieldUnderline2 = _interopRequireDefault(_TextFieldUnderline);
-var _possibleConstructorReturn2 = __webpack_require__(4);
+var _TextFieldHint = __webpack_require__(329);
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+var _TextFieldHint2 = _interopRequireDefault(_TextFieldHint);
-var _inherits2 = __webpack_require__(5);
+var _TextFieldLabel = __webpack_require__(330);
-var _inherits3 = _interopRequireDefault(_inherits2);
+var _TextFieldLabel2 = _interopRequireDefault(_TextFieldLabel);
-var _simpleAssign = __webpack_require__(6);
+var _AutoComplete = __webpack_require__(328);
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+var _AutoComplete2 = _interopRequireDefault(_AutoComplete);
-var _react = __webpack_require__(0);
+var _transitions = __webpack_require__(10);
-var _react2 = _interopRequireDefault(_react);
+var _transitions2 = _interopRequireDefault(_transitions);
-var _reactEventListener = __webpack_require__(42);
+var _Chip = __webpack_require__(833);
-var _reactEventListener2 = _interopRequireDefault(_reactEventListener);
+var _Chip2 = _interopRequireDefault(_Chip);
-var _keycode = __webpack_require__(30);
+var _colors = __webpack_require__(31);
-var _keycode2 = _interopRequireDefault(_keycode);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _Clock = __webpack_require__(832);
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-var _Clock2 = _interopRequireDefault(_Clock);
+function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
-var _Dialog = __webpack_require__(323);
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-var _Dialog2 = _interopRequireDefault(_Dialog);
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-var _FlatButton = __webpack_require__(198);
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-var _FlatButton2 = _interopRequireDefault(_FlatButton);
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var getStyles = function getStyles(props, context, state) {
+ var _context$muiTheme = context.muiTheme,
+ baseTheme = _context$muiTheme.baseTheme,
+ _context$muiTheme$tex = _context$muiTheme.textField,
+ floatingLabelColor = _context$muiTheme$tex.floatingLabelColor,
+ focusColor = _context$muiTheme$tex.focusColor,
+ textColor = _context$muiTheme$tex.textColor,
+ disabledTextColor = _context$muiTheme$tex.disabledTextColor,
+ backgroundColor = _context$muiTheme$tex.backgroundColor,
+ errorColor = _context$muiTheme$tex.errorColor;
-var TimePickerDialog = function (_Component) {
- (0, _inherits3.default)(TimePickerDialog, _Component);
- function TimePickerDialog() {
- var _ref;
+ var styles = {
+ root: {
+ fontSize: 16,
+ lineHeight: '24px',
+ width: props.fullWidth ? '100%' : 256,
+ display: 'inline-block',
+ position: 'relative',
+ backgroundColor: backgroundColor,
+ fontFamily: baseTheme.fontFamily,
+ transition: _transitions2.default.easeOut('200ms', 'height'),
+ cursor: 'text'
+ },
+ input: {
+ padding: 0,
+ marginTop: 0,
+ marginBottom: 24,
+ lineHeight: '32px',
+ height: 32,
+ position: 'relative',
+ display: 'inline-block',
+ border: 'none',
+ outline: 'none',
+ backgroundColor: 'rgba(0,0,0,0)',
+ color: props.disabled ? disabledTextColor : textColor,
+ cursor: props.disabled ? 'not-allowed' : 'initial',
+ font: 'inherit',
+ appearance: 'none', // Remove border in Safari, doesn't seem to break anything in other browsers
+ WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated style).
+ float: 'left'
+ },
+ error: {
+ position: 'absolute',
+ bottom: -10,
+ fontSize: 12,
+ lineHeight: '12px',
+ color: errorColor,
+ transition: _transitions2.default.easeOut()
+ },
+ floatingLabel: {
+ color: props.disabled ? disabledTextColor : floatingLabelColor,
+ pointerEvents: 'none',
+ top: 28
+ },
+ floatingLabelFocusStyle: {
+ transform: 'scale(0.75) translate(0, -36px)'
+ },
+ defaultChip: {
+ margin: '8px 8px 0 0',
+ float: 'left'
+ },
+ chipContainer: {
+ marginTop: props.floatingLabelText ? 12 : 0
+ }
+ };
- var _temp, _this, _ret;
+ if (state.isFocused) {
+ styles.floatingLabel.color = focusColor;
+ }
- (0, _classCallCheck3.default)(this, TimePickerDialog);
+ if (props.floatingLabelText) {
+ styles.input.boxSizing = 'border-box';
+ }
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
+ if (state.errorText) {
+ if (state.isFocused) {
+ styles.floatingLabel.color = styles.error.color;
}
+ }
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimePickerDialog.__proto__ || (0, _getPrototypeOf2.default)(TimePickerDialog)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- open: false
- }, _this.handleRequestClose = function () {
- _this.dismiss();
- }, _this.handleTouchTapCancel = function () {
- _this.dismiss();
- }, _this.handleTouchTapOK = function () {
- if (_this.props.onAccept) {
- _this.props.onAccept(_this.refs.clock.getSelectedTime());
+ return styles;
+};
+
+var defaultChipRenderer = function defaultChipRenderer(_ref, key) {
+ var value = _ref.value,
+ text = _ref.text,
+ isFocused = _ref.isFocused,
+ isDisabled = _ref.isDisabled,
+ handleClick = _ref.handleClick,
+ handleRequestDelete = _ref.handleRequestDelete,
+ defaultStyle = _ref.defaultStyle;
+ return _react2.default.createElement(
+ _Chip2.default,
+ {
+ key: key,
+ style: _extends({}, defaultStyle, { pointerEvents: isDisabled ? 'none' : undefined }),
+ backgroundColor: isFocused ? _colors.blue300 : null,
+ onClick: handleClick,
+ onRequestDelete: handleRequestDelete
+ },
+ text
+ );
+};
+
+var ChipInput = function (_React$Component) {
+ _inherits(ChipInput, _React$Component);
+
+ function ChipInput(props) {
+ _classCallCheck(this, ChipInput);
+
+ var _this = _possibleConstructorReturn(this, (ChipInput.__proto__ || Object.getPrototypeOf(ChipInput)).call(this, props));
+
+ _this.state = {
+ isFocused: false,
+ errorText: undefined,
+ isClean: true,
+ chips: [],
+ focusedChip: null,
+ inputValue: ''
+ };
+
+ _this.handleInputBlur = function (event) {
+ if (_this.props.onBlur) {
+ _this.props.onBlur(event);
}
- _this.setState({
- open: false
- });
- }, _this.handleKeyUp = function (event) {
- switch ((0, _keycode2.default)(event)) {
- case 'enter':
- _this.handleTouchTapOK();
- break;
+
+ // A momentary delay is required to support openOnFocus. We must give time for the autocomplete
+ // menu to close before checking the current status. Otherwise, tabbing off the input while the
+ // menu is open results in the input keeping its focus styles. Note that the ref might not be set
+ // yet, so this.autocomplete might be null.
+ setTimeout(function () {
+ if (_this.autoComplete && (!_this.autoComplete.state.open || _this.autoComplete.requestsList.length === 0)) {
+ if (_this.props.clearOnBlur) {
+ _this.clearInput();
+ }
+ _this.setState({ isFocused: false });
+ }
+ }, 0);
+ };
+
+ _this.handleInputFocus = function (event) {
+ if (_this.props.disabled) {
+ return;
}
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
- }
+ _this.setState({ isFocused: true });
+ if (_this.props.onFocus) {
+ _this.props.onFocus(event);
+ }
+ };
- (0, _createClass3.default)(TimePickerDialog, [{
- key: 'show',
- value: function show() {
- if (this.props.onShow && !this.state.open) this.props.onShow();
- this.setState({
- open: true
- });
+ _this.handleKeyDown = function (event) {
+ _this.setState({ keyPressed: false });
+ if (_this.props.newChipKeyCodes.indexOf(event.keyCode) >= 0) {
+ _this.handleAddChip(event.target.value);
+ } else if (event.keyCode === 8 || event.keyCode === 46) {
+ if (event.target.value === '') {
+ var chips = _this.props.value || _this.state.chips;
+ if (_this.state.focusedChip == null && event.keyCode === 8) {
+ _this.setState({ focusedChip: chips[chips.length - 1] });
+ } else if (_this.state.focusedChip) {
+ var index = chips.indexOf(_this.state.focusedChip);
+ var value = _this.props.dataSourceConfig ? _this.state.focusedChip[_this.props.dataSourceConfig.value] : _this.state.focusedChip;
+ _this.handleDeleteChip(value, index);
+ if (event.keyCode === 8 && index > 0) {
+ _this.setState({ focusedChip: chips[index - 1] });
+ } else if (event.keyCode === 46 && index < chips.length - 1) {
+ _this.setState({ focusedChip: chips[index + 1] });
+ }
+ }
+ }
+ } else if (event.keyCode === 37) {
+ var _chips = _this.props.value || _this.state.chips;
+ var _index = _chips.indexOf(_this.state.focusedChip);
+ if (_index > 0) {
+ _this.setState({ focusedChip: _chips[_index - 1] });
+ }
+ } else if (event.keyCode === 39) {
+ var _chips2 = _this.props.value || _this.state.chips;
+ var _index2 = _chips2.indexOf(_this.state.focusedChip);
+ if (_index2 >= 0 && _index2 < _chips2.length - 1) {
+ _this.setState({ focusedChip: _chips2[_index2 + 1] });
+ } else {
+ _this.setState({ focusedChip: null });
+ }
+ } else {
+ _this.setState({ focusedChip: null });
+ }
+ };
+
+ _this.handleKeyUp = function (event) {
+ if (_this.props.newChipKeyCodes.indexOf(event.keyCode) > 0 && _this.state.keyPressed) {
+ _this.clearInput();
+ } else {
+ _this.setState({ inputValue: event.target.value });
+ }
+ };
+
+ _this.handleKeyPress = function (event) {
+ _this.setState({ keyPressed: true });
+ };
+
+ _this.setAutoComplete = function (autoComplete) {
+ _this.autoComplete = autoComplete;
+ };
+
+ if (props.defaultValue) {
+ _this.state.chips = props.defaultValue;
}
- }, {
- key: 'dismiss',
- value: function dismiss() {
- if (this.props.onDismiss && this.state.open) this.props.onDismiss();
+ return _this;
+ }
+
+ _createClass(ChipInput, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ var _props = this.props,
+ name = _props.name,
+ hintText = _props.hintText,
+ floatingLabelText = _props.floatingLabelText;
+
+
this.setState({
- open: false
+ errorText: this.props.errorText
});
+
+ var uniqueId = name + '-' + hintText + '-' + floatingLabelText + '-' + Math.floor(Math.random() * 0xFFFF);
+ this.uniqueId = uniqueId.replace(/[^A-Za-z0-9-]/gi, '');
}
}, {
- key: 'render',
- value: function render() {
- var _props = this.props,
- bodyStyle = _props.bodyStyle,
- initialTime = _props.initialTime,
- onAccept = _props.onAccept,
- format = _props.format,
- autoOk = _props.autoOk,
- okLabel = _props.okLabel,
- cancelLabel = _props.cancelLabel,
- style = _props.style,
- other = (0, _objectWithoutProperties3.default)(_props, ['bodyStyle', 'initialTime', 'onAccept', 'format', 'autoOk', 'okLabel', 'cancelLabel', 'style']);
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var _this2 = this;
+ var handleKeyDown = this.autoComplete.handleKeyDown;
+ this.autoComplete.handleKeyDown = function (event) {
+ var newChipKeyCodes = _this2.props.newChipKeyCodes;
- var styles = {
- root: {
- fontSize: 14,
- color: this.context.muiTheme.timePicker.clockColor
- },
- dialogContent: {
- width: 280
- },
- body: {
- padding: 0
+ if (newChipKeyCodes.indexOf(event.keyCode) >= 0 && event.target.value) {
+ event.preventDefault();
+ _this2.handleAddChip(event.target.value);
+ _this2.autoComplete.setState({ searchText: '' });
+ _this2.autoComplete.forceUpdate();
+ } else {
+ handleKeyDown(event);
}
};
- var actions = [_react2.default.createElement(_FlatButton2.default, {
- key: 0,
- label: cancelLabel,
- primary: true,
- onTouchTap: this.handleTouchTapCancel
- }), _react2.default.createElement(_FlatButton2.default, {
- key: 1,
- label: okLabel,
- primary: true,
- onTouchTap: this.handleTouchTapOK
- })];
+ this.autoComplete.handleItemTouchTap = function (event, child) {
+ var dataSource = _this2.autoComplete.props.dataSource;
- var onClockChangeMinutes = autoOk === true ? this.handleTouchTapOK : undefined;
- var open = this.state.open;
+ var index = parseInt(child.key, 10);
+ var chosenRequest = dataSource[index];
+ _this2.handleAddChip(chosenRequest);
- return _react2.default.createElement(
- _Dialog2.default,
- (0, _extends3.default)({}, other, {
- style: (0, _simpleAssign2.default)(styles.root, style),
- bodyStyle: (0, _simpleAssign2.default)(styles.body, bodyStyle),
- actions: actions,
- contentStyle: styles.dialogContent,
- repositionOnUpdate: false,
- open: open,
- onRequestClose: this.handleRequestClose
- }),
- open && _react2.default.createElement(_reactEventListener2.default, { target: 'window', onKeyUp: this.handleKeyUp }),
- open && _react2.default.createElement(_Clock2.default, {
- ref: 'clock',
- format: format,
- initialTime: initialTime,
- onChangeMinutes: onClockChangeMinutes
- })
- );
+ _this2.autoComplete.setState({
+ searchText: ''
+ });
+ _this2.autoComplete.forceUpdate();
+ _this2.autoComplete.close();
+
+ setTimeout(function () {
+ return _this2.focus();
+ }, 1);
+ };
+
+ // force update autocomplete to ensure that it uses the new handlers
+ this.autoComplete.forceUpdate();
}
- }]);
- return TimePickerDialog;
-}(_react.Component);
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ if (nextProps.disabled) {
+ this.setState({ focusedChip: null });
+ }
+ if (nextProps.errorText !== this.props.errorText) {
+ this.setState({
+ errorText: nextProps.errorText
+ });
+ }
+ }
+ }, {
+ key: 'blur',
+ value: function blur() {
+ if (this.input) this.getInputNode().blur();
+ }
+ }, {
+ key: 'focus',
+ value: function focus() {
+ if (this.autoComplete) {
+ this.getInputNode().focus();
+ if (this.props.openOnFocus) {
+ this.autoComplete.setState({
+ open: true,
+ anchorEl: this.getInputNode()
+ });
-TimePickerDialog.defaultProps = {
- okLabel: 'OK',
- cancelLabel: 'Cancel'
-};
-TimePickerDialog.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? TimePickerDialog.propTypes = {
- autoOk: _react.PropTypes.bool,
- bodyStyle: _react.PropTypes.object,
- cancelLabel: _react.PropTypes.node,
- format: _react.PropTypes.oneOf(['ampm', '24hr']),
- initialTime: _react.PropTypes.object,
- okLabel: _react.PropTypes.node,
- onAccept: _react.PropTypes.func,
- onDismiss: _react.PropTypes.func,
- onShow: _react.PropTypes.func,
- style: _react.PropTypes.object
-} : void 0;
-exports.default = TimePickerDialog;
+ this.autoComplete.forceUpdate();
+ }
+ }
+ if (this.state.focusedChip) {
+ this.setState({ focusedChip: null });
+ }
+ }
+ }, {
+ key: 'select',
+ value: function select() {
+ if (this.input) this.getInputNode().select();
+ }
+ }, {
+ key: 'getValue',
+ value: function getValue() {
+ return this.input ? this.getInputNode().value : undefined;
+ }
+ }, {
+ key: 'getInputNode',
+ value: function getInputNode() {
+ return this.autoComplete.refs.searchTextField.getInputNode();
+ }
+ }, {
+ key: 'handleAddChip',
+ value: function handleAddChip(chip) {
+ var _this3 = this;
-/***/ }),
-/* 832 */
-/***/ (function(module, exports, __webpack_require__) {
+ this.autoComplete.setState({ searchText: '' });
+ var chips = this.props.value || this.state.chips;
-"use strict";
+ if (this.props.dataSourceConfig) {
+ if (typeof chip === 'string') {
+ var _chip;
+ chip = (_chip = {}, _defineProperty(_chip, this.props.dataSourceConfig.text, chip), _defineProperty(_chip, this.props.dataSourceConfig.value, chip), _chip);
+ }
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
+ if (this.props.allowDuplicates || !chips.some(function (c) {
+ return c[_this3.props.dataSourceConfig.value] === chip[_this3.props.dataSourceConfig.value];
+ })) {
+ if (this.props.value) {
+ if (this.props.onRequestAdd) {
+ this.props.onRequestAdd(chip);
+ }
+ } else {
+ this.setState({ chips: [].concat(_toConsumableArray(this.state.chips), [chip]) });
+ if (this.props.onChange) {
+ this.props.onChange([].concat(_toConsumableArray(this.state.chips), [chip]));
+ }
+ }
+ }
+ } else {
+ if (chip.trim().length > 0) {
+ if (this.props.allowDuplicates || chips.indexOf(chip) === -1) {
+ if (this.props.value) {
+ if (this.props.onRequestAdd) {
+ this.props.onRequestAdd(chip);
+ }
+ } else {
+ this.setState({ chips: [].concat(_toConsumableArray(this.state.chips), [chip]) });
+ if (this.props.onChange) {
+ this.props.onChange([].concat(_toConsumableArray(this.state.chips), [chip]));
+ }
+ }
+ }
+ }
+ }
+ }
+ }, {
+ key: 'handleDeleteChip',
+ value: function handleDeleteChip(chip, i) {
+ if (this.props.value) {
+ if (this.props.onRequestDelete) {
+ this.props.onRequestDelete(chip, i);
+ }
+ } else {
+ if (this.props.dataSourceConfig) {
+ var chips = this.state.chips.slice();
+ var changed = chips.splice(i, 1); // remove the chip at index i
+ if (changed) {
+ this.setState({
+ chips: chips,
+ focusedChip: this.state.focusedChip && this.state.focusedChip[this.props.dataSourceConfig.value] === chip ? null : this.state.focusedChip
+ });
+ if (this.props.onChange) {
+ this.props.onChange(chips);
+ }
+ }
+ } else {
+ var _chips3 = this.state.chips.slice();
+ var _changed = _chips3.splice(i, 1); // remove the chip at index i
+ if (_changed) {
+ this.setState({
+ chips: _chips3,
+ focusedChip: this.state.focusedChip === chip ? null : this.state.focusedChip
+ });
+ if (this.props.onChange) {
+ this.props.onChange(_chips3);
+ }
+ }
+ }
+ }
+ }
+ }, {
+ key: 'clearInput',
+ value: function clearInput() {
+ this.setState({ inputValue: '' });
+ }
-var _getPrototypeOf = __webpack_require__(3);
+ /**
+ * Sets a reference to the AutoComplete instance.
+ *
+ * Using a bound class method here to set `autoComplete` to avoid it being set
+ * to null by an inline ref callback.
+ *
+ * See [Issue #71](https://github.com/TeamWertarbyte/material-ui-chip-input/issues/71)
+ *
+ * @param {Object} autoComplete - The AutoComplete DOM element or null
+ */
-var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+ }, {
+ key: 'render',
+ value: function render() {
+ var _this4 = this;
-var _classCallCheck2 = __webpack_require__(1);
+ var _props2 = this.props,
+ children = _props2.children,
+ className = _props2.className,
+ dataSourceConfig = _props2.dataSourceConfig,
+ disabled = _props2.disabled,
+ errorStyle = _props2.errorStyle,
+ errorText = _props2.errorText,
+ fullWidth = _props2.fullWidth,
+ fullWidthInput = _props2.fullWidthInput,
+ hintText = _props2.hintText,
+ hintStyle = _props2.hintStyle,
+ id = _props2.id,
+ inputStyle = _props2.inputStyle,
+ clearOnBlur = _props2.clearOnBlur,
+ onBlur = _props2.onBlur,
+ onChange = _props2.onChange,
+ onFocus = _props2.onFocus,
+ style = _props2.style,
+ chipContainerStyle = _props2.chipContainerStyle,
+ underlineDisabledStyle = _props2.underlineDisabledStyle,
+ underlineFocusStyle = _props2.underlineFocusStyle,
+ underlineShow = _props2.underlineShow,
+ underlineStyle = _props2.underlineStyle,
+ _props2$defaultValue = _props2.defaultValue,
+ defaultValue = _props2$defaultValue === undefined ? [] : _props2$defaultValue,
+ filter = _props2.filter,
+ value = _props2.value,
+ dataSource = _props2.dataSource,
+ floatingLabelFixed = _props2.floatingLabelFixed,
+ floatingLabelFocusStyle = _props2.floatingLabelFocusStyle,
+ floatingLabelStyle = _props2.floatingLabelStyle,
+ floatingLabelText = _props2.floatingLabelText,
+ onRequestAdd = _props2.onRequestAdd,
+ onRequestDelete = _props2.onRequestDelete,
+ _props2$chipRenderer = _props2.chipRenderer,
+ chipRenderer = _props2$chipRenderer === undefined ? defaultChipRenderer : _props2$chipRenderer,
+ newChipKeyCodes = _props2.newChipKeyCodes,
+ allowDuplicates = _props2.allowDuplicates,
+ other = _objectWithoutProperties(_props2, ['children', 'className', 'dataSourceConfig', 'disabled', 'errorStyle', 'errorText', 'fullWidth', 'fullWidthInput', 'hintText', 'hintStyle', 'id', 'inputStyle', 'clearOnBlur', 'onBlur', 'onChange', 'onFocus', 'style', 'chipContainerStyle', 'underlineDisabledStyle', 'underlineFocusStyle', 'underlineShow', 'underlineStyle', 'defaultValue', 'filter', 'value', 'dataSource', 'floatingLabelFixed', 'floatingLabelFocusStyle', 'floatingLabelStyle', 'floatingLabelText', 'onRequestAdd', 'onRequestDelete', 'chipRenderer', 'newChipKeyCodes', 'allowDuplicates']);
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
-var _createClass2 = __webpack_require__(2);
+ var styles = getStyles(this.props, this.context, this.state);
+ var inputId = id || this.uniqueId;
-var _createClass3 = _interopRequireDefault(_createClass2);
+ var inputProps = {
+ id: inputId,
+ ref: function ref(elem) {
+ _this4.input = elem;
+ },
+ disabled: !!this.props.disabled,
+ onBlur: this.handleInputBlur,
+ onFocus: this.handleInputFocus,
+ onKeyDown: this.handleKeyDown,
+ onKeyUp: this.handleKeyUp,
+ onKeyPress: this.handleKeyPress,
+ fullWidth: !!fullWidthInput
+ };
-var _possibleConstructorReturn2 = __webpack_require__(4);
+ var inputStyleMerged = _extends(styles.input, inputStyle);
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+ var hasInput = (this.props.value || this.state.chips).length > 0 || this.state.inputValue.length > 0;
+ var showHintText = hintText && !hasInput;
+ var shrinkFloatingLabel = floatingLabelText && (hasInput || this.state.isFocused || floatingLabelFixed);
-var _inherits2 = __webpack_require__(5);
+ var errorTextElement = this.state.errorText && _react2.default.createElement(
+ 'div',
+ { style: prepareStyles(_extends(styles.error, errorStyle)) },
+ this.state.errorText
+ );
-var _inherits3 = _interopRequireDefault(_inherits2);
+ var floatingLabelTextElement = floatingLabelText && _react2.default.createElement(
+ _TextFieldLabel2.default,
+ {
+ muiTheme: this.context.muiTheme,
+ style: _extends(styles.floatingLabel, this.props.floatingLabelStyle),
+ shrinkStyle: _extends(styles.floatingLabelFocusStyle, this.props.floatingLabelFocusStyle),
+ htmlFor: inputId,
+ shrink: shrinkFloatingLabel,
+ disabled: disabled
+ },
+ floatingLabelText
+ );
-var _react = __webpack_require__(0);
+ var overrideRootStyles = {};
+ if (floatingLabelText) {
+ overrideRootStyles.marginTop = 14;
+ }
+ if (fullWidth) {
+ overrideRootStyles.width = '100%';
+ }
+ if (disabled) {
+ overrideRootStyles.cursor = 'not-allowed';
+ }
-var _react2 = _interopRequireDefault(_react);
+ var chips = this.props.value || this.state.chips;
+ var autoCompleteData = dataSourceConfig ? (dataSource || []).filter(function (value) {
+ return !chips.some(function (c) {
+ return c[dataSourceConfig.value] === value[dataSourceConfig.value];
+ });
+ }) : (dataSource || []).filter(function (value) {
+ return chips.indexOf(value) < 0;
+ });
-var _TimeDisplay = __webpack_require__(833);
+ var actualFilter = other.openOnFocus ? function (search, key) {
+ return search === '' || filter(search, key);
+ } : filter;
-var _TimeDisplay2 = _interopRequireDefault(_TimeDisplay);
+ return _react2.default.createElement(
+ 'div',
+ {
+ className: className,
+ style: prepareStyles(_extends(styles.root, style, overrideRootStyles)),
+ onClick: function onClick() {
+ return _this4.focus();
+ }
+ },
+ _react2.default.createElement(
+ 'div',
+ null,
+ floatingLabelTextElement,
+ _react2.default.createElement(
+ 'div',
+ { style: _extends(styles.chipContainer, chipContainerStyle) },
+ chips.map(function (tag, i) {
+ var value = dataSourceConfig ? tag[dataSourceConfig.value] : tag;
+ return chipRenderer({
+ value: value,
+ text: dataSourceConfig ? tag[dataSourceConfig.text] : tag,
+ chip: tag,
+ isDisabled: disabled,
+ isFocused: dataSourceConfig ? _this4.state.focusedChip && _this4.state.focusedChip[dataSourceConfig.value] === value : _this4.state.focusedChip === value,
+ handleClick: function handleClick() {
+ return _this4.setState({ focusedChip: value });
+ },
+ handleRequestDelete: function handleRequestDelete() {
+ return _this4.handleDeleteChip(value, i);
+ },
+ defaultStyle: styles.defaultChip
+ }, i);
+ })
+ )
+ ),
+ hintText ? _react2.default.createElement(_TextFieldHint2.default, {
+ muiTheme: this.context.muiTheme,
+ show: showHintText && !(floatingLabelText && !floatingLabelFixed && !this.state.isFocused),
+ style: _extends({ bottom: 20, pointerEvents: 'none' }, hintStyle),
+ text: hintText
+ }) : null,
+ _react2.default.createElement(_AutoComplete2.default, _extends({}, other, inputProps, {
+ filter: actualFilter,
+ style: inputStyleMerged,
+ dataSource: autoCompleteData,
+ dataSourceConfig: dataSourceConfig,
+ searchText: this.state.inputValue,
+ underlineShow: false,
+ ref: this.setAutoComplete
+ })),
+ underlineShow ? _react2.default.createElement(_TextFieldUnderline2.default, {
+ disabled: disabled,
+ disabledStyle: underlineDisabledStyle,
+ error: !!this.state.errorText,
+ errorStyle: errorStyle,
+ focus: this.state.isFocused,
+ focusStyle: underlineFocusStyle,
+ muiTheme: this.context.muiTheme,
+ style: underlineStyle
+ }) : null,
+ errorTextElement
+ );
+ }
+ }]);
-var _ClockHours = __webpack_require__(840);
+ return ChipInput;
+}(_react2.default.Component);
-var _ClockHours2 = _interopRequireDefault(_ClockHours);
+ChipInput.contextTypes = {
+ muiTheme: _propTypes2.default.object.isRequired
+};
-var _ClockMinutes = __webpack_require__(841);
-var _ClockMinutes2 = _interopRequireDefault(_ClockMinutes);
+ChipInput.propTypes = {
+ style: _propTypes2.default.object,
+ chipContainerStyle: _propTypes2.default.object,
+ floatingLabelText: _propTypes2.default.node,
+ hintText: _propTypes2.default.node,
+ id: _propTypes2.default.string,
+ dataSourceConfig: _propTypes2.default.shape({
+ text: _propTypes2.default.string.isRequired,
+ value: _propTypes2.default.string.isRequired
+ }),
+ disabled: _propTypes2.default.bool,
+ defaultValue: _propTypes2.default.array,
+ onChange: _propTypes2.default.func,
+ value: _propTypes2.default.array,
+ onRequestAdd: _propTypes2.default.func,
+ onRequestDelete: _propTypes2.default.func,
+ dataSource: _propTypes2.default.array,
+ onUpdateInput: _propTypes2.default.func,
+ openOnFocus: _propTypes2.default.bool,
+ chipRenderer: _propTypes2.default.func,
+ newChipKeyCodes: _propTypes2.default.arrayOf(_propTypes2.default.number),
+ clearOnBlur: _propTypes2.default.bool,
+ allowDuplicates: _propTypes2.default.bool
+};
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ChipInput.defaultProps = {
+ filter: _AutoComplete2.default.caseInsensitiveFilter,
+ newChipKeyCodes: [13],
+ clearOnBlur: true,
+ allowDuplicates: false,
+ underlineShow: true
+};
-var Clock = function (_Component) {
- (0, _inherits3.default)(Clock, _Component);
+exports.default = ChipInput;
- function Clock() {
- var _ref;
+/***/ }),
+/* 831 */
+/***/ (function(module, exports, __webpack_require__) {
- var _temp, _this, _ret;
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
- (0, _classCallCheck3.default)(this, Clock);
+if (false) {
+ var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
+ Symbol.for &&
+ Symbol.for('react.element')) ||
+ 0xeac7;
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
+ var isValidElement = function(object) {
+ return typeof object === 'object' &&
+ object !== null &&
+ object.$$typeof === REACT_ELEMENT_TYPE;
+ };
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Clock.__proto__ || (0, _getPrototypeOf2.default)(Clock)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- selectedTime: null,
- mode: 'hour'
- }, _this.setMode = function (mode) {
- setTimeout(function () {
- _this.setState({
- mode: mode
- });
- }, 100);
- }, _this.handleSelectAffix = function (affix) {
- if (affix === _this.getAffix()) return;
+ // By explicitly using `prop-types` you are opting into new development behavior.
+ // http://fb.me/prop-types-in-prod
+ var throwOnDirectAccess = true;
+ module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);
+} else {
+ // By explicitly using `prop-types` you are opting into new production behavior.
+ // http://fb.me/prop-types-in-prod
+ module.exports = __webpack_require__(832)();
+}
- var hours = _this.state.selectedTime.getHours();
- if (affix === 'am') {
- _this.handleChangeHours(hours - 12, affix);
- return;
- }
+/***/ }),
+/* 832 */
+/***/ (function(module, exports, __webpack_require__) {
- _this.handleChangeHours(hours + 12, affix);
- }, _this.handleChangeHours = function (hours, finished) {
- var time = new Date(_this.state.selectedTime);
- var affix = void 0;
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
- if (typeof finished === 'string') {
- affix = finished;
- finished = undefined;
- }
- if (!affix) {
- affix = _this.getAffix();
- }
- if (affix === 'pm' && hours < 12) {
- hours += 12;
- }
- time.setHours(hours);
- _this.setState({
- selectedTime: time
- });
- if (finished) {
- setTimeout(function () {
- _this.setState({
- mode: 'minute'
- });
+var emptyFunction = __webpack_require__(22);
+var invariant = __webpack_require__(9);
+var ReactPropTypesSecret = __webpack_require__(224);
- var onChangeHours = _this.props.onChangeHours;
+module.exports = function() {
+ function shim(props, propName, componentName, location, propFullName, secret) {
+ if (secret === ReactPropTypesSecret) {
+ // It is still safe when called from React.
+ return;
+ }
+ invariant(
+ false,
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
+ 'Use PropTypes.checkPropTypes() to call them. ' +
+ 'Read more at http://fb.me/use-check-prop-types'
+ );
+ };
+ shim.isRequired = shim;
+ function getShim() {
+ return shim;
+ };
+ // Important!
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
+ var ReactPropTypes = {
+ array: shim,
+ bool: shim,
+ func: shim,
+ number: shim,
+ object: shim,
+ string: shim,
+ symbol: shim,
- if (onChangeHours) {
- onChangeHours(time);
- }
- }, 100);
- }
- }, _this.handleChangeMinutes = function (minutes, finished) {
- var time = new Date(_this.state.selectedTime);
- time.setMinutes(minutes);
- _this.setState({
- selectedTime: time
- });
+ any: shim,
+ arrayOf: getShim,
+ element: shim,
+ instanceOf: getShim,
+ node: shim,
+ objectOf: getShim,
+ oneOf: getShim,
+ oneOfType: getShim,
+ shape: getShim
+ };
- var onChangeMinutes = _this.props.onChangeMinutes;
+ ReactPropTypes.checkPropTypes = emptyFunction;
+ ReactPropTypes.PropTypes = ReactPropTypes;
- if (onChangeMinutes && finished) {
- setTimeout(function () {
- onChangeMinutes(time);
- }, 0);
- }
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
- }
+ return ReactPropTypes;
+};
- (0, _createClass3.default)(Clock, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
- this.setState({
- selectedTime: this.props.initialTime || new Date()
- });
- }
- }, {
- key: 'getAffix',
- value: function getAffix() {
- if (this.props.format !== 'ampm') return '';
- var hours = this.state.selectedTime.getHours();
- if (hours < 12) {
- return 'am';
- }
+/***/ }),
+/* 833 */
+/***/ (function(module, exports, __webpack_require__) {
- return 'pm';
- }
- }, {
- key: 'getSelectedTime',
- value: function getSelectedTime() {
- return this.state.selectedTime;
- }
- }, {
- key: 'render',
- value: function render() {
- var clock = null;
+"use strict";
- var _context$muiTheme = this.context.muiTheme,
- prepareStyles = _context$muiTheme.prepareStyles,
- timePicker = _context$muiTheme.timePicker;
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = undefined;
- var styles = {
- root: {
- userSelect: 'none'
- },
- container: {
- height: 280,
- padding: 10,
- position: 'relative',
- boxSizing: 'content-box'
- },
- circle: {
- position: 'absolute',
- top: 20,
- width: 260,
- height: 260,
- borderRadius: '100%',
- backgroundColor: timePicker.clockCircleColor
- }
- };
+var _Chip = __webpack_require__(834);
- if (this.state.mode === 'hour') {
- clock = _react2.default.createElement(_ClockHours2.default, {
- key: 'hours',
- format: this.props.format,
- onChange: this.handleChangeHours,
- initialHours: this.state.selectedTime.getHours()
- });
- } else {
- clock = _react2.default.createElement(_ClockMinutes2.default, {
- key: 'minutes',
- onChange: this.handleChangeMinutes,
- initialMinutes: this.state.selectedTime.getMinutes()
- });
- }
+var _Chip2 = _interopRequireDefault(_Chip);
- return _react2.default.createElement(
- 'div',
- { style: prepareStyles(styles.root) },
- _react2.default.createElement(_TimeDisplay2.default, {
- selectedTime: this.state.selectedTime,
- mode: this.state.mode,
- format: this.props.format,
- affix: this.getAffix(),
- onSelectAffix: this.handleSelectAffix,
- onSelectHour: this.setMode.bind(this, 'hour'),
- onSelectMin: this.setMode.bind(this, 'minute')
- }),
- _react2.default.createElement(
- 'div',
- { style: prepareStyles(styles.container) },
- _react2.default.createElement('div', { style: prepareStyles(styles.circle) }),
- clock
- )
- );
- }
- }]);
- return Clock;
-}(_react.Component);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-Clock.defaultProps = {
- initialTime: new Date()
-};
-Clock.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? Clock.propTypes = {
- format: _react.PropTypes.oneOf(['ampm', '24hr']),
- initialTime: _react.PropTypes.object,
- onChangeHours: _react.PropTypes.func,
- onChangeMinutes: _react.PropTypes.func
-} : void 0;
-exports.default = Clock;
+exports.default = _Chip2.default;
/***/ }),
-/* 833 */
+/* 834 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -71255,10 +74936,6 @@ var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
-var _slicedToArray2 = __webpack_require__(326);
-
-var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
-
var _objectWithoutProperties2 = __webpack_require__(8);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
@@ -71291,265 +74968,361 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
+var _keycode = __webpack_require__(26);
+
+var _keycode2 = _interopRequireDefault(_keycode);
+
+var _colorManipulator = __webpack_require__(50);
+
+var _EnhancedButton = __webpack_require__(51);
+
+var _EnhancedButton2 = _interopRequireDefault(_EnhancedButton);
+
+var _cancel = __webpack_require__(835);
+
+var _cancel2 = _interopRequireDefault(_cancel);
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var TimeDisplay = function (_Component) {
- (0, _inherits3.default)(TimeDisplay, _Component);
+function getStyles(props, context, state) {
+ var chip = context.muiTheme.chip;
- function TimeDisplay() {
+
+ var backgroundColor = props.backgroundColor || chip.backgroundColor;
+ var focusColor = (0, _colorManipulator.emphasize)(backgroundColor, 0.08);
+ var pressedColor = (0, _colorManipulator.emphasize)(backgroundColor, 0.12);
+
+ return {
+ avatar: {
+ marginRight: -4
+ },
+ deleteIcon: {
+ color: state.deleteHovered ? (0, _colorManipulator.fade)(chip.deleteIconColor, 0.4) : chip.deleteIconColor,
+ cursor: 'pointer',
+ margin: '4px 4px 0px -8px'
+ },
+ label: {
+ color: props.labelColor || chip.textColor,
+ fontSize: chip.fontSize,
+ fontWeight: chip.fontWeight,
+ lineHeight: '32px',
+ paddingLeft: 12,
+ paddingRight: 12,
+ userSelect: 'none',
+ whiteSpace: 'nowrap'
+ },
+ root: {
+ backgroundColor: state.clicked ? pressedColor : state.focused || state.hovered ? focusColor : backgroundColor,
+ borderRadius: 16,
+ boxShadow: state.clicked ? chip.shadow : null,
+ cursor: props.onTouchTap ? 'pointer' : 'default',
+ display: 'flex',
+ whiteSpace: 'nowrap',
+ width: 'fit-content'
+ }
+ };
+}
+
+var Chip = function (_Component) {
+ (0, _inherits3.default)(Chip, _Component);
+
+ function Chip() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, TimeDisplay);
+ (0, _classCallCheck3.default)(this, Chip);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = TimeDisplay.__proto__ || (0, _getPrototypeOf2.default)(TimeDisplay)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- transitionDirection: 'up'
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
- }
-
- (0, _createClass3.default)(TimeDisplay, [{
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- if (nextProps.selectedTime !== this.props.selectedTime) {
- var direction = nextProps.selectedTime > this.props.selectedTime ? 'up' : 'down';
-
- this.setState({
- transitionDirection: direction
- });
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Chip.__proto__ || (0, _getPrototypeOf2.default)(Chip)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ clicked: false,
+ deleteHovered: false,
+ focused: false,
+ hovered: false
+ }, _this.handleBlur = function (event) {
+ _this.setState({ clicked: false, focused: false });
+ _this.props.onBlur(event);
+ }, _this.handleFocus = function (event) {
+ if (_this.props.onTouchTap || _this.props.onRequestDelete) {
+ _this.setState({ focused: true });
}
- }
- }, {
- key: 'sanitizeTime',
- value: function sanitizeTime() {
- var hour = this.props.selectedTime.getHours();
- var min = this.props.selectedTime.getMinutes().toString();
-
- if (this.props.format === 'ampm') {
- hour %= 12;
- hour = hour || 12;
+ _this.props.onFocus(event);
+ }, _this.handleKeyboardFocus = function (event, keyboardFocused) {
+ if (keyboardFocused) {
+ _this.handleFocus();
+ _this.props.onFocus(event);
+ } else {
+ _this.handleBlur();
}
- hour = hour.toString();
- if (hour.length < 2) hour = '0' + hour;
- if (min.length < 2) min = '0' + min;
+ _this.props.onKeyboardFocus(event, keyboardFocused);
+ }, _this.handleKeyDown = function (event) {
+ if ((0, _keycode2.default)(event) === 'backspace') {
+ event.preventDefault();
+ if (_this.props.onRequestDelete) {
+ _this.props.onRequestDelete(event);
+ }
+ }
+ _this.props.onKeyDown(event);
+ }, _this.handleMouseDown = function (event) {
+ // Only listen to left clicks
+ if (event.button === 0) {
+ event.stopPropagation();
+ if (_this.props.onTouchTap) {
+ _this.setState({ clicked: true });
+ }
+ }
+ _this.props.onMouseDown(event);
+ }, _this.handleMouseEnter = function (event) {
+ if (_this.props.onTouchTap) {
+ _this.setState({ hovered: true });
+ }
+ _this.props.onMouseEnter(event);
+ }, _this.handleMouseEnterDeleteIcon = function () {
+ _this.setState({ deleteHovered: true });
+ }, _this.handleMouseLeave = function (event) {
+ _this.setState({
+ clicked: false,
+ hovered: false
+ });
+ _this.props.onMouseLeave(event);
+ }, _this.handleMouseLeaveDeleteIcon = function () {
+ _this.setState({ deleteHovered: false });
+ }, _this.handleMouseUp = function (event) {
+ _this.setState({ clicked: false });
+ _this.props.onMouseUp(event);
+ }, _this.handleTouchTapDeleteIcon = function (event) {
+ // Stop the event from bubbling up to the `Chip`
+ event.stopPropagation();
+ _this.props.onRequestDelete(event);
+ }, _this.handleTouchEnd = function (event) {
+ _this.setState({ clicked: false });
+ _this.props.onTouchEnd(event);
+ }, _this.handleTouchStart = function (event) {
+ event.stopPropagation();
+ if (_this.props.onTouchTap) {
+ _this.setState({ clicked: true });
+ }
+ _this.props.onTouchStart(event);
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
- return [hour, min];
- }
- }, {
+ (0, _createClass3.default)(Chip, [{
key: 'render',
value: function render() {
+ var buttonEventHandlers = {
+ onBlur: this.handleBlur,
+ onFocus: this.handleFocus,
+ onKeyDown: this.handleKeyDown,
+ onMouseDown: this.handleMouseDown,
+ onMouseEnter: this.handleMouseEnter,
+ onMouseLeave: this.handleMouseLeave,
+ onMouseUp: this.handleMouseUp,
+ onTouchEnd: this.handleTouchEnd,
+ onTouchStart: this.handleTouchStart,
+ onKeyboardFocus: this.handleKeyboardFocus
+ };
+
+ var prepareStyles = this.context.muiTheme.prepareStyles;
+
+ var styles = getStyles(this.props, this.context, this.state);
+
var _props = this.props,
- affix = _props.affix,
- format = _props.format,
- mode = _props.mode,
- onSelectAffix = _props.onSelectAffix,
- onSelectHour = _props.onSelectHour,
- onSelectMin = _props.onSelectMin,
- selectedTime = _props.selectedTime,
- other = (0, _objectWithoutProperties3.default)(_props, ['affix', 'format', 'mode', 'onSelectAffix', 'onSelectHour', 'onSelectMin', 'selectedTime']);
- var _context$muiTheme = this.context.muiTheme,
- prepareStyles = _context$muiTheme.prepareStyles,
- timePicker = _context$muiTheme.timePicker;
+ childrenProp = _props.children,
+ style = _props.style,
+ className = _props.className,
+ labelStyle = _props.labelStyle,
+ labelColor = _props.labelColor,
+ backgroundColor = _props.backgroundColor,
+ onRequestDelete = _props.onRequestDelete,
+ other = (0, _objectWithoutProperties3.default)(_props, ['children', 'style', 'className', 'labelStyle', 'labelColor', 'backgroundColor', 'onRequestDelete']);
- var styles = {
- root: {
- padding: '14px 0',
- borderTopLeftRadius: 2,
- borderTopRightRadius: 2,
- backgroundColor: timePicker.headerColor,
- color: timePicker.textColor
- },
- text: {
- margin: '6px 0',
- lineHeight: '58px',
- height: 58,
- fontSize: 58,
- display: 'flex',
- justifyContent: 'center',
- alignItems: 'baseline'
- },
- time: {
- margin: '0 10px'
- },
- affix: {
- flex: 1,
- position: 'relative',
- lineHeight: '17px',
- height: 17,
- fontSize: 17
- },
- affixTop: {
- position: 'absolute',
- top: -20,
- left: 0
- },
- clickable: {
- cursor: 'pointer'
- },
- inactive: {
- opacity: 0.7
- }
- };
+ var deletable = this.props.onRequestDelete;
+ var avatar = null;
- var _sanitizeTime = this.sanitizeTime(),
- _sanitizeTime2 = (0, _slicedToArray3.default)(_sanitizeTime, 2),
- hour = _sanitizeTime2[0],
- min = _sanitizeTime2[1];
+ var deleteIcon = deletable ? _react2.default.createElement(_cancel2.default, {
+ color: styles.deleteIcon.color,
+ style: styles.deleteIcon,
+ onTouchTap: this.handleTouchTapDeleteIcon,
+ onMouseEnter: this.handleMouseEnterDeleteIcon,
+ onMouseLeave: this.handleMouseLeaveDeleteIcon
+ }) : null;
- var buttons = [];
- if (format === 'ampm') {
- buttons = [_react2.default.createElement(
- 'div',
- {
- key: 'pm',
- style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, affix === 'pm' ? {} : styles.inactive)),
- onTouchTap: function onTouchTap() {
- return onSelectAffix('pm');
- }
- },
- 'PM'
- ), _react2.default.createElement(
- 'div',
- {
- key: 'am',
- style: prepareStyles((0, _simpleAssign2.default)({}, styles.affixTop, styles.clickable, affix === 'am' ? {} : styles.inactive)),
- onTouchTap: function onTouchTap() {
- return onSelectAffix('am');
- }
- },
- 'AM'
- )];
+ var children = childrenProp;
+ var childCount = _react2.default.Children.count(children);
+
+ // If the first child is an avatar, extract it and style it
+ if (childCount > 1) {
+ children = _react2.default.Children.toArray(children);
+
+ if (_react2.default.isValidElement(children[0]) && children[0].type.muiName === 'Avatar') {
+ avatar = children.shift();
+
+ avatar = _react2.default.cloneElement(avatar, {
+ style: (0, _simpleAssign2.default)(styles.avatar, avatar.props.style),
+ size: 32
+ });
+ }
}
return _react2.default.createElement(
- 'div',
- (0, _extends3.default)({}, other, { style: prepareStyles(styles.root) }),
+ _EnhancedButton2.default,
+ (0, _extends3.default)({}, other, buttonEventHandlers, {
+ className: className,
+ containerElement: 'div' // Firefox doesn't support nested buttons
+ , disableTouchRipple: true,
+ disableFocusRipple: true,
+ style: (0, _simpleAssign2.default)(styles.root, style)
+ }),
+ avatar,
_react2.default.createElement(
- 'div',
- { style: prepareStyles(styles.text) },
- _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.affix)) }),
- _react2.default.createElement(
- 'div',
- { style: prepareStyles(styles.time) },
- _react2.default.createElement(
- 'span',
- {
- style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, mode === 'hour' ? {} : styles.inactive)),
- onTouchTap: onSelectHour
- },
- hour
- ),
- _react2.default.createElement(
- 'span',
- null,
- ':'
- ),
- _react2.default.createElement(
- 'span',
- {
- style: prepareStyles((0, _simpleAssign2.default)({}, styles.clickable, mode === 'minute' ? {} : styles.inactive)),
- onTouchTap: onSelectMin
- },
- min
- )
- ),
- _react2.default.createElement(
- 'div',
- { style: prepareStyles((0, _simpleAssign2.default)({}, styles.affix)) },
- buttons
- )
- )
+ 'span',
+ { style: prepareStyles((0, _simpleAssign2.default)(styles.label, labelStyle)) },
+ children
+ ),
+ deleteIcon
);
- }
- }]);
- return TimeDisplay;
-}(_react.Component);
-
-TimeDisplay.defaultProps = {
- affix: '',
- mode: 'hour'
-};
-TimeDisplay.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
+ }
+ }]);
+ return Chip;
+}(_react.Component);
+
+Chip.defaultProps = {
+ onBlur: function onBlur() {},
+ onFocus: function onFocus() {},
+ onKeyDown: function onKeyDown() {},
+ onKeyboardFocus: function onKeyboardFocus() {},
+ onMouseDown: function onMouseDown() {},
+ onMouseEnter: function onMouseEnter() {},
+ onMouseLeave: function onMouseLeave() {},
+ onMouseUp: function onMouseUp() {},
+ onTouchEnd: function onTouchEnd() {},
+ onTouchStart: function onTouchStart() {}
};
- false ? TimeDisplay.propTypes = {
- affix: _react.PropTypes.oneOf(['', 'pm', 'am']),
- format: _react.PropTypes.oneOf(['ampm', '24hr']),
- mode: _react.PropTypes.oneOf(['hour', 'minute']),
- onSelectAffix: _react.PropTypes.func,
- onSelectHour: _react.PropTypes.func,
- onSelectMin: _react.PropTypes.func,
- selectedTime: _react.PropTypes.object.isRequired
+Chip.contextTypes = { muiTheme: _react.PropTypes.object.isRequired };
+ false ? Chip.propTypes = {
+ /**
+ * Override the background color of the chip.
+ */
+ backgroundColor: _react.PropTypes.string,
+ /**
+ * Used to render elements inside the Chip.
+ */
+ children: _react.PropTypes.node,
+ /**
+ * CSS `className` of the root element.
+ */
+ className: _react.PropTypes.node,
+ /**
+ * Override the label color.
+ */
+ labelColor: _react.PropTypes.string,
+ /**
+ * Override the inline-styles of the label.
+ */
+ labelStyle: _react.PropTypes.object,
+ /** @ignore */
+ onBlur: _react.PropTypes.func,
+ /** @ignore */
+ onFocus: _react.PropTypes.func,
+ /** @ignore */
+ onKeyDown: _react.PropTypes.func,
+ /** @ignore */
+ onKeyboardFocus: _react.PropTypes.func,
+ /** @ignore */
+ onMouseDown: _react.PropTypes.func,
+ /** @ignore */
+ onMouseEnter: _react.PropTypes.func,
+ /** @ignore */
+ onMouseLeave: _react.PropTypes.func,
+ /** @ignore */
+ onMouseUp: _react.PropTypes.func,
+ /**
+ * Callback function fired when the delete icon is clicked. If set, the delete icon will be shown.
+ * @param {object} event `touchTap` event targeting the element.
+ */
+ onRequestDelete: _react.PropTypes.func,
+ /** @ignore */
+ onTouchEnd: _react.PropTypes.func,
+ /** @ignore */
+ onTouchStart: _react.PropTypes.func,
+ /**
+ * Callback function fired when the `Chip` element is touch-tapped.
+ *
+ * @param {object} event TouchTap event targeting the element.
+ */
+ onTouchTap: _react.PropTypes.func,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
} : void 0;
-exports.default = TimeDisplay;
+exports.default = Chip;
/***/ }),
-/* 834 */
+/* 835 */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = { "default": __webpack_require__(835), __esModule: true };
+"use strict";
-/***/ }),
-/* 835 */
-/***/ (function(module, exports, __webpack_require__) {
-__webpack_require__(124);
-__webpack_require__(93);
-module.exports = __webpack_require__(836);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+var _react = __webpack_require__(0);
-/***/ }),
-/* 836 */
-/***/ (function(module, exports, __webpack_require__) {
+var _react2 = _interopRequireDefault(_react);
-var classof = __webpack_require__(191);
-var ITERATOR = __webpack_require__(22)('iterator');
-var Iterators = __webpack_require__(78);
-module.exports = __webpack_require__(18).isIterable = function (it) {
- var O = Object(it);
- return O[ITERATOR] !== undefined
- || '@@iterator' in O
- // eslint-disable-next-line no-prototype-builtins
- || Iterators.hasOwnProperty(classof(O));
+var _pure = __webpack_require__(20);
+
+var _pure2 = _interopRequireDefault(_pure);
+
+var _SvgIcon = __webpack_require__(21);
+
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var NavigationCancel = function NavigationCancel(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z' })
+ );
};
+NavigationCancel = (0, _pure2.default)(NavigationCancel);
+NavigationCancel.displayName = 'NavigationCancel';
+NavigationCancel.muiName = 'SvgIcon';
+exports.default = NavigationCancel;
/***/ }),
-/* 837 */
+/* 836 */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = { "default": __webpack_require__(838), __esModule: true };
+"use strict";
-/***/ }),
-/* 838 */
-/***/ (function(module, exports, __webpack_require__) {
-__webpack_require__(124);
-__webpack_require__(93);
-module.exports = __webpack_require__(839);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = undefined;
+var _AppBar = __webpack_require__(837);
-/***/ }),
-/* 839 */
-/***/ (function(module, exports, __webpack_require__) {
+var _AppBar2 = _interopRequireDefault(_AppBar);
-var anObject = __webpack_require__(36);
-var get = __webpack_require__(190);
-module.exports = __webpack_require__(18).getIterator = function (it) {
- var iterFn = get(it);
- if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
- return anObject(iterFn.call(it));
-};
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+exports.default = _AppBar2.default;
/***/ }),
-/* 840 */
+/* 837 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -71559,6 +75332,18 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
+var _extends2 = __webpack_require__(7);
+
+var _extends3 = _interopRequireDefault(_extends2);
+
+var _keys = __webpack_require__(62);
+
+var _keys2 = _interopRequireDefault(_keys);
+
+var _objectWithoutProperties2 = __webpack_require__(8);
+
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
var _getPrototypeOf = __webpack_require__(3);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -71579,221 +75364,389 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
+exports.getStyles = getStyles;
+
+var _simpleAssign = __webpack_require__(6);
+
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reactDom = __webpack_require__(19);
+var _IconButton = __webpack_require__(64);
-var _reactDom2 = _interopRequireDefault(_reactDom);
+var _IconButton2 = _interopRequireDefault(_IconButton);
-var _ClockNumber = __webpack_require__(327);
+var _menu = __webpack_require__(838);
-var _ClockNumber2 = _interopRequireDefault(_ClockNumber);
+var _menu2 = _interopRequireDefault(_menu);
-var _ClockPointer = __webpack_require__(328);
+var _Paper = __webpack_require__(32);
-var _ClockPointer2 = _interopRequireDefault(_ClockPointer);
+var _Paper2 = _interopRequireDefault(_Paper);
+
+var _propTypes = __webpack_require__(39);
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
+var _warning = __webpack_require__(15);
-var _timeUtils = __webpack_require__(98);
+var _warning2 = _interopRequireDefault(_warning);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var ClockHours = function (_Component) {
- (0, _inherits3.default)(ClockHours, _Component);
+function getStyles(props, context) {
+ var _context$muiTheme = context.muiTheme,
+ appBar = _context$muiTheme.appBar,
+ iconButtonSize = _context$muiTheme.button.iconButtonSize,
+ zIndex = _context$muiTheme.zIndex;
- function ClockHours() {
+
+ var flatButtonSize = 36;
+
+ var styles = {
+ root: {
+ position: 'relative',
+ zIndex: zIndex.appBar,
+ width: '100%',
+ display: 'flex',
+ backgroundColor: appBar.color,
+ paddingLeft: appBar.padding,
+ paddingRight: appBar.padding
+ },
+ title: {
+ whiteSpace: 'nowrap',
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ margin: 0,
+ paddingTop: 0,
+ letterSpacing: 0,
+ fontSize: 24,
+ fontWeight: appBar.titleFontWeight,
+ color: appBar.textColor,
+ height: appBar.height,
+ lineHeight: appBar.height + 'px'
+ },
+ mainElement: {
+ boxFlex: 1,
+ flex: '1'
+ },
+ iconButtonStyle: {
+ marginTop: (appBar.height - iconButtonSize) / 2,
+ marginRight: 8,
+ marginLeft: -16
+ },
+ iconButtonIconStyle: {
+ fill: appBar.textColor,
+ color: appBar.textColor
+ },
+ flatButton: {
+ color: appBar.textColor,
+ marginTop: (iconButtonSize - flatButtonSize) / 2 + 1
+ }
+ };
+
+ return styles;
+}
+
+var AppBar = function (_Component) {
+ (0, _inherits3.default)(AppBar, _Component);
+
+ function AppBar() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, ClockHours);
+ (0, _classCallCheck3.default)(this, AppBar);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockHours.__proto__ || (0, _getPrototypeOf2.default)(ClockHours)).call.apply(_ref, [this].concat(args))), _this), _this.handleUp = function (event) {
- event.preventDefault();
- _this.setClock(event.nativeEvent, true);
- }, _this.handleMove = function (event) {
- event.preventDefault();
- if (_this.isMousePressed(event) !== 1) return;
- _this.setClock(event.nativeEvent, false);
- }, _this.handleTouchMove = function (event) {
- event.preventDefault();
- _this.setClock(event.changedTouches[0], false);
- }, _this.handleTouchEnd = function (event) {
- event.preventDefault();
- _this.setClock(event.changedTouches[0], true);
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AppBar.__proto__ || (0, _getPrototypeOf2.default)(AppBar)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapLeftIconButton = function (event) {
+ if (_this.props.onLeftIconButtonTouchTap) {
+ _this.props.onLeftIconButtonTouchTap(event);
+ }
+ }, _this.handleTouchTapRightIconButton = function (event) {
+ if (_this.props.onRightIconButtonTouchTap) {
+ _this.props.onRightIconButtonTouchTap(event);
+ }
+ }, _this.handleTitleTouchTap = function (event) {
+ if (_this.props.onTitleTouchTap) {
+ _this.props.onTitleTouchTap(event);
+ }
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(ClockHours, [{
+ (0, _createClass3.default)(AppBar, [{
key: 'componentDidMount',
value: function componentDidMount() {
- var clockElement = _reactDom2.default.findDOMNode(this.refs.mask);
-
- this.center = {
- x: clockElement.offsetWidth / 2,
- y: clockElement.offsetHeight / 2
- };
+ false ? (0, _warning2.default)(!this.props.iconElementLeft || !this.props.iconClassNameLeft, 'Material-UI: Properties iconElementLeft\n and iconClassNameLeft cannot be simultaneously defined. Please use one or the other.') : void 0;
- this.basePoint = {
- x: this.center.x,
- y: 0
- };
+ false ? (0, _warning2.default)(!this.props.iconElementRight || !this.props.iconClassNameRight, 'Material-UI: Properties iconElementRight\n and iconClassNameRight cannot be simultaneously defined. Please use one or the other.') : void 0;
}
}, {
- key: 'isMousePressed',
- value: function isMousePressed(event) {
- if (typeof event.buttons === 'undefined') {
- return event.nativeEvent.which;
- }
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ title = _props.title,
+ titleStyle = _props.titleStyle,
+ iconStyleLeft = _props.iconStyleLeft,
+ iconStyleRight = _props.iconStyleRight,
+ onTitleTouchTap = _props.onTitleTouchTap,
+ showMenuIconButton = _props.showMenuIconButton,
+ iconElementLeft = _props.iconElementLeft,
+ iconElementRight = _props.iconElementRight,
+ iconClassNameLeft = _props.iconClassNameLeft,
+ iconClassNameRight = _props.iconClassNameRight,
+ onLeftIconButtonTouchTap = _props.onLeftIconButtonTouchTap,
+ onRightIconButtonTouchTap = _props.onRightIconButtonTouchTap,
+ className = _props.className,
+ style = _props.style,
+ zDepth = _props.zDepth,
+ children = _props.children,
+ other = (0, _objectWithoutProperties3.default)(_props, ['title', 'titleStyle', 'iconStyleLeft', 'iconStyleRight', 'onTitleTouchTap', 'showMenuIconButton', 'iconElementLeft', 'iconElementRight', 'iconClassNameLeft', 'iconClassNameRight', 'onLeftIconButtonTouchTap', 'onRightIconButtonTouchTap', 'className', 'style', 'zDepth', 'children']);
+ var prepareStyles = this.context.muiTheme.prepareStyles;
- return event.buttons;
- }
- }, {
- key: 'setClock',
- value: function setClock(event, finish) {
- if (typeof event.offsetX === 'undefined') {
- var offset = (0, _timeUtils.getTouchEventOffsetValues)(event);
+ var styles = getStyles(this.props, this.context);
- event.offsetX = offset.offsetX;
- event.offsetY = offset.offsetY;
- }
+ var menuElementLeft = void 0;
+ var menuElementRight = void 0;
- var hours = this.getHours(event.offsetX, event.offsetY);
+ // If the title is a string, wrap in an h1 tag.
+ // If not, wrap in a div tag.
+ var titleComponent = typeof title === 'string' || title instanceof String ? 'h1' : 'div';
- this.props.onChange(hours, finish);
- }
- }, {
- key: 'getHours',
- value: function getHours(offsetX, offsetY) {
- var step = 30;
- var x = offsetX - this.center.x;
- var y = offsetY - this.center.y;
- var cx = this.basePoint.x - this.center.x;
- var cy = this.basePoint.y - this.center.y;
+ var titleElement = _react2.default.createElement(titleComponent, {
+ onTouchTap: this.handleTitleTouchTap,
+ style: prepareStyles((0, _simpleAssign2.default)(styles.title, styles.mainElement, titleStyle))
+ }, title);
- var atan = Math.atan2(cx, cy) - Math.atan2(x, y);
+ var iconLeftStyle = (0, _simpleAssign2.default)({}, styles.iconButtonStyle, iconStyleLeft);
- var deg = (0, _timeUtils.rad2deg)(atan);
- deg = Math.round(deg / step) * step;
- deg %= 360;
+ if (showMenuIconButton) {
+ if (iconElementLeft) {
+ var iconElementLeftProps = {};
- var value = Math.floor(deg / step) || 0;
+ if (iconElementLeft.type.muiName === 'IconButton') {
+ var iconElemLeftChildren = iconElementLeft.props.children;
+ var iconButtonIconStyle = !(iconElemLeftChildren && iconElemLeftChildren.props && iconElemLeftChildren.props.color) ? styles.iconButtonIconStyle : null;
- var delta = Math.pow(x, 2) + Math.pow(y, 2);
- var distance = Math.sqrt(delta);
+ iconElementLeftProps.iconStyle = (0, _simpleAssign2.default)({}, iconButtonIconStyle, iconElementLeft.props.iconStyle);
+ }
- value = value || 12;
- if (this.props.format === '24hr') {
- if (distance < 90) {
- value += 12;
- value %= 24;
+ if (!iconElementLeft.props.onTouchTap && this.props.onLeftIconButtonTouchTap) {
+ iconElementLeftProps.onTouchTap = this.handleTouchTapLeftIconButton;
+ }
+
+ menuElementLeft = _react2.default.createElement(
+ 'div',
+ { style: prepareStyles(iconLeftStyle) },
+ (0, _keys2.default)(iconElementLeftProps).length > 0 ? (0, _react.cloneElement)(iconElementLeft, iconElementLeftProps) : iconElementLeft
+ );
+ } else {
+ menuElementLeft = _react2.default.createElement(
+ _IconButton2.default,
+ {
+ style: iconLeftStyle,
+ iconStyle: styles.iconButtonIconStyle,
+ iconClassName: iconClassNameLeft,
+ onTouchTap: this.handleTouchTapLeftIconButton
+ },
+ iconClassNameLeft ? '' : _react2.default.createElement(_menu2.default, { style: (0, _simpleAssign2.default)({}, styles.iconButtonIconStyle) })
+ );
}
- } else {
- value %= 12;
}
- return value;
- }
- }, {
- key: 'getSelected',
- value: function getSelected() {
- var hour = this.props.initialHours;
+ var iconRightStyle = (0, _simpleAssign2.default)({}, styles.iconButtonStyle, {
+ marginRight: -16,
+ marginLeft: 'auto'
+ }, iconStyleRight);
- if (this.props.format === 'ampm') {
- hour %= 12;
- hour = hour || 12;
+ if (iconElementRight) {
+ var iconElementRightProps = {};
+
+ switch (iconElementRight.type.muiName) {
+ case 'IconMenu':
+ case 'IconButton':
+ var iconElemRightChildren = iconElementRight.props.children;
+ var _iconButtonIconStyle = !(iconElemRightChildren && iconElemRightChildren.props && iconElemRightChildren.props.color) ? styles.iconButtonIconStyle : null;
+
+ iconElementRightProps.iconStyle = (0, _simpleAssign2.default)({}, _iconButtonIconStyle, iconElementRight.props.iconStyle);
+ break;
+
+ case 'FlatButton':
+ iconElementRightProps.style = (0, _simpleAssign2.default)({}, styles.flatButton, iconElementRight.props.style);
+ break;
+
+ default:
+ }
+
+ if (!iconElementRight.props.onTouchTap && this.props.onRightIconButtonTouchTap) {
+ iconElementRightProps.onTouchTap = this.handleTouchTapRightIconButton;
+ }
+
+ menuElementRight = _react2.default.createElement(
+ 'div',
+ { style: prepareStyles(iconRightStyle) },
+ (0, _keys2.default)(iconElementRightProps).length > 0 ? (0, _react.cloneElement)(iconElementRight, iconElementRightProps) : iconElementRight
+ );
+ } else if (iconClassNameRight) {
+ menuElementRight = _react2.default.createElement(_IconButton2.default, {
+ style: iconRightStyle,
+ iconStyle: styles.iconButtonIconStyle,
+ iconClassName: iconClassNameRight,
+ onTouchTap: this.handleTouchTapRightIconButton
+ });
}
- return hour;
+ return _react2.default.createElement(
+ _Paper2.default,
+ (0, _extends3.default)({}, other, {
+ rounded: false,
+ className: className,
+ style: (0, _simpleAssign2.default)({}, styles.root, style),
+ zDepth: zDepth
+ }),
+ menuElementLeft,
+ titleElement,
+ menuElementRight,
+ children
+ );
}
- }, {
- key: 'getHourNumbers',
- value: function getHourNumbers() {
- var _this2 = this;
+ }]);
+ return AppBar;
+}(_react.Component);
+
+AppBar.muiName = 'AppBar';
+AppBar.defaultProps = {
+ showMenuIconButton: true,
+ title: '',
+ zDepth: 1
+};
+AppBar.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? AppBar.propTypes = {
+ /**
+ * Can be used to render a tab inside an app bar for instance.
+ */
+ children: _react.PropTypes.node,
+ /**
+ * Applied to the app bar's root element.
+ */
+ className: _react.PropTypes.string,
+ /**
+ * The classname of the icon on the left of the app bar.
+ * If you are using a stylesheet for your icons, enter the class name for the icon to be used here.
+ */
+ iconClassNameLeft: _react.PropTypes.string,
+ /**
+ * Similiar to the iconClassNameLeft prop except that
+ * it applies to the icon displayed on the right of the app bar.
+ */
+ iconClassNameRight: _react.PropTypes.string,
+ /**
+ * The custom element to be displayed on the left side of the
+ * app bar such as an SvgIcon.
+ */
+ iconElementLeft: _react.PropTypes.element,
+ /**
+ * Similiar to the iconElementLeft prop except that this element is displayed on the right of the app bar.
+ */
+ iconElementRight: _react.PropTypes.element,
+ /**
+ * Override the inline-styles of the element displayed on the left side of the app bar.
+ */
+ iconStyleLeft: _react.PropTypes.object,
+ /**
+ * Override the inline-styles of the element displayed on the right side of the app bar.
+ */
+ iconStyleRight: _react.PropTypes.object,
+ /**
+ * Callback function for when the left icon is selected via a touch tap.
+ *
+ * @param {object} event TouchTap event targeting the left `IconButton`.
+ */
+ onLeftIconButtonTouchTap: _react.PropTypes.func,
+ /**
+ * Callback function for when the right icon is selected via a touch tap.
+ *
+ * @param {object} event TouchTap event targeting the right `IconButton`.
+ */
+ onRightIconButtonTouchTap: _react.PropTypes.func,
+ /**
+ * Callback function for when the title text is selected via a touch tap.
+ *
+ * @param {object} event TouchTap event targeting the `title` node.
+ */
+ onTitleTouchTap: _react.PropTypes.func,
+ /**
+ * Determines whether or not to display the Menu icon next to the title.
+ * Setting this prop to false will hide the icon.
+ */
+ showMenuIconButton: _react.PropTypes.bool,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object,
+ /**
+ * The title to display on the app bar.
+ */
+ title: _react.PropTypes.node,
+ /**
+ * Override the inline-styles of the app bar's title element.
+ */
+ titleStyle: _react.PropTypes.object,
+ /**
+ * The zDepth of the component.
+ * The shadow of the app bar is also dependent on this property.
+ */
+ zDepth: _propTypes2.default.zDepth
+} : void 0;
+exports.default = AppBar;
+
+/***/ }),
+/* 838 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
- var style = {
- pointerEvents: 'none'
- };
- var hourSize = this.props.format === 'ampm' ? 12 : 24;
+var _react = __webpack_require__(0);
- var hours = [];
- for (var i = 1; i <= hourSize; i++) {
- hours.push(i % 24);
- }
+var _react2 = _interopRequireDefault(_react);
- return hours.map(function (hour) {
- var isSelected = _this2.getSelected() === hour;
- return _react2.default.createElement(_ClockNumber2.default, {
- key: hour,
- style: style,
- isSelected: isSelected,
- type: 'hour',
- value: hour
- });
- });
- }
- }, {
- key: 'render',
- value: function render() {
- var styles = {
- root: {
- height: '100%',
- width: '100%',
- borderRadius: '100%',
- position: 'relative',
- pointerEvents: 'none',
- boxSizing: 'border-box'
- },
+var _pure = __webpack_require__(20);
- hitMask: {
- height: '100%',
- width: '100%',
- pointerEvents: 'auto'
- }
- };
+var _pure2 = _interopRequireDefault(_pure);
- var prepareStyles = this.context.muiTheme.prepareStyles;
+var _SvgIcon = __webpack_require__(21);
- var hours = this.getSelected();
- var numbers = this.getHourNumbers();
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
- return _react2.default.createElement(
- 'div',
- { ref: 'clock', style: prepareStyles(styles.root) },
- _react2.default.createElement(_ClockPointer2.default, { hasSelected: true, value: hours, type: 'hour' }),
- numbers,
- _react2.default.createElement('div', {
- ref: 'mask', style: prepareStyles(styles.hitMask), onTouchMove: this.handleTouchMove,
- onTouchEnd: this.handleTouchEnd, onMouseUp: this.handleUp, onMouseMove: this.handleMove
- })
- );
- }
- }]);
- return ClockHours;
-}(_react.Component);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-ClockHours.defaultProps = {
- initialHours: new Date().getHours(),
- onChange: function onChange() {},
- format: 'ampm'
-};
-ClockHours.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
+var NavigationMenu = function NavigationMenu(props) {
+ return _react2.default.createElement(
+ _SvgIcon2.default,
+ props,
+ _react2.default.createElement('path', { d: 'M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z' })
+ );
};
- false ? ClockHours.propTypes = {
- format: _react.PropTypes.oneOf(['ampm', '24hr']),
- initialHours: _react.PropTypes.number,
- onChange: _react.PropTypes.func
-} : void 0;
-exports.default = ClockHours;
+NavigationMenu = (0, _pure2.default)(NavigationMenu);
+NavigationMenu.displayName = 'NavigationMenu';
+NavigationMenu.muiName = 'SvgIcon';
+
+exports.default = NavigationMenu;
/***/ }),
-/* 841 */
+/* 839 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -71803,6 +75756,14 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
+var _extends2 = __webpack_require__(7);
+
+var _extends3 = _interopRequireDefault(_extends2);
+
+var _objectWithoutProperties2 = __webpack_require__(8);
+
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
var _getPrototypeOf = __webpack_require__(3);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -71823,234 +75784,443 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
+var _simpleAssign = __webpack_require__(6);
+
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _ClockNumber = __webpack_require__(327);
+var _warning = __webpack_require__(15);
-var _ClockNumber2 = _interopRequireDefault(_ClockNumber);
+var _warning2 = _interopRequireDefault(_warning);
-var _ClockPointer = __webpack_require__(328);
+var _TabTemplate = __webpack_require__(840);
-var _ClockPointer2 = _interopRequireDefault(_ClockPointer);
+var _TabTemplate2 = _interopRequireDefault(_TabTemplate);
+
+var _InkBar = __webpack_require__(841);
-var _timeUtils = __webpack_require__(98);
+var _InkBar2 = _interopRequireDefault(_InkBar);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var ClockMinutes = function (_Component) {
- (0, _inherits3.default)(ClockMinutes, _Component);
+function getStyles(props, context) {
+ var tabs = context.muiTheme.tabs;
- function ClockMinutes() {
+
+ return {
+ tabItemContainer: {
+ width: '100%',
+ backgroundColor: tabs.backgroundColor,
+ whiteSpace: 'nowrap',
+ display: 'flex'
+ }
+ };
+}
+
+var Tabs = function (_Component) {
+ (0, _inherits3.default)(Tabs, _Component);
+
+ function Tabs() {
var _ref;
var _temp, _this, _ret;
- (0, _classCallCheck3.default)(this, ClockMinutes);
+ (0, _classCallCheck3.default)(this, Tabs);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = ClockMinutes.__proto__ || (0, _getPrototypeOf2.default)(ClockMinutes)).call.apply(_ref, [this].concat(args))), _this), _this.handleUp = function (event) {
- event.preventDefault();
- _this.setClock(event.nativeEvent, true);
- }, _this.handleMove = function (event) {
- event.preventDefault();
- if (_this.isMousePressed(event) !== 1) {
- return;
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tabs.__proto__ || (0, _getPrototypeOf2.default)(Tabs)).call.apply(_ref, [this].concat(args))), _this), _this.state = { selectedIndex: 0 }, _this.handleTabTouchTap = function (value, event, tab) {
+ var valueLink = _this.getValueLink(_this.props);
+ var index = tab.props.index;
+
+ if (valueLink.value && valueLink.value !== value || _this.state.selectedIndex !== index) {
+ valueLink.requestChange(value, event, tab);
+ }
+
+ _this.setState({ selectedIndex: index });
+
+ if (tab.props.onActive) {
+ tab.props.onActive(tab);
}
- _this.setClock(event.nativeEvent, false);
- }, _this.handleTouch = function (event) {
- event.preventDefault();
- _this.setClock(event.changedTouches[0], event.type === 'touchend');
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- (0, _createClass3.default)(ClockMinutes, [{
- key: 'componentDidMount',
- value: function componentDidMount() {
- var clockElement = this.refs.mask;
-
- this.center = {
- x: clockElement.offsetWidth / 2,
- y: clockElement.offsetHeight / 2
- };
+ (0, _createClass3.default)(Tabs, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ var valueLink = this.getValueLink(this.props);
+ var initialIndex = this.props.initialSelectedIndex;
- this.basePoint = {
- x: this.center.x,
- y: 0
- };
+ this.setState({
+ selectedIndex: valueLink.value !== undefined ? this.getSelectedIndex(this.props) : initialIndex < this.getTabCount() ? initialIndex : 0
+ });
}
}, {
- key: 'isMousePressed',
- value: function isMousePressed(event) {
- if (typeof event.buttons === 'undefined') {
- return event.nativeEvent.which;
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(newProps, nextContext) {
+ var valueLink = this.getValueLink(newProps);
+ var newState = {
+ muiTheme: nextContext.muiTheme || this.context.muiTheme
+ };
+
+ if (valueLink.value !== undefined) {
+ newState.selectedIndex = this.getSelectedIndex(newProps);
}
- return event.buttons;
+
+ this.setState(newState);
}
}, {
- key: 'setClock',
- value: function setClock(event, finish) {
- if (typeof event.offsetX === 'undefined') {
- var offset = (0, _timeUtils.getTouchEventOffsetValues)(event);
+ key: 'getTabs',
+ value: function getTabs() {
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
- event.offsetX = offset.offsetX;
- event.offsetY = offset.offsetY;
- }
+ var tabs = [];
- var minutes = this.getMinutes(event.offsetX, event.offsetY);
+ _react.Children.forEach(props.children, function (tab) {
+ if ((0, _react.isValidElement)(tab)) {
+ tabs.push(tab);
+ }
+ });
- this.props.onChange(minutes, finish);
+ return tabs;
}
}, {
- key: 'getMinutes',
- value: function getMinutes(offsetX, offsetY) {
- var step = 6;
- var x = offsetX - this.center.x;
- var y = offsetY - this.center.y;
- var cx = this.basePoint.x - this.center.x;
- var cy = this.basePoint.y - this.center.y;
-
- var atan = Math.atan2(cx, cy) - Math.atan2(x, y);
-
- var deg = (0, _timeUtils.rad2deg)(atan);
- deg = Math.round(deg / step) * step;
- deg %= 360;
+ key: 'getTabCount',
+ value: function getTabCount() {
+ return this.getTabs().length;
+ }
- var value = Math.floor(deg / step) || 0;
+ // Do not use outside of this component, it will be removed once valueLink is deprecated
- return value;
+ }, {
+ key: 'getValueLink',
+ value: function getValueLink(props) {
+ return props.valueLink || {
+ value: props.value,
+ requestChange: props.onChange
+ };
}
}, {
- key: 'getMinuteNumbers',
- value: function getMinuteNumbers() {
- var minutes = [];
- for (var i = 0; i < 12; i++) {
- minutes.push(i * 5);
- }
- var selectedMinutes = this.props.initialMinutes;
- var hasSelected = false;
+ key: 'getSelectedIndex',
+ value: function getSelectedIndex(props) {
+ var valueLink = this.getValueLink(props);
+ var selectedIndex = -1;
- var numbers = minutes.map(function (minute) {
- var isSelected = selectedMinutes === minute;
- if (isSelected) {
- hasSelected = true;
+ this.getTabs(props).forEach(function (tab, index) {
+ if (valueLink.value === tab.props.value) {
+ selectedIndex = index;
}
- return _react2.default.createElement(_ClockNumber2.default, {
- key: minute,
- isSelected: isSelected,
- type: 'minute',
- value: minute
- });
});
- return {
- numbers: numbers,
- hasSelected: hasSelected,
- selected: selectedMinutes
- };
+ return selectedIndex;
+ }
+ }, {
+ key: 'getSelected',
+ value: function getSelected(tab, index) {
+ var valueLink = this.getValueLink(this.props);
+ return valueLink.value ? valueLink.value === tab.props.value : this.state.selectedIndex === index;
}
}, {
key: 'render',
value: function render() {
- var styles = {
- root: {
- height: '100%',
- width: '100%',
- borderRadius: '100%',
- position: 'relative',
- pointerEvents: 'none',
- boxSizing: 'border-box'
- },
-
- hitMask: {
- height: '100%',
- width: '100%',
- pointerEvents: 'auto'
- }
- };
+ var _this2 = this;
+ var _props = this.props,
+ contentContainerClassName = _props.contentContainerClassName,
+ contentContainerStyle = _props.contentContainerStyle,
+ initialSelectedIndex = _props.initialSelectedIndex,
+ inkBarStyle = _props.inkBarStyle,
+ onChange = _props.onChange,
+ style = _props.style,
+ tabItemContainerStyle = _props.tabItemContainerStyle,
+ tabTemplate = _props.tabTemplate,
+ tabTemplateStyle = _props.tabTemplateStyle,
+ other = (0, _objectWithoutProperties3.default)(_props, ['contentContainerClassName', 'contentContainerStyle', 'initialSelectedIndex', 'inkBarStyle', 'onChange', 'style', 'tabItemContainerStyle', 'tabTemplate', 'tabTemplateStyle']);
var prepareStyles = this.context.muiTheme.prepareStyles;
- var minutes = this.getMinuteNumbers();
+ var styles = getStyles(this.props, this.context);
+ var valueLink = this.getValueLink(this.props);
+ var tabValue = valueLink.value;
+ var tabContent = [];
+ var width = 100 / this.getTabCount();
+
+ var tabs = this.getTabs().map(function (tab, index) {
+ false ? (0, _warning2.default)(tab.type && tab.type.muiName === 'Tab', 'Material-UI: Tabs only accepts Tab Components as children.\n Found ' + (tab.type.muiName || tab.type) + ' as child number ' + (index + 1) + ' of Tabs') : void 0;
+
+ false ? (0, _warning2.default)(!tabValue || tab.props.value !== undefined, 'Material-UI: Tabs value prop has been passed, but Tab ' + index + '\n does not have a value prop. Needs value if Tabs is going\n to be a controlled component.') : void 0;
+
+ tabContent.push(tab.props.children ? (0, _react.createElement)(tabTemplate || _TabTemplate2.default, {
+ key: index,
+ selected: _this2.getSelected(tab, index),
+ style: tabTemplateStyle
+ }, tab.props.children) : undefined);
+
+ return (0, _react.cloneElement)(tab, {
+ key: index,
+ index: index,
+ selected: _this2.getSelected(tab, index),
+ width: width + '%',
+ onTouchTap: _this2.handleTabTouchTap
+ });
+ });
+
+ var inkBar = this.state.selectedIndex !== -1 ? _react2.default.createElement(_InkBar2.default, {
+ left: width * this.state.selectedIndex + '%',
+ width: width + '%',
+ style: inkBarStyle
+ }) : null;
+
+ var inkBarContainerWidth = tabItemContainerStyle ? tabItemContainerStyle.width : '100%';
return _react2.default.createElement(
'div',
- { ref: 'clock', style: prepareStyles(styles.root) },
- _react2.default.createElement(_ClockPointer2.default, { value: minutes.selected, type: 'minute', hasSelected: minutes.hasSelected }),
- minutes.numbers,
- _react2.default.createElement('div', {
- ref: 'mask',
- style: prepareStyles(styles.hitMask),
- onTouchMove: this.handleTouch,
- onTouchEnd: this.handleTouch,
- onMouseUp: this.handleUp,
- onMouseMove: this.handleMove
- })
+ (0, _extends3.default)({ style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, other),
+ _react2.default.createElement(
+ 'div',
+ { style: prepareStyles((0, _simpleAssign2.default)(styles.tabItemContainer, tabItemContainerStyle)) },
+ tabs
+ ),
+ _react2.default.createElement(
+ 'div',
+ { style: { width: inkBarContainerWidth } },
+ inkBar
+ ),
+ _react2.default.createElement(
+ 'div',
+ {
+ style: prepareStyles((0, _simpleAssign2.default)({}, contentContainerStyle)),
+ className: contentContainerClassName
+ },
+ tabContent
+ )
);
}
}]);
- return ClockMinutes;
+ return Tabs;
}(_react.Component);
-ClockMinutes.defaultProps = {
- initialMinutes: new Date().getMinutes(),
+Tabs.defaultProps = {
+ initialSelectedIndex: 0,
onChange: function onChange() {}
};
-ClockMinutes.contextTypes = {
+Tabs.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? ClockMinutes.propTypes = {
- initialMinutes: _react.PropTypes.number,
- onChange: _react.PropTypes.func
+ false ? Tabs.propTypes = {
+ /**
+ * Should be used to pass `Tab` components.
+ */
+ children: _react.PropTypes.node,
+ /**
+ * The css class name of the root element.
+ */
+ className: _react.PropTypes.string,
+ /**
+ * The css class name of the content's container.
+ */
+ contentContainerClassName: _react.PropTypes.string,
+ /**
+ * Override the inline-styles of the content's container.
+ */
+ contentContainerStyle: _react.PropTypes.object,
+ /**
+ * Specify initial visible tab index.
+ * If `initialSelectedIndex` is set but larger than the total amount of specified tabs,
+ * `initialSelectedIndex` will revert back to default.
+ * If `initialSelectedIndex` is set to any negative value, no tab will be selected intially.
+ */
+ initialSelectedIndex: _react.PropTypes.number,
+ /**
+ * Override the inline-styles of the InkBar.
+ */
+ inkBarStyle: _react.PropTypes.object,
+ /**
+ * Called when the selected value change.
+ */
+ onChange: _react.PropTypes.func,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object,
+ /**
+ * Override the inline-styles of the tab-labels container.
+ */
+ tabItemContainerStyle: _react.PropTypes.object,
+ /**
+ * Override the default tab template used to wrap the content of each tab element.
+ */
+ tabTemplate: _react.PropTypes.func,
+ /**
+ * Override the inline-styles of the tab template.
+ */
+ tabTemplateStyle: _react.PropTypes.object,
+ /**
+ * Makes Tabs controllable and selects the tab whose value prop matches this prop.
+ */
+ value: _react.PropTypes.any
} : void 0;
-exports.default = ClockMinutes;
+exports.default = Tabs;
+
+/***/ }),
+/* 840 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _simpleAssign = __webpack_require__(6);
+
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var styles = {
+ width: '100%',
+ position: 'relative',
+ textAlign: 'initial'
+};
+
+var TabTemplate = function TabTemplate(_ref) {
+ var children = _ref.children,
+ selected = _ref.selected,
+ style = _ref.style;
+
+ var templateStyle = (0, _simpleAssign2.default)({}, styles, style);
+ if (!selected) {
+ templateStyle.height = 0;
+ templateStyle.overflow = 'hidden';
+ }
+
+ return _react2.default.createElement(
+ 'div',
+ { style: templateStyle },
+ children
+ );
+};
+
+ false ? TabTemplate.propTypes = {
+ children: _react.PropTypes.node,
+ selected: _react.PropTypes.bool,
+ style: _react.PropTypes.object
+} : void 0;
+
+exports.default = TabTemplate;
+
+/***/ }),
+/* 841 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _simpleAssign = __webpack_require__(6);
+
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-/***/ }),
-/* 842 */
-/***/ (function(module, exports, __webpack_require__) {
+var _react = __webpack_require__(0);
-"use strict";
+var _react2 = _interopRequireDefault(_react);
+var _transitions = __webpack_require__(10);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
+var _transitions2 = _interopRequireDefault(_transitions);
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _Toggle = __webpack_require__(843);
+function getStyles(props, context) {
+ var inkBar = context.muiTheme.inkBar;
-var _Toggle2 = _interopRequireDefault(_Toggle);
-var _createComponent = __webpack_require__(43);
+ return {
+ root: {
+ left: props.left,
+ width: props.width,
+ bottom: 0,
+ display: 'block',
+ backgroundColor: props.color || inkBar.backgroundColor,
+ height: 2,
+ marginTop: -2,
+ position: 'relative',
+ transition: _transitions2.default.easeOut('1s', 'left')
+ }
+ };
+}
-var _createComponent2 = _interopRequireDefault(_createComponent);
+var InkBar = function (_Component) {
+ (0, _inherits3.default)(InkBar, _Component);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ function InkBar() {
+ (0, _classCallCheck3.default)(this, InkBar);
+ return (0, _possibleConstructorReturn3.default)(this, (InkBar.__proto__ || (0, _getPrototypeOf2.default)(InkBar)).apply(this, arguments));
+ }
-function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+ (0, _createClass3.default)(InkBar, [{
+ key: 'render',
+ value: function render() {
+ var style = this.props.style;
+ var prepareStyles = this.context.muiTheme.prepareStyles;
-exports.default = (0, _createComponent2.default)(_Toggle2.default, function (_ref) {
- var _ref$input = _ref.input,
- onChange = _ref$input.onChange,
- value = _ref$input.value,
- inputProps = _objectWithoutProperties(_ref$input, ['onChange', 'value']),
- defaultToggled = _ref.defaultToggled,
- meta = _ref.meta,
- props = _objectWithoutProperties(_ref, ['input', 'defaultToggled', 'meta']);
+ var styles = getStyles(this.props, this.context);
- return _extends({}, inputProps, props, {
- onToggle: onChange,
- toggled: !!value
- });
-});
+ return _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) });
+ }
+ }]);
+ return InkBar;
+}(_react.Component);
+
+InkBar.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? InkBar.propTypes = {
+ color: _react.PropTypes.string,
+ left: _react.PropTypes.string.isRequired,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object,
+ width: _react.PropTypes.string.isRequired
+} : void 0;
+exports.default = InkBar;
/***/ }),
-/* 843 */
+/* 842 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -72061,16 +76231,16 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = undefined;
-var _Toggle = __webpack_require__(844);
+var _Badge = __webpack_require__(843);
-var _Toggle2 = _interopRequireDefault(_Toggle);
+var _Badge2 = _interopRequireDefault(_Badge);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-exports.default = _Toggle2.default;
+exports.default = _Badge2.default;
/***/ }),
-/* 844 */
+/* 843 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -72116,293 +76286,137 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _transitions = __webpack_require__(10);
-
-var _transitions2 = _interopRequireDefault(_transitions);
-
-var _Paper = __webpack_require__(34);
-
-var _Paper2 = _interopRequireDefault(_Paper);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _EnhancedSwitch = __webpack_require__(202);
+function getStyles(props, context) {
+ var primary = props.primary,
+ secondary = props.secondary;
+ var badge = context.muiTheme.badge;
-var _EnhancedSwitch2 = _interopRequireDefault(_EnhancedSwitch);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ var badgeBackgroundColor = void 0;
+ var badgeTextColor = void 0;
-function getStyles(props, context, state) {
- var disabled = props.disabled,
- elementStyle = props.elementStyle,
- trackSwitchedStyle = props.trackSwitchedStyle,
- thumbSwitchedStyle = props.thumbSwitchedStyle,
- trackStyle = props.trackStyle,
- thumbStyle = props.thumbStyle,
- iconStyle = props.iconStyle,
- rippleStyle = props.rippleStyle,
- labelStyle = props.labelStyle;
- var _context$muiTheme = context.muiTheme,
- baseTheme = _context$muiTheme.baseTheme,
- toggle = _context$muiTheme.toggle;
+ if (primary) {
+ badgeBackgroundColor = badge.primaryColor;
+ badgeTextColor = badge.primaryTextColor;
+ } else if (secondary) {
+ badgeBackgroundColor = badge.secondaryColor;
+ badgeTextColor = badge.secondaryTextColor;
+ } else {
+ badgeBackgroundColor = badge.color;
+ badgeTextColor = badge.textColor;
+ }
+ var radius = 12;
+ var radius2x = Math.floor(2 * radius);
- var toggleSize = 20;
- var toggleTrackWidth = 36;
- var styles = {
- icon: {
- width: 36,
- padding: '4px 0px 6px 2px'
- },
- ripple: {
- top: -10,
- left: -10,
- color: state.switched ? toggle.thumbOnColor : baseTheme.palette.textColor
- },
- toggleElement: {
- width: toggleTrackWidth
- },
- track: {
- transition: _transitions2.default.easeOut(),
- width: '100%',
- height: 14,
- borderRadius: 30,
- backgroundColor: toggle.trackOffColor
+ return {
+ root: {
+ position: 'relative',
+ display: 'inline-block',
+ padding: radius2x + 'px ' + radius2x + 'px ' + radius + 'px ' + radius + 'px'
},
- thumb: {
- transition: _transitions2.default.easeOut(),
+ badge: {
+ display: 'flex',
+ flexDirection: 'row',
+ flexWrap: 'wrap',
+ justifyContent: 'center',
+ alignContent: 'center',
+ alignItems: 'center',
position: 'absolute',
- top: 1,
- left: 0,
- width: toggleSize,
- height: toggleSize,
- lineHeight: '24px',
+ top: 0,
+ right: 0,
+ fontWeight: badge.fontWeight,
+ fontSize: radius,
+ width: radius2x,
+ height: radius2x,
borderRadius: '50%',
- backgroundColor: toggle.thumbOffColor
- },
- trackWhenSwitched: {
- backgroundColor: toggle.trackOnColor
- },
- thumbWhenSwitched: {
- backgroundColor: toggle.thumbOnColor,
- left: '100%'
- },
- trackWhenDisabled: {
- backgroundColor: toggle.trackDisabledColor
- },
- thumbWhenDisabled: {
- backgroundColor: toggle.thumbDisabledColor
- },
- label: {
- color: disabled ? toggle.labelDisabledColor : toggle.labelColor,
- width: 'calc(100% - ' + (toggleTrackWidth + 10) + 'px)'
+ backgroundColor: badgeBackgroundColor,
+ color: badgeTextColor
}
};
-
- (0, _simpleAssign2.default)(styles.track, trackStyle, state.switched && styles.trackWhenSwitched, state.switched && trackSwitchedStyle, disabled && styles.trackWhenDisabled);
-
- (0, _simpleAssign2.default)(styles.thumb, thumbStyle, state.switched && styles.thumbWhenSwitched, state.switched && thumbSwitchedStyle, disabled && styles.thumbWhenDisabled);
-
- if (state.switched) {
- styles.thumb.marginLeft = 0 - styles.thumb.width;
- }
-
- (0, _simpleAssign2.default)(styles.icon, iconStyle);
-
- (0, _simpleAssign2.default)(styles.ripple, rippleStyle);
-
- (0, _simpleAssign2.default)(styles.label, labelStyle);
-
- (0, _simpleAssign2.default)(styles.toggleElement, elementStyle);
-
- return styles;
}
-var Toggle = function (_Component) {
- (0, _inherits3.default)(Toggle, _Component);
-
- function Toggle() {
- var _ref;
-
- var _temp, _this, _ret;
-
- (0, _classCallCheck3.default)(this, Toggle);
-
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
+var Badge = function (_Component) {
+ (0, _inherits3.default)(Badge, _Component);
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Toggle.__proto__ || (0, _getPrototypeOf2.default)(Toggle)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- switched: false
- }, _this.handleStateChange = function (newSwitched) {
- _this.setState({
- switched: newSwitched
- });
- }, _this.handleToggle = function (event, isInputChecked) {
- if (_this.props.onToggle) {
- _this.props.onToggle(event, isInputChecked);
- }
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ function Badge() {
+ (0, _classCallCheck3.default)(this, Badge);
+ return (0, _possibleConstructorReturn3.default)(this, (Badge.__proto__ || (0, _getPrototypeOf2.default)(Badge)).apply(this, arguments));
}
- (0, _createClass3.default)(Toggle, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
- var _props = this.props,
- toggled = _props.toggled,
- defaultToggled = _props.defaultToggled,
- valueLink = _props.valueLink;
-
-
- if (toggled || defaultToggled || valueLink && valueLink.value) {
- this.setState({
- switched: true
- });
- }
- }
- }, {
- key: 'isToggled',
- value: function isToggled() {
- return this.refs.enhancedSwitch.isSwitched();
- }
- }, {
- key: 'setToggled',
- value: function setToggled(newToggledValue) {
- this.refs.enhancedSwitch.setSwitched(newToggledValue);
- }
- }, {
+ (0, _createClass3.default)(Badge, [{
key: 'render',
value: function render() {
- var _props2 = this.props,
- defaultToggled = _props2.defaultToggled,
- elementStyle = _props2.elementStyle,
- onToggle = _props2.onToggle,
- trackSwitchedStyle = _props2.trackSwitchedStyle,
- thumbSwitchedStyle = _props2.thumbSwitchedStyle,
- toggled = _props2.toggled,
- other = (0, _objectWithoutProperties3.default)(_props2, ['defaultToggled', 'elementStyle', 'onToggle', 'trackSwitchedStyle', 'thumbSwitchedStyle', 'toggled']);
+ var _props = this.props,
+ badgeContent = _props.badgeContent,
+ badgeStyle = _props.badgeStyle,
+ children = _props.children,
+ primary = _props.primary,
+ secondary = _props.secondary,
+ style = _props.style,
+ other = (0, _objectWithoutProperties3.default)(_props, ['badgeContent', 'badgeStyle', 'children', 'primary', 'secondary', 'style']);
var prepareStyles = this.context.muiTheme.prepareStyles;
- var styles = getStyles(this.props, this.context, this.state);
+ var styles = getStyles(this.props, this.context);
- var toggleElement = _react2.default.createElement(
+ return _react2.default.createElement(
'div',
- { style: prepareStyles((0, _simpleAssign2.default)({}, styles.toggleElement)) },
- _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)({}, styles.track)) }),
- _react2.default.createElement(_Paper2.default, { style: styles.thumb, circle: true, zDepth: 1 })
+ (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)({}, styles.root, style)) }),
+ children,
+ _react2.default.createElement(
+ 'span',
+ { style: prepareStyles((0, _simpleAssign2.default)({}, styles.badge, badgeStyle)) },
+ badgeContent
+ )
);
-
- var enhancedSwitchProps = {
- ref: 'enhancedSwitch',
- inputType: 'checkbox',
- switchElement: toggleElement,
- rippleStyle: styles.ripple,
- rippleColor: styles.ripple.color,
- iconStyle: styles.icon,
- trackStyle: styles.track,
- thumbStyle: styles.thumb,
- labelStyle: styles.label,
- switched: this.state.switched,
- onSwitch: this.handleToggle,
- onParentShouldUpdate: this.handleStateChange,
- labelPosition: this.props.labelPosition
- };
-
- if (this.props.hasOwnProperty('toggled')) {
- enhancedSwitchProps.checked = toggled;
- } else if (this.props.hasOwnProperty('defaultToggled')) {
- enhancedSwitchProps.defaultChecked = defaultToggled;
- }
-
- return _react2.default.createElement(_EnhancedSwitch2.default, (0, _extends3.default)({}, other, enhancedSwitchProps));
}
}]);
- return Toggle;
+ return Badge;
}(_react.Component);
-Toggle.defaultProps = {
- defaultToggled: false,
- disabled: false,
- labelPosition: 'left'
+Badge.defaultProps = {
+ primary: false,
+ secondary: false
};
-Toggle.contextTypes = {
+Badge.contextTypes = {
muiTheme: _react.PropTypes.object.isRequired
};
- false ? Toggle.propTypes = {
- /**
- * Determines whether the Toggle is initially turned on.
- * **Warning:** This cannot be used in conjunction with `toggled`.
- * Decide between using a controlled or uncontrolled input element and remove one of these props.
- * More info: https://fb.me/react-controlled-components
- */
- defaultToggled: _react.PropTypes.bool,
- /**
- * Will disable the toggle if true.
- */
- disabled: _react.PropTypes.bool,
- /**
- * Overrides the inline-styles of the Toggle element.
- */
- elementStyle: _react.PropTypes.object,
- /**
- * Overrides the inline-styles of the Icon element.
- */
- iconStyle: _react.PropTypes.object,
+ false ? Badge.propTypes = {
/**
- * Overrides the inline-styles of the input element.
+ * This is the content rendered within the badge.
*/
- inputStyle: _react.PropTypes.object,
+ badgeContent: _react.PropTypes.node.isRequired,
/**
- * Label for toggle.
+ * Override the inline-styles of the badge element.
*/
- label: _react.PropTypes.node,
+ badgeStyle: _react.PropTypes.object,
/**
- * Where the label will be placed next to the toggle.
+ * The badge will be added relativelty to this node.
*/
- labelPosition: _react.PropTypes.oneOf(['left', 'right']),
+ children: _react.PropTypes.node,
/**
- * Overrides the inline-styles of the Toggle element label.
+ * The css class name of the root element.
*/
- labelStyle: _react.PropTypes.object,
+ className: _react.PropTypes.string,
/**
- * Callback function that is fired when the toggle switch is toggled.
+ * If true, the badge will use the primary badge colors.
*/
- onToggle: _react.PropTypes.func,
+ primary: _react.PropTypes.bool,
/**
- * Override style of ripple.
+ * If true, the badge will use the secondary badge colors.
*/
- rippleStyle: _react.PropTypes.object,
+ secondary: _react.PropTypes.bool,
/**
* Override the inline-styles of the root element.
*/
- style: _react.PropTypes.object,
- /**
- * Override style for thumb.
- */
- thumbStyle: _react.PropTypes.object,
- /**
- * Override the inline styles for thumb when the toggle switch is toggled on.
- */
- thumbSwitchedStyle: _react.PropTypes.object,
- /**
- * Toggled if set to true.
- */
- toggled: _react.PropTypes.bool,
- /**
- * Override style for track.
- */
- trackStyle: _react.PropTypes.object,
- /**
- * Override the inline styles for track when the toggle switch is toggled on.
- */
- trackSwitchedStyle: _react.PropTypes.object,
- /**
- * ValueLink prop for when using controlled toggle.
- */
- valueLink: _react.PropTypes.object
+ style: _react.PropTypes.object
} : void 0;
-exports.default = Toggle;
+exports.default = Badge;
/***/ }),
-/* 845 */
+/* 844 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -72412,184 +76426,36 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _assign = __webpack_require__(49);
-
-var _assign2 = _interopRequireDefault(_assign);
-
-var _react = __webpack_require__(0);
-
-var _react2 = _interopRequireDefault(_react);
-
-var _reduxForm = __webpack_require__(113);
-
-var _reactRedux = __webpack_require__(27);
-
-var _RaisedButton = __webpack_require__(200);
-
-var _RaisedButton2 = _interopRequireDefault(_RaisedButton);
-
-var _reduxFormMaterialUi = __webpack_require__(201);
+var _keys = __webpack_require__(62);
-var _Styles = __webpack_require__(80);
+var _keys2 = _interopRequireDefault(_keys);
-var _Styles2 = _interopRequireDefault(_Styles);
+exports.changeMenu = changeMenu;
-var _FormValidators = __webpack_require__(204);
+var _ActionTypes = __webpack_require__(49);
-var Validators = _interopRequireWildcard(_FormValidators);
+var types = _interopRequireWildcard(_ActionTypes);
-var _Menus = __webpack_require__(96);
+var _Menus = __webpack_require__(84);
var menus = _interopRequireWildcard(_Menus);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-var defaultValues = {
- autoCheckout: false,
- autoPay: false,
- strictSize: true,
- hideSoldOut: false,
- captchaBypass: false,
- addToCartDelay: 200,
- checkoutDelay: 2000
-};
-
-var Options = function Options(props) {
- var handleSubmit = props.handleSubmit,
- pristine = props.pristine,
- submitting = props.submitting;
-
- return _react2.default.createElement(
- 'form',
- { onSubmit: handleSubmit, id: 'options-form' },
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'autoCheckout',
- component: _reduxFormMaterialUi.Toggle,
- label: 'Enable auto checkout',
- style: _Styles2.default.fields.text
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'autoPay',
- component: _reduxFormMaterialUi.Toggle,
- label: 'Enable auto payment',
- style: _Styles2.default.fields.text
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'strictSize',
- component: _reduxFormMaterialUi.Toggle,
- label: 'Enable strict size checking',
- style: _Styles2.default.fields.text
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'hideSoldOut',
- component: _reduxFormMaterialUi.Toggle,
- label: 'Hide sold out products',
- style: _Styles2.default.fields.text
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'captchaBypass',
- component: _reduxFormMaterialUi.Toggle,
- label: 'Bypass captcha (beta)',
- style: _Styles2.default.fields.text
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'addToCartDelay',
- component: _reduxFormMaterialUi.TextField,
- floatingLabelText: 'Add to cart delay (ms)',
- hintText: 'Add to cart delay (ms)',
- style: _Styles2.default.fields.text,
- validate: [Validators.required, Validators.number]
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'checkoutDelay',
- component: _reduxFormMaterialUi.TextField,
- floatingLabelText: 'Checkout delay (ms)',
- hintText: 'Checkout delay (ms)',
- style: _Styles2.default.fields.text,
- validate: [Validators.required, Validators.number]
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'maxPrice',
- component: _reduxFormMaterialUi.TextField,
- floatingLabelText: 'Maximum product price',
- hintText: 'Maximum product price',
- style: _Styles2.default.fields.text,
- validate: [Validators.required, Validators.number]
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_reduxForm.Field, {
- name: 'minPrice',
- component: _reduxFormMaterialUi.TextField,
- floatingLabelText: 'Minimum product price',
- hintText: 'Minimum product price',
- style: _Styles2.default.fields.text,
- validate: [Validators.required, Validators.number]
- })
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_RaisedButton2.default, {
- label: 'Save',
- disabled: pristine || submitting,
- type: 'submit'
- })
- )
- );
-};
-
-function mapStateToProps(state, ownProps) {
- return {
- initialValues: (0, _assign2.default)(defaultValues, (state.settings.values[ownProps.shop] || {})[menus.MENU_OPTIONS] || {})
- };
-}
-
-Options.propTypes = {
- shop: _react.PropTypes.string.isRequired
-};
-
-exports.default = (0, _reactRedux.connect)(mapStateToProps)((0, _reduxForm.reduxForm)({
- form: 'options'
-})(Options));
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function changeMenu(newMenu) {
+ var keys = (0, _keys2.default)(menus).map(function (x) {
+ return menus[x];
+ });
+ if (keys.indexOf(newMenu) !== -1) {
+ return { type: types.CHANGE_MENU, menu: newMenu };
+ }
+ throw new Error('Invalid menu : ' + newMenu);
+}
/***/ }),
-/* 846 */
+/* 845 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -72603,235 +76469,58 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _reduxForm = __webpack_require__(113);
-
-var _reactRedux = __webpack_require__(27);
+var _reactRedux = __webpack_require__(19);
-var _MenuItem = __webpack_require__(129);
+var _Snackbar = __webpack_require__(846);
-var _MenuItem2 = _interopRequireDefault(_MenuItem);
+var _Snackbar2 = _interopRequireDefault(_Snackbar);
-var _RaisedButton = __webpack_require__(200);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _RaisedButton2 = _interopRequireDefault(_RaisedButton);
+function NotificationBar(props) {
+ var notification = props.notification;
-var _reduxFormMaterialUi = __webpack_require__(201);
+ return _react2.default.createElement(_Snackbar2.default, {
+ open: notification.message !== null,
+ message: notification.message === null ? '...' : notification.message,
+ autoHideDuration: 4000,
+ bodyStyle: { height: 'auto', lineHeight: '20px', padding: 24, marginLeft: 256, whiteSpace: 'pre-line' }
+ });
+}
-var _Styles = __webpack_require__(80);
+NotificationBar.propTypes = {
+ notification: _react.PropTypes.shape({
+ message: _react.PropTypes.string
+ })
+};
-var _Styles2 = _interopRequireDefault(_Styles);
+function mapStateToProps(state) {
+ return {
+ notification: state.notification
+ };
+}
-var _Utils = __webpack_require__(329);
+exports.default = (0, _reactRedux.connect)(mapStateToProps)(NotificationBar);
-var Utils = _interopRequireWildcard(_Utils);
+/***/ }),
+/* 846 */
+/***/ (function(module, exports, __webpack_require__) {
-var _FormValidators = __webpack_require__(204);
+"use strict";
-var Validators = _interopRequireWildcard(_FormValidators);
-var _Menus = __webpack_require__(96);
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = undefined;
-var menus = _interopRequireWildcard(_Menus);
+var _Snackbar = __webpack_require__(847);
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+var _Snackbar2 = _interopRequireDefault(_Snackbar);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var Sizes = function Sizes(props) {
- var handleSubmit = props.handleSubmit,
- pristine = props.pristine,
- submitting = props.submitting;
-
- return _react2.default.createElement(
- 'form',
- { onSubmit: handleSubmit, id: 'biling-form' },
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(
- _reduxForm.Field,
- {
- name: 'accessories',
- component: _reduxFormMaterialUi.SelectField,
- floatingLabelText: 'Accessories',
- hintText: 'Accessories',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- },
- Utils.sizes.map(function (x) {
- return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x });
- })
- )
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(
- _reduxForm.Field,
- {
- name: 't-shirts',
- component: _reduxFormMaterialUi.SelectField,
- floatingLabelText: 'T-Shirts',
- hintText: 'T-Shirts',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- },
- Utils.sizes.map(function (x) {
- return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x });
- })
- )
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(
- _reduxForm.Field,
- {
- name: 'pants',
- component: _reduxFormMaterialUi.SelectField,
- floatingLabelText: 'Pants',
- hintText: 'Pants',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- },
- Utils.sizesPants.map(function (x) {
- return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x });
- })
- )
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(
- _reduxForm.Field,
- {
- name: 'shorts',
- component: _reduxFormMaterialUi.SelectField,
- floatingLabelText: 'Shorts',
- hintText: 'Shorts',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- },
- Utils.sizesPants.map(function (x) {
- return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x });
- })
- )
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(
- _reduxForm.Field,
- {
- name: 'sweatshirts',
- component: _reduxFormMaterialUi.SelectField,
- floatingLabelText: 'Sweatshirts',
- hintText: 'Sweatshirts',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- },
- Utils.sizes.map(function (x) {
- return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x });
- })
- )
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(
- _reduxForm.Field,
- {
- name: 'tops-sweaters',
- component: _reduxFormMaterialUi.SelectField,
- floatingLabelText: 'Tops/Sweaters',
- hintText: 'Tops/Sweaters',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- },
- Utils.sizes.map(function (x) {
- return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x });
- })
- )
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(
- _reduxForm.Field,
- {
- name: 'shirts',
- component: _reduxFormMaterialUi.SelectField,
- floatingLabelText: 'Shirts',
- hintText: 'Shirts',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- },
- Utils.sizes.map(function (x) {
- return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x });
- })
- )
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(
- _reduxForm.Field,
- {
- name: 'jackets',
- component: _reduxFormMaterialUi.SelectField,
- floatingLabelText: 'Jackets',
- hintText: 'Jackets',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- },
- Utils.sizes.map(function (x) {
- return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x });
- })
- )
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(
- _reduxForm.Field,
- {
- name: 'shoes',
- component: _reduxFormMaterialUi.SelectField,
- floatingLabelText: 'Shoes',
- hintText: 'Shoes',
- style: _Styles2.default.fields.text,
- validate: [Validators.required]
- },
- Utils.shoeSizes.map(function (x) {
- return _react2.default.createElement(_MenuItem2.default, { key: x, value: x, primaryText: x });
- })
- )
- ),
- _react2.default.createElement(
- 'div',
- null,
- _react2.default.createElement(_RaisedButton2.default, {
- label: 'Save',
- disabled: pristine || submitting,
- type: 'submit'
- })
- )
- );
-};
-
-Sizes.propTypes = {
- shop: _react.PropTypes.string.isRequired
-};
-
-function mapStateToProps(state, ownProps) {
- return {
- initialValues: (state.settings.values[ownProps.shop] || {})[menus.MENU_SIZES] || {}
- };
-}
-
-exports.default = (0, _reactRedux.connect)(mapStateToProps)((0, _reduxForm.reduxForm)({
- form: 'sizes'
-})(Sizes));
+exports.default = _Snackbar2.default;
/***/ }),
/* 847 */
@@ -72844,87 +76533,309 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _assign = __webpack_require__(49);
+var _extends2 = __webpack_require__(7);
-var _assign2 = _interopRequireDefault(_assign);
+var _extends3 = _interopRequireDefault(_extends2);
-exports.default = Layout;
+var _objectWithoutProperties2 = __webpack_require__(8);
+
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _simpleAssign = __webpack_require__(6);
+
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _AppBar = __webpack_require__(848);
+var _transitions = __webpack_require__(10);
-var _AppBar2 = _interopRequireDefault(_AppBar);
+var _transitions2 = _interopRequireDefault(_transitions);
-var _Tabs = __webpack_require__(851);
+var _ClickAwayListener = __webpack_require__(206);
-var _Tabs2 = _interopRequireDefault(_Tabs);
+var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener);
-var _Paper = __webpack_require__(34);
+var _SnackbarBody = __webpack_require__(848);
-var _Paper2 = _interopRequireDefault(_Paper);
+var _SnackbarBody2 = _interopRequireDefault(_SnackbarBody);
-var _Styles = __webpack_require__(80);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _Styles2 = _interopRequireDefault(_Styles);
+function getStyles(props, context, state) {
+ var _context$muiTheme = context.muiTheme,
+ desktopSubheaderHeight = _context$muiTheme.baseTheme.spacing.desktopSubheaderHeight,
+ zIndex = _context$muiTheme.zIndex;
+ var open = state.open;
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-function Layout(props) {
- var children = props.children,
- title = props.title,
- contentStyle = props.contentStyle,
- tabs = props.tabs,
- currentTab = props.currentTab;
+ var styles = {
+ root: {
+ position: 'fixed',
+ left: '50%',
+ display: 'flex',
+ bottom: 0,
+ zIndex: zIndex.snackbar,
+ visibility: open ? 'visible' : 'hidden',
+ transform: open ? 'translate(-50%, 0)' : 'translate(-50%, ' + desktopSubheaderHeight + 'px)',
+ transition: _transitions2.default.easeOut('400ms', 'transform') + ', ' + _transitions2.default.easeOut('400ms', 'visibility')
+ }
+ };
+ return styles;
+}
- var appBarStyles = (0, _assign2.default)({}, _Styles2.default.appBar);
+var Snackbar = function (_Component) {
+ (0, _inherits3.default)(Snackbar, _Component);
- if (tabs) {
- appBarStyles.marginBottom = 64;
+ function Snackbar() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, Snackbar);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Snackbar.__proto__ || (0, _getPrototypeOf2.default)(Snackbar)).call.apply(_ref, [this].concat(args))), _this), _this.componentClickAway = function () {
+ if (_this.timerTransitionId) {
+ // If transitioning, don't close the snackbar.
+ return;
+ }
+
+ if (_this.props.open !== null && _this.props.onRequestClose) {
+ _this.props.onRequestClose('clickaway');
+ } else {
+ _this.setState({ open: false });
+ }
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
}
- return _react2.default.createElement(
- 'div',
- { style: _Styles2.default.container },
- _react2.default.createElement(
- _AppBar2.default,
- { title: title, showMenuIconButton: false, style: appBarStyles },
- tabs && _react2.default.createElement(
- 'div',
- { style: { width: '100%' } },
- _react2.default.createElement(
- _Tabs2.default,
- { style: _Styles2.default.tabs, value: currentTab },
- tabs
- )
- )
- ),
- _react2.default.createElement(
- 'div',
- { style: { width: '100%' } },
- _react2.default.createElement(
- 'div',
- { style: (0, _assign2.default)({}, _Styles2.default.content, contentStyle) },
+ (0, _createClass3.default)(Snackbar, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ this.setState({
+ open: this.props.open,
+ message: this.props.message,
+ action: this.props.action
+ });
+ }
+ }, {
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ if (this.state.open) {
+ this.setAutoHideTimer();
+ this.setTransitionTimer();
+ }
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ var _this2 = this;
+
+ if (this.props.open && nextProps.open && (nextProps.message !== this.props.message || nextProps.action !== this.props.action)) {
+ this.setState({
+ open: false
+ });
+
+ clearTimeout(this.timerOneAtTheTimeId);
+ this.timerOneAtTheTimeId = setTimeout(function () {
+ _this2.setState({
+ message: nextProps.message,
+ action: nextProps.action,
+ open: true
+ });
+ }, 400);
+ } else {
+ var open = nextProps.open;
+
+ this.setState({
+ open: open !== null ? open : this.state.open,
+ message: nextProps.message,
+ action: nextProps.action
+ });
+ }
+ }
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate(prevProps, prevState) {
+ if (prevState.open !== this.state.open) {
+ if (this.state.open) {
+ this.setAutoHideTimer();
+ this.setTransitionTimer();
+ } else {
+ clearTimeout(this.timerAutoHideId);
+ }
+ }
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ clearTimeout(this.timerAutoHideId);
+ clearTimeout(this.timerTransitionId);
+ clearTimeout(this.timerOneAtTheTimeId);
+ }
+ }, {
+ key: 'setAutoHideTimer',
+
+
+ // Timer that controls delay before snackbar auto hides
+ value: function setAutoHideTimer() {
+ var _this3 = this;
+
+ var autoHideDuration = this.props.autoHideDuration;
+
+ if (autoHideDuration > 0) {
+ clearTimeout(this.timerAutoHideId);
+ this.timerAutoHideId = setTimeout(function () {
+ if (_this3.props.open !== null && _this3.props.onRequestClose) {
+ _this3.props.onRequestClose('timeout');
+ } else {
+ _this3.setState({ open: false });
+ }
+ }, autoHideDuration);
+ }
+ }
+
+ // Timer that controls delay before click-away events are captured (based on when animation completes)
+
+ }, {
+ key: 'setTransitionTimer',
+ value: function setTransitionTimer() {
+ var _this4 = this;
+
+ this.timerTransitionId = setTimeout(function () {
+ _this4.timerTransitionId = undefined;
+ }, 400);
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ autoHideDuration = _props.autoHideDuration,
+ contentStyle = _props.contentStyle,
+ bodyStyle = _props.bodyStyle,
+ messageProp = _props.message,
+ onRequestClose = _props.onRequestClose,
+ onActionTouchTap = _props.onActionTouchTap,
+ style = _props.style,
+ other = (0, _objectWithoutProperties3.default)(_props, ['autoHideDuration', 'contentStyle', 'bodyStyle', 'message', 'onRequestClose', 'onActionTouchTap', 'style']);
+ var _state = this.state,
+ action = _state.action,
+ message = _state.message,
+ open = _state.open;
+ var prepareStyles = this.context.muiTheme.prepareStyles;
+
+ var styles = getStyles(this.props, this.context, this.state);
+
+ return _react2.default.createElement(
+ _ClickAwayListener2.default,
+ { onClickAway: open ? this.componentClickAway : null },
_react2.default.createElement(
- _Paper2.default,
- { style: _Styles2.default.paper },
- children
+ 'div',
+ (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }),
+ _react2.default.createElement(_SnackbarBody2.default, {
+ action: action,
+ contentStyle: contentStyle,
+ message: message,
+ open: open,
+ onActionTouchTap: onActionTouchTap,
+ style: bodyStyle
+ })
)
- )
- )
- );
-}
-
-Layout.propTypes = {
- children: _react.PropTypes.node,
- title: _react.PropTypes.string.isRequired,
- contentStyle: _react.PropTypes.object,
- tabs: _react.PropTypes.arrayOf(_react.PropTypes.node),
- currentTab: _react.PropTypes.any
+ );
+ }
+ }]);
+ return Snackbar;
+}(_react.Component);
+
+Snackbar.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
};
+ false ? Snackbar.propTypes = {
+ /**
+ * The label for the action on the snackbar.
+ */
+ action: _react.PropTypes.node,
+ /**
+ * The number of milliseconds to wait before automatically dismissing.
+ * If no value is specified the snackbar will dismiss normally.
+ * If a value is provided the snackbar can still be dismissed normally.
+ * If a snackbar is dismissed before the timer expires, the timer will be cleared.
+ */
+ autoHideDuration: _react.PropTypes.number,
+ /**
+ * Override the inline-styles of the body element.
+ */
+ bodyStyle: _react.PropTypes.object,
+ /**
+ * The css class name of the root element.
+ */
+ className: _react.PropTypes.string,
+ /**
+ * Override the inline-styles of the content element.
+ */
+ contentStyle: _react.PropTypes.object,
+ /**
+ * The message to be displayed.
+ *
+ * (Note: If the message is an element or array, and the `Snackbar` may re-render while it is still open,
+ * ensure that the same object remains as the `message` property if you want to avoid the `Snackbar` hiding and
+ * showing again)
+ */
+ message: _react.PropTypes.node.isRequired,
+ /**
+ * Fired when the action button is touchtapped.
+ *
+ * @param {object} event Action button event.
+ */
+ onActionTouchTap: _react.PropTypes.func,
+ /**
+ * Fired when the `Snackbar` is requested to be closed by a click outside the `Snackbar`, or after the
+ * `autoHideDuration` timer expires.
+ *
+ * Typically `onRequestClose` is used to set state in the parent component, which is used to control the `Snackbar`
+ * `open` prop.
+ *
+ * The `reason` parameter can optionally be used to control the response to `onRequestClose`,
+ * for example ignoring `clickaway`.
+ *
+ * @param {string} reason Can be:`"timeout"` (`autoHideDuration` expired) or: `"clickaway"`
+ */
+ onRequestClose: _react.PropTypes.func,
+ /**
+ * Controls whether the `Snackbar` is opened or not.
+ */
+ open: _react.PropTypes.bool.isRequired,
+ /**
+ * Override the inline-styles of the root element.
+ */
+ style: _react.PropTypes.object
+} : void 0;
+exports.default = Snackbar;
/***/ }),
/* 848 */
@@ -72936,61 +76847,16 @@ Layout.propTypes = {
Object.defineProperty(exports, "__esModule", {
value: true
});
-exports.default = undefined;
-
-var _AppBar = __webpack_require__(849);
-
-var _AppBar2 = _interopRequireDefault(_AppBar);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-exports.default = _AppBar2.default;
-
-/***/ }),
-/* 849 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
+exports.SnackbarBody = undefined;
var _extends2 = __webpack_require__(7);
var _extends3 = _interopRequireDefault(_extends2);
-var _keys = __webpack_require__(79);
-
-var _keys2 = _interopRequireDefault(_keys);
-
var _objectWithoutProperties2 = __webpack_require__(8);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-var _getPrototypeOf = __webpack_require__(3);
-
-var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
-
-var _classCallCheck2 = __webpack_require__(1);
-
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
-
-var _createClass2 = __webpack_require__(2);
-
-var _createClass3 = _interopRequireDefault(_createClass2);
-
-var _possibleConstructorReturn2 = __webpack_require__(4);
-
-var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
-
-var _inherits2 = __webpack_require__(5);
-
-var _inherits3 = _interopRequireDefault(_inherits2);
-
-exports.getStyles = getStyles;
-
var _simpleAssign = __webpack_require__(6);
var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
@@ -72999,379 +76865,301 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _IconButton = __webpack_require__(95);
-
-var _IconButton2 = _interopRequireDefault(_IconButton);
-
-var _menu = __webpack_require__(850);
-
-var _menu2 = _interopRequireDefault(_menu);
-
-var _Paper = __webpack_require__(34);
+var _transitions = __webpack_require__(10);
-var _Paper2 = _interopRequireDefault(_Paper);
+var _transitions2 = _interopRequireDefault(_transitions);
-var _propTypes = __webpack_require__(41);
+var _withWidth = __webpack_require__(849);
-var _propTypes2 = _interopRequireDefault(_propTypes);
+var _withWidth2 = _interopRequireDefault(_withWidth);
-var _warning = __webpack_require__(17);
+var _FlatButton = __webpack_require__(100);
-var _warning2 = _interopRequireDefault(_warning);
+var _FlatButton2 = _interopRequireDefault(_FlatButton);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function getStyles(props, context) {
+ var open = props.open,
+ width = props.width;
var _context$muiTheme = context.muiTheme,
- appBar = _context$muiTheme.appBar,
- iconButtonSize = _context$muiTheme.button.iconButtonSize,
- zIndex = _context$muiTheme.zIndex;
+ _context$muiTheme$bas = _context$muiTheme.baseTheme,
+ _context$muiTheme$bas2 = _context$muiTheme$bas.spacing,
+ desktopGutter = _context$muiTheme$bas2.desktopGutter,
+ desktopSubheaderHeight = _context$muiTheme$bas2.desktopSubheaderHeight,
+ fontFamily = _context$muiTheme$bas.fontFamily,
+ _context$muiTheme$sna = _context$muiTheme.snackbar,
+ backgroundColor = _context$muiTheme$sna.backgroundColor,
+ textColor = _context$muiTheme$sna.textColor,
+ actionColor = _context$muiTheme$sna.actionColor;
- var flatButtonSize = 36;
+ var isSmall = width === _withWidth.SMALL;
var styles = {
root: {
- position: 'relative',
- zIndex: zIndex.appBar,
- width: '100%',
- display: 'flex',
- backgroundColor: appBar.color,
- paddingLeft: appBar.padding,
- paddingRight: appBar.padding
- },
- title: {
- whiteSpace: 'nowrap',
- overflow: 'hidden',
- textOverflow: 'ellipsis',
- margin: 0,
- paddingTop: 0,
- letterSpacing: 0,
- fontSize: 24,
- fontWeight: appBar.titleFontWeight,
- color: appBar.textColor,
- height: appBar.height,
- lineHeight: appBar.height + 'px'
- },
- mainElement: {
- boxFlex: 1,
- flex: '1'
- },
- iconButtonStyle: {
- marginTop: (appBar.height - iconButtonSize) / 2,
- marginRight: 8,
- marginLeft: -16
+ fontFamily: fontFamily,
+ backgroundColor: backgroundColor,
+ padding: '0 ' + desktopGutter + 'px',
+ height: desktopSubheaderHeight,
+ lineHeight: desktopSubheaderHeight + 'px',
+ borderRadius: isSmall ? 0 : 2,
+ maxWidth: isSmall ? 'inherit' : 568,
+ minWidth: isSmall ? 'inherit' : 288,
+ width: isSmall ? 'calc(100vw - ' + desktopGutter * 2 + 'px)' : 'auto',
+ flexGrow: isSmall ? 1 : 0
},
- iconButtonIconStyle: {
- fill: appBar.textColor,
- color: appBar.textColor
+ content: {
+ fontSize: 14,
+ color: textColor,
+ opacity: open ? 1 : 0,
+ transition: open ? _transitions2.default.easeOut('500ms', 'opacity', '100ms') : _transitions2.default.easeOut('400ms', 'opacity')
},
- flatButton: {
- color: appBar.textColor,
- marginTop: (iconButtonSize - flatButtonSize) / 2 + 1
+ action: {
+ color: actionColor,
+ float: 'right',
+ marginTop: 6,
+ marginRight: -16,
+ marginLeft: desktopGutter,
+ backgroundColor: 'transparent'
}
};
return styles;
}
-var AppBar = function (_Component) {
- (0, _inherits3.default)(AppBar, _Component);
-
- function AppBar() {
- var _ref;
-
- var _temp, _this, _ret;
-
- (0, _classCallCheck3.default)(this, AppBar);
-
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = AppBar.__proto__ || (0, _getPrototypeOf2.default)(AppBar)).call.apply(_ref, [this].concat(args))), _this), _this.handleTouchTapLeftIconButton = function (event) {
- if (_this.props.onLeftIconButtonTouchTap) {
- _this.props.onLeftIconButtonTouchTap(event);
- }
- }, _this.handleTouchTapRightIconButton = function (event) {
- if (_this.props.onRightIconButtonTouchTap) {
- _this.props.onRightIconButtonTouchTap(event);
- }
- }, _this.handleTitleTouchTap = function (event) {
- if (_this.props.onTitleTouchTap) {
- _this.props.onTitleTouchTap(event);
- }
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
- }
-
- (0, _createClass3.default)(AppBar, [{
- key: 'componentDidMount',
- value: function componentDidMount() {
- false ? (0, _warning2.default)(!this.props.iconElementLeft || !this.props.iconClassNameLeft, 'Material-UI: Properties iconElementLeft\n and iconClassNameLeft cannot be simultaneously defined. Please use one or the other.') : void 0;
-
- false ? (0, _warning2.default)(!this.props.iconElementRight || !this.props.iconClassNameRight, 'Material-UI: Properties iconElementRight\n and iconClassNameRight cannot be simultaneously defined. Please use one or the other.') : void 0;
- }
- }, {
- key: 'render',
- value: function render() {
- var _props = this.props,
- title = _props.title,
- titleStyle = _props.titleStyle,
- iconStyleLeft = _props.iconStyleLeft,
- iconStyleRight = _props.iconStyleRight,
- onTitleTouchTap = _props.onTitleTouchTap,
- showMenuIconButton = _props.showMenuIconButton,
- iconElementLeft = _props.iconElementLeft,
- iconElementRight = _props.iconElementRight,
- iconClassNameLeft = _props.iconClassNameLeft,
- iconClassNameRight = _props.iconClassNameRight,
- onLeftIconButtonTouchTap = _props.onLeftIconButtonTouchTap,
- onRightIconButtonTouchTap = _props.onRightIconButtonTouchTap,
- className = _props.className,
- style = _props.style,
- zDepth = _props.zDepth,
- children = _props.children,
- other = (0, _objectWithoutProperties3.default)(_props, ['title', 'titleStyle', 'iconStyleLeft', 'iconStyleRight', 'onTitleTouchTap', 'showMenuIconButton', 'iconElementLeft', 'iconElementRight', 'iconClassNameLeft', 'iconClassNameRight', 'onLeftIconButtonTouchTap', 'onRightIconButtonTouchTap', 'className', 'style', 'zDepth', 'children']);
- var prepareStyles = this.context.muiTheme.prepareStyles;
-
- var styles = getStyles(this.props, this.context);
-
- var menuElementLeft = void 0;
- var menuElementRight = void 0;
-
- // If the title is a string, wrap in an h1 tag.
- // If not, wrap in a div tag.
- var titleComponent = typeof title === 'string' || title instanceof String ? 'h1' : 'div';
-
- var titleElement = _react2.default.createElement(titleComponent, {
- onTouchTap: this.handleTitleTouchTap,
- style: prepareStyles((0, _simpleAssign2.default)(styles.title, styles.mainElement, titleStyle))
- }, title);
-
- var iconLeftStyle = (0, _simpleAssign2.default)({}, styles.iconButtonStyle, iconStyleLeft);
-
- if (showMenuIconButton) {
- if (iconElementLeft) {
- var iconElementLeftProps = {};
-
- if (iconElementLeft.type.muiName === 'IconButton') {
- var iconElemLeftChildren = iconElementLeft.props.children;
- var iconButtonIconStyle = !(iconElemLeftChildren && iconElemLeftChildren.props && iconElemLeftChildren.props.color) ? styles.iconButtonIconStyle : null;
-
- iconElementLeftProps.iconStyle = (0, _simpleAssign2.default)({}, iconButtonIconStyle, iconElementLeft.props.iconStyle);
- }
-
- if (!iconElementLeft.props.onTouchTap && this.props.onLeftIconButtonTouchTap) {
- iconElementLeftProps.onTouchTap = this.handleTouchTapLeftIconButton;
- }
-
- menuElementLeft = _react2.default.createElement(
- 'div',
- { style: prepareStyles(iconLeftStyle) },
- (0, _keys2.default)(iconElementLeftProps).length > 0 ? (0, _react.cloneElement)(iconElementLeft, iconElementLeftProps) : iconElementLeft
- );
- } else {
- menuElementLeft = _react2.default.createElement(
- _IconButton2.default,
- {
- style: iconLeftStyle,
- iconStyle: styles.iconButtonIconStyle,
- iconClassName: iconClassNameLeft,
- onTouchTap: this.handleTouchTapLeftIconButton
- },
- iconClassNameLeft ? '' : _react2.default.createElement(_menu2.default, { style: (0, _simpleAssign2.default)({}, styles.iconButtonIconStyle) })
- );
- }
- }
-
- var iconRightStyle = (0, _simpleAssign2.default)({}, styles.iconButtonStyle, {
- marginRight: -16,
- marginLeft: 'auto'
- }, iconStyleRight);
-
- if (iconElementRight) {
- var iconElementRightProps = {};
-
- switch (iconElementRight.type.muiName) {
- case 'IconMenu':
- case 'IconButton':
- var iconElemRightChildren = iconElementRight.props.children;
- var _iconButtonIconStyle = !(iconElemRightChildren && iconElemRightChildren.props && iconElemRightChildren.props.color) ? styles.iconButtonIconStyle : null;
-
- iconElementRightProps.iconStyle = (0, _simpleAssign2.default)({}, _iconButtonIconStyle, iconElementRight.props.iconStyle);
- break;
-
- case 'FlatButton':
- iconElementRightProps.style = (0, _simpleAssign2.default)({}, styles.flatButton, iconElementRight.props.style);
- break;
-
- default:
- }
-
- if (!iconElementRight.props.onTouchTap && this.props.onRightIconButtonTouchTap) {
- iconElementRightProps.onTouchTap = this.handleTouchTapRightIconButton;
- }
+var SnackbarBody = exports.SnackbarBody = function SnackbarBody(props, context) {
+ var action = props.action,
+ contentStyle = props.contentStyle,
+ message = props.message,
+ open = props.open,
+ onActionTouchTap = props.onActionTouchTap,
+ style = props.style,
+ other = (0, _objectWithoutProperties3.default)(props, ['action', 'contentStyle', 'message', 'open', 'onActionTouchTap', 'style']);
+ var prepareStyles = context.muiTheme.prepareStyles;
- menuElementRight = _react2.default.createElement(
- 'div',
- { style: prepareStyles(iconRightStyle) },
- (0, _keys2.default)(iconElementRightProps).length > 0 ? (0, _react.cloneElement)(iconElementRight, iconElementRightProps) : iconElementRight
- );
- } else if (iconClassNameRight) {
- menuElementRight = _react2.default.createElement(_IconButton2.default, {
- style: iconRightStyle,
- iconStyle: styles.iconButtonIconStyle,
- iconClassName: iconClassNameRight,
- onTouchTap: this.handleTouchTapRightIconButton
- });
- }
+ var styles = getStyles(props, context);
- return _react2.default.createElement(
- _Paper2.default,
- (0, _extends3.default)({}, other, {
- rounded: false,
- className: className,
- style: (0, _simpleAssign2.default)({}, styles.root, style),
- zDepth: zDepth
- }),
- menuElementLeft,
- titleElement,
- menuElementRight,
- children
- );
- }
- }]);
- return AppBar;
-}(_react.Component);
+ var actionButton = action && _react2.default.createElement(_FlatButton2.default, {
+ style: styles.action,
+ label: action,
+ onTouchTap: onActionTouchTap
+ });
-AppBar.muiName = 'AppBar';
-AppBar.defaultProps = {
- showMenuIconButton: true,
- title: '',
- zDepth: 1
-};
-AppBar.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
+ return _react2.default.createElement(
+ 'div',
+ (0, _extends3.default)({}, other, { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) }),
+ _react2.default.createElement(
+ 'div',
+ { style: prepareStyles((0, _simpleAssign2.default)(styles.content, contentStyle)) },
+ _react2.default.createElement(
+ 'span',
+ null,
+ message
+ ),
+ actionButton
+ )
+ );
};
- false ? AppBar.propTypes = {
- /**
- * Can be used to render a tab inside an app bar for instance.
- */
- children: _react.PropTypes.node,
- /**
- * Applied to the app bar's root element.
- */
- className: _react.PropTypes.string,
- /**
- * The classname of the icon on the left of the app bar.
- * If you are using a stylesheet for your icons, enter the class name for the icon to be used here.
- */
- iconClassNameLeft: _react.PropTypes.string,
- /**
- * Similiar to the iconClassNameLeft prop except that
- * it applies to the icon displayed on the right of the app bar.
- */
- iconClassNameRight: _react.PropTypes.string,
- /**
- * The custom element to be displayed on the left side of the
- * app bar such as an SvgIcon.
- */
- iconElementLeft: _react.PropTypes.element,
- /**
- * Similiar to the iconElementLeft prop except that this element is displayed on the right of the app bar.
- */
- iconElementRight: _react.PropTypes.element,
- /**
- * Override the inline-styles of the element displayed on the left side of the app bar.
- */
- iconStyleLeft: _react.PropTypes.object,
+
+ false ? SnackbarBody.propTypes = {
/**
- * Override the inline-styles of the element displayed on the right side of the app bar.
+ * The label for the action on the snackbar.
*/
- iconStyleRight: _react.PropTypes.object,
+ action: _react.PropTypes.node,
/**
- * Callback function for when the left icon is selected via a touch tap.
- *
- * @param {object} event TouchTap event targeting the left `IconButton`.
+ * Override the inline-styles of the content element.
*/
- onLeftIconButtonTouchTap: _react.PropTypes.func,
+ contentStyle: _react.PropTypes.object,
/**
- * Callback function for when the right icon is selected via a touch tap.
+ * The message to be displayed.
*
- * @param {object} event TouchTap event targeting the right `IconButton`.
+ * (Note: If the message is an element or array, and the `Snackbar` may re-render while it is still open,
+ * ensure that the same object remains as the `message` property if you want to avoid the `Snackbar` hiding and
+ * showing again)
*/
- onRightIconButtonTouchTap: _react.PropTypes.func,
+ message: _react.PropTypes.node.isRequired,
/**
- * Callback function for when the title text is selected via a touch tap.
+ * Fired when the action button is touchtapped.
*
- * @param {object} event TouchTap event targeting the `title` node.
+ * @param {object} event Action button event.
*/
- onTitleTouchTap: _react.PropTypes.func,
+ onActionTouchTap: _react.PropTypes.func,
/**
- * Determines whether or not to display the Menu icon next to the title.
- * Setting this prop to false will hide the icon.
+ * @ignore
+ * Controls whether the `Snackbar` is opened or not.
*/
- showMenuIconButton: _react.PropTypes.bool,
+ open: _react.PropTypes.bool.isRequired,
/**
* Override the inline-styles of the root element.
*/
style: _react.PropTypes.object,
/**
- * The title to display on the app bar.
- */
- title: _react.PropTypes.node,
- /**
- * Override the inline-styles of the app bar's title element.
- */
- titleStyle: _react.PropTypes.object,
- /**
- * The zDepth of the component.
- * The shadow of the app bar is also dependent on this property.
+ * @ignore
+ * Width of the screen.
*/
- zDepth: _propTypes2.default.zDepth
+ width: _react.PropTypes.number.isRequired
} : void 0;
-exports.default = AppBar;
-/***/ }),
-/* 850 */
-/***/ (function(module, exports, __webpack_require__) {
+SnackbarBody.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+
+exports.default = (0, _withWidth2.default)()(SnackbarBody);
+
+/***/ }),
+/* 849 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.LARGE = exports.MEDIUM = exports.SMALL = undefined;
+
+var _extends2 = __webpack_require__(7);
+
+var _extends3 = _interopRequireDefault(_extends2);
+
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
-"use strict";
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+var _inherits3 = _interopRequireDefault(_inherits2);
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
+exports.default = withWidth;
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _pure = __webpack_require__(25);
+var _reactEventListener = __webpack_require__(40);
-var _pure2 = _interopRequireDefault(_pure);
+var _reactEventListener2 = _interopRequireDefault(_reactEventListener);
-var _SvgIcon = __webpack_require__(26);
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
+var SMALL = exports.SMALL = 1;
+var MEDIUM = exports.MEDIUM = 2;
+var LARGE = exports.LARGE = 3;
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+function withWidth() {
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+ var _options$largeWidth = options.largeWidth,
+ largeWidth = _options$largeWidth === undefined ? 992 : _options$largeWidth,
+ _options$mediumWidth = options.mediumWidth,
+ mediumWidth = _options$mediumWidth === undefined ? 768 : _options$mediumWidth,
+ _options$resizeInterv = options.resizeInterval,
+ resizeInterval = _options$resizeInterv === undefined ? 166 : _options$resizeInterv;
-var NavigationMenu = function NavigationMenu(props) {
- return _react2.default.createElement(
- _SvgIcon2.default,
- props,
- _react2.default.createElement('path', { d: 'M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z' })
- );
-};
-NavigationMenu = (0, _pure2.default)(NavigationMenu);
-NavigationMenu.displayName = 'NavigationMenu';
-NavigationMenu.muiName = 'SvgIcon';
-exports.default = NavigationMenu;
+ return function (MyComponent) {
+ return function (_Component) {
+ (0, _inherits3.default)(WithWidth, _Component);
+
+ function WithWidth() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, WithWidth);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = WithWidth.__proto__ || (0, _getPrototypeOf2.default)(WithWidth)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ width: null
+ }, _this.handleResize = function () {
+ clearTimeout(_this.deferTimer);
+ _this.deferTimer = setTimeout(function () {
+ _this.updateWidth();
+ }, resizeInterval);
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
+
+ (0, _createClass3.default)(WithWidth, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ this.updateWidth();
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ clearTimeout(this.deferTimer);
+ }
+ }, {
+ key: 'updateWidth',
+ value: function updateWidth() {
+ var innerWidth = window.innerWidth;
+ var width = void 0;
+
+ if (innerWidth >= largeWidth) {
+ width = LARGE;
+ } else if (innerWidth >= mediumWidth) {
+ width = MEDIUM;
+ } else {
+ // innerWidth < 768
+ width = SMALL;
+ }
+
+ if (width !== this.state.width) {
+ this.setState({
+ width: width
+ });
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var width = this.state.width;
+
+ /**
+ * When rendering the component on the server,
+ * we have no idea about the screen width.
+ * In order to prevent blinks and help the reconciliation
+ * we are not rendering the component.
+ *
+ * A better alternative would be to send client hints.
+ * But the browser support of this API is low:
+ * http://caniuse.com/#search=client%20hint
+ */
+ if (width === null) {
+ return null;
+ }
+
+ return _react2.default.createElement(
+ _reactEventListener2.default,
+ { target: 'window', onResize: this.handleResize },
+ _react2.default.createElement(MyComponent, (0, _extends3.default)({
+ width: width
+ }, this.props))
+ );
+ }
+ }]);
+ return WithWidth;
+ }(_react.Component);
+ };
+}
/***/ }),
-/* 851 */
+/* 850 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -73381,14 +77169,6 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _extends2 = __webpack_require__(7);
-
-var _extends3 = _interopRequireDefault(_extends2);
-
-var _objectWithoutProperties2 = __webpack_require__(8);
-
-var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
-
var _getPrototypeOf = __webpack_require__(3);
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
@@ -73409,146 +77189,95 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
-var _simpleAssign = __webpack_require__(6);
-
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _warning = __webpack_require__(17);
+var _reactRedux = __webpack_require__(19);
-var _warning2 = _interopRequireDefault(_warning);
+var _Table = __webpack_require__(339);
-var _TabTemplate = __webpack_require__(852);
+var _colors = __webpack_require__(31);
-var _TabTemplate2 = _interopRequireDefault(_TabTemplate);
+var _Dialog = __webpack_require__(134);
-var _InkBar = __webpack_require__(853);
+var _Dialog2 = _interopRequireDefault(_Dialog);
-var _InkBar2 = _interopRequireDefault(_InkBar);
+var _Toggle = __webpack_require__(135);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _Toggle2 = _interopRequireDefault(_Toggle);
-function getStyles(props, context) {
- var tabs = context.muiTheme.tabs;
+var _IconButton = __webpack_require__(64);
+var _IconButton2 = _interopRequireDefault(_IconButton);
- return {
- tabItemContainer: {
- width: '100%',
- backgroundColor: tabs.backgroundColor,
- whiteSpace: 'nowrap',
- display: 'flex'
- }
- };
-}
+var _delete = __webpack_require__(341);
-var Tabs = function (_Component) {
- (0, _inherits3.default)(Tabs, _Component);
+var _delete2 = _interopRequireDefault(_delete);
- function Tabs() {
- var _ref;
+var _RaisedButton = __webpack_require__(65);
- var _temp, _this, _ret;
+var _RaisedButton2 = _interopRequireDefault(_RaisedButton);
- (0, _classCallCheck3.default)(this, Tabs);
+var _profiles = __webpack_require__(212);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
+var _Layout = __webpack_require__(343);
- return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = Tabs.__proto__ || (0, _getPrototypeOf2.default)(Tabs)).call.apply(_ref, [this].concat(args))), _this), _this.state = { selectedIndex: 0 }, _this.handleTabTouchTap = function (value, event, tab) {
- var valueLink = _this.getValueLink(_this.props);
- var index = tab.props.index;
+var _Layout2 = _interopRequireDefault(_Layout);
- if (valueLink.value && valueLink.value !== value || _this.state.selectedIndex !== index) {
- valueLink.requestChange(value, event, tab);
- }
+var _ProfileCreateForm = __webpack_require__(851);
- _this.setState({ selectedIndex: index });
+var _ProfileCreateForm2 = _interopRequireDefault(_ProfileCreateForm);
- if (tab.props.onActive) {
- tab.props.onActive(tab);
- }
- }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
- }
+var _ProfileToggle = __webpack_require__(852);
- (0, _createClass3.default)(Tabs, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
- var valueLink = this.getValueLink(this.props);
- var initialIndex = this.props.initialSelectedIndex;
+var _ProfileToggle2 = _interopRequireDefault(_ProfileToggle);
- this.setState({
- selectedIndex: valueLink.value !== undefined ? this.getSelectedIndex(this.props) : initialIndex < this.getTabCount() ? initialIndex : 0
- });
- }
- }, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(newProps, nextContext) {
- var valueLink = this.getValueLink(newProps);
- var newState = {
- muiTheme: nextContext.muiTheme || this.context.muiTheme
- };
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- if (valueLink.value !== undefined) {
- newState.selectedIndex = this.getSelectedIndex(newProps);
- }
+var Profile = function (_Component) {
+ (0, _inherits3.default)(Profile, _Component);
- this.setState(newState);
- }
- }, {
- key: 'getTabs',
- value: function getTabs() {
- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;
+ function Profile(props) {
+ (0, _classCallCheck3.default)(this, Profile);
- var tabs = [];
+ var _this = (0, _possibleConstructorReturn3.default)(this, (Profile.__proto__ || (0, _getPrototypeOf2.default)(Profile)).call(this, props));
- _react.Children.forEach(props.children, function (tab) {
- if ((0, _react.isValidElement)(tab)) {
- tabs.push(tab);
- }
- });
+ _this.state = {
+ createModalOpen: false
+ };
+ return _this;
+ }
- return tabs;
+ (0, _createClass3.default)(Profile, [{
+ key: 'onSetProfile',
+ value: function onSetProfile(profileName) {
+ this.props.setProfileEnabled(profileName);
}
}, {
- key: 'getTabCount',
- value: function getTabCount() {
- return this.getTabs().length;
+ key: 'requestCloseModal',
+ value: function requestCloseModal() {
+ this.setState({
+ createModalOpen: false
+ });
}
-
- // Do not use outside of this component, it will be removed once valueLink is deprecated
-
}, {
- key: 'getValueLink',
- value: function getValueLink(props) {
- return props.valueLink || {
- value: props.value,
- requestChange: props.onChange
- };
+ key: 'requestModalOpen',
+ value: function requestModalOpen() {
+ this.setState({
+ createModalOpen: true
+ });
}
}, {
- key: 'getSelectedIndex',
- value: function getSelectedIndex(props) {
- var valueLink = this.getValueLink(props);
- var selectedIndex = -1;
-
- this.getTabs(props).forEach(function (tab, index) {
- if (valueLink.value === tab.props.value) {
- selectedIndex = index;
- }
- });
-
- return selectedIndex;
+ key: 'onRequestDeleteProfile',
+ value: function onRequestDeleteProfile(name) {
+ this.props.removeProfile(name);
}
}, {
- key: 'getSelected',
- value: function getSelected(tab, index) {
- var valueLink = this.getValueLink(this.props);
- return valueLink.value ? valueLink.value === tab.props.value : this.state.selectedIndex === index;
+ key: 'handleSubmit',
+ value: function handleSubmit(data) {
+ this.props.createProfile(data.name, data.description);
+ this.requestCloseModal();
}
}, {
key: 'render',
@@ -73556,143 +77285,134 @@ var Tabs = function (_Component) {
var _this2 = this;
var _props = this.props,
- contentContainerClassName = _props.contentContainerClassName,
- contentContainerStyle = _props.contentContainerStyle,
- initialSelectedIndex = _props.initialSelectedIndex,
- inkBarStyle = _props.inkBarStyle,
- onChange = _props.onChange,
- style = _props.style,
- tabItemContainerStyle = _props.tabItemContainerStyle,
- tabTemplate = _props.tabTemplate,
- tabTemplateStyle = _props.tabTemplateStyle,
- other = (0, _objectWithoutProperties3.default)(_props, ['contentContainerClassName', 'contentContainerStyle', 'initialSelectedIndex', 'inkBarStyle', 'onChange', 'style', 'tabItemContainerStyle', 'tabTemplate', 'tabTemplateStyle']);
- var prepareStyles = this.context.muiTheme.prepareStyles;
-
- var styles = getStyles(this.props, this.context);
- var valueLink = this.getValueLink(this.props);
- var tabValue = valueLink.value;
- var tabContent = [];
- var width = 100 / this.getTabCount();
-
- var tabs = this.getTabs().map(function (tab, index) {
- false ? (0, _warning2.default)(tab.type && tab.type.muiName === 'Tab', 'Material-UI: Tabs only accepts Tab Components as children.\n Found ' + (tab.type.muiName || tab.type) + ' as child number ' + (index + 1) + ' of Tabs') : void 0;
-
- false ? (0, _warning2.default)(!tabValue || tab.props.value !== undefined, 'Material-UI: Tabs value prop has been passed, but Tab ' + index + '\n does not have a value prop. Needs value if Tabs is going\n to be a controlled component.') : void 0;
-
- tabContent.push(tab.props.children ? (0, _react.createElement)(tabTemplate || _TabTemplate2.default, {
- key: index,
- selected: _this2.getSelected(tab, index),
- style: tabTemplateStyle
- }, tab.props.children) : undefined);
-
- return (0, _react.cloneElement)(tab, {
- key: index,
- index: index,
- selected: _this2.getSelected(tab, index),
- width: width + '%',
- onTouchTap: _this2.handleTabTouchTap
- });
- });
-
- var inkBar = this.state.selectedIndex !== -1 ? _react2.default.createElement(_InkBar2.default, {
- left: width * this.state.selectedIndex + '%',
- width: width + '%',
- style: inkBarStyle
- }) : null;
+ profiles = _props.profiles,
+ currentProfile = _props.currentProfile;
- var inkBarContainerWidth = tabItemContainerStyle ? tabItemContainerStyle.width : '100%';
return _react2.default.createElement(
- 'div',
- (0, _extends3.default)({ style: prepareStyles((0, _simpleAssign2.default)({}, style)) }, other),
- _react2.default.createElement(
- 'div',
- { style: prepareStyles((0, _simpleAssign2.default)(styles.tabItemContainer, tabItemContainerStyle)) },
- tabs
- ),
- _react2.default.createElement(
- 'div',
- { style: { width: inkBarContainerWidth } },
- inkBar
- ),
+ _Layout2.default,
+ { title: 'Profiles' },
_react2.default.createElement(
- 'div',
+ _Dialog2.default,
{
- style: prepareStyles((0, _simpleAssign2.default)({}, contentContainerStyle)),
- className: contentContainerClassName
+ open: this.state.createModalOpen,
+ title: 'Create a new profile',
+ modal: false,
+ onRequestClose: function onRequestClose() {
+ return _this2.requestCloseModal();
+ }
},
- tabContent
+ _react2.default.createElement(_ProfileCreateForm2.default, {
+ onSubmit: function onSubmit(data) {
+ return _this2.handleSubmit(data);
+ },
+ onRequestClose: function onRequestClose() {
+ return _this2.requestCloseModal();
+ }
+ })
+ ),
+ _react2.default.createElement(_RaisedButton2.default, { label: 'Add new', onTouchTap: function onTouchTap() {
+ return _this2.requestModalOpen();
+ }, primary: true }),
+ _react2.default.createElement(
+ _Table.Table,
+ { selectable: false },
+ _react2.default.createElement(
+ _Table.TableHeader,
+ { displaySelectAll: false, adjustForCheckbox: false },
+ _react2.default.createElement(
+ _Table.TableRow,
+ null,
+ _react2.default.createElement(
+ _Table.TableHeaderColumn,
+ null,
+ 'Name'
+ ),
+ _react2.default.createElement(
+ _Table.TableHeaderColumn,
+ null,
+ 'Description'
+ ),
+ _react2.default.createElement(
+ _Table.TableHeaderColumn,
+ null,
+ 'Enabled'
+ ),
+ _react2.default.createElement(
+ _Table.TableHeaderColumn,
+ null,
+ 'Delete'
+ )
+ )
+ ),
+ _react2.default.createElement(
+ _Table.TableBody,
+ { displayRowCheckbox: false, stripedRows: true },
+ profiles.map(function (x, i) {
+ return _react2.default.createElement(
+ _Table.TableRow,
+ { key: i },
+ _react2.default.createElement(
+ _Table.TableRowColumn,
+ null,
+ x.name
+ ),
+ _react2.default.createElement(
+ _Table.TableRowColumn,
+ null,
+ x.description
+ ),
+ _react2.default.createElement(
+ _Table.TableRowColumn,
+ null,
+ _react2.default.createElement(_ProfileToggle2.default, { profile: x })
+ ),
+ _react2.default.createElement(
+ _Table.TableRowColumn,
+ null,
+ _react2.default.createElement(
+ _IconButton2.default,
+ { onTouchTap: function onTouchTap() {
+ return _this2.onRequestDeleteProfile(x.name);
+ }, disabled: x.name === 'default' },
+ _react2.default.createElement(_delete2.default, { color: _colors.red300 })
+ )
+ )
+ );
+ })
+ )
)
);
}
}]);
- return Tabs;
+ return Profile;
}(_react.Component);
-Tabs.defaultProps = {
- initialSelectedIndex: 0,
- onChange: function onChange() {}
-};
-Tabs.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? Tabs.propTypes = {
- /**
- * Should be used to pass `Tab` components.
- */
- children: _react.PropTypes.node,
- /**
- * The css class name of the root element.
- */
- className: _react.PropTypes.string,
- /**
- * The css class name of the content's container.
- */
- contentContainerClassName: _react.PropTypes.string,
- /**
- * Override the inline-styles of the content's container.
- */
- contentContainerStyle: _react.PropTypes.object,
- /**
- * Specify initial visible tab index.
- * If `initialSelectedIndex` is set but larger than the total amount of specified tabs,
- * `initialSelectedIndex` will revert back to default.
- * If `initialSelectedIndex` is set to any negative value, no tab will be selected intially.
- */
- initialSelectedIndex: _react.PropTypes.number,
- /**
- * Override the inline-styles of the InkBar.
- */
- inkBarStyle: _react.PropTypes.object,
- /**
- * Called when the selected value change.
- */
- onChange: _react.PropTypes.func,
- /**
- * Override the inline-styles of the root element.
- */
- style: _react.PropTypes.object,
- /**
- * Override the inline-styles of the tab-labels container.
- */
- tabItemContainerStyle: _react.PropTypes.object,
- /**
- * Override the default tab template used to wrap the content of each tab element.
- */
- tabTemplate: _react.PropTypes.func,
- /**
- * Override the inline-styles of the tab template.
- */
- tabTemplateStyle: _react.PropTypes.object,
- /**
- * Makes Tabs controllable and selects the tab whose value prop matches this prop.
- */
- value: _react.PropTypes.any
-} : void 0;
-exports.default = Tabs;
+function mapStateToProps(state) {
+ return {
+ profiles: state.profiles.profiles,
+ currentProfile: state.profiles.currentProfile
+ };
+}
+
+function mapDispatchToProps(dispatch) {
+ return {
+ createProfile: function createProfile(name, description) {
+ return dispatch((0, _profiles.createProfile)(name, description));
+ },
+ setProfileEnabled: function setProfileEnabled(name) {
+ return dispatch((0, _profiles.setProfileEnabled)(name));
+ },
+ removeProfile: function removeProfile(name) {
+ return dispatch((0, _profiles.removeProfile)(name));
+ }
+ };
+}
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(Profile);
/***/ }),
-/* 852 */
+/* 851 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -73702,50 +77422,152 @@ Object.defineProperty(exports, "__esModule", {
value: true
});
-var _simpleAssign = __webpack_require__(6);
+var _getPrototypeOf = __webpack_require__(3);
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+var _reactRedux = __webpack_require__(19);
-var styles = {
- width: '100%',
- position: 'relative',
- textAlign: 'initial'
-};
+var _reduxForm = __webpack_require__(82);
-var TabTemplate = function TabTemplate(_ref) {
- var children = _ref.children,
- selected = _ref.selected,
- style = _ref.style;
+var _reduxFormMaterialUi = __webpack_require__(98);
- var templateStyle = (0, _simpleAssign2.default)({}, styles, style);
- if (!selected) {
- templateStyle.height = 0;
- templateStyle.overflow = 'hidden';
+var _RaisedButton = __webpack_require__(65);
+
+var _RaisedButton2 = _interopRequireDefault(_RaisedButton);
+
+var _FlatButton = __webpack_require__(100);
+
+var _FlatButton2 = _interopRequireDefault(_FlatButton);
+
+var _FormValidators = __webpack_require__(102);
+
+var Validators = _interopRequireWildcard(_FormValidators);
+
+var _Styles = __webpack_require__(52);
+
+var _Styles2 = _interopRequireDefault(_Styles);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var ProfileCreateForm = function (_Component) {
+ (0, _inherits3.default)(ProfileCreateForm, _Component);
+
+ function ProfileCreateForm() {
+ (0, _classCallCheck3.default)(this, ProfileCreateForm);
+ return (0, _possibleConstructorReturn3.default)(this, (ProfileCreateForm.__proto__ || (0, _getPrototypeOf2.default)(ProfileCreateForm)).apply(this, arguments));
}
- return _react2.default.createElement(
- 'div',
- { style: templateStyle },
- children
- );
+ (0, _createClass3.default)(ProfileCreateForm, [{
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ handleSubmit = _props.handleSubmit,
+ pristine = _props.pristine,
+ submitting = _props.submitting,
+ onRequestClose = _props.onRequestClose,
+ profiles = _props.profiles;
+
+ var buttonStyle = {
+ margin: 6,
+ float: 'right'
+ };
+
+ return _react2.default.createElement(
+ 'form',
+ { onSubmit: handleSubmit, id: 'profile-form' },
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_reduxForm.Field, {
+ name: 'name',
+ validate: [Validators.required, Validators.unique(profiles.map(function (x) {
+ return x.name;
+ }))],
+ component: _reduxFormMaterialUi.TextField,
+ floatingLabelText: 'Name',
+ hintText: 'Name',
+ style: _Styles2.default.fields.text
+ })
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_reduxForm.Field, {
+ name: 'description',
+ component: _reduxFormMaterialUi.TextField,
+ floatingLabelText: 'Description',
+ hintText: 'Description',
+ style: _Styles2.default.fields.text,
+ validate: [Validators.required]
+ })
+ ),
+ _react2.default.createElement(
+ 'div',
+ null,
+ _react2.default.createElement(_RaisedButton2.default, {
+ label: 'Add',
+ style: buttonStyle,
+ disabled: pristine || submitting,
+ type: 'submit'
+ }),
+ _react2.default.createElement(_FlatButton2.default, {
+ label: 'Cancel',
+ style: buttonStyle,
+ onTouchTap: function onTouchTap() {
+ if (onRequestClose) {
+ onRequestClose();
+ }
+ }
+ })
+ )
+ );
+ }
+ }]);
+ return ProfileCreateForm;
+}(_react.Component);
+
+ProfileCreateForm.propTypes = {
+ onRequestClose: _react.PropTypes.function
};
- false ? TabTemplate.propTypes = {
- children: _react.PropTypes.node,
- selected: _react.PropTypes.bool,
- style: _react.PropTypes.object
-} : void 0;
+function mapStateToProps(state) {
+ return {
+ profiles: state.profiles.profiles,
+ currentProfile: state.profiles.currentProfile
+ };
+}
-exports.default = TabTemplate;
+var Form = (0, _reduxForm.reduxForm)({
+ form: 'profile-form'
+})(ProfileCreateForm);
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps)(Form);
/***/ }),
-/* 853 */
+/* 852 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -73775,178 +77597,72 @@ var _inherits2 = __webpack_require__(5);
var _inherits3 = _interopRequireDefault(_inherits2);
-var _simpleAssign = __webpack_require__(6);
-
-var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
-
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
-var _transitions = __webpack_require__(10);
+var _reactRedux = __webpack_require__(19);
-var _transitions2 = _interopRequireDefault(_transitions);
+var _Toggle = __webpack_require__(135);
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function getStyles(props, context) {
- var inkBar = context.muiTheme.inkBar;
+var _Toggle2 = _interopRequireDefault(_Toggle);
+var _profiles = __webpack_require__(212);
- return {
- root: {
- left: props.left,
- width: props.width,
- bottom: 0,
- display: 'block',
- backgroundColor: props.color || inkBar.backgroundColor,
- height: 2,
- marginTop: -2,
- position: 'relative',
- transition: _transitions2.default.easeOut('1s', 'left')
- }
- };
-}
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-var InkBar = function (_Component) {
- (0, _inherits3.default)(InkBar, _Component);
+var ProfileToggle = function (_Component) {
+ (0, _inherits3.default)(ProfileToggle, _Component);
- function InkBar() {
- (0, _classCallCheck3.default)(this, InkBar);
- return (0, _possibleConstructorReturn3.default)(this, (InkBar.__proto__ || (0, _getPrototypeOf2.default)(InkBar)).apply(this, arguments));
+ function ProfileToggle() {
+ (0, _classCallCheck3.default)(this, ProfileToggle);
+ return (0, _possibleConstructorReturn3.default)(this, (ProfileToggle.__proto__ || (0, _getPrototypeOf2.default)(ProfileToggle)).apply(this, arguments));
}
- (0, _createClass3.default)(InkBar, [{
+ (0, _createClass3.default)(ProfileToggle, [{
+ key: 'onSetProfile',
+ value: function onSetProfile(profileName) {
+ this.props.setProfileEnabled(profileName);
+ }
+ }, {
key: 'render',
value: function render() {
- var style = this.props.style;
- var prepareStyles = this.context.muiTheme.prepareStyles;
+ var _this2 = this;
- var styles = getStyles(this.props, this.context);
+ var _props = this.props,
+ profile = _props.profile,
+ currentProfile = _props.currentProfile;
- return _react2.default.createElement('div', { style: prepareStyles((0, _simpleAssign2.default)(styles.root, style)) });
+ return _react2.default.createElement(_Toggle2.default, { toggled: profile.name === currentProfile, onToggle: function onToggle() {
+ return _this2.onSetProfile(profile.name);
+ } });
}
}]);
- return InkBar;
+ return ProfileToggle;
}(_react.Component);
-InkBar.contextTypes = {
- muiTheme: _react.PropTypes.object.isRequired
-};
- false ? InkBar.propTypes = {
- color: _react.PropTypes.string,
- left: _react.PropTypes.string.isRequired,
- /**
- * Override the inline-styles of the root element.
- */
- style: _react.PropTypes.object,
- width: _react.PropTypes.string.isRequired
-} : void 0;
-exports.default = InkBar;
-
-/***/ }),
-/* 854 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _keys = __webpack_require__(79);
-
-var _keys2 = _interopRequireDefault(_keys);
-
-exports.changeMenu = changeMenu;
-
-var _ActionTypes = __webpack_require__(77);
-
-var types = _interopRequireWildcard(_ActionTypes);
-
-var _Menus = __webpack_require__(96);
-
-var menus = _interopRequireWildcard(_Menus);
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function changeMenu(newMenu) {
- var keys = (0, _keys2.default)(menus).map(function (x) {
- return menus[x];
- });
- if (keys.indexOf(newMenu) !== -1) {
- return { type: types.CHANGE_MENU, menu: newMenu };
- }
- throw new Error('Invalid menu : ' + newMenu);
-}
-
-/***/ }),
-/* 855 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.updateSettings = updateSettings;
-
-var _ActionTypes = __webpack_require__(77);
-
-var types = _interopRequireWildcard(_ActionTypes);
-
-var _notification = __webpack_require__(856);
-
-var _notification2 = _interopRequireDefault(_notification);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
-function updateSettings(shop, key, value) {
- return function (dispatch) {
- dispatch((0, _notification2.default)('Settings saved'));
- var obj = {};
- obj[key] = value;
- dispatch({
- type: types.UPDATE_SETTINGS,
- value: obj,
- shop: shop
- });
+function mapStateToProps(state) {
+ return {
+ currentProfile: state.profiles.currentProfile
};
}
-/***/ }),
-/* 856 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = addNotification;
-
-var _ActionTypes = __webpack_require__(77);
-
-var types = _interopRequireWildcard(_ActionTypes);
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
-function addNotification(message) {
+function mapDispatchToProps(dispatch) {
return {
- type: types.NOTIFICATION_ADD,
- message: message
+ setProfileEnabled: function setProfileEnabled(name) {
+ return dispatch((0, _profiles.setProfileEnabled)(name));
+ }
};
}
+ProfileToggle.PropTypes = {
+ profile: _react.PropTypes.object.isRequired
+};
+
+exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(ProfileToggle);
+
/***/ }),
-/* 857 */
+/* 853 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -73957,26 +77673,26 @@ Object.defineProperty(exports, "__esModule", {
});
exports.saveState = exports.loadSavedState = exports.initializeLocalStorageState = undefined;
-var _regenerator = __webpack_require__(858);
+var _regenerator = __webpack_require__(854);
var _regenerator2 = _interopRequireDefault(_regenerator);
-var _asyncToGenerator2 = __webpack_require__(861);
+var _asyncToGenerator2 = __webpack_require__(857);
var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
-var _promise = __webpack_require__(330);
+var _promise = __webpack_require__(344);
var _promise2 = _interopRequireDefault(_promise);
-var _stringify = __webpack_require__(872);
+var _stringify = __webpack_require__(867);
var _stringify2 = _interopRequireDefault(_stringify);
exports.saveToChromeStorage = saveToChromeStorage;
exports.getFromChromeStorage = getFromChromeStorage;
-var _Helpers = __webpack_require__(874);
+var _Helpers = __webpack_require__(338);
var Helpers = _interopRequireWildcard(_Helpers);
@@ -74066,14 +77782,14 @@ function getFromChromeStorage(key) {
}
/***/ }),
-/* 858 */
+/* 854 */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = __webpack_require__(859);
+module.exports = __webpack_require__(855);
/***/ }),
-/* 859 */
+/* 855 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {// This method of obtaining a reference to the global object needs to be
@@ -74094,7 +77810,7 @@ var oldRuntime = hadRuntime && g.regeneratorRuntime;
// Force reevalutation of runtime.js.
g.regeneratorRuntime = undefined;
-module.exports = __webpack_require__(860);
+module.exports = __webpack_require__(856);
if (hadRuntime) {
// Restore the original runtime.
@@ -74108,13 +77824,13 @@ if (hadRuntime) {
}
}
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47)))
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46)))
/***/ }),
-/* 860 */
+/* 856 */
/***/ (function(module, exports, __webpack_require__) {
-/* WEBPACK VAR INJECTION */(function(global) {/**
+/* WEBPACK VAR INJECTION */(function(global, process) {/**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
@@ -74132,7 +77848,6 @@ if (hadRuntime) {
var undefined; // More compressible than void 0.
var $Symbol = typeof Symbol === "function" ? Symbol : {};
var iteratorSymbol = $Symbol.iterator || "@@iterator";
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
var inModule = typeof module === "object";
@@ -74306,8 +78021,8 @@ if (hadRuntime) {
}
}
- if (typeof global.process === "object" && global.process.domain) {
- invoke = global.process.domain.bind(invoke);
+ if (typeof process === "object" && process.domain) {
+ invoke = process.domain.bind(invoke);
}
var previousPromise;
@@ -74346,9 +78061,6 @@ if (hadRuntime) {
}
defineIteratorMethods(AsyncIterator.prototype);
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
- return this;
- };
runtime.AsyncIterator = AsyncIterator;
// Note that simple async functions are implemented on top of
@@ -74384,34 +78096,90 @@ if (hadRuntime) {
return doneResult();
}
- context.method = method;
- context.arg = arg;
-
while (true) {
var delegate = context.delegate;
if (delegate) {
- var delegateResult = maybeInvokeDelegate(delegate, context);
- if (delegateResult) {
- if (delegateResult === ContinueSentinel) continue;
- return delegateResult;
+ if (method === "return" ||
+ (method === "throw" && delegate.iterator[method] === undefined)) {
+ // A return or throw (when the delegate iterator has no throw
+ // method) always terminates the yield* loop.
+ context.delegate = null;
+
+ // If the delegate iterator has a return method, give it a
+ // chance to clean up.
+ var returnMethod = delegate.iterator["return"];
+ if (returnMethod) {
+ var record = tryCatch(returnMethod, delegate.iterator, arg);
+ if (record.type === "throw") {
+ // If the return method threw an exception, let that
+ // exception prevail over the original return or throw.
+ method = "throw";
+ arg = record.arg;
+ continue;
+ }
+ }
+
+ if (method === "return") {
+ // Continue with the outer return, now that the delegate
+ // iterator has been terminated.
+ continue;
+ }
+ }
+
+ var record = tryCatch(
+ delegate.iterator[method],
+ delegate.iterator,
+ arg
+ );
+
+ if (record.type === "throw") {
+ context.delegate = null;
+
+ // Like returning generator.throw(uncaught), but without the
+ // overhead of an extra function call.
+ method = "throw";
+ arg = record.arg;
+ continue;
}
+
+ // Delegate generator ran and handled its own exceptions so
+ // regardless of what the method was, we continue as if it is
+ // "next" with an undefined arg.
+ method = "next";
+ arg = undefined;
+
+ var info = record.arg;
+ if (info.done) {
+ context[delegate.resultName] = info.value;
+ context.next = delegate.nextLoc;
+ } else {
+ state = GenStateSuspendedYield;
+ return info;
+ }
+
+ context.delegate = null;
}
- if (context.method === "next") {
+ if (method === "next") {
// Setting context._sent for legacy support of Babel's
// function.sent implementation.
- context.sent = context._sent = context.arg;
+ context.sent = context._sent = arg;
- } else if (context.method === "throw") {
+ } else if (method === "throw") {
if (state === GenStateSuspendedStart) {
state = GenStateCompleted;
- throw context.arg;
+ throw arg;
}
- context.dispatchException(context.arg);
+ if (context.dispatchException(arg)) {
+ // If the dispatched exception was caught by a catch block,
+ // then let that catch block handle the exception normally.
+ method = "next";
+ arg = undefined;
+ }
- } else if (context.method === "return") {
- context.abrupt("return", context.arg);
+ } else if (method === "return") {
+ context.abrupt("return", arg);
}
state = GenStateExecuting;
@@ -74424,123 +78192,38 @@ if (hadRuntime) {
? GenStateCompleted
: GenStateSuspendedYield;
- if (record.arg === ContinueSentinel) {
- continue;
- }
-
- return {
+ var info = {
value: record.arg,
done: context.done
};
+ if (record.arg === ContinueSentinel) {
+ if (context.delegate && method === "next") {
+ // Deliberately forget the last sent value so that we don't
+ // accidentally pass it on to the delegate.
+ arg = undefined;
+ }
+ } else {
+ return info;
+ }
+
} else if (record.type === "throw") {
state = GenStateCompleted;
// Dispatch the exception by looping back around to the
- // context.dispatchException(context.arg) call above.
- context.method = "throw";
- context.arg = record.arg;
+ // context.dispatchException(arg) call above.
+ method = "throw";
+ arg = record.arg;
}
}
};
}
- // Call delegate.iterator[context.method](context.arg) and handle the
- // result, either by returning a { value, done } result from the
- // delegate iterator, or by modifying context.method and context.arg,
- // setting context.delegate to null, and returning the ContinueSentinel.
- function maybeInvokeDelegate(delegate, context) {
- var method = delegate.iterator[context.method];
- if (method === undefined) {
- // A .throw or .return when the delegate iterator has no .throw
- // method always terminates the yield* loop.
- context.delegate = null;
-
- if (context.method === "throw") {
- if (delegate.iterator.return) {
- // If the delegate iterator has a return method, give it a
- // chance to clean up.
- context.method = "return";
- context.arg = undefined;
- maybeInvokeDelegate(delegate, context);
-
- if (context.method === "throw") {
- // If maybeInvokeDelegate(context) changed context.method from
- // "return" to "throw", let that override the TypeError below.
- return ContinueSentinel;
- }
- }
-
- context.method = "throw";
- context.arg = new TypeError(
- "The iterator does not provide a 'throw' method");
- }
-
- return ContinueSentinel;
- }
-
- var record = tryCatch(method, delegate.iterator, context.arg);
-
- if (record.type === "throw") {
- context.method = "throw";
- context.arg = record.arg;
- context.delegate = null;
- return ContinueSentinel;
- }
-
- var info = record.arg;
-
- if (! info) {
- context.method = "throw";
- context.arg = new TypeError("iterator result is not an object");
- context.delegate = null;
- return ContinueSentinel;
- }
-
- if (info.done) {
- // Assign the result of the finished delegate to the temporary
- // variable specified by delegate.resultName (see delegateYield).
- context[delegate.resultName] = info.value;
-
- // Resume execution at the desired location (see delegateYield).
- context.next = delegate.nextLoc;
-
- // If context.method was "throw" but the delegate handled the
- // exception, let the outer generator proceed normally. If
- // context.method was "next", forget context.arg since it has been
- // "consumed" by the delegate iterator. If context.method was
- // "return", allow the original .return call to continue in the
- // outer generator.
- if (context.method !== "return") {
- context.method = "next";
- context.arg = undefined;
- }
-
- } else {
- // Re-yield the result returned by the delegate method.
- return info;
- }
-
- // The delegate iterator is finished, so forget it and continue with
- // the outer generator.
- context.delegate = null;
- return ContinueSentinel;
- }
-
// Define Generator.prototype.{next,throw,return} in terms of the
// unified ._invoke helper method.
defineIteratorMethods(Gp);
Gp[toStringTagSymbol] = "Generator";
- // A Generator should always return itself as the iterator object when the
- // @@iterator function is called on it. Some browsers' implementations of the
- // iterator prototype chain incorrectly implement this, causing the Generator
- // object to not be returned from this call. This ensures that doesn't happen.
- // See https://github.com/facebook/regenerator/issues/274 for more details.
- Gp[iteratorSymbol] = function() {
- return this;
- };
-
Gp.toString = function() {
return "[object Generator]";
};
@@ -74655,9 +78338,6 @@ if (hadRuntime) {
this.done = false;
this.delegate = null;
- this.method = "next";
- this.arg = undefined;
-
this.tryEntries.forEach(resetTryEntry);
if (!skipTempReset) {
@@ -74694,15 +78374,7 @@ if (hadRuntime) {
record.type = "throw";
record.arg = exception;
context.next = loc;
-
- if (caught) {
- // If the dispatched exception was caught by a catch block,
- // then let that catch block handle the exception normally.
- context.method = "next";
- context.arg = undefined;
- }
-
- return !! caught;
+ return !!caught;
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
@@ -74770,12 +78442,12 @@ if (hadRuntime) {
record.arg = arg;
if (finallyEntry) {
- this.method = "next";
this.next = finallyEntry.finallyLoc;
- return ContinueSentinel;
+ } else {
+ this.complete(record);
}
- return this.complete(record);
+ return ContinueSentinel;
},
complete: function(record, afterLoc) {
@@ -74787,14 +78459,11 @@ if (hadRuntime) {
record.type === "continue") {
this.next = record.arg;
} else if (record.type === "return") {
- this.rval = this.arg = record.arg;
- this.method = "return";
+ this.rval = record.arg;
this.next = "end";
} else if (record.type === "normal" && afterLoc) {
this.next = afterLoc;
}
-
- return ContinueSentinel;
},
finish: function(finallyLoc) {
@@ -74833,12 +78502,6 @@ if (hadRuntime) {
nextLoc: nextLoc
};
- if (this.method === "next") {
- // Deliberately forget the last sent value so that we don't
- // accidentally pass it on to the delegate.
- this.arg = undefined;
- }
-
return ContinueSentinel;
}
};
@@ -74851,10 +78514,10 @@ if (hadRuntime) {
typeof self === "object" ? self : this
);
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(47)))
+/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(46), __webpack_require__(112)))
/***/ }),
-/* 861 */
+/* 857 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -74862,7 +78525,7 @@ if (hadRuntime) {
exports.__esModule = true;
-var _promise = __webpack_require__(330);
+var _promise = __webpack_require__(344);
var _promise2 = _interopRequireDefault(_promise);
@@ -74898,178 +78561,189 @@ exports.default = function (fn) {
};
/***/ }),
-/* 862 */
+/* 858 */
/***/ (function(module, exports, __webpack_require__) {
-__webpack_require__(300);
-__webpack_require__(93);
-__webpack_require__(124);
-__webpack_require__(863);
-__webpack_require__(870);
-__webpack_require__(871);
+__webpack_require__(303);
+__webpack_require__(94);
+__webpack_require__(128);
+__webpack_require__(859);
module.exports = __webpack_require__(18).Promise;
-
/***/ }),
-/* 863 */
+/* 859 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var LIBRARY = __webpack_require__(122);
-var global = __webpack_require__(23);
-var ctx = __webpack_require__(61);
-var classof = __webpack_require__(191);
-var $export = __webpack_require__(28);
-var isObject = __webpack_require__(62);
-var aFunction = __webpack_require__(99);
-var anInstance = __webpack_require__(864);
-var forOf = __webpack_require__(865);
-var speciesConstructor = __webpack_require__(331);
-var task = __webpack_require__(332).set;
-var microtask = __webpack_require__(867)();
-var newPromiseCapabilityModule = __webpack_require__(205);
-var perform = __webpack_require__(333);
-var promiseResolve = __webpack_require__(334);
-var PROMISE = 'Promise';
-var TypeError = global.TypeError;
-var process = global.process;
-var $Promise = global[PROMISE];
-var isNode = classof(process) == 'process';
-var empty = function () { /* empty */ };
-var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
-var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
-
-var USE_NATIVE = !!function () {
+var LIBRARY = __webpack_require__(126)
+ , global = __webpack_require__(25)
+ , ctx = __webpack_require__(67)
+ , classof = __webpack_require__(198)
+ , $export = __webpack_require__(33)
+ , isObject = __webpack_require__(68)
+ , aFunction = __webpack_require__(136)
+ , anInstance = __webpack_require__(860)
+ , forOf = __webpack_require__(861)
+ , speciesConstructor = __webpack_require__(862)
+ , task = __webpack_require__(345).set
+ , microtask = __webpack_require__(864)()
+ , PROMISE = 'Promise'
+ , TypeError = global.TypeError
+ , process = global.process
+ , $Promise = global[PROMISE]
+ , process = global.process
+ , isNode = classof(process) == 'process'
+ , empty = function(){ /* empty */ }
+ , Internal, GenericPromiseCapability, Wrapper;
+
+var USE_NATIVE = !!function(){
try {
// correct subclassing with @@species support
- var promise = $Promise.resolve(1);
- var FakePromise = (promise.constructor = {})[__webpack_require__(22)('species')] = function (exec) {
- exec(empty, empty);
- };
+ var promise = $Promise.resolve(1)
+ , FakePromise = (promise.constructor = {})[__webpack_require__(24)('species')] = function(exec){ exec(empty, empty); };
// unhandled rejections tracking support, NodeJS Promise without it fails @@species test
return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
- } catch (e) { /* empty */ }
+ } catch(e){ /* empty */ }
}();
// helpers
-var sameConstructor = LIBRARY ? function (a, b) {
+var sameConstructor = function(a, b){
// with library wrapper special case
return a === b || a === $Promise && b === Wrapper;
-} : function (a, b) {
- return a === b;
};
-var isThenable = function (it) {
+var isThenable = function(it){
var then;
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
-var notify = function (promise, isReject) {
- if (promise._n) return;
+var newPromiseCapability = function(C){
+ return sameConstructor($Promise, C)
+ ? new PromiseCapability(C)
+ : new GenericPromiseCapability(C);
+};
+var PromiseCapability = GenericPromiseCapability = function(C){
+ var resolve, reject;
+ this.promise = new C(function($$resolve, $$reject){
+ if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');
+ resolve = $$resolve;
+ reject = $$reject;
+ });
+ this.resolve = aFunction(resolve);
+ this.reject = aFunction(reject);
+};
+var perform = function(exec){
+ try {
+ exec();
+ } catch(e){
+ return {error: e};
+ }
+};
+var notify = function(promise, isReject){
+ if(promise._n)return;
promise._n = true;
var chain = promise._c;
- microtask(function () {
- var value = promise._v;
- var ok = promise._s == 1;
- var i = 0;
- var run = function (reaction) {
- var handler = ok ? reaction.ok : reaction.fail;
- var resolve = reaction.resolve;
- var reject = reaction.reject;
- var domain = reaction.domain;
- var result, then;
+ microtask(function(){
+ var value = promise._v
+ , ok = promise._s == 1
+ , i = 0;
+ var run = function(reaction){
+ var handler = ok ? reaction.ok : reaction.fail
+ , resolve = reaction.resolve
+ , reject = reaction.reject
+ , domain = reaction.domain
+ , result, then;
try {
- if (handler) {
- if (!ok) {
- if (promise._h == 2) onHandleUnhandled(promise);
+ if(handler){
+ if(!ok){
+ if(promise._h == 2)onHandleUnhandled(promise);
promise._h = 1;
}
- if (handler === true) result = value;
+ if(handler === true)result = value;
else {
- if (domain) domain.enter();
+ if(domain)domain.enter();
result = handler(value);
- if (domain) domain.exit();
+ if(domain)domain.exit();
}
- if (result === reaction.promise) {
+ if(result === reaction.promise){
reject(TypeError('Promise-chain cycle'));
- } else if (then = isThenable(result)) {
+ } else if(then = isThenable(result)){
then.call(result, resolve, reject);
} else resolve(result);
} else reject(value);
- } catch (e) {
+ } catch(e){
reject(e);
}
};
- while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
+ while(chain.length > i)run(chain[i++]); // variable length - can't use forEach
promise._c = [];
promise._n = false;
- if (isReject && !promise._h) onUnhandled(promise);
+ if(isReject && !promise._h)onUnhandled(promise);
});
};
-var onUnhandled = function (promise) {
- task.call(global, function () {
- var value = promise._v;
- var unhandled = isUnhandled(promise);
- var result, handler, console;
- if (unhandled) {
- result = perform(function () {
- if (isNode) {
+var onUnhandled = function(promise){
+ task.call(global, function(){
+ var value = promise._v
+ , abrupt, handler, console;
+ if(isUnhandled(promise)){
+ abrupt = perform(function(){
+ if(isNode){
process.emit('unhandledRejection', value, promise);
- } else if (handler = global.onunhandledrejection) {
- handler({ promise: promise, reason: value });
- } else if ((console = global.console) && console.error) {
+ } else if(handler = global.onunhandledrejection){
+ handler({promise: promise, reason: value});
+ } else if((console = global.console) && console.error){
console.error('Unhandled promise rejection', value);
}
});
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
promise._h = isNode || isUnhandled(promise) ? 2 : 1;
} promise._a = undefined;
- if (unhandled && result.e) throw result.v;
+ if(abrupt)throw abrupt.error;
});
};
-var isUnhandled = function (promise) {
- if (promise._h == 1) return false;
- var chain = promise._a || promise._c;
- var i = 0;
- var reaction;
- while (chain.length > i) {
+var isUnhandled = function(promise){
+ if(promise._h == 1)return false;
+ var chain = promise._a || promise._c
+ , i = 0
+ , reaction;
+ while(chain.length > i){
reaction = chain[i++];
- if (reaction.fail || !isUnhandled(reaction.promise)) return false;
+ if(reaction.fail || !isUnhandled(reaction.promise))return false;
} return true;
};
-var onHandleUnhandled = function (promise) {
- task.call(global, function () {
+var onHandleUnhandled = function(promise){
+ task.call(global, function(){
var handler;
- if (isNode) {
+ if(isNode){
process.emit('rejectionHandled', promise);
- } else if (handler = global.onrejectionhandled) {
- handler({ promise: promise, reason: promise._v });
+ } else if(handler = global.onrejectionhandled){
+ handler({promise: promise, reason: promise._v});
}
});
};
-var $reject = function (value) {
+var $reject = function(value){
var promise = this;
- if (promise._d) return;
+ if(promise._d)return;
promise._d = true;
promise = promise._w || promise; // unwrap
promise._v = value;
promise._s = 2;
- if (!promise._a) promise._a = promise._c.slice();
+ if(!promise._a)promise._a = promise._c.slice();
notify(promise, true);
};
-var $resolve = function (value) {
- var promise = this;
- var then;
- if (promise._d) return;
+var $resolve = function(value){
+ var promise = this
+ , then;
+ if(promise._d)return;
promise._d = true;
promise = promise._w || promise; // unwrap
try {
- if (promise === value) throw TypeError("Promise can't be resolved itself");
- if (then = isThenable(value)) {
- microtask(function () {
- var wrapper = { _w: promise, _d: false }; // wrap
+ if(promise === value)throw TypeError("Promise can't be resolved itself");
+ if(then = isThenable(value)){
+ microtask(function(){
+ var wrapper = {_w: promise, _d: false}; // wrap
try {
then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
- } catch (e) {
+ } catch(e){
$reject.call(wrapper, e);
}
});
@@ -75078,26 +78752,25 @@ var $resolve = function (value) {
promise._s = 1;
notify(promise, false);
}
- } catch (e) {
- $reject.call({ _w: promise, _d: false }, e); // wrap
+ } catch(e){
+ $reject.call({_w: promise, _d: false}, e); // wrap
}
};
// constructor polyfill
-if (!USE_NATIVE) {
+if(!USE_NATIVE){
// 25.4.3.1 Promise(executor)
- $Promise = function Promise(executor) {
+ $Promise = function Promise(executor){
anInstance(this, $Promise, PROMISE, '_h');
aFunction(executor);
Internal.call(this);
try {
executor(ctx($resolve, this, 1), ctx($reject, this, 1));
- } catch (err) {
+ } catch(err){
$reject.call(this, err);
}
};
- // eslint-disable-next-line no-unused-vars
- Internal = function Promise(executor) {
+ Internal = function Promise(executor){
this._c = []; // <- awaiting reactions
this._a = undefined; // <- checked in isUnhandled reactions
this._s = 0; // <- state
@@ -75106,155 +78779,163 @@ if (!USE_NATIVE) {
this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
this._n = false; // <- notify
};
- Internal.prototype = __webpack_require__(868)($Promise.prototype, {
+ Internal.prototype = __webpack_require__(865)($Promise.prototype, {
// 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
- then: function then(onFulfilled, onRejected) {
- var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
- reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
- reaction.fail = typeof onRejected == 'function' && onRejected;
+ then: function then(onFulfilled, onRejected){
+ var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
+ reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
+ reaction.fail = typeof onRejected == 'function' && onRejected;
reaction.domain = isNode ? process.domain : undefined;
this._c.push(reaction);
- if (this._a) this._a.push(reaction);
- if (this._s) notify(this, false);
+ if(this._a)this._a.push(reaction);
+ if(this._s)notify(this, false);
return reaction.promise;
},
// 25.4.5.1 Promise.prototype.catch(onRejected)
- 'catch': function (onRejected) {
+ 'catch': function(onRejected){
return this.then(undefined, onRejected);
}
});
- OwnPromiseCapability = function () {
- var promise = new Internal();
+ PromiseCapability = function(){
+ var promise = new Internal;
this.promise = promise;
this.resolve = ctx($resolve, promise, 1);
- this.reject = ctx($reject, promise, 1);
- };
- newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
- return sameConstructor($Promise, C)
- ? new OwnPromiseCapability(C)
- : newGenericPromiseCapability(C);
+ this.reject = ctx($reject, promise, 1);
};
}
-$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
-__webpack_require__(123)($Promise, PROMISE);
-__webpack_require__(869)(PROMISE);
+$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise});
+__webpack_require__(127)($Promise, PROMISE);
+__webpack_require__(866)(PROMISE);
Wrapper = __webpack_require__(18)[PROMISE];
// statics
$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
// 25.4.4.5 Promise.reject(r)
- reject: function reject(r) {
- var capability = newPromiseCapability(this);
- var $$reject = capability.reject;
+ reject: function reject(r){
+ var capability = newPromiseCapability(this)
+ , $$reject = capability.reject;
$$reject(r);
return capability.promise;
}
});
$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
// 25.4.4.6 Promise.resolve(x)
- resolve: function resolve(x) {
+ resolve: function resolve(x){
// instanceof instead of internal slot check because we should fix it without replacement native Promise core
- if (x instanceof $Promise && sameConstructor(x.constructor, this)) return x;
- return promiseResolve(this, x);
+ if(x instanceof $Promise && sameConstructor(x.constructor, this))return x;
+ var capability = newPromiseCapability(this)
+ , $$resolve = capability.resolve;
+ $$resolve(x);
+ return capability.promise;
}
});
-$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(305)(function (iter) {
+$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(309)(function(iter){
$Promise.all(iter)['catch'](empty);
})), PROMISE, {
// 25.4.4.1 Promise.all(iterable)
- all: function all(iterable) {
- var C = this;
- var capability = newPromiseCapability(C);
- var resolve = capability.resolve;
- var reject = capability.reject;
- var result = perform(function () {
- var values = [];
- var index = 0;
- var remaining = 1;
- forOf(iterable, false, function (promise) {
- var $index = index++;
- var alreadyCalled = false;
+ all: function all(iterable){
+ var C = this
+ , capability = newPromiseCapability(C)
+ , resolve = capability.resolve
+ , reject = capability.reject;
+ var abrupt = perform(function(){
+ var values = []
+ , index = 0
+ , remaining = 1;
+ forOf(iterable, false, function(promise){
+ var $index = index++
+ , alreadyCalled = false;
values.push(undefined);
remaining++;
- C.resolve(promise).then(function (value) {
- if (alreadyCalled) return;
- alreadyCalled = true;
+ C.resolve(promise).then(function(value){
+ if(alreadyCalled)return;
+ alreadyCalled = true;
values[$index] = value;
--remaining || resolve(values);
}, reject);
});
--remaining || resolve(values);
});
- if (result.e) reject(result.v);
+ if(abrupt)reject(abrupt.error);
return capability.promise;
},
// 25.4.4.4 Promise.race(iterable)
- race: function race(iterable) {
- var C = this;
- var capability = newPromiseCapability(C);
- var reject = capability.reject;
- var result = perform(function () {
- forOf(iterable, false, function (promise) {
+ race: function race(iterable){
+ var C = this
+ , capability = newPromiseCapability(C)
+ , reject = capability.reject;
+ var abrupt = perform(function(){
+ forOf(iterable, false, function(promise){
C.resolve(promise).then(capability.resolve, reject);
});
});
- if (result.e) reject(result.v);
+ if(abrupt)reject(abrupt.error);
return capability.promise;
}
});
-
/***/ }),
-/* 864 */
+/* 860 */
/***/ (function(module, exports) {
-module.exports = function (it, Constructor, name, forbiddenField) {
- if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
+module.exports = function(it, Constructor, name, forbiddenField){
+ if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){
throw TypeError(name + ': incorrect invocation!');
} return it;
};
-
/***/ }),
-/* 865 */
+/* 861 */
/***/ (function(module, exports, __webpack_require__) {
-var ctx = __webpack_require__(61);
-var call = __webpack_require__(303);
-var isArrayIter = __webpack_require__(304);
-var anObject = __webpack_require__(36);
-var toLength = __webpack_require__(134);
-var getIterFn = __webpack_require__(190);
-var BREAK = {};
-var RETURN = {};
-var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
- var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
- var f = ctx(fn, that, entries ? 2 : 1);
- var index = 0;
- var length, step, iterator, result;
- if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
+var ctx = __webpack_require__(67)
+ , call = __webpack_require__(307)
+ , isArrayIter = __webpack_require__(308)
+ , anObject = __webpack_require__(35)
+ , toLength = __webpack_require__(140)
+ , getIterFn = __webpack_require__(197)
+ , BREAK = {}
+ , RETURN = {};
+var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){
+ var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable)
+ , f = ctx(fn, that, entries ? 2 : 1)
+ , index = 0
+ , length, step, iterator, result;
+ if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');
// fast case for arrays with default iterator
- if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
+ if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){
result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
- if (result === BREAK || result === RETURN) return result;
- } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
+ if(result === BREAK || result === RETURN)return result;
+ } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){
result = call(iterator, f, step.value, entries);
- if (result === BREAK || result === RETURN) return result;
+ if(result === BREAK || result === RETURN)return result;
}
};
-exports.BREAK = BREAK;
+exports.BREAK = BREAK;
exports.RETURN = RETURN;
+/***/ }),
+/* 862 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// 7.3.20 SpeciesConstructor(O, defaultConstructor)
+var anObject = __webpack_require__(35)
+ , aFunction = __webpack_require__(136)
+ , SPECIES = __webpack_require__(24)('species');
+module.exports = function(O, D){
+ var C = anObject(O).constructor, S;
+ return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
+};
/***/ }),
-/* 866 */
+/* 863 */
/***/ (function(module, exports) {
// fast apply, http://jsperf.lnkit.com/fast-apply/5
-module.exports = function (fn, args, that) {
+module.exports = function(fn, args, that){
var un = that === undefined;
- switch (args.length) {
+ switch(args.length){
case 0: return un ? fn()
: fn.call(that);
case 1: return un ? fn(args[0])
@@ -75265,58 +78946,57 @@ module.exports = function (fn, args, that) {
: fn.call(that, args[0], args[1], args[2]);
case 4: return un ? fn(args[0], args[1], args[2], args[3])
: fn.call(that, args[0], args[1], args[2], args[3]);
- } return fn.apply(that, args);
+ } return fn.apply(that, args);
};
-
/***/ }),
-/* 867 */
+/* 864 */
/***/ (function(module, exports, __webpack_require__) {
-var global = __webpack_require__(23);
-var macrotask = __webpack_require__(332).set;
-var Observer = global.MutationObserver || global.WebKitMutationObserver;
-var process = global.process;
-var Promise = global.Promise;
-var isNode = __webpack_require__(83)(process) == 'process';
+var global = __webpack_require__(25)
+ , macrotask = __webpack_require__(345).set
+ , Observer = global.MutationObserver || global.WebKitMutationObserver
+ , process = global.process
+ , Promise = global.Promise
+ , isNode = __webpack_require__(87)(process) == 'process';
-module.exports = function () {
+module.exports = function(){
var head, last, notify;
- var flush = function () {
+ var flush = function(){
var parent, fn;
- if (isNode && (parent = process.domain)) parent.exit();
- while (head) {
- fn = head.fn;
+ if(isNode && (parent = process.domain))parent.exit();
+ while(head){
+ fn = head.fn;
head = head.next;
try {
fn();
- } catch (e) {
- if (head) notify();
+ } catch(e){
+ if(head)notify();
else last = undefined;
throw e;
}
} last = undefined;
- if (parent) parent.enter();
+ if(parent)parent.enter();
};
// Node.js
- if (isNode) {
- notify = function () {
+ if(isNode){
+ notify = function(){
process.nextTick(flush);
};
// browsers with MutationObserver
- } else if (Observer) {
- var toggle = true;
- var node = document.createTextNode('');
- new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
- notify = function () {
+ } else if(Observer){
+ var toggle = true
+ , node = document.createTextNode('');
+ new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new
+ notify = function(){
node.data = toggle = !toggle;
};
// environments with maybe non-completely correct, but existent Promise
- } else if (Promise && Promise.resolve) {
+ } else if(Promise && Promise.resolve){
var promise = Promise.resolve();
- notify = function () {
+ notify = function(){
promise.then(flush);
};
// for other environments - macrotask based on:
@@ -75326,159 +79006,69 @@ module.exports = function () {
// - onreadystatechange
// - setTimeout
} else {
- notify = function () {
+ notify = function(){
// strange IE + webpack dev server bug - use .call(global)
macrotask.call(global, flush);
};
}
- return function (fn) {
- var task = { fn: fn, next: undefined };
- if (last) last.next = task;
- if (!head) {
+ return function(fn){
+ var task = {fn: fn, next: undefined};
+ if(last)last.next = task;
+ if(!head){
head = task;
notify();
} last = task;
};
};
-
/***/ }),
-/* 868 */
+/* 865 */
/***/ (function(module, exports, __webpack_require__) {
-var hide = __webpack_require__(50);
-module.exports = function (target, src, safe) {
- for (var key in src) {
- if (safe && target[key]) target[key] = src[key];
+var hide = __webpack_require__(53);
+module.exports = function(target, src, safe){
+ for(var key in src){
+ if(safe && target[key])target[key] = src[key];
else hide(target, key, src[key]);
} return target;
};
-
/***/ }),
-/* 869 */
+/* 866 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-var global = __webpack_require__(23);
-var core = __webpack_require__(18);
-var dP = __webpack_require__(35);
-var DESCRIPTORS = __webpack_require__(44);
-var SPECIES = __webpack_require__(22)('species');
+var global = __webpack_require__(25)
+ , core = __webpack_require__(18)
+ , dP = __webpack_require__(34)
+ , DESCRIPTORS = __webpack_require__(43)
+ , SPECIES = __webpack_require__(24)('species');
-module.exports = function (KEY) {
+module.exports = function(KEY){
var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY];
- if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
+ if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, {
configurable: true,
- get: function () { return this; }
+ get: function(){ return this; }
});
};
-
/***/ }),
-/* 870 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-// https://github.com/tc39/proposal-promise-finally
-
-var $export = __webpack_require__(28);
-var core = __webpack_require__(18);
-var global = __webpack_require__(23);
-var speciesConstructor = __webpack_require__(331);
-var promiseResolve = __webpack_require__(334);
-
-$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
- var C = speciesConstructor(this, core.Promise || global.Promise);
- var isFunction = typeof onFinally == 'function';
- return this.then(
- isFunction ? function (x) {
- return promiseResolve(C, onFinally()).then(function () { return x; });
- } : onFinally,
- isFunction ? function (e) {
- return promiseResolve(C, onFinally()).then(function () { throw e; });
- } : onFinally
- );
-} });
-
-
-/***/ }),
-/* 871 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// https://github.com/tc39/proposal-promise-try
-var $export = __webpack_require__(28);
-var newPromiseCapability = __webpack_require__(205);
-var perform = __webpack_require__(333);
-
-$export($export.S, 'Promise', { 'try': function (callbackfn) {
- var promiseCapability = newPromiseCapability.f(this);
- var result = perform(callbackfn);
- (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
- return promiseCapability.promise;
-} });
-
-
-/***/ }),
-/* 872 */
+/* 867 */
/***/ (function(module, exports, __webpack_require__) {
-module.exports = { "default": __webpack_require__(873), __esModule: true };
+module.exports = { "default": __webpack_require__(868), __esModule: true };
/***/ }),
-/* 873 */
+/* 868 */
/***/ (function(module, exports, __webpack_require__) {
-var core = __webpack_require__(18);
-var $JSON = core.JSON || (core.JSON = { stringify: JSON.stringify });
-module.exports = function stringify(it) { // eslint-disable-line no-unused-vars
+var core = __webpack_require__(18)
+ , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify});
+module.exports = function stringify(it){ // eslint-disable-line no-unused-vars
return $JSON.stringify.apply($JSON, arguments);
};
-
-/***/ }),
-/* 874 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _keys = __webpack_require__(79);
-
-var _keys2 = _interopRequireDefault(_keys);
-
-exports.isObjectEmpty = isObjectEmpty;
-exports.getQueryStringValue = getQueryStringValue;
-exports.pageHasNodeOfClass = pageHasNodeOfClass;
-exports.hasStringInPath = hasStringInPath;
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-function isObjectEmpty(obj) {
- return (0, _keys2.default)(obj).length === 0 && obj.constructor === Object;
-}
-
-function getQueryStringValue(key) {
- return decodeURIComponent(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + encodeURIComponent(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1"));
-}
-
-function pageHasNodeOfClass(className) {
- return document.querySelectorAll('.' + className).length > 0;
-}
-
-function hasStringInPath(value) {
- return location.pathname.substring(1).split('/').filter(function (x) {
- return !!x && x === value;
- }).length > 0;
-}
-
/***/ })
/******/ ]);
\ No newline at end of file
diff --git a/bot/build/bundle.js.orig b/bot/build/bundle.js.orig
new file mode 100644
index 0000000..f81ae3d
--- /dev/null
+++ b/bot/build/bundle.js.orig
@@ -0,0 +1,152357 @@
+<<<<<<< HEAD
+/******/ (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 = 335);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+module.exports = __webpack_require__(65);
+
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+exports.default = function (instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError("Cannot call a class as a function");
+ }
+};
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _defineProperty = __webpack_require__(185);
+
+var _defineProperty2 = _interopRequireDefault(_defineProperty);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = function () {
+ function defineProperties(target, props) {
+ for (var i = 0; i < props.length; i++) {
+ var descriptor = props[i];
+ descriptor.enumerable = descriptor.enumerable || false;
+ descriptor.configurable = true;
+ if ("value" in descriptor) descriptor.writable = true;
+ (0, _defineProperty2.default)(target, descriptor.key, descriptor);
+ }
+ }
+
+ return function (Constructor, protoProps, staticProps) {
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) defineProperties(Constructor, staticProps);
+ return Constructor;
+ };
+}();
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(660), __esModule: true };
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _typeof2 = __webpack_require__(92);
+
+var _typeof3 = _interopRequireDefault(_typeof2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = function (self, call) {
+ if (!self) {
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ }
+
+ return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;
+};
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _setPrototypeOf = __webpack_require__(682);
+
+var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
+
+var _create = __webpack_require__(686);
+
+var _create2 = _interopRequireDefault(_create);
+
+var _typeof2 = __webpack_require__(92);
+
+var _typeof3 = _interopRequireDefault(_typeof2);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = function (subClass, superClass) {
+ if (typeof superClass !== "function" && superClass !== null) {
+ throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));
+ }
+
+ subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
+ constructor: {
+ value: subClass,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;
+};
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports) {
+
+module.exports = function (target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i];
+ for (var key in source) {
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+ return target;
+};
+
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _assign = __webpack_require__(49);
+
+var _assign2 = _interopRequireDefault(_assign);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _assign2.default || function (target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i];
+
+ for (var key in source) {
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+
+ return target;
+};
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+exports.default = function (obj, keys) {
+ var target = {};
+
+ for (var i in obj) {
+ if (keys.indexOf(i) >= 0) continue;
+ if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
+ target[i] = obj[i];
+ }
+
+ return target;
+};
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+/**
+ * Use invariant() to assert state which your program assumes to be true.
+ *
+ * Provide sprintf-style format (only %s is supported) and arguments
+ * to provide information about what broke and what you were
+ * expecting.
+ *
+ * The invariant message will be stripped in production, but the invariant
+ * will remain to ensure logic does not differ in production.
+ */
+
+var validateFormat = function validateFormat(format) {};
+
+if (false) {
+ validateFormat = function validateFormat(format) {
+ if (format === undefined) {
+ throw new Error('invariant requires an error message argument');
+ }
+ };
+}
+
+function invariant(condition, format, a, b, c, d, e, f) {
+ validateFormat(format);
+
+ if (!condition) {
+ var error;
+ if (format === undefined) {
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
+ } else {
+ var args = [a, b, c, d, e, f];
+ var argIndex = 0;
+ error = new Error(format.replace(/%s/g, function () {
+ return args[argIndex++];
+ }));
+ error.name = 'Invariant Violation';
+ }
+
+ error.framesToPop = 1; // we don't care about invariant's own frame
+ throw error;
+ }
+}
+
+module.exports = invariant;
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = {
+
+ easeOutFunction: 'cubic-bezier(0.23, 1, 0.32, 1)',
+ easeInOutFunction: 'cubic-bezier(0.445, 0.05, 0.55, 0.95)',
+
+ easeOut: function easeOut(duration, property, delay, easeFunction) {
+ easeFunction = easeFunction || this.easeOutFunction;
+
+ if (property && Object.prototype.toString.call(property) === '[object Array]') {
+ var transitions = '';
+ for (var i = 0; i < property.length; i++) {
+ if (transitions) transitions += ',';
+ transitions += this.create(duration, property[i], delay, easeFunction);
+ }
+
+ return transitions;
+ } else {
+ return this.create(duration, property, delay, easeFunction);
+ }
+ },
+ create: function create(duration, property, delay, easeFunction) {
+ duration = duration || '450ms';
+ property = property || 'all';
+ delay = delay || '0ms';
+ easeFunction = easeFunction || 'linear';
+
+ return property + ' ' + duration + ' ' + easeFunction + ' ' + delay;
+ }
+};
+
+/***/ }),
+/* 11 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__splice__ = __webpack_require__(500);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getIn__ = __webpack_require__(501);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__setIn__ = __webpack_require__(526);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__deepEqual__ = __webpack_require__(527);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__deleteIn__ = __webpack_require__(562);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__keys__ = __webpack_require__(563);
+
+
+
+
+
+
+
+var structure = {
+ allowsArrayErrors: true,
+ empty: {},
+ emptyList: [],
+ getIn: __WEBPACK_IMPORTED_MODULE_1__getIn__["a" /* default */],
+ setIn: __WEBPACK_IMPORTED_MODULE_2__setIn__["a" /* default */],
+ deepEqual: __WEBPACK_IMPORTED_MODULE_3__deepEqual__["a" /* default */],
+ deleteIn: __WEBPACK_IMPORTED_MODULE_4__deleteIn__["a" /* default */],
+ fromJS: function fromJS(value) {
+ return value;
+ },
+ keys: __WEBPACK_IMPORTED_MODULE_5__keys__["a" /* default */],
+ size: function size(array) {
+ return array ? array.length : 0;
+ },
+ splice: __WEBPACK_IMPORTED_MODULE_0__splice__["a" /* default */],
+ toJS: function toJS(value) {
+ return value;
+ }
+};
+
+/* harmony default export */ __webpack_exports__["a"] = (structure);
+
+/***/ }),
+/* 12 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2014-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var emptyFunction = __webpack_require__(24);
+
+/**
+ * Similar to invariant but only logs a warning if the condition is not met.
+ * This can be used to log issues in development environments in critical
+ * paths. Removing the logging code for production environments will keep the
+ * same logic and follow the same code paths.
+ */
+
+var warning = emptyFunction;
+
+if (false) {
+ var printWarning = function printWarning(format) {
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+
+ var argIndex = 0;
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
+ return args[argIndex++];
+ });
+ if (typeof console !== 'undefined') {
+ console.error(message);
+ }
+ try {
+ // --- Welcome to debugging React ---
+ // This error was thrown as a convenience so that you can use this stack
+ // to find the callsite that caused this warning to fire.
+ throw new Error(message);
+ } catch (x) {}
+ };
+
+ warning = function warning(condition, format) {
+ if (format === undefined) {
+ throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
+ }
+
+ if (format.indexOf('Failed Composite propType: ') === 0) {
+ return; // Ignore CompositeComponent proptype check.
+ }
+
+ if (!condition) {
+ for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
+ args[_key2 - 2] = arguments[_key2];
+ }
+
+ printWarning.apply(undefined, [format].concat(args));
+ }
+ };
+}
+
+module.exports = warning;
+
+/***/ }),
+/* 13 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
+
+
+/**
+ * WARNING: DO NOT manually require this module.
+ * This is a replacement for `invariant(...)` used by the error code system
+ * and will _only_ be required by the corresponding babel pass.
+ * It always throws.
+ */
+
+function reactProdInvariant(code) {
+ var argCount = arguments.length - 1;
+
+ var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
+
+ for (var argIdx = 0; argIdx < argCount; argIdx++) {
+ message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
+ }
+
+ message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
+
+ var error = new Error(message);
+ error.name = 'Invariant Violation';
+ error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
+
+ throw error;
+}
+
+module.exports = reactProdInvariant;
+
+/***/ }),
+/* 14 */
+/***/ (function(module, exports, __webpack_require__) {
+
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
+
+if (false) {
+ var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
+ Symbol.for &&
+ Symbol.for('react.element')) ||
+ 0xeac7;
+
+ var isValidElement = function(object) {
+ return typeof object === 'object' &&
+ object !== null &&
+ object.$$typeof === REACT_ELEMENT_TYPE;
+ };
+
+ // By explicitly using `prop-types` you are opting into new development behavior.
+ // http://fb.me/prop-types-in-prod
+ var throwOnDirectAccess = true;
+ module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);
+} else {
+ // By explicitly using `prop-types` you are opting into new production behavior.
+ // http://fb.me/prop-types-in-prod
+ module.exports = __webpack_require__(431)();
+}
+
+
+/***/ }),
+/* 15 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/
+
+
+/* eslint-disable no-unused-vars */
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+var propIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+function toObject(val) {
+ if (val === null || val === undefined) {
+ throw new TypeError('Object.assign cannot be called with null or undefined');
+ }
+
+ return Object(val);
+}
+
+function shouldUseNative() {
+ try {
+ if (!Object.assign) {
+ return false;
+ }
+
+ // Detect buggy property enumeration order in older V8 versions.
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
+ test1[5] = 'de';
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test2 = {};
+ for (var i = 0; i < 10; i++) {
+ test2['_' + String.fromCharCode(i)] = i;
+ }
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
+ return test2[n];
+ });
+ if (order2.join('') !== '0123456789') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test3 = {};
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
+ test3[letter] = letter;
+ });
+ if (Object.keys(Object.assign({}, test3)).join('') !==
+ 'abcdefghijklmnopqrst') {
+ return false;
+ }
+
+ return true;
+ } catch (err) {
+ // We don't expect any of the above to throw, but better to be safe.
+ return false;
+ }
+}
+
+module.exports = shouldUseNative() ? Object.assign : function (target, source) {
+ var from;
+ var to = toObject(target);
+ var symbols;
+
+ for (var s = 1; s < arguments.length; s++) {
+ from = Object(arguments[s]);
+
+ for (var key in from) {
+ if (hasOwnProperty.call(from, key)) {
+ to[key] = from[key];
+ }
+ }
+
+ if (getOwnPropertySymbols) {
+ symbols = getOwnPropertySymbols(from);
+ for (var i = 0; i < symbols.length; i++) {
+ if (propIsEnumerable.call(from, symbols[i])) {
+ to[symbols[i]] = from[symbols[i]];
+ }
+ }
+ }
+ }
+
+ return to;
+};
+
+
+/***/ }),
+/* 16 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(13);
+
+var DOMProperty = __webpack_require__(67);
+var ReactDOMComponentFlags = __webpack_require__(216);
+
+var invariant = __webpack_require__(9);
+
+var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
+var Flags = ReactDOMComponentFlags;
+
+var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
+
+/**
+ * Check if a given node should be cached.
+ */
+function shouldPrecacheNode(node, nodeID) {
+ return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ';
+}
+
+/**
+ * Drill down (through composites and empty components) until we get a host or
+ * host text component.
+ *
+ * This is pretty polymorphic but unavoidable with the current structure we have
+ * for `_renderedChildren`.
+ */
+function getRenderedHostOrTextFromComponent(component) {
+ var rendered;
+ while (rendered = component._renderedComponent) {
+ component = rendered;
+ }
+ return component;
+}
+
+/**
+ * Populate `_hostNode` on the rendered host/text component with the given
+ * DOM node. The passed `inst` can be a composite.
+ */
+function precacheNode(inst, node) {
+ var hostInst = getRenderedHostOrTextFromComponent(inst);
+ hostInst._hostNode = node;
+ node[internalInstanceKey] = hostInst;
+}
+
+function uncacheNode(inst) {
+ var node = inst._hostNode;
+ if (node) {
+ delete node[internalInstanceKey];
+ inst._hostNode = null;
+ }
+}
+
+/**
+ * Populate `_hostNode` on each child of `inst`, assuming that the children
+ * match up with the DOM (element) children of `node`.
+ *
+ * We cache entire levels at once to avoid an n^2 problem where we access the
+ * children of a node sequentially and have to walk from the start to our target
+ * node every time.
+ *
+ * Since we update `_renderedChildren` and the actual DOM at (slightly)
+ * different times, we could race here and see a newer `_renderedChildren` than
+ * the DOM nodes we see. To avoid this, ReactMultiChild calls
+ * `prepareToManageChildren` before we change `_renderedChildren`, at which
+ * time the container's child nodes are always cached (until it unmounts).
+ */
+function precacheChildNodes(inst, node) {
+ if (inst._flags & Flags.hasCachedChildNodes) {
+ return;
+ }
+ var children = inst._renderedChildren;
+ var childNode = node.firstChild;
+ outer: for (var name in children) {
+ if (!children.hasOwnProperty(name)) {
+ continue;
+ }
+ var childInst = children[name];
+ var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
+ if (childID === 0) {
+ // We're currently unmounting this child in ReactMultiChild; skip it.
+ continue;
+ }
+ // We assume the child nodes are in the same order as the child instances.
+ for (; childNode !== null; childNode = childNode.nextSibling) {
+ if (shouldPrecacheNode(childNode, childID)) {
+ precacheNode(childInst, childNode);
+ continue outer;
+ }
+ }
+ // We reached the end of the DOM children without finding an ID match.
+ true ? false ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0;
+ }
+ inst._flags |= Flags.hasCachedChildNodes;
+}
+
+/**
+ * Given a DOM node, return the closest ReactDOMComponent or
+ * ReactDOMTextComponent instance ancestor.
+ */
+function getClosestInstanceFromNode(node) {
+ if (node[internalInstanceKey]) {
+ return node[internalInstanceKey];
+ }
+
+ // Walk up the tree until we find an ancestor whose instance we have cached.
+ var parents = [];
+ while (!node[internalInstanceKey]) {
+ parents.push(node);
+ if (node.parentNode) {
+ node = node.parentNode;
+ } else {
+ // Top of the tree. This node must not be part of a React tree (or is
+ // unmounted, potentially).
+ return null;
+ }
+ }
+
+ var closest;
+ var inst;
+ for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {
+ closest = inst;
+ if (parents.length) {
+ precacheChildNodes(inst, node);
+ }
+ }
+
+ return closest;
+}
+
+/**
+ * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
+ * instance, or null if the node was not rendered by this React.
+ */
+function getInstanceFromNode(node) {
+ var inst = getClosestInstanceFromNode(node);
+ if (inst != null && inst._hostNode === node) {
+ return inst;
+ } else {
+ return null;
+ }
+}
+
+/**
+ * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
+ * DOM node.
+ */
+function getNodeFromInstance(inst) {
+ // Without this first invariant, passing a non-DOM-component triggers the next
+ // invariant for a missing parent, which is super confusing.
+ !(inst._hostNode !== undefined) ? false ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
+
+ if (inst._hostNode) {
+ return inst._hostNode;
+ }
+
+ // Walk up the tree until we find an ancestor whose DOM node we have cached.
+ var parents = [];
+ while (!inst._hostNode) {
+ parents.push(inst);
+ !inst._hostParent ? false ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0;
+ inst = inst._hostParent;
+ }
+
+ // Now parents contains each ancestor that does *not* have a cached native
+ // node, and `inst` is the deepest ancestor that does.
+ for (; parents.length; inst = parents.pop()) {
+ precacheChildNodes(inst, inst._hostNode);
+ }
+
+ return inst._hostNode;
+}
+
+var ReactDOMComponentTree = {
+ getClosestInstanceFromNode: getClosestInstanceFromNode,
+ getInstanceFromNode: getInstanceFromNode,
+ getNodeFromInstance: getNodeFromInstance,
+ precacheChildNodes: precacheChildNodes,
+ precacheNode: precacheNode,
+ uncacheNode: uncacheNode
+};
+
+module.exports = ReactDOMComponentTree;
+
+/***/ }),
+/* 17 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2014-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
+
+
+
+/**
+ * Similar to invariant but only logs a warning if the condition is not met.
+ * This can be used to log issues in development environments in critical
+ * paths. Removing the logging code for production environments will keep the
+ * same logic and follow the same code paths.
+ */
+
+var warning = function() {};
+
+if (false) {
+ warning = function(condition, format, args) {
+ var len = arguments.length;
+ args = new Array(len > 2 ? len - 2 : 0);
+ for (var key = 2; key < len; key++) {
+ args[key - 2] = arguments[key];
+ }
+ if (format === undefined) {
+ throw new Error(
+ '`warning(condition, format, ...args)` requires a warning ' +
+ 'message argument'
+ );
+ }
+
+ if (format.length < 10 || (/^[s\W]*$/).test(format)) {
+ throw new Error(
+ 'The warning format should be able to uniquely identify this ' +
+ 'warning. Please, use a more descriptive format than: ' + format
+ );
+ }
+
+ if (!condition) {
+ var argIndex = 0;
+ var message = 'Warning: ' +
+ format.replace(/%s/g, function() {
+ return args[argIndex++];
+ });
+ if (typeof console !== 'undefined') {
+ console.error(message);
+ }
+ try {
+ // This error was thrown as a convenience so that you can use this stack
+ // to find the callsite that caused this warning to fire.
+ throw new Error(message);
+ } catch(x) {}
+ }
+ };
+}
+
+module.exports = warning;
+
+
+/***/ }),
+/* 18 */
+/***/ (function(module, exports) {
+
+var core = module.exports = { version: '2.5.0' };
+if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
+
+
+/***/ }),
+/* 19 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+module.exports = __webpack_require__(354);
+
+
+/***/ }),
+/* 20 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
+
+
+
+/**
+ * Use invariant() to assert state which your program assumes to be true.
+ *
+ * Provide sprintf-style format (only %s is supported) and arguments
+ * to provide information about what broke and what you were
+ * expecting.
+ *
+ * The invariant message will be stripped in production, but the invariant
+ * will remain to ensure logic does not differ in production.
+ */
+
+var invariant = function(condition, format, a, b, c, d, e, f) {
+ if (false) {
+ if (format === undefined) {
+ throw new Error('invariant requires an error message argument');
+ }
+ }
+
+ if (!condition) {
+ var error;
+ if (format === undefined) {
+ error = new Error(
+ 'Minified exception occurred; use the non-minified dev environment ' +
+ 'for the full error message and additional helpful warnings.'
+ );
+ } else {
+ var args = [a, b, c, d, e, f];
+ var argIndex = 0;
+ error = new Error(
+ format.replace(/%s/g, function() { return args[argIndex++]; })
+ );
+ error.name = 'Invariant Violation';
+ }
+
+ error.framesToPop = 1; // we don't care about invariant's own frame
+ throw error;
+ }
+};
+
+module.exports = invariant;
+
+
+/***/ }),
+/* 21 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
+
+/**
+ * Simple, lightweight module assisting with the detection and context of
+ * Worker. Helps avoid circular dependencies and allows code to reason about
+ * whether or not they are in a Worker, even if they never include the main
+ * `ReactWorker` dependency.
+ */
+var ExecutionEnvironment = {
+
+ canUseDOM: canUseDOM,
+
+ canUseWorkers: typeof Worker !== 'undefined',
+
+ canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
+
+ canUseViewport: canUseDOM && !!window.screen,
+
+ isInWorker: !canUseDOM // For now, this is true - might change in the future.
+
+};
+
+module.exports = ExecutionEnvironment;
+
+/***/ }),
+/* 22 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var store = __webpack_require__(137)('wks');
+var uid = __webpack_require__(100);
+var Symbol = __webpack_require__(23).Symbol;
+var USE_SYMBOL = typeof Symbol == 'function';
+
+var $exports = module.exports = function (name) {
+ return store[name] || (store[name] =
+ USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
+};
+
+$exports.store = store;
+
+
+/***/ }),
+/* 23 */
+/***/ (function(module, exports) {
+
+// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+var global = module.exports = typeof window != 'undefined' && window.Math == Math
+ ? window : typeof self != 'undefined' && self.Math == Math ? self
+ // eslint-disable-next-line no-new-func
+ : Function('return this')();
+if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
+
+
+/***/ }),
+/* 24 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
+
+function makeEmptyFunction(arg) {
+ return function () {
+ return arg;
+ };
+}
+
+/**
+ * This function accepts and discards inputs; it has no side effects. This is
+ * primarily useful idiomatically for overridable function endpoints which
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
+ */
+var emptyFunction = function emptyFunction() {};
+
+emptyFunction.thatReturns = makeEmptyFunction;
+emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
+emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
+emptyFunction.thatReturnsNull = makeEmptyFunction(null);
+emptyFunction.thatReturnsThis = function () {
+ return this;
+};
+emptyFunction.thatReturnsArgument = function (arg) {
+ return arg;
+};
+
+module.exports = emptyFunction;
+
+/***/ }),
+/* 25 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _shouldUpdate = __webpack_require__(741);
+
+var _shouldUpdate2 = _interopRequireDefault(_shouldUpdate);
+
+var _shallowEqual = __webpack_require__(58);
+
+var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
+
+var _createHelper = __webpack_require__(318);
+
+var _createHelper2 = _interopRequireDefault(_createHelper);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var pure = (0, _shouldUpdate2.default)(function (props, nextProps) {
+ return !(0, _shallowEqual2.default)(props, nextProps);
+});
+
+exports.default = (0, _createHelper2.default)(pure, 'pure', true, true);
+
+/***/ }),
+/* 26 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = undefined;
+
+var _SvgIcon = __webpack_require__(746);
+
+var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _SvgIcon2.default;
+
+/***/ }),
+/* 27 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+exports.connect = exports.Provider = undefined;
+
+var _Provider = __webpack_require__(463);
+
+var _Provider2 = _interopRequireDefault(_Provider);
+
+var _connect = __webpack_require__(464);
+
+var _connect2 = _interopRequireDefault(_connect);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+exports.Provider = _Provider2["default"];
+exports.connect = _connect2["default"];
+
+/***/ }),
+/* 28 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var global = __webpack_require__(23);
+var core = __webpack_require__(18);
+var ctx = __webpack_require__(61);
+var hide = __webpack_require__(50);
+var PROTOTYPE = 'prototype';
+
+var $export = function (type, name, source) {
+ var IS_FORCED = type & $export.F;
+ var IS_GLOBAL = type & $export.G;
+ var IS_STATIC = type & $export.S;
+ var IS_PROTO = type & $export.P;
+ var IS_BIND = type & $export.B;
+ var IS_WRAP = type & $export.W;
+ var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
+ var expProto = exports[PROTOTYPE];
+ var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
+ var key, own, out;
+ if (IS_GLOBAL) source = name;
+ for (key in source) {
+ // contains in native
+ own = !IS_FORCED && target && target[key] !== undefined;
+ if (own && key in exports) continue;
+ // export native or passed
+ out = own ? target[key] : source[key];
+ // prevent global pollution for namespaces
+ exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
+ // bind timers to global for call from export context
+ : IS_BIND && own ? ctx(out, global)
+ // wrap global constructors for prevent change them in library
+ : IS_WRAP && target[key] == out ? (function (C) {
+ var F = function (a, b, c) {
+ if (this instanceof C) {
+ switch (arguments.length) {
+ case 0: return new C();
+ case 1: return new C(a);
+ case 2: return new C(a, b);
+ } return new C(a, b, c);
+ } return C.apply(this, arguments);
+ };
+ F[PROTOTYPE] = C[PROTOTYPE];
+ return F;
+ // make static versions for prototype methods
+ })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
+ // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
+ if (IS_PROTO) {
+ (exports.virtual || (exports.virtual = {}))[key] = out;
+ // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
+ if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
+ }
+ }
+};
+// type bitmap
+$export.F = 1; // forced
+$export.G = 2; // global
+$export.S = 4; // static
+$export.P = 8; // proto
+$export.B = 16; // bind
+$export.W = 32; // wrap
+$export.U = 64; // safe
+$export.R = 128; // real proto method for `library`
+module.exports = $export;
+
+
+/***/ }),
+/* 29 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2016-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
+
+
+
+// Trust the developer to only use ReactInstrumentation with a __DEV__ check
+
+var debugTool = null;
+
+if (false) {
+ var ReactDebugTool = require('./ReactDebugTool');
+ debugTool = ReactDebugTool;
+}
+
+module.exports = { debugTool: debugTool };
+
+/***/ }),
+/* 30 */
+/***/ (function(module, exports) {
+
+// Source: http://jsfiddle.net/vWx8V/
+// http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes
+
+/**
+ * Conenience method returns corresponding value for given keyName or keyCode.
+ *
+ * @param {Mixed} keyCode {Number} or keyName {String}
+ * @return {Mixed}
+ * @api public
+ */
+
+exports = module.exports = function(searchInput) {
+ // Keyboard Events
+ if (searchInput && 'object' === typeof searchInput) {
+ var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode
+ if (hasKeyCode) searchInput = hasKeyCode
+ }
+
+ // Numbers
+ if ('number' === typeof searchInput) return names[searchInput]
+
+ // Everything else (cast to string)
+ var search = String(searchInput)
+
+ // check codes
+ var foundNamedKey = codes[search.toLowerCase()]
+ if (foundNamedKey) return foundNamedKey
+
+ // check aliases
+ var foundNamedKey = aliases[search.toLowerCase()]
+ if (foundNamedKey) return foundNamedKey
+
+ // weird character?
+ if (search.length === 1) return search.charCodeAt(0)
+
+ return undefined
+}
+
+/**
+ * Get by name
+ *
+ * exports.code['enter'] // => 13
+ */
+
+var codes = exports.code = exports.codes = {
+ 'backspace': 8,
+ 'tab': 9,
+ 'enter': 13,
+ 'shift': 16,
+ 'ctrl': 17,
+ 'alt': 18,
+ 'pause/break': 19,
+ 'caps lock': 20,
+ 'esc': 27,
+ 'space': 32,
+ 'page up': 33,
+ 'page down': 34,
+ 'end': 35,
+ 'home': 36,
+ 'left': 37,
+ 'up': 38,
+ 'right': 39,
+ 'down': 40,
+ 'insert': 45,
+ 'delete': 46,
+ 'command': 91,
+ 'left command': 91,
+ 'right command': 93,
+ 'numpad *': 106,
+ 'numpad +': 107,
+ 'numpad -': 109,
+ 'numpad .': 110,
+ 'numpad /': 111,
+ 'num lock': 144,
+ 'scroll lock': 145,
+ 'my computer': 182,
+ 'my calculator': 183,
+ ';': 186,
+ '=': 187,
+ ',': 188,
+ '-': 189,
+ '.': 190,
+ '/': 191,
+ '`': 192,
+ '[': 219,
+ '\\': 220,
+ ']': 221,
+ "'": 222
+}
+
+// Helper aliases
+
+var aliases = exports.aliases = {
+ 'windows': 91,
+ '⇧': 16,
+ '⌥': 18,
+ '⌃': 17,
+ '⌘': 91,
+ 'ctl': 17,
+ 'control': 17,
+ 'option': 18,
+ 'pause': 19,
+ 'break': 19,
+ 'caps': 20,
+ 'return': 13,
+ 'escape': 27,
+ 'spc': 32,
+ 'pgup': 33,
+ 'pgdn': 34,
+ 'ins': 45,
+ 'del': 46,
+ 'cmd': 91
+}
+
+
+/*!
+ * Programatically add the following
+ */
+
+// lower case chars
+for (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32
+
+// numbers
+for (var i = 48; i < 58; i++) codes[i - 48] = i
+
+// function keys
+for (i = 1; i < 13; i++) codes['f'+i] = i + 111
+
+// numpad keys
+for (i = 0; i < 10; i++) codes['numpad '+i] = i + 96
+
+/**
+ * Get by code
+ *
+ * exports.name[13] // => 'Enter'
+ */
+
+var names = exports.names = exports.title = {} // title for backward compat
+
+// Create reverse mapping
+for (i in codes) names[codes[i]] = i
+
+// Add aliases
+for (var alias in aliases) {
+ codes[alias] = aliases[alias]
+}
+
+
+/***/ }),
+/* 31 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(13),
+ _assign = __webpack_require__(15);
+
+var CallbackQueue = __webpack_require__(220);
+var PooledClass = __webpack_require__(53);
+var ReactFeatureFlags = __webpack_require__(221);
+var ReactReconciler = __webpack_require__(70);
+var Transaction = __webpack_require__(104);
+
+var invariant = __webpack_require__(9);
+
+var dirtyComponents = [];
+var updateBatchNumber = 0;
+var asapCallbackQueue = CallbackQueue.getPooled();
+var asapEnqueued = false;
+
+var batchingStrategy = null;
+
+function ensureInjected() {
+ !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? false ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
+}
+
+var NESTED_UPDATES = {
+ initialize: function () {
+ this.dirtyComponentsLength = dirtyComponents.length;
+ },
+ close: function () {
+ if (this.dirtyComponentsLength !== dirtyComponents.length) {
+ // Additional updates were enqueued by componentDidUpdate handlers or
+ // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run
+ // these new updates so that if A's componentDidUpdate calls setState on
+ // B, B will update before the callback A's updater provided when calling
+ // setState.
+ dirtyComponents.splice(0, this.dirtyComponentsLength);
+ flushBatchedUpdates();
+ } else {
+ dirtyComponents.length = 0;
+ }
+ }
+};
+
+var UPDATE_QUEUEING = {
+ initialize: function () {
+ this.callbackQueue.reset();
+ },
+ close: function () {
+ this.callbackQueue.notifyAll();
+ }
+};
+
+var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
+
+function ReactUpdatesFlushTransaction() {
+ this.reinitializeTransaction();
+ this.dirtyComponentsLength = null;
+ this.callbackQueue = CallbackQueue.getPooled();
+ this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
+ /* useCreateElement */true);
+}
+
+_assign(ReactUpdatesFlushTransaction.prototype, Transaction, {
+ getTransactionWrappers: function () {
+ return TRANSACTION_WRAPPERS;
+ },
+
+ destructor: function () {
+ this.dirtyComponentsLength = null;
+ CallbackQueue.release(this.callbackQueue);
+ this.callbackQueue = null;
+ ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
+ this.reconcileTransaction = null;
+ },
+
+ perform: function (method, scope, a) {
+ // Essentially calls `this.reconcileTransaction.perform(method, scope, a)`
+ // with this transaction's wrappers around it.
+ return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
+ }
+});
+
+PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
+
+function batchedUpdates(callback, a, b, c, d, e) {
+ ensureInjected();
+ return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
+}
+
+/**
+ * Array comparator for ReactComponents by mount ordering.
+ *
+ * @param {ReactComponent} c1 first component you're comparing
+ * @param {ReactComponent} c2 second component you're comparing
+ * @return {number} Return value usable by Array.prototype.sort().
+ */
+function mountOrderComparator(c1, c2) {
+ return c1._mountOrder - c2._mountOrder;
+}
+
+function runBatchedUpdates(transaction) {
+ var len = transaction.dirtyComponentsLength;
+ !(len === dirtyComponents.length) ? false ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;
+
+ // Since reconciling a component higher in the owner hierarchy usually (not
+ // always -- see shouldComponentUpdate()) will reconcile children, reconcile
+ // them before their children by sorting the array.
+ dirtyComponents.sort(mountOrderComparator);
+
+ // Any updates enqueued while reconciling must be performed after this entire
+ // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and
+ // C, B could update twice in a single batch if C's render enqueues an update
+ // to B (since B would have already updated, we should skip it, and the only
+ // way we can know to do so is by checking the batch counter).
+ updateBatchNumber++;
+
+ for (var i = 0; i < len; i++) {
+ // If a component is unmounted before pending changes apply, it will still
+ // be here, but we assume that it has cleared its _pendingCallbacks and
+ // that performUpdateIfNecessary is a noop.
+ var component = dirtyComponents[i];
+
+ // If performUpdateIfNecessary happens to enqueue any new updates, we
+ // shouldn't execute the callbacks until the next render happens, so
+ // stash the callbacks first
+ var callbacks = component._pendingCallbacks;
+ component._pendingCallbacks = null;
+
+ var markerName;
+ if (ReactFeatureFlags.logTopLevelRenders) {
+ var namedComponent = component;
+ // Duck type TopLevelWrapper. This is probably always true.
+ if (component._currentElement.type.isReactTopLevelWrapper) {
+ namedComponent = component._renderedComponent;
+ }
+ markerName = 'React update: ' + namedComponent.getName();
+ console.time(markerName);
+ }
+
+ ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
+
+ if (markerName) {
+ console.timeEnd(markerName);
+ }
+
+ if (callbacks) {
+ for (var j = 0; j < callbacks.length; j++) {
+ transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
+ }
+ }
+ }
+}
+
+var flushBatchedUpdates = function () {
+ // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents
+ // array and perform any updates enqueued by mount-ready handlers (i.e.,
+ // componentDidUpdate) but we need to check here too in order to catch
+ // updates enqueued by setState callbacks and asap calls.
+ while (dirtyComponents.length || asapEnqueued) {
+ if (dirtyComponents.length) {
+ var transaction = ReactUpdatesFlushTransaction.getPooled();
+ transaction.perform(runBatchedUpdates, null, transaction);
+ ReactUpdatesFlushTransaction.release(transaction);
+ }
+
+ if (asapEnqueued) {
+ asapEnqueued = false;
+ var queue = asapCallbackQueue;
+ asapCallbackQueue = CallbackQueue.getPooled();
+ queue.notifyAll();
+ CallbackQueue.release(queue);
+ }
+ }
+};
+
+/**
+ * Mark a component as needing a rerender, adding an optional callback to a
+ * list of functions which will be executed once the rerender occurs.
+ */
+function enqueueUpdate(component) {
+ ensureInjected();
+
+ // Various parts of our code (such as ReactCompositeComponent's
+ // _renderValidatedComponent) assume that calls to render aren't nested;
+ // verify that that's the case. (This is called by each top-level update
+ // function, like setState, forceUpdate, etc.; creation and
+ // destruction of top-level components is guarded in ReactMount.)
+
+ if (!batchingStrategy.isBatchingUpdates) {
+ batchingStrategy.batchedUpdates(enqueueUpdate, component);
+ return;
+ }
+
+ dirtyComponents.push(component);
+ if (component._updateBatchNumber == null) {
+ component._updateBatchNumber = updateBatchNumber + 1;
+ }
+}
+
+/**
+ * Enqueue a callback to be run at the end of the current batching cycle. Throws
+ * if no updates are currently being performed.
+ */
+function asap(callback, context) {
+ !batchingStrategy.isBatchingUpdates ? false ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0;
+ asapCallbackQueue.enqueue(callback, context);
+ asapEnqueued = true;
+}
+
+var ReactUpdatesInjection = {
+ injectReconcileTransaction: function (ReconcileTransaction) {
+ !ReconcileTransaction ? false ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
+ ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
+ },
+
+ injectBatchingStrategy: function (_batchingStrategy) {
+ !_batchingStrategy ? false ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
+ !(typeof _batchingStrategy.batchedUpdates === 'function') ? false ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
+ !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? false ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
+ batchingStrategy = _batchingStrategy;
+ }
+};
+
+var ReactUpdates = {
+ /**
+ * React references `ReactReconcileTransaction` using this property in order
+ * to allow dependency injection.
+ *
+ * @internal
+ */
+ ReactReconcileTransaction: null,
+
+ batchedUpdates: batchedUpdates,
+ enqueueUpdate: enqueueUpdate,
+ flushBatchedUpdates: flushBatchedUpdates,
+ injection: ReactUpdatesInjection,
+ asap: asap
+};
+
+module.exports = ReactUpdates;
+
+/***/ }),
+/* 32 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(253);
+
+
+/** Detect free variable `self`. */
+var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+/** Used as a reference to the global object. */
+var root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */] || freeSelf || Function('return this')();
+
+/* harmony default export */ __webpack_exports__["a"] = (root);
+
+
+/***/ }),
+/* 33 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+var isArray = Array.isArray;
+
+/* harmony default export */ __webpack_exports__["a"] = (isArray);
+
+
+/***/ }),
+/* 34 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = undefined;
+
+var _Paper = __webpack_require__(755);
+
+var _Paper2 = _interopRequireDefault(_Paper);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _Paper2.default;
+
+/***/ }),
+/* 35 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var anObject = __webpack_require__(36);
+var IE8_DOM_DEFINE = __webpack_require__(206);
+var toPrimitive = __webpack_require__(132);
+var dP = Object.defineProperty;
+
+exports.f = __webpack_require__(44) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
+ anObject(O);
+ P = toPrimitive(P, true);
+ anObject(Attributes);
+ if (IE8_DOM_DEFINE) try {
+ return dP(O, P, Attributes);
+ } catch (e) { /* empty */ }
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
+ if ('value' in Attributes) O[P] = Attributes.value;
+ return O;
+};
+
+
+/***/ }),
+/* 36 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var isObject = __webpack_require__(62);
+module.exports = function (it) {
+ if (!isObject(it)) throw TypeError(it + ' is not an object!');
+ return it;
+};
+
+
+/***/ }),
+/* 37 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
+
+
+
+/**
+ * Keeps track of the current owner.
+ *
+ * The current owner is the component who should own any components that are
+ * currently being constructed.
+ */
+var ReactCurrentOwner = {
+ /**
+ * @internal
+ * @type {ReactComponent}
+ */
+ current: null
+};
+
+module.exports = ReactCurrentOwner;
+
+/***/ }),
+/* 38 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var _assign = __webpack_require__(15);
+
+var PooledClass = __webpack_require__(53);
+
+var emptyFunction = __webpack_require__(24);
+var warning = __webpack_require__(12);
+
+var didWarnForAddedNewProperty = false;
+var isProxySupported = typeof Proxy === 'function';
+
+var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
+
+/**
+ * @interface Event
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+var EventInterface = {
+ type: null,
+ target: null,
+ // currentTarget is set when dispatching; no use in copying it here
+ currentTarget: emptyFunction.thatReturnsNull,
+ eventPhase: null,
+ bubbles: null,
+ cancelable: null,
+ timeStamp: function (event) {
+ return event.timeStamp || Date.now();
+ },
+ defaultPrevented: null,
+ isTrusted: null
+};
+
+/**
+ * Synthetic events are dispatched by event plugins, typically in response to a
+ * top-level event delegation handler.
+ *
+ * These systems should generally use pooling to reduce the frequency of garbage
+ * collection. The system should check `isPersistent` to determine whether the
+ * event should be released into the pool after being dispatched. Users that
+ * need a persisted event should invoke `persist`.
+ *
+ * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
+ * normalizing browser quirks. Subclasses do not necessarily have to implement a
+ * DOM interface; custom application-specific events can also subclass this.
+ *
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
+ * @param {*} targetInst Marker identifying the event target.
+ * @param {object} nativeEvent Native browser event.
+ * @param {DOMEventTarget} nativeEventTarget Target node.
+ */
+function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
+ if (false) {
+ // these have a getter/setter for warnings
+ delete this.nativeEvent;
+ delete this.preventDefault;
+ delete this.stopPropagation;
+ }
+
+ this.dispatchConfig = dispatchConfig;
+ this._targetInst = targetInst;
+ this.nativeEvent = nativeEvent;
+
+ var Interface = this.constructor.Interface;
+ for (var propName in Interface) {
+ if (!Interface.hasOwnProperty(propName)) {
+ continue;
+ }
+ if (false) {
+ delete this[propName]; // this has a getter/setter for warnings
+ }
+ var normalize = Interface[propName];
+ if (normalize) {
+ this[propName] = normalize(nativeEvent);
+ } else {
+ if (propName === 'target') {
+ this.target = nativeEventTarget;
+ } else {
+ this[propName] = nativeEvent[propName];
+ }
+ }
+ }
+
+ var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
+ if (defaultPrevented) {
+ this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
+ } else {
+ this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
+ }
+ this.isPropagationStopped = emptyFunction.thatReturnsFalse;
+ return this;
+}
+
+_assign(SyntheticEvent.prototype, {
+ preventDefault: function () {
+ this.defaultPrevented = true;
+ var event = this.nativeEvent;
+ if (!event) {
+ return;
+ }
+
+ if (event.preventDefault) {
+ event.preventDefault();
+ // eslint-disable-next-line valid-typeof
+ } else if (typeof event.returnValue !== 'unknown') {
+ event.returnValue = false;
+ }
+ this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
+ },
+
+ stopPropagation: function () {
+ var event = this.nativeEvent;
+ if (!event) {
+ return;
+ }
+
+ if (event.stopPropagation) {
+ event.stopPropagation();
+ // eslint-disable-next-line valid-typeof
+ } else if (typeof event.cancelBubble !== 'unknown') {
+ // The ChangeEventPlugin registers a "propertychange" event for
+ // IE. This event does not support bubbling or cancelling, and
+ // any references to cancelBubble throw "Member not found". A
+ // typeof check of "unknown" circumvents this issue (and is also
+ // IE specific).
+ event.cancelBubble = true;
+ }
+
+ this.isPropagationStopped = emptyFunction.thatReturnsTrue;
+ },
+
+ /**
+ * We release all dispatched `SyntheticEvent`s after each event loop, adding
+ * them back into the pool. This allows a way to hold onto a reference that
+ * won't be added back into the pool.
+ */
+ persist: function () {
+ this.isPersistent = emptyFunction.thatReturnsTrue;
+ },
+
+ /**
+ * Checks if this event should be released back into the pool.
+ *
+ * @return {boolean} True if this should not be released, false otherwise.
+ */
+ isPersistent: emptyFunction.thatReturnsFalse,
+
+ /**
+ * `PooledClass` looks for `destructor` on each instance it releases.
+ */
+ destructor: function () {
+ var Interface = this.constructor.Interface;
+ for (var propName in Interface) {
+ if (false) {
+ Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
+ } else {
+ this[propName] = null;
+ }
+ }
+ for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
+ this[shouldBeReleasedProperties[i]] = null;
+ }
+ if (false) {
+ Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
+ Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
+ Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
+ }
+ }
+});
+
+SyntheticEvent.Interface = EventInterface;
+
+if (false) {
+ if (isProxySupported) {
+ /*eslint-disable no-func-assign */
+ SyntheticEvent = new Proxy(SyntheticEvent, {
+ construct: function (target, args) {
+ return this.apply(target, Object.create(target.prototype), args);
+ },
+ apply: function (constructor, that, args) {
+ return new Proxy(constructor.apply(that, args), {
+ set: function (target, prop, value) {
+ if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
+ process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
+ didWarnForAddedNewProperty = true;
+ }
+ target[prop] = value;
+ return true;
+ }
+ });
+ }
+ });
+ /*eslint-enable no-func-assign */
+ }
+}
+/**
+ * Helper to reduce boilerplate when creating subclasses.
+ *
+ * @param {function} Class
+ * @param {?object} Interface
+ */
+SyntheticEvent.augmentClass = function (Class, Interface) {
+ var Super = this;
+
+ var E = function () {};
+ E.prototype = Super.prototype;
+ var prototype = new E();
+
+ _assign(prototype, Class.prototype);
+ Class.prototype = prototype;
+ Class.prototype.constructor = Class;
+
+ Class.Interface = _assign({}, Super.Interface, Interface);
+ Class.augmentClass = Super.augmentClass;
+
+ PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
+};
+
+PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);
+
+module.exports = SyntheticEvent;
+
+/**
+ * Helper to nullify syntheticEvent instance properties when destructing
+ *
+ * @param {object} SyntheticEvent
+ * @param {String} propName
+ * @return {object} defineProperty object
+ */
+function getPooledWarningPropertyDefinition(propName, getVal) {
+ var isFunction = typeof getVal === 'function';
+ return {
+ configurable: true,
+ set: set,
+ get: get
+ };
+
+ function set(val) {
+ var action = isFunction ? 'setting the method' : 'setting the property';
+ warn(action, 'This is effectively a no-op');
+ return val;
+ }
+
+ function get() {
+ var action = isFunction ? 'accessing the method' : 'accessing the property';
+ var result = isFunction ? 'This is a no-op function' : 'This is set to null';
+ warn(action, result);
+ return getVal;
+ }
+
+ function warn(action, result) {
+ var warningCondition = false;
+ false ? warning(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
+ }
+}
+
+/***/ }),
+/* 39 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var React = __webpack_require__(0);
+var factory = __webpack_require__(215);
+
+if (typeof React === 'undefined') {
+ throw Error(
+ 'create-react-class could not find the React object. If you are using script tags, ' +
+ 'make sure that React is being loaded before create-react-class.'
+ );
+}
+
+// Hack to grab NoopUpdateQueue from isomorphic React
+var ReactNoopUpdateQueue = new React.Component().updater;
+
+module.exports = factory(
+ React.Component,
+ React.isValidElement,
+ ReactNoopUpdateQueue
+);
+
+
+/***/ }),
+/* 40 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+exports.default = function (prefixedValue, value, keepUnprefixed) {
+ return keepUnprefixed ? [prefixedValue, value] : prefixedValue;
+};
+
+module.exports = exports["default"];
+
+/***/ }),
+/* 41 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _react = __webpack_require__(0);
+
+var horizontal = _react.PropTypes.oneOf(['left', 'middle', 'right']);
+var vertical = _react.PropTypes.oneOf(['top', 'center', 'bottom']);
+
+exports.default = {
+
+ corners: _react.PropTypes.oneOf(['bottom-left', 'bottom-right', 'top-left', 'top-right']),
+
+ horizontal: horizontal,
+
+ vertical: vertical,
+
+ origin: _react.PropTypes.shape({
+ horizontal: horizontal,
+ vertical: vertical
+ }),
+
+ cornersAndCenter: _react.PropTypes.oneOf(['bottom-center', 'bottom-left', 'bottom-right', 'top-center', 'top-left', 'top-right']),
+
+ stringOrNumber: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]),
+
+ zDepth: _react.PropTypes.oneOf([0, 1, 2, 3, 4, 5])
+
+};
+
+/***/ }),
+/* 42 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _typeof2 = __webpack_require__(92);
+
+var _typeof3 = _interopRequireDefault(_typeof2);
+
+var _keys = __webpack_require__(79);
+
+var _keys2 = _interopRequireDefault(_keys);
+
+var _objectWithoutProperties2 = __webpack_require__(8);
+
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
+var _assign = __webpack_require__(49);
+
+var _assign2 = _interopRequireDefault(_assign);
+
+exports.withOptions = withOptions;
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _propTypes = __webpack_require__(14);
+
+var _propTypes2 = _interopRequireDefault(_propTypes);
+
+var _shallowEqual = __webpack_require__(87);
+
+var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
+
+var _warning = __webpack_require__(17);
+
+var _warning2 = _interopRequireDefault(_warning);
+
+var _supports = __webpack_require__(752);
+
+var supports = _interopRequireWildcard(_supports);
+
+function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var defaultEventOptions = {
+ capture: false,
+ passive: false
+};
+/* eslint-disable prefer-spread */
+
+function mergeDefaultEventOptions(options) {
+ return (0, _assign2.default)({}, defaultEventOptions, options);
+}
+
+function getEventListenerArgs(eventName, callback, options) {
+ var args = [eventName, callback];
+ args.push(supports.passiveOption ? options : options.capture);
+ return args;
+}
+
+function on(target, eventName, callback, options) {
+ if (supports.addEventListener) {
+ target.addEventListener.apply(target, getEventListenerArgs(eventName, callback, options));
+ } else if (supports.attachEvent) {
+ // IE8+ Support
+ target.attachEvent('on' + eventName, function () {
+ callback.call(target);
+ });
+ }
+}
+
+function off(target, eventName, callback, options) {
+ if (supports.removeEventListener) {
+ target.removeEventListener.apply(target, getEventListenerArgs(eventName, callback, options));
+ } else if (supports.detachEvent) {
+ // IE8+ Support
+ target.detachEvent('on' + eventName, callback);
+ }
+}
+
+function forEachListener(props, iteratee) {
+ var children = props.children,
+ target = props.target,
+ eventProps = (0, _objectWithoutProperties3.default)(props, ['children', 'target']);
+
+
+ (0, _keys2.default)(eventProps).forEach(function (name) {
+ if (name.substring(0, 2) !== 'on') {
+ return;
+ }
+
+ var prop = eventProps[name];
+ var type = typeof prop === 'undefined' ? 'undefined' : (0, _typeof3.default)(prop);
+ var isObject = type === 'object';
+ var isFunction = type === 'function';
+
+ if (!isObject && !isFunction) {
+ return;
+ }
+
+ var capture = name.substr(-7).toLowerCase() === 'capture';
+ var eventName = name.substring(2).toLowerCase();
+ eventName = capture ? eventName.substring(0, eventName.length - 7) : eventName;
+
+ if (isObject) {
+ iteratee(eventName, prop.handler, prop.options);
+ } else {
+ iteratee(eventName, prop, mergeDefaultEventOptions({ capture: capture }));
+ }
+ });
+}
+
+function withOptions(handler, options) {
+ false ? (0, _warning2.default)(options, 'react-event-listener: Should be specified options in withOptions.') : void 0;
+
+ return {
+ handler: handler,
+ options: mergeDefaultEventOptions(options)
+ };
+}
+
+var EventListener = function (_Component) {
+ (0, _inherits3.default)(EventListener, _Component);
+
+ function EventListener() {
+ (0, _classCallCheck3.default)(this, EventListener);
+ return (0, _possibleConstructorReturn3.default)(this, (EventListener.__proto__ || (0, _getPrototypeOf2.default)(EventListener)).apply(this, arguments));
+ }
+
+ (0, _createClass3.default)(EventListener, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ this.addListeners();
+ }
+ }, {
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps) {
+ return !(0, _shallowEqual2.default)(this.props, nextProps);
+ }
+ }, {
+ key: 'componentWillUpdate',
+ value: function componentWillUpdate() {
+ this.removeListeners();
+ }
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate() {
+ this.addListeners();
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ this.removeListeners();
+ }
+ }, {
+ key: 'addListeners',
+ value: function addListeners() {
+ this.applyListeners(on);
+ }
+ }, {
+ key: 'removeListeners',
+ value: function removeListeners() {
+ this.applyListeners(off);
+ }
+ }, {
+ key: 'applyListeners',
+ value: function applyListeners(onOrOff) {
+ var target = this.props.target;
+
+
+ if (target) {
+ var element = target;
+
+ if (typeof target === 'string') {
+ element = window[target];
+ }
+
+ forEachListener(this.props, onOrOff.bind(null, element));
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ return this.props.children || null;
+ }
+ }]);
+ return EventListener;
+}(_react.Component);
+
+ false ? EventListener.propTypes = {
+ /**
+ * You can provide a single child too.
+ */
+ children: _propTypes2.default.element,
+ /**
+ * The DOM target to listen to.
+ */
+ target: _propTypes2.default.oneOfType([_propTypes2.default.object, _propTypes2.default.string]).isRequired
+} : void 0;
+exports.default = EventListener;
+
+/***/ }),
+/* 43 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+exports.default = createComponent;
+
+var _react = __webpack_require__(0);
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+
+/**
+ * Creates a component class that renders the given Material UI component
+ *
+ * @param MaterialUIComponent The material ui component to render
+ * @param mapProps A mapping of props provided by redux-form to the props the Material UI
+ * component needs
+ */
+function createComponent(MaterialUIComponent, mapProps) {
+ var InputComponent = function (_Component) {
+ _inherits(InputComponent, _Component);
+
+ function InputComponent() {
+ _classCallCheck(this, InputComponent);
+
+ return _possibleConstructorReturn(this, (InputComponent.__proto__ || Object.getPrototypeOf(InputComponent)).apply(this, arguments));
+ }
+
+ _createClass(InputComponent, [{
+ key: 'getRenderedComponent',
+ value: function getRenderedComponent() {
+ return this.refs.component;
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ return (0, _react.createElement)(MaterialUIComponent, _extends({}, mapProps(this.props), {
+ ref: 'component'
+ }));
+ }
+ }]);
+
+ return InputComponent;
+ }(_react.Component);
+
+ InputComponent.displayName = 'ReduxFormMaterialUI' + MaterialUIComponent.name;
+ return InputComponent;
+}
+
+/***/ }),
+/* 44 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// Thank's IE8 for his funny defineProperty
+module.exports = !__webpack_require__(63)(function () {
+ return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
+});
+
+
+/***/ }),
+/* 45 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony export (immutable) */ __webpack_exports__["c"] = isReactChildren;
+/* harmony export (immutable) */ __webpack_exports__["a"] = createRouteFromReactElement;
+/* unused harmony export createRoutesFromReactChildren */
+/* harmony export (immutable) */ __webpack_exports__["b"] = createRoutes;
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+
+
+function isValidChild(object) {
+ return object == null || __WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(object);
+}
+
+function isReactChildren(object) {
+ return isValidChild(object) || Array.isArray(object) && object.every(isValidChild);
+}
+
+function createRoute(defaultProps, props) {
+ return _extends({}, defaultProps, props);
+}
+
+function createRouteFromReactElement(element) {
+ var type = element.type;
+ var route = createRoute(type.defaultProps, element.props);
+
+ if (route.children) {
+ var childRoutes = createRoutesFromReactChildren(route.children, route);
+
+ if (childRoutes.length) route.childRoutes = childRoutes;
+
+ delete route.children;
+ }
+
+ return route;
+}
+
+/**
+ * Creates and returns a routes object from the given ReactChildren. JSX
+ * provides a convenient way to visualize how routes in the hierarchy are
+ * nested.
+ *
+ * import { Route, createRoutesFromReactChildren } from 'react-router'
+ *
+ * const routes = createRoutesFromReactChildren(
+ *
+ *
+ *
+ *
+ * )
+ *
+ * Note: This method is automatically used when you provide children
+ * to a component.
+ */
+function createRoutesFromReactChildren(children, parentRoute) {
+ var routes = [];
+
+ __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (element) {
+ if (__WEBPACK_IMPORTED_MODULE_0_react___default.a.isValidElement(element)) {
+ // Component classes may have a static create* method.
+ if (element.type.createRouteFromReactElement) {
+ var route = element.type.createRouteFromReactElement(element, parentRoute);
+
+ if (route) routes.push(route);
+ } else {
+ routes.push(createRouteFromReactElement(element));
+ }
+ }
+ });
+
+ return routes;
+}
+
+/**
+ * Creates and returns an array of routes from the given object which
+ * may be a JSX route, a plain object route, or an array of either.
+ */
+function createRoutes(routes) {
+ if (isReactChildren(routes)) {
+ routes = createRoutesFromReactChildren(routes);
+ } else if (routes && !Array.isArray(routes)) {
+ routes = [routes];
+ }
+
+ return routes;
+}
+
+/***/ }),
+/* 46 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+exports.createPath = exports.parsePath = exports.getQueryStringValueFromPath = exports.stripQueryStringValueFromPath = exports.addQueryStringValueToPath = undefined;
+
+var _warning = __webpack_require__(17);
+
+var _warning2 = _interopRequireDefault(_warning);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var addQueryStringValueToPath = exports.addQueryStringValueToPath = function addQueryStringValueToPath(path, key, value) {
+ var _parsePath = parsePath(path),
+ pathname = _parsePath.pathname,
+ search = _parsePath.search,
+ hash = _parsePath.hash;
+
+ return createPath({
+ pathname: pathname,
+ search: search + (search.indexOf('?') === -1 ? '?' : '&') + key + '=' + value,
+ hash: hash
+ });
+};
+
+var stripQueryStringValueFromPath = exports.stripQueryStringValueFromPath = function stripQueryStringValueFromPath(path, key) {
+ var _parsePath2 = parsePath(path),
+ pathname = _parsePath2.pathname,
+ search = _parsePath2.search,
+ hash = _parsePath2.hash;
+
+ return createPath({
+ pathname: pathname,
+ search: search.replace(new RegExp('([?&])' + key + '=[a-zA-Z0-9]+(&?)'), function (match, prefix, suffix) {
+ return prefix === '?' ? prefix : suffix;
+ }),
+ hash: hash
+ });
+};
+
+var getQueryStringValueFromPath = exports.getQueryStringValueFromPath = function getQueryStringValueFromPath(path, key) {
+ var _parsePath3 = parsePath(path),
+ search = _parsePath3.search;
+
+ var match = search.match(new RegExp('[?&]' + key + '=([a-zA-Z0-9]+)'));
+ return match && match[1];
+};
+
+var extractPath = function extractPath(string) {
+ var match = string.match(/^(https?:)?\/\/[^\/]*/);
+ return match == null ? string : string.substring(match[0].length);
+};
+
+var parsePath = exports.parsePath = function parsePath(path) {
+ var pathname = extractPath(path);
+ var search = '';
+ var hash = '';
+
+ false ? (0, _warning2.default)(path === pathname, 'A path must be pathname + search + hash only, not a full URL like "%s"', path) : void 0;
+
+ var hashIndex = pathname.indexOf('#');
+ if (hashIndex !== -1) {
+ hash = pathname.substring(hashIndex);
+ pathname = pathname.substring(0, hashIndex);
+ }
+
+ var searchIndex = pathname.indexOf('?');
+ if (searchIndex !== -1) {
+ search = pathname.substring(searchIndex);
+ pathname = pathname.substring(0, searchIndex);
+ }
+
+ if (pathname === '') pathname = '/';
+
+ return {
+ pathname: pathname,
+ search: search,
+ hash: hash
+ };
+};
+
+var createPath = exports.createPath = function createPath(location) {
+ if (location == null || typeof location === 'string') return location;
+
+ var basename = location.basename,
+ pathname = location.pathname,
+ search = location.search,
+ hash = location.hash;
+
+ var path = (basename || '') + pathname;
+
+ if (search && search !== '?') path += search;
+
+ if (hash) path += hash;
+
+ return path;
+};
+
+/***/ }),
+/* 47 */
+/***/ (function(module, exports) {
+
+var g;
+
+// This works in non-strict mode
+g = (function() {
+ return this;
+})();
+
+try {
+ // This works if eval is allowed (see CSP)
+ g = g || Function("return this")() || (1,eval)("this");
+} catch(e) {
+ // This works if the window reference is available
+ if(typeof window === "object")
+ g = window;
+}
+
+// g can still be undefined, but nothing to do about it...
+// We return undefined, instead of nothing here, so it's
+// easier to handle this case. if(!global) { ...}
+
+module.exports = g;
+
+
+/***/ }),
+/* 48 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return value != null && (type == 'object' || type == 'function');
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (isObject);
+
+
+/***/ }),
+/* 49 */
+/***/ (function(module, exports, __webpack_require__) {
+
+module.exports = { "default": __webpack_require__(336), __esModule: true };
+
+/***/ }),
+/* 50 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var dP = __webpack_require__(35);
+var createDesc = __webpack_require__(82);
+module.exports = __webpack_require__(44) ? function (object, key, value) {
+ return dP.f(object, key, createDesc(1, value));
+} : function (object, key, value) {
+ object[key] = value;
+ return object;
+};
+
+
+/***/ }),
+/* 51 */
+/***/ (function(module, exports) {
+
+var hasOwnProperty = {}.hasOwnProperty;
+module.exports = function (it, key) {
+ return hasOwnProperty.call(it, key);
+};
+
+
+/***/ }),
+/* 52 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// to indexed object, toObject with fallback for non-array-like ES3 strings
+var IObject = __webpack_require__(208);
+var defined = __webpack_require__(133);
+module.exports = function (it) {
+ return IObject(defined(it));
+};
+
+
+/***/ }),
+/* 53 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(13);
+
+var invariant = __webpack_require__(9);
+
+/**
+ * Static poolers. Several custom versions for each potential number of
+ * arguments. A completely generic pooler is easy to implement, but would
+ * require accessing the `arguments` object. In each of these, `this` refers to
+ * the Class itself, not an instance. If any others are needed, simply add them
+ * here, or in their own files.
+ */
+var oneArgumentPooler = function (copyFieldsFrom) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, copyFieldsFrom);
+ return instance;
+ } else {
+ return new Klass(copyFieldsFrom);
+ }
+};
+
+var twoArgumentPooler = function (a1, a2) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, a1, a2);
+ return instance;
+ } else {
+ return new Klass(a1, a2);
+ }
+};
+
+var threeArgumentPooler = function (a1, a2, a3) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, a1, a2, a3);
+ return instance;
+ } else {
+ return new Klass(a1, a2, a3);
+ }
+};
+
+var fourArgumentPooler = function (a1, a2, a3, a4) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, a1, a2, a3, a4);
+ return instance;
+ } else {
+ return new Klass(a1, a2, a3, a4);
+ }
+};
+
+var standardReleaser = function (instance) {
+ var Klass = this;
+ !(instance instanceof Klass) ? false ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
+ instance.destructor();
+ if (Klass.instancePool.length < Klass.poolSize) {
+ Klass.instancePool.push(instance);
+ }
+};
+
+var DEFAULT_POOL_SIZE = 10;
+var DEFAULT_POOLER = oneArgumentPooler;
+
+/**
+ * Augments `CopyConstructor` to be a poolable class, augmenting only the class
+ * itself (statically) not adding any prototypical fields. Any CopyConstructor
+ * you give this may have a `poolSize` property, and will look for a
+ * prototypical `destructor` on instances.
+ *
+ * @param {Function} CopyConstructor Constructor that can be used to reset.
+ * @param {Function} pooler Customizable pooler.
+ */
+var addPoolingTo = function (CopyConstructor, pooler) {
+ // Casting as any so that flow ignores the actual implementation and trusts
+ // it to match the type we declared
+ var NewKlass = CopyConstructor;
+ NewKlass.instancePool = [];
+ NewKlass.getPooled = pooler || DEFAULT_POOLER;
+ if (!NewKlass.poolSize) {
+ NewKlass.poolSize = DEFAULT_POOL_SIZE;
+ }
+ NewKlass.release = standardReleaser;
+ return NewKlass;
+};
+
+var PooledClass = {
+ addPoolingTo: addPoolingTo,
+ oneArgumentPooler: oneArgumentPooler,
+ twoArgumentPooler: twoArgumentPooler,
+ threeArgumentPooler: threeArgumentPooler,
+ fourArgumentPooler: fourArgumentPooler
+};
+
+module.exports = PooledClass;
+
+/***/ }),
+/* 54 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/**
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
+ *
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return value != null && typeof value == 'object';
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (isObjectLike);
+
+
+/***/ }),
+/* 55 */
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__ = __webpack_require__(507);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getValue_js__ = __webpack_require__(510);
+
+
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = Object(__WEBPACK_IMPORTED_MODULE_1__getValue_js__["a" /* default */])(object, key);
+ return Object(__WEBPACK_IMPORTED_MODULE_0__baseIsNative_js__["a" /* default */])(value) ? value : undefined;
+}
+
+/* harmony default export */ __webpack_exports__["a"] = (getNative);
+
+
+/***/ }),
+/* 56 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.convertColorToString = convertColorToString;
+exports.convertHexToRGB = convertHexToRGB;
+exports.decomposeColor = decomposeColor;
+exports.getContrastRatio = getContrastRatio;
+exports.getLuminance = getLuminance;
+exports.emphasize = emphasize;
+exports.fade = fade;
+exports.darken = darken;
+exports.lighten = lighten;
+/**
+ * Returns a number whose value is limited to the given range.
+ *
+ * @param {number} value The value to be clamped
+ * @param {number} min The lower boundary of the output range
+ * @param {number} max The upper boundary of the output range
+ * @returns {number} A number in the range [min, max]
+ */
+function clamp(value, min, max) {
+ if (value < min) {
+ return min;
+ }
+ if (value > max) {
+ return max;
+ }
+ return value;
+}
+
+/**
+ * Converts a color object with type and values to a string.
+ *
+ * @param {object} color - Decomposed color
+ * @param {string} color.type - One of, 'rgb', 'rgba', 'hsl', 'hsla'
+ * @param {array} color.values - [n,n,n] or [n,n,n,n]
+ * @returns {string} A CSS color string
+ */
+function convertColorToString(color) {
+ var type = color.type,
+ values = color.values;
+
+
+ if (type.indexOf('rgb') > -1) {
+ // Only convert the first 3 values to int (i.e. not alpha)
+ for (var i = 0; i < 3; i++) {
+ values[i] = parseInt(values[i]);
+ }
+ }
+
+ var colorString = void 0;
+
+ if (type.indexOf('hsl') > -1) {
+ colorString = color.type + '(' + values[0] + ', ' + values[1] + '%, ' + values[2] + '%';
+ } else {
+ colorString = color.type + '(' + values[0] + ', ' + values[1] + ', ' + values[2];
+ }
+
+ if (values.length === 4) {
+ colorString += ', ' + color.values[3] + ')';
+ } else {
+ colorString += ')';
+ }
+
+ return colorString;
+}
+
+/**
+ * Converts a color from CSS hex format to CSS rgb format.
+ *
+ * @param {string} color - Hex color, i.e. #nnn or #nnnnnn
+ * @returns {string} A CSS rgb color string
+ */
+function convertHexToRGB(color) {
+ if (color.length === 4) {
+ var extendedColor = '#';
+ for (var i = 1; i < color.length; i++) {
+ extendedColor += color.charAt(i) + color.charAt(i);
+ }
+ color = extendedColor;
+ }
+
+ var values = {
+ r: parseInt(color.substr(1, 2), 16),
+ g: parseInt(color.substr(3, 2), 16),
+ b: parseInt(color.substr(5, 2), 16)
+ };
+
+ return 'rgb(' + values.r + ', ' + values.g + ', ' + values.b + ')';
+}
+
+/**
+ * Returns an object with the type and values of a color.
+ *
+ * Note: Does not support rgb % values.
+ *
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
+ * @returns {{type: string, values: number[]}} A MUI color object
+ */
+function decomposeColor(color) {
+ if (color.charAt(0) === '#') {
+ return decomposeColor(convertHexToRGB(color));
+ }
+
+ var marker = color.indexOf('(');
+ var type = color.substring(0, marker);
+ var values = color.substring(marker + 1, color.length - 1).split(',');
+ values = values.map(function (value) {
+ return parseFloat(value);
+ });
+
+ return { type: type, values: values };
+}
+
+/**
+ * Calculates the contrast ratio between two colors.
+ *
+ * Formula: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef
+ *
+ * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
+ * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
+ * @returns {number} A contrast ratio value in the range 0 - 21 with 2 digit precision.
+ */
+function getContrastRatio(foreground, background) {
+ var lumA = getLuminance(foreground);
+ var lumB = getLuminance(background);
+ var contrastRatio = (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);
+
+ return Number(contrastRatio.toFixed(2)); // Truncate at two digits
+}
+
+/**
+ * The relative brightness of any point in a color space,
+ * normalized to 0 for darkest black and 1 for lightest white.
+ *
+ * Formula: https://www.w3.org/WAI/GL/wiki/Relative_luminance
+ *
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
+ * @returns {number} The relative brightness of the color in the range 0 - 1
+ */
+function getLuminance(color) {
+ color = decomposeColor(color);
+
+ if (color.type.indexOf('rgb') > -1) {
+ var rgb = color.values.map(function (val) {
+ val /= 255; // normalized
+ return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);
+ });
+ return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3)); // Truncate at 3 digits
+ } else if (color.type.indexOf('hsl') > -1) {
+ return color.values[2] / 100;
+ }
+}
+
+/**
+ * Darken or lighten a colour, depending on its luminance.
+ * Light colors are darkened, dark colors are lightened.
+ *
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
+ * @param {number} coefficient=0.15 - multiplier in the range 0 - 1
+ * @returns {string} A CSS color string. Hex input values are returned as rgb
+ */
+function emphasize(color) {
+ var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;
+
+ return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);
+}
+
+/**
+ * Set the absolute transparency of a color.
+ * Any existing alpha values are overwritten.
+ *
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
+ * @param {number} value - value to set the alpha channel to in the range 0 -1
+ * @returns {string} A CSS color string. Hex input values are returned as rgb
+ */
+function fade(color, value) {
+ color = decomposeColor(color);
+ value = clamp(value, 0, 1);
+
+ if (color.type === 'rgb' || color.type === 'hsl') {
+ color.type += 'a';
+ }
+ color.values[3] = value;
+
+ return convertColorToString(color);
+}
+
+/**
+ * Darkens a color.
+ *
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
+ * @param {number} coefficient - multiplier in the range 0 - 1
+ * @returns {string} A CSS color string. Hex input values are returned as rgb
+ */
+function darken(color, coefficient) {
+ color = decomposeColor(color);
+ coefficient = clamp(coefficient, 0, 1);
+
+ if (color.type.indexOf('hsl') > -1) {
+ color.values[2] *= 1 - coefficient;
+ } else if (color.type.indexOf('rgb') > -1) {
+ for (var i = 0; i < 3; i++) {
+ color.values[i] *= 1 - coefficient;
+ }
+ }
+ return convertColorToString(color);
+}
+
+/**
+ * Lightens a color.
+ *
+ * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
+ * @param {number} coefficient - multiplier in the range 0 - 1
+ * @returns {string} A CSS color string. Hex input values are returned as rgb
+ */
+function lighten(color, coefficient) {
+ color = decomposeColor(color);
+ coefficient = clamp(coefficient, 0, 1);
+
+ if (color.type.indexOf('hsl') > -1) {
+ color.values[2] += (100 - color.values[2]) * coefficient;
+ } else if (color.type.indexOf('rgb') > -1) {
+ for (var i = 0; i < 3; i++) {
+ color.values[i] += (255 - color.values[i]) * coefficient;
+ }
+ }
+
+ return convertColorToString(color);
+}
+
+/***/ }),
+/* 57 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+var red50 = exports.red50 = '#ffebee';
+var red100 = exports.red100 = '#ffcdd2';
+var red200 = exports.red200 = '#ef9a9a';
+var red300 = exports.red300 = '#e57373';
+var red400 = exports.red400 = '#ef5350';
+var red500 = exports.red500 = '#f44336';
+var red600 = exports.red600 = '#e53935';
+var red700 = exports.red700 = '#d32f2f';
+var red800 = exports.red800 = '#c62828';
+var red900 = exports.red900 = '#b71c1c';
+var redA100 = exports.redA100 = '#ff8a80';
+var redA200 = exports.redA200 = '#ff5252';
+var redA400 = exports.redA400 = '#ff1744';
+var redA700 = exports.redA700 = '#d50000';
+
+var pink50 = exports.pink50 = '#fce4ec';
+var pink100 = exports.pink100 = '#f8bbd0';
+var pink200 = exports.pink200 = '#f48fb1';
+var pink300 = exports.pink300 = '#f06292';
+var pink400 = exports.pink400 = '#ec407a';
+var pink500 = exports.pink500 = '#e91e63';
+var pink600 = exports.pink600 = '#d81b60';
+var pink700 = exports.pink700 = '#c2185b';
+var pink800 = exports.pink800 = '#ad1457';
+var pink900 = exports.pink900 = '#880e4f';
+var pinkA100 = exports.pinkA100 = '#ff80ab';
+var pinkA200 = exports.pinkA200 = '#ff4081';
+var pinkA400 = exports.pinkA400 = '#f50057';
+var pinkA700 = exports.pinkA700 = '#c51162';
+
+var purple50 = exports.purple50 = '#f3e5f5';
+var purple100 = exports.purple100 = '#e1bee7';
+var purple200 = exports.purple200 = '#ce93d8';
+var purple300 = exports.purple300 = '#ba68c8';
+var purple400 = exports.purple400 = '#ab47bc';
+var purple500 = exports.purple500 = '#9c27b0';
+var purple600 = exports.purple600 = '#8e24aa';
+var purple700 = exports.purple700 = '#7b1fa2';
+var purple800 = exports.purple800 = '#6a1b9a';
+var purple900 = exports.purple900 = '#4a148c';
+var purpleA100 = exports.purpleA100 = '#ea80fc';
+var purpleA200 = exports.purpleA200 = '#e040fb';
+var purpleA400 = exports.purpleA400 = '#d500f9';
+var purpleA700 = exports.purpleA700 = '#aa00ff';
+
+var deepPurple50 = exports.deepPurple50 = '#ede7f6';
+var deepPurple100 = exports.deepPurple100 = '#d1c4e9';
+var deepPurple200 = exports.deepPurple200 = '#b39ddb';
+var deepPurple300 = exports.deepPurple300 = '#9575cd';
+var deepPurple400 = exports.deepPurple400 = '#7e57c2';
+var deepPurple500 = exports.deepPurple500 = '#673ab7';
+var deepPurple600 = exports.deepPurple600 = '#5e35b1';
+var deepPurple700 = exports.deepPurple700 = '#512da8';
+var deepPurple800 = exports.deepPurple800 = '#4527a0';
+var deepPurple900 = exports.deepPurple900 = '#311b92';
+var deepPurpleA100 = exports.deepPurpleA100 = '#b388ff';
+var deepPurpleA200 = exports.deepPurpleA200 = '#7c4dff';
+var deepPurpleA400 = exports.deepPurpleA400 = '#651fff';
+var deepPurpleA700 = exports.deepPurpleA700 = '#6200ea';
+
+var indigo50 = exports.indigo50 = '#e8eaf6';
+var indigo100 = exports.indigo100 = '#c5cae9';
+var indigo200 = exports.indigo200 = '#9fa8da';
+var indigo300 = exports.indigo300 = '#7986cb';
+var indigo400 = exports.indigo400 = '#5c6bc0';
+var indigo500 = exports.indigo500 = '#3f51b5';
+var indigo600 = exports.indigo600 = '#3949ab';
+var indigo700 = exports.indigo700 = '#303f9f';
+var indigo800 = exports.indigo800 = '#283593';
+var indigo900 = exports.indigo900 = '#1a237e';
+var indigoA100 = exports.indigoA100 = '#8c9eff';
+var indigoA200 = exports.indigoA200 = '#536dfe';
+var indigoA400 = exports.indigoA400 = '#3d5afe';
+var indigoA700 = exports.indigoA700 = '#304ffe';
+
+var blue50 = exports.blue50 = '#e3f2fd';
+var blue100 = exports.blue100 = '#bbdefb';
+var blue200 = exports.blue200 = '#90caf9';
+var blue300 = exports.blue300 = '#64b5f6';
+var blue400 = exports.blue400 = '#42a5f5';
+var blue500 = exports.blue500 = '#2196f3';
+var blue600 = exports.blue600 = '#1e88e5';
+var blue700 = exports.blue700 = '#1976d2';
+var blue800 = exports.blue800 = '#1565c0';
+var blue900 = exports.blue900 = '#0d47a1';
+var blueA100 = exports.blueA100 = '#82b1ff';
+var blueA200 = exports.blueA200 = '#448aff';
+var blueA400 = exports.blueA400 = '#2979ff';
+var blueA700 = exports.blueA700 = '#2962ff';
+
+var lightBlue50 = exports.lightBlue50 = '#e1f5fe';
+var lightBlue100 = exports.lightBlue100 = '#b3e5fc';
+var lightBlue200 = exports.lightBlue200 = '#81d4fa';
+var lightBlue300 = exports.lightBlue300 = '#4fc3f7';
+var lightBlue400 = exports.lightBlue400 = '#29b6f6';
+var lightBlue500 = exports.lightBlue500 = '#03a9f4';
+var lightBlue600 = exports.lightBlue600 = '#039be5';
+var lightBlue700 = exports.lightBlue700 = '#0288d1';
+var lightBlue800 = exports.lightBlue800 = '#0277bd';
+var lightBlue900 = exports.lightBlue900 = '#01579b';
+var lightBlueA100 = exports.lightBlueA100 = '#80d8ff';
+var lightBlueA200 = exports.lightBlueA200 = '#40c4ff';
+var lightBlueA400 = exports.lightBlueA400 = '#00b0ff';
+var lightBlueA700 = exports.lightBlueA700 = '#0091ea';
+
+var cyan50 = exports.cyan50 = '#e0f7fa';
+var cyan100 = exports.cyan100 = '#b2ebf2';
+var cyan200 = exports.cyan200 = '#80deea';
+var cyan300 = exports.cyan300 = '#4dd0e1';
+var cyan400 = exports.cyan400 = '#26c6da';
+var cyan500 = exports.cyan500 = '#00bcd4';
+var cyan600 = exports.cyan600 = '#00acc1';
+var cyan700 = exports.cyan700 = '#0097a7';
+var cyan800 = exports.cyan800 = '#00838f';
+var cyan900 = exports.cyan900 = '#006064';
+var cyanA100 = exports.cyanA100 = '#84ffff';
+var cyanA200 = exports.cyanA200 = '#18ffff';
+var cyanA400 = exports.cyanA400 = '#00e5ff';
+var cyanA700 = exports.cyanA700 = '#00b8d4';
+
+var teal50 = exports.teal50 = '#e0f2f1';
+var teal100 = exports.teal100 = '#b2dfdb';
+var teal200 = exports.teal200 = '#80cbc4';
+var teal300 = exports.teal300 = '#4db6ac';
+var teal400 = exports.teal400 = '#26a69a';
+var teal500 = exports.teal500 = '#009688';
+var teal600 = exports.teal600 = '#00897b';
+var teal700 = exports.teal700 = '#00796b';
+var teal800 = exports.teal800 = '#00695c';
+var teal900 = exports.teal900 = '#004d40';
+var tealA100 = exports.tealA100 = '#a7ffeb';
+var tealA200 = exports.tealA200 = '#64ffda';
+var tealA400 = exports.tealA400 = '#1de9b6';
+var tealA700 = exports.tealA700 = '#00bfa5';
+
+var green50 = exports.green50 = '#e8f5e9';
+var green100 = exports.green100 = '#c8e6c9';
+var green200 = exports.green200 = '#a5d6a7';
+var green300 = exports.green300 = '#81c784';
+var green400 = exports.green400 = '#66bb6a';
+var green500 = exports.green500 = '#4caf50';
+var green600 = exports.green600 = '#43a047';
+var green700 = exports.green700 = '#388e3c';
+var green800 = exports.green800 = '#2e7d32';
+var green900 = exports.green900 = '#1b5e20';
+var greenA100 = exports.greenA100 = '#b9f6ca';
+var greenA200 = exports.greenA200 = '#69f0ae';
+var greenA400 = exports.greenA400 = '#00e676';
+var greenA700 = exports.greenA700 = '#00c853';
+
+var lightGreen50 = exports.lightGreen50 = '#f1f8e9';
+var lightGreen100 = exports.lightGreen100 = '#dcedc8';
+var lightGreen200 = exports.lightGreen200 = '#c5e1a5';
+var lightGreen300 = exports.lightGreen300 = '#aed581';
+var lightGreen400 = exports.lightGreen400 = '#9ccc65';
+var lightGreen500 = exports.lightGreen500 = '#8bc34a';
+var lightGreen600 = exports.lightGreen600 = '#7cb342';
+var lightGreen700 = exports.lightGreen700 = '#689f38';
+var lightGreen800 = exports.lightGreen800 = '#558b2f';
+var lightGreen900 = exports.lightGreen900 = '#33691e';
+var lightGreenA100 = exports.lightGreenA100 = '#ccff90';
+var lightGreenA200 = exports.lightGreenA200 = '#b2ff59';
+var lightGreenA400 = exports.lightGreenA400 = '#76ff03';
+var lightGreenA700 = exports.lightGreenA700 = '#64dd17';
+
+var lime50 = exports.lime50 = '#f9fbe7';
+var lime100 = exports.lime100 = '#f0f4c3';
+var lime200 = exports.lime200 = '#e6ee9c';
+var lime300 = exports.lime300 = '#dce775';
+var lime400 = exports.lime400 = '#d4e157';
+var lime500 = exports.lime500 = '#cddc39';
+var lime600 = exports.lime600 = '#c0ca33';
+var lime700 = exports.lime700 = '#afb42b';
+var lime800 = exports.lime800 = '#9e9d24';
+var lime900 = exports.lime900 = '#827717';
+var limeA100 = exports.limeA100 = '#f4ff81';
+var limeA200 = exports.limeA200 = '#eeff41';
+var limeA400 = exports.limeA400 = '#c6ff00';
+var limeA700 = exports.limeA700 = '#aeea00';
+
+var yellow50 = exports.yellow50 = '#fffde7';
+var yellow100 = exports.yellow100 = '#fff9c4';
+var yellow200 = exports.yellow200 = '#fff59d';
+var yellow300 = exports.yellow300 = '#fff176';
+var yellow400 = exports.yellow400 = '#ffee58';
+var yellow500 = exports.yellow500 = '#ffeb3b';
+var yellow600 = exports.yellow600 = '#fdd835';
+var yellow700 = exports.yellow700 = '#fbc02d';
+var yellow800 = exports.yellow800 = '#f9a825';
+var yellow900 = exports.yellow900 = '#f57f17';
+var yellowA100 = exports.yellowA100 = '#ffff8d';
+var yellowA200 = exports.yellowA200 = '#ffff00';
+var yellowA400 = exports.yellowA400 = '#ffea00';
+var yellowA700 = exports.yellowA700 = '#ffd600';
+
+var amber50 = exports.amber50 = '#fff8e1';
+var amber100 = exports.amber100 = '#ffecb3';
+var amber200 = exports.amber200 = '#ffe082';
+var amber300 = exports.amber300 = '#ffd54f';
+var amber400 = exports.amber400 = '#ffca28';
+var amber500 = exports.amber500 = '#ffc107';
+var amber600 = exports.amber600 = '#ffb300';
+var amber700 = exports.amber700 = '#ffa000';
+var amber800 = exports.amber800 = '#ff8f00';
+var amber900 = exports.amber900 = '#ff6f00';
+var amberA100 = exports.amberA100 = '#ffe57f';
+var amberA200 = exports.amberA200 = '#ffd740';
+var amberA400 = exports.amberA400 = '#ffc400';
+var amberA700 = exports.amberA700 = '#ffab00';
+
+var orange50 = exports.orange50 = '#fff3e0';
+var orange100 = exports.orange100 = '#ffe0b2';
+var orange200 = exports.orange200 = '#ffcc80';
+var orange300 = exports.orange300 = '#ffb74d';
+var orange400 = exports.orange400 = '#ffa726';
+var orange500 = exports.orange500 = '#ff9800';
+var orange600 = exports.orange600 = '#fb8c00';
+var orange700 = exports.orange700 = '#f57c00';
+var orange800 = exports.orange800 = '#ef6c00';
+var orange900 = exports.orange900 = '#e65100';
+var orangeA100 = exports.orangeA100 = '#ffd180';
+var orangeA200 = exports.orangeA200 = '#ffab40';
+var orangeA400 = exports.orangeA400 = '#ff9100';
+var orangeA700 = exports.orangeA700 = '#ff6d00';
+
+var deepOrange50 = exports.deepOrange50 = '#fbe9e7';
+var deepOrange100 = exports.deepOrange100 = '#ffccbc';
+var deepOrange200 = exports.deepOrange200 = '#ffab91';
+var deepOrange300 = exports.deepOrange300 = '#ff8a65';
+var deepOrange400 = exports.deepOrange400 = '#ff7043';
+var deepOrange500 = exports.deepOrange500 = '#ff5722';
+var deepOrange600 = exports.deepOrange600 = '#f4511e';
+var deepOrange700 = exports.deepOrange700 = '#e64a19';
+var deepOrange800 = exports.deepOrange800 = '#d84315';
+var deepOrange900 = exports.deepOrange900 = '#bf360c';
+var deepOrangeA100 = exports.deepOrangeA100 = '#ff9e80';
+var deepOrangeA200 = exports.deepOrangeA200 = '#ff6e40';
+var deepOrangeA400 = exports.deepOrangeA400 = '#ff3d00';
+var deepOrangeA700 = exports.deepOrangeA700 = '#dd2c00';
+
+var brown50 = exports.brown50 = '#efebe9';
+var brown100 = exports.brown100 = '#d7ccc8';
+var brown200 = exports.brown200 = '#bcaaa4';
+var brown300 = exports.brown300 = '#a1887f';
+var brown400 = exports.brown400 = '#8d6e63';
+var brown500 = exports.brown500 = '#795548';
+var brown600 = exports.brown600 = '#6d4c41';
+var brown700 = exports.brown700 = '#5d4037';
+var brown800 = exports.brown800 = '#4e342e';
+var brown900 = exports.brown900 = '#3e2723';
+
+var blueGrey50 = exports.blueGrey50 = '#eceff1';
+var blueGrey100 = exports.blueGrey100 = '#cfd8dc';
+var blueGrey200 = exports.blueGrey200 = '#b0bec5';
+var blueGrey300 = exports.blueGrey300 = '#90a4ae';
+var blueGrey400 = exports.blueGrey400 = '#78909c';
+var blueGrey500 = exports.blueGrey500 = '#607d8b';
+var blueGrey600 = exports.blueGrey600 = '#546e7a';
+var blueGrey700 = exports.blueGrey700 = '#455a64';
+var blueGrey800 = exports.blueGrey800 = '#37474f';
+var blueGrey900 = exports.blueGrey900 = '#263238';
+
+var grey50 = exports.grey50 = '#fafafa';
+var grey100 = exports.grey100 = '#f5f5f5';
+var grey200 = exports.grey200 = '#eeeeee';
+var grey300 = exports.grey300 = '#e0e0e0';
+var grey400 = exports.grey400 = '#bdbdbd';
+var grey500 = exports.grey500 = '#9e9e9e';
+var grey600 = exports.grey600 = '#757575';
+var grey700 = exports.grey700 = '#616161';
+var grey800 = exports.grey800 = '#424242';
+var grey900 = exports.grey900 = '#212121';
+
+var black = exports.black = '#000000';
+var white = exports.white = '#ffffff';
+
+var transparent = exports.transparent = 'rgba(0, 0, 0, 0)';
+var fullBlack = exports.fullBlack = 'rgba(0, 0, 0, 1)';
+var darkBlack = exports.darkBlack = 'rgba(0, 0, 0, 0.87)';
+var lightBlack = exports.lightBlack = 'rgba(0, 0, 0, 0.54)';
+var minBlack = exports.minBlack = 'rgba(0, 0, 0, 0.26)';
+var faintBlack = exports.faintBlack = 'rgba(0, 0, 0, 0.12)';
+var fullWhite = exports.fullWhite = 'rgba(255, 255, 255, 1)';
+var darkWhite = exports.darkWhite = 'rgba(255, 255, 255, 0.87)';
+var lightWhite = exports.lightWhite = 'rgba(255, 255, 255, 0.54)';
+
+/***/ }),
+/* 58 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+exports.__esModule = true;
+
+var _shallowEqual = __webpack_require__(87);
+
+var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+exports.default = _shallowEqual2.default;
+
+/***/ }),
+/* 59 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _extends2 = __webpack_require__(7);
+
+var _extends3 = _interopRequireDefault(_extends2);
+
+var _objectWithoutProperties2 = __webpack_require__(8);
+
+var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
+
+var _getPrototypeOf = __webpack_require__(3);
+
+var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
+
+var _classCallCheck2 = __webpack_require__(1);
+
+var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
+
+var _createClass2 = __webpack_require__(2);
+
+var _createClass3 = _interopRequireDefault(_createClass2);
+
+var _possibleConstructorReturn2 = __webpack_require__(4);
+
+var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
+
+var _inherits2 = __webpack_require__(5);
+
+var _inherits3 = _interopRequireDefault(_inherits2);
+
+var _simpleAssign = __webpack_require__(6);
+
+var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
+
+var _react = __webpack_require__(0);
+
+var _react2 = _interopRequireDefault(_react);
+
+var _childUtils = __webpack_require__(127);
+
+var _events = __webpack_require__(196);
+
+var _events2 = _interopRequireDefault(_events);
+
+var _keycode = __webpack_require__(30);
+
+var _keycode2 = _interopRequireDefault(_keycode);
+
+var _FocusRipple = __webpack_require__(197);
+
+var _FocusRipple2 = _interopRequireDefault(_FocusRipple);
+
+var _TouchRipple = __webpack_require__(314);
+
+var _TouchRipple2 = _interopRequireDefault(_TouchRipple);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var styleInjected = false;
+var listening = false;
+var tabPressed = false;
+
+function injectStyle() {
+ if (!styleInjected) {
+ // Remove inner padding and border in Firefox 4+.
+ var style = document.createElement('style');
+ style.innerHTML = '\n button::-moz-focus-inner,\n input::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n ';
+
+ document.body.appendChild(style);
+ styleInjected = true;
+ }
+}
+
+function listenForTabPresses() {
+ if (!listening) {
+ _events2.default.on(window, 'keydown', function (event) {
+ tabPressed = (0, _keycode2.default)(event) === 'tab';
+ });
+ listening = true;
+ }
+}
+
+var EnhancedButton = function (_Component) {
+ (0, _inherits3.default)(EnhancedButton, _Component);
+
+ function EnhancedButton() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ (0, _classCallCheck3.default)(this, EnhancedButton);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = (0, _possibleConstructorReturn3.default)(this, (_ref = EnhancedButton.__proto__ || (0, _getPrototypeOf2.default)(EnhancedButton)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
+ isKeyboardFocused: false
+ }, _this.handleKeyDown = function (event) {
+ if (!_this.props.disabled && !_this.props.disableKeyboardFocus) {
+ if ((0, _keycode2.default)(event) === 'enter' && _this.state.isKeyboardFocused) {
+ _this.handleTouchTap(event);
+ }
+ if ((0, _keycode2.default)(event) === 'esc' && _this.state.isKeyboardFocused) {
+ _this.removeKeyboardFocus(event);
+ }
+ }
+ _this.props.onKeyDown(event);
+ }, _this.handleKeyUp = function (event) {
+ if (!_this.props.disabled && !_this.props.disableKeyboardFocus) {
+ if ((0, _keycode2.default)(event) === 'space' && _this.state.isKeyboardFocused) {
+ _this.handleTouchTap(event);
+ }
+ }
+ _this.props.onKeyUp(event);
+ }, _this.handleBlur = function (event) {
+ _this.cancelFocusTimeout();
+ _this.removeKeyboardFocus(event);
+ _this.props.onBlur(event);
+ }, _this.handleFocus = function (event) {
+ if (event) event.persist();
+ if (!_this.props.disabled && !_this.props.disableKeyboardFocus) {
+ // setTimeout is needed because the focus event fires first
+ // Wait so that we can capture if this was a keyboard focus
+ // or touch focus
+ _this.focusTimeout = setTimeout(function () {
+ if (tabPressed) {
+ _this.setKeyboardFocus(event);
+ tabPressed = false;
+ }
+ }, 150);
+
+ _this.props.onFocus(event);
+ }
+ }, _this.handleClick = function (event) {
+ if (!_this.props.disabled) {
+ tabPressed = false;
+ _this.props.onClick(event);
+ }
+ }, _this.handleTouchTap = function (event) {
+ _this.cancelFocusTimeout();
+ if (!_this.props.disabled) {
+ tabPressed = false;
+ _this.removeKeyboardFocus(event);
+ _this.props.onTouchTap(event);
+ }
+ }, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret);
+ }
+
+ (0, _createClass3.default)(EnhancedButton, [{
+ key: 'componentWillMount',
+ value: function componentWillMount() {
+ var _props = this.props,
+ disabled = _props.disabled,
+ disableKeyboardFocus = _props.disableKeyboardFocus,
+ keyboardFocused = _props.keyboardFocused;
+
+ if (!disabled && keyboardFocused && !disableKeyboardFocus) {
+ this.setState({ isKeyboardFocused: true });
+ }
+ }
+ }, {
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ injectStyle();
+ listenForTabPresses();
+ if (this.state.isKeyboardFocused) {
+ this.refs.enhancedButton.focus();
+ this.props.onKeyboardFocus(null, true);
+ }
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ if ((nextProps.disabled || nextProps.disableKeyboardFocus) && this.state.isKeyboardFocused) {
+ this.setState({ isKeyboardFocused: false });
+ if (nextProps.onKeyboardFocus) {
+ nextProps.onKeyboardFocus(null, false);
+ }
+ }
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ clearTimeout(this.focusTimeout);
+ }
+ }, {
+ key: 'isKeyboardFocused',
+ value: function isKeyboardFocused() {
+ return this.state.isKeyboardFocused;
+ }
+ }, {
+ key: 'removeKeyboardFocus',
+ value: function removeKeyboardFocus(event) {
+ if (this.state.isKeyboardFocused) {
+ this.setState({ isKeyboardFocused: false });
+ this.props.onKeyboardFocus(event, false);
+ }
+ }
+ }, {
+ key: 'setKeyboardFocus',
+ value: function setKeyboardFocus(event) {
+ if (!this.state.isKeyboardFocused) {
+ this.setState({ isKeyboardFocused: true });
+ this.props.onKeyboardFocus(event, true);
+ }
+ }
+ }, {
+ key: 'cancelFocusTimeout',
+ value: function cancelFocusTimeout() {
+ if (this.focusTimeout) {
+ clearTimeout(this.focusTimeout);
+ this.focusTimeout = null;
+ }
+ }
+ }, {
+ key: 'createButtonChildren',
+ value: function createButtonChildren() {
+ var _props2 = this.props,
+ centerRipple = _props2.centerRipple,
+ children = _props2.children,
+ disabled = _props2.disabled,
+ disableFocusRipple = _props2.disableFocusRipple,
+ disableKeyboardFocus = _props2.disableKeyboardFocus,
+ disableTouchRipple = _props2.disableTouchRipple,
+ focusRippleColor = _props2.focusRippleColor,
+ focusRippleOpacity = _props2.focusRippleOpacity,
+ touchRippleColor = _props2.touchRippleColor,
+ touchRippleOpacity = _props2.touchRippleOpacity;
+ var isKeyboardFocused = this.state.isKeyboardFocused;
+
+ // Focus Ripple
+
+ var focusRipple = isKeyboardFocused && !disabled && !disableFocusRipple && !disableKeyboardFocus ? _react2.default.createElement(_FocusRipple2.default, {
+ color: focusRippleColor,
+ opacity: focusRippleOpacity,
+ show: isKeyboardFocused
+ }) : undefined;
+
+ // Touch Ripple
+ var touchRipple = !disabled && !disableTouchRipple ? _react2.default.createElement(
+ _TouchRipple2.default,
+ {
+ centerRipple: centerRipple,
+ color: touchRippleColor,
+ opacity: touchRippleOpacity
+ },
+ children
+ ) : undefined;
+
+ return (0, _childUtils.createChildFragment)({
+ focusRipple: focusRipple,
+ touchRipple: touchRipple,
+ children: touchRipple ? undefined : children
+ });
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props3 = this.props,
+ centerRipple = _props3.centerRipple,
+ children = _props3.children,
+ containerElement = _props3.containerElement,
+ disabled = _props3.disabled,
+ disableFocusRipple = _props3.disableFocusRipple,
+ disableKeyboardFocus = _props3.disableKeyboardFocus,
+ disableTouchRipple = _props3.disableTouchRipple,
+ focusRippleColor = _props3.focusRippleColor,
+ focusRippleOpacity = _props3.focusRippleOpacity,
+ href = _props3.href,
+ keyboardFocused = _props3.keyboardFocused,
+ touchRippleColor = _props3.touchRippleColor,
+ touchRippleOpacity = _props3.touchRippleOpacity,
+ onBlur = _props3.onBlur,
+ onClick = _props3.onClick,
+ onFocus = _props3.onFocus,
+ onKeyUp = _props3.onKeyUp,
+ onKeyDown = _props3.onKeyDown,
+ onKeyboardFocus = _props3.onKeyboardFocus,
+ onTouchTap = _props3.onTouchTap,
+ style = _props3.style,
+ tabIndex = _props3.tabIndex,
+ type = _props3.type,
+ other = (0, _objectWithoutProperties3.default)(_props3, ['centerRipple', 'children', 'containerElement', 'disabled', 'disableFocusRipple', 'disableKeyboardFocus', 'disableTouchRipple', 'focusRippleColor', 'focusRippleOpacity', 'href', 'keyboardFocused', 'touchRippleColor', 'touchRippleOpacity', 'onBlur', 'onClick', 'onFocus', 'onKeyUp', 'onKeyDown', 'onKeyboardFocus', 'onTouchTap', 'style', 'tabIndex', 'type']);
+ var _context$muiTheme = this.context.muiTheme,
+ prepareStyles = _context$muiTheme.prepareStyles,
+ enhancedButton = _context$muiTheme.enhancedButton;
+
+
+ var mergedStyles = (0, _simpleAssign2.default)({
+ border: 10,
+ boxSizing: 'border-box',
+ display: 'inline-block',
+ fontFamily: this.context.muiTheme.baseTheme.fontFamily,
+ WebkitTapHighlightColor: enhancedButton.tapHighlightColor, // Remove mobile color flashing (deprecated)
+ cursor: disabled ? 'default' : 'pointer',
+ textDecoration: 'none',
+ margin: 0,
+ padding: 0,
+ outline: 'none',
+ fontSize: 'inherit',
+ fontWeight: 'inherit',
+ position: 'relative', // This is needed so that ripples do not bleed past border radius.
+ verticalAlign: href ? 'middle' : null
+ }, style);
+
+ // Passing both background:none & backgroundColor can break due to object iteration order
+ if (!mergedStyles.backgroundColor && !mergedStyles.background) {
+ mergedStyles.background = 'none';
+ }
+
+ if (disabled && href) {
+ return _react2.default.createElement(
+ 'span',
+ (0, _extends3.default)({}, other, {
+ style: mergedStyles
+ }),
+ children
+ );
+ }
+
+ var buttonProps = (0, _extends3.default)({}, other, {
+ style: prepareStyles(mergedStyles),
+ ref: 'enhancedButton',
+ disabled: disabled,
+ href: href,
+ onBlur: this.handleBlur,
+ onClick: this.handleClick,
+ onFocus: this.handleFocus,
+ onKeyUp: this.handleKeyUp,
+ onKeyDown: this.handleKeyDown,
+ onTouchTap: this.handleTouchTap,
+ tabIndex: disabled || disableKeyboardFocus ? -1 : tabIndex
+ });
+
+ var buttonChildren = this.createButtonChildren();
+
+ if (_react2.default.isValidElement(containerElement)) {
+ return _react2.default.cloneElement(containerElement, buttonProps, buttonChildren);
+ }
+
+ if (!href && containerElement === 'button') {
+ buttonProps.type = type;
+ }
+
+ return _react2.default.createElement(href ? 'a' : containerElement, buttonProps, buttonChildren);
+ }
+ }]);
+ return EnhancedButton;
+}(_react.Component);
+
+EnhancedButton.defaultProps = {
+ containerElement: 'button',
+ onBlur: function onBlur() {},
+ onClick: function onClick() {},
+ onFocus: function onFocus() {},
+ onKeyDown: function onKeyDown() {},
+ onKeyUp: function onKeyUp() {},
+ onKeyboardFocus: function onKeyboardFocus() {},
+ onTouchTap: function onTouchTap() {},
+ tabIndex: 0,
+ type: 'button'
+};
+EnhancedButton.contextTypes = {
+ muiTheme: _react.PropTypes.object.isRequired
+};
+ false ? EnhancedButton.propTypes = {
+ centerRipple: _react.PropTypes.bool,
+ children: _react.PropTypes.node,
+ containerElement: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.element]),
+ disableFocusRipple: _react.PropTypes.bool,
+ disableKeyboardFocus: _react.PropTypes.bool,
+ disableTouchRipple: _react.PropTypes.bool,
+ disabled: _react.PropTypes.bool,
+ focusRippleColor: _react.PropTypes.string,
+ focusRippleOpacity: _react.PropTypes.number,
+ href: _react.PropTypes.string,
+ keyboardFocused: _react.PropTypes.bool,
+ onBlur: _react.PropTypes.func,
+ onClick: _react.PropTypes.func,
+ onFocus: _react.PropTypes.func,
+ onKeyDown: _react.PropTypes.func,
+ onKeyUp: _react.PropTypes.func,
+ onKeyboardFocus: _react.PropTypes.func,
+ onTouchTap: _react.PropTypes.func,
+ style: _react.PropTypes.object,
+ tabIndex: _react.PropTypes.number,
+ touchRippleColor: _react.PropTypes.string,
+ touchRippleOpacity: _react.PropTypes.number,
+ type: _react.PropTypes.string
+} : void 0;
+exports.default = EnhancedButton;
+
+/***/ }),
+/* 60 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+var mapError = function mapError(_ref) {
+ var errorProp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'errorText';
+ var _ref$meta = _ref.meta;
+ _ref$meta = _ref$meta === undefined ? {} : _ref$meta;
+
+ var touched = _ref$meta.touched,
+ error = _ref$meta.error,
+ warning = _ref$meta.warning,
+ input = _ref.input,
+ props = _objectWithoutProperties(_ref, ['meta', 'input']);
+
+ return touched && (error || warning) ? _extends({}, props, input, _defineProperty({}, errorProp, error || warning)) : _extends({}, input, props);
+};
+
+exports.default = mapError;
+
+/***/ }),
+/* 61 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// optional / simple context binding
+var aFunction = __webpack_require__(99);
+module.exports = function (fn, that, length) {
+ aFunction(fn);
+ if (that === undefined) return fn;
+ switch (length) {
+ case 1: return function (a) {
+ return fn.call(that, a);
+ };
+ case 2: return function (a, b) {
+ return fn.call(that, a, b);
+ };
+ case 3: return function (a, b, c) {
+ return fn.call(that, a, b, c);
+ };
+ }
+ return function (/* ...args */) {
+ return fn.apply(that, arguments);
+ };
+};
+
+
+/***/ }),
+/* 62 */
+/***/ (function(module, exports) {
+
+module.exports = function (it) {
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
+};
+
+
+/***/ }),
+/* 63 */
+/***/ (function(module, exports) {
+
+module.exports = function (exec) {
+ try {
+ return !!exec();
+ } catch (e) {
+ return true;
+ }
+};
+
+
+/***/ }),
+/* 64 */
+/***/ (function(module, exports, __webpack_require__) {
+
+// 19.1.2.14 / 15.2.3.14 Object.keys(O)
+var $keys = __webpack_require__(207);
+var enumBugKeys = __webpack_require__(138);
+
+module.exports = Object.keys || function keys(O) {
+ return $keys(O, enumBugKeys);
+};
+
+
+/***/ }),
+/* 65 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var _assign = __webpack_require__(15);
+
+var ReactBaseClasses = __webpack_require__(209);
+var ReactChildren = __webpack_require__(342);
+var ReactDOMFactories = __webpack_require__(347);
+var ReactElement = __webpack_require__(66);
+var ReactPropTypes = __webpack_require__(348);
+var ReactVersion = __webpack_require__(351);
+
+var createReactClass = __webpack_require__(352);
+var onlyChild = __webpack_require__(353);
+
+var createElement = ReactElement.createElement;
+var createFactory = ReactElement.createFactory;
+var cloneElement = ReactElement.cloneElement;
+
+if (false) {
+ var lowPriorityWarning = require('./lowPriorityWarning');
+ var canDefineProperty = require('./canDefineProperty');
+ var ReactElementValidator = require('./ReactElementValidator');
+ var didWarnPropTypesDeprecated = false;
+ createElement = ReactElementValidator.createElement;
+ createFactory = ReactElementValidator.createFactory;
+ cloneElement = ReactElementValidator.cloneElement;
+}
+
+var __spread = _assign;
+var createMixin = function (mixin) {
+ return mixin;
+};
+
+if (false) {
+ var warnedForSpread = false;
+ var warnedForCreateMixin = false;
+ __spread = function () {
+ lowPriorityWarning(warnedForSpread, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.');
+ warnedForSpread = true;
+ return _assign.apply(null, arguments);
+ };
+
+ createMixin = function (mixin) {
+ lowPriorityWarning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. ' + 'In React v16.0, it will be removed. ' + 'You can use this mixin directly instead. ' + 'See https://fb.me/createmixin-was-never-implemented for more info.');
+ warnedForCreateMixin = true;
+ return mixin;
+ };
+}
+
+var React = {
+ // Modern
+
+ Children: {
+ map: ReactChildren.map,
+ forEach: ReactChildren.forEach,
+ count: ReactChildren.count,
+ toArray: ReactChildren.toArray,
+ only: onlyChild
+ },
+
+ Component: ReactBaseClasses.Component,
+ PureComponent: ReactBaseClasses.PureComponent,
+
+ createElement: createElement,
+ cloneElement: cloneElement,
+ isValidElement: ReactElement.isValidElement,
+
+ // Classic
+
+ PropTypes: ReactPropTypes,
+ createClass: createReactClass,
+ createFactory: createFactory,
+ createMixin: createMixin,
+
+ // This looks DOM specific but these are actually isomorphic helpers
+ // since they are just generating DOM strings.
+ DOM: ReactDOMFactories,
+
+ version: ReactVersion,
+
+ // Deprecated hook for JSX spread, don't use this for anything.
+ __spread: __spread
+};
+
+if (false) {
+ var warnedForCreateClass = false;
+ if (canDefineProperty) {
+ Object.defineProperty(React, 'PropTypes', {
+ get: function () {
+ lowPriorityWarning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated,' + ' and will be removed in React v16.0.' + ' Use the latest available v15.* prop-types package from npm instead.' + ' For info on usage, compatibility, migration and more, see ' + 'https://fb.me/prop-types-docs');
+ didWarnPropTypesDeprecated = true;
+ return ReactPropTypes;
+ }
+ });
+
+ Object.defineProperty(React, 'createClass', {
+ get: function () {
+ lowPriorityWarning(warnedForCreateClass, 'Accessing createClass via the main React package is deprecated,' + ' and will be removed in React v16.0.' + " Use a plain JavaScript class instead. If you're not yet " + 'ready to migrate, create-react-class v15.* is available ' + 'on npm as a temporary, drop-in replacement. ' + 'For more info see https://fb.me/react-create-class');
+ warnedForCreateClass = true;
+ return createReactClass;
+ }
+ });
+ }
+
+ // React.DOM factories are deprecated. Wrap these methods so that
+ // invocations of the React.DOM namespace and alert users to switch
+ // to the `react-dom-factories` package.
+ React.DOM = {};
+ var warnedForFactories = false;
+ Object.keys(ReactDOMFactories).forEach(function (factory) {
+ React.DOM[factory] = function () {
+ if (!warnedForFactories) {
+ lowPriorityWarning(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in v16.0+. Use the ' + 'react-dom-factories package instead. ' + ' Version 1.0 provides a drop-in replacement.' + ' For more info, see https://fb.me/react-dom-factories', factory);
+ warnedForFactories = true;
+ }
+ return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments);
+ };
+ });
+}
+
+module.exports = React;
+
+/***/ }),
+/* 66 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2014-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var _assign = __webpack_require__(15);
+
+var ReactCurrentOwner = __webpack_require__(37);
+
+var warning = __webpack_require__(12);
+var canDefineProperty = __webpack_require__(211);
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+var REACT_ELEMENT_TYPE = __webpack_require__(212);
+
+var RESERVED_PROPS = {
+ key: true,
+ ref: true,
+ __self: true,
+ __source: true
+};
+
+var specialPropKeyWarningShown, specialPropRefWarningShown;
+
+function hasValidRef(config) {
+ if (false) {
+ if (hasOwnProperty.call(config, 'ref')) {
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
+ if (getter && getter.isReactWarning) {
+ return false;
+ }
+ }
+ }
+ return config.ref !== undefined;
+}
+
+function hasValidKey(config) {
+ if (false) {
+ if (hasOwnProperty.call(config, 'key')) {
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
+ if (getter && getter.isReactWarning) {
+ return false;
+ }
+ }
+ }
+ return config.key !== undefined;
+}
+
+function defineKeyPropWarningGetter(props, displayName) {
+ var warnAboutAccessingKey = function () {
+ if (!specialPropKeyWarningShown) {
+ specialPropKeyWarningShown = true;
+ false ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
+ }
+ };
+ warnAboutAccessingKey.isReactWarning = true;
+ Object.defineProperty(props, 'key', {
+ get: warnAboutAccessingKey,
+ configurable: true
+ });
+}
+
+function defineRefPropWarningGetter(props, displayName) {
+ var warnAboutAccessingRef = function () {
+ if (!specialPropRefWarningShown) {
+ specialPropRefWarningShown = true;
+ false ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
+ }
+ };
+ warnAboutAccessingRef.isReactWarning = true;
+ Object.defineProperty(props, 'ref', {
+ get: warnAboutAccessingRef,
+ configurable: true
+ });
+}
+
+/**
+ * Factory method to create a new React element. This no longer adheres to
+ * the class pattern, so do not use new to call it. Also, no instanceof check
+ * will work. Instead test $$typeof field against Symbol.for('react.element') to check
+ * if something is a React Element.
+ *
+ * @param {*} type
+ * @param {*} key
+ * @param {string|object} ref
+ * @param {*} self A *temporary* helper to detect places where `this` is
+ * different from the `owner` when React.createElement is called, so that we
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
+ * functions, and as long as `this` and owner are the same, there will be no
+ * change in behavior.
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
+ * indicating filename, line number, and/or other information.
+ * @param {*} owner
+ * @param {*} props
+ * @internal
+ */
+var ReactElement = function (type, key, ref, self, source, owner, props) {
+ var element = {
+ // This tag allow us to uniquely identify this as a React Element
+ $$typeof: REACT_ELEMENT_TYPE,
+
+ // Built-in properties that belong on the element
+ type: type,
+ key: key,
+ ref: ref,
+ props: props,
+
+ // Record the component responsible for creating this element.
+ _owner: owner
+ };
+
+ if (false) {
+ // The validation flag is currently mutative. We put it on
+ // an external backing store so that we can freeze the whole object.
+ // This can be replaced with a WeakMap once they are implemented in
+ // commonly used development environments.
+ element._store = {};
+
+ // To make comparing ReactElements easier for testing purposes, we make
+ // the validation flag non-enumerable (where possible, which should
+ // include every environment we run tests in), so the test framework
+ // ignores it.
+ if (canDefineProperty) {
+ Object.defineProperty(element._store, 'validated', {
+ configurable: false,
+ enumerable: false,
+ writable: true,
+ value: false
+ });
+ // self and source are DEV only properties.
+ Object.defineProperty(element, '_self', {
+ configurable: false,
+ enumerable: false,
+ writable: false,
+ value: self
+ });
+ // Two elements created in two different places should be considered
+ // equal for testing purposes and therefore we hide it from enumeration.
+ Object.defineProperty(element, '_source', {
+ configurable: false,
+ enumerable: false,
+ writable: false,
+ value: source
+ });
+ } else {
+ element._store.validated = false;
+ element._self = self;
+ element._source = source;
+ }
+ if (Object.freeze) {
+ Object.freeze(element.props);
+ Object.freeze(element);
+ }
+ }
+
+ return element;
+};
+
+/**
+ * Create and return a new ReactElement of the given type.
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement
+ */
+ReactElement.createElement = function (type, config, children) {
+ var propName;
+
+ // Reserved names are extracted
+ var props = {};
+
+ var key = null;
+ var ref = null;
+ var self = null;
+ var source = null;
+
+ if (config != null) {
+ if (hasValidRef(config)) {
+ ref = config.ref;
+ }
+ if (hasValidKey(config)) {
+ key = '' + config.key;
+ }
+
+ self = config.__self === undefined ? null : config.__self;
+ source = config.__source === undefined ? null : config.__source;
+ // Remaining properties are added to a new props object
+ for (propName in config) {
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
+ props[propName] = config[propName];
+ }
+ }
+ }
+
+ // Children can be more than one argument, and those are transferred onto
+ // the newly allocated props object.
+ var childrenLength = arguments.length - 2;
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = Array(childrenLength);
+ for (var i = 0; i < childrenLength; i++) {
+ childArray[i] = arguments[i + 2];
+ }
+ if (false) {
+ if (Object.freeze) {
+ Object.freeze(childArray);
+ }
+ }
+ props.children = childArray;
+ }
+
+ // Resolve default props
+ if (type && type.defaultProps) {
+ var defaultProps = type.defaultProps;
+ for (propName in defaultProps) {
+ if (props[propName] === undefined) {
+ props[propName] = defaultProps[propName];
+ }
+ }
+ }
+ if (false) {
+ if (key || ref) {
+ if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
+ if (key) {
+ defineKeyPropWarningGetter(props, displayName);
+ }
+ if (ref) {
+ defineRefPropWarningGetter(props, displayName);
+ }
+ }
+ }
+ }
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
+};
+
+/**
+ * Return a function that produces ReactElements of a given type.
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory
+ */
+ReactElement.createFactory = function (type) {
+ var factory = ReactElement.createElement.bind(null, type);
+ // Expose the type on the factory and the prototype so that it can be
+ // easily accessed on elements. E.g. `.type === Foo`.
+ // This should not be named `constructor` since this may not be the function
+ // that created the element, and it may not even be a constructor.
+ // Legacy hook TODO: Warn if this is accessed
+ factory.type = type;
+ return factory;
+};
+
+ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
+
+ return newElement;
+};
+
+/**
+ * Clone and return a new ReactElement using element as the starting point.
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement
+ */
+ReactElement.cloneElement = function (element, config, children) {
+ var propName;
+
+ // Original props are copied
+ var props = _assign({}, element.props);
+
+ // Reserved names are extracted
+ var key = element.key;
+ var ref = element.ref;
+ // Self is preserved since the owner is preserved.
+ var self = element._self;
+ // Source is preserved since cloneElement is unlikely to be targeted by a
+ // transpiler, and the original source is probably a better indicator of the
+ // true owner.
+ var source = element._source;
+
+ // Owner will be preserved, unless ref is overridden
+ var owner = element._owner;
+
+ if (config != null) {
+ if (hasValidRef(config)) {
+ // Silently steal the ref from the parent.
+ ref = config.ref;
+ owner = ReactCurrentOwner.current;
+ }
+ if (hasValidKey(config)) {
+ key = '' + config.key;
+ }
+
+ // Remaining properties override existing props
+ var defaultProps;
+ if (element.type && element.type.defaultProps) {
+ defaultProps = element.type.defaultProps;
+ }
+ for (propName in config) {
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
+ if (config[propName] === undefined && defaultProps !== undefined) {
+ // Resolve default props
+ props[propName] = defaultProps[propName];
+ } else {
+ props[propName] = config[propName];
+ }
+ }
+ }
+ }
+
+ // Children can be more than one argument, and those are transferred onto
+ // the newly allocated props object.
+ var childrenLength = arguments.length - 2;
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = Array(childrenLength);
+ for (var i = 0; i < childrenLength; i++) {
+ childArray[i] = arguments[i + 2];
+ }
+ props.children = childArray;
+ }
+
+ return ReactElement(element.type, key, ref, self, source, owner, props);
+};
+
+/**
+ * Verifies the object is a ReactElement.
+ * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement
+ * @param {?object} object
+ * @return {boolean} True if `object` is a valid component.
+ * @final
+ */
+ReactElement.isValidElement = function (object) {
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
+};
+
+module.exports = ReactElement;
+
+/***/ }),
+/* 67 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(13);
+
+var invariant = __webpack_require__(9);
+
+function checkMask(value, bitmask) {
+ return (value & bitmask) === bitmask;
+}
+
+var DOMPropertyInjection = {
+ /**
+ * Mapping from normalized, camelcased property names to a configuration that
+ * specifies how the associated DOM property should be accessed or rendered.
+ */
+ MUST_USE_PROPERTY: 0x1,
+ HAS_BOOLEAN_VALUE: 0x4,
+ HAS_NUMERIC_VALUE: 0x8,
+ HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
+ HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
+
+ /**
+ * Inject some specialized knowledge about the DOM. This takes a config object
+ * with the following properties:
+ *
+ * isCustomAttribute: function that given an attribute name will return true
+ * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
+ * attributes where it's impossible to enumerate all of the possible
+ * attribute names,
+ *
+ * Properties: object mapping DOM property name to one of the
+ * DOMPropertyInjection constants or null. If your attribute isn't in here,
+ * it won't get written to the DOM.
+ *
+ * DOMAttributeNames: object mapping React attribute name to the DOM
+ * attribute name. Attribute names not specified use the **lowercase**
+ * normalized name.
+ *
+ * DOMAttributeNamespaces: object mapping React attribute name to the DOM
+ * attribute namespace URL. (Attribute names not specified use no namespace.)
+ *
+ * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
+ * Property names not specified use the normalized name.
+ *
+ * DOMMutationMethods: Properties that require special mutation methods. If
+ * `value` is undefined, the mutation method should unset the property.
+ *
+ * @param {object} domPropertyConfig the config as described above.
+ */
+ injectDOMPropertyConfig: function (domPropertyConfig) {
+ var Injection = DOMPropertyInjection;
+ var Properties = domPropertyConfig.Properties || {};
+ var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
+ var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
+ var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
+ var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
+
+ if (domPropertyConfig.isCustomAttribute) {
+ DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
+ }
+
+ for (var propName in Properties) {
+ !!DOMProperty.properties.hasOwnProperty(propName) ? false ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;
+
+ var lowerCased = propName.toLowerCase();
+ var propConfig = Properties[propName];
+
+ var propertyInfo = {
+ attributeName: lowerCased,
+ attributeNamespace: null,
+ propertyName: propName,
+ mutationMethod: null,
+
+ mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
+ hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
+ hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
+ hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
+ hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
+ };
+ !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? false ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;
+
+ if (false) {
+ DOMProperty.getPossibleStandardName[lowerCased] = propName;
+ }
+
+ if (DOMAttributeNames.hasOwnProperty(propName)) {
+ var attributeName = DOMAttributeNames[propName];
+ propertyInfo.attributeName = attributeName;
+ if (false) {
+ DOMProperty.getPossibleStandardName[attributeName] = propName;
+ }
+ }
+
+ if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
+ propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
+ }
+
+ if (DOMPropertyNames.hasOwnProperty(propName)) {
+ propertyInfo.propertyName = DOMPropertyNames[propName];
+ }
+
+ if (DOMMutationMethods.hasOwnProperty(propName)) {
+ propertyInfo.mutationMethod = DOMMutationMethods[propName];
+ }
+
+ DOMProperty.properties[propName] = propertyInfo;
+ }
+ }
+};
+
+/* eslint-disable max-len */
+var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
+/* eslint-enable max-len */
+
+/**
+ * DOMProperty exports lookup objects that can be used like functions:
+ *
+ * > DOMProperty.isValid['id']
+ * true
+ * > DOMProperty.isValid['foobar']
+ * undefined
+ *
+ * Although this may be confusing, it performs better in general.
+ *
+ * @see http://jsperf.com/key-exists
+ * @see http://jsperf.com/key-missing
+ */
+var DOMProperty = {
+ ID_ATTRIBUTE_NAME: 'data-reactid',
+ ROOT_ATTRIBUTE_NAME: 'data-reactroot',
+
+ ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
+ ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
+
+ /**
+ * Map from property "standard name" to an object with info about how to set
+ * the property in the DOM. Each object contains:
+ *
+ * attributeName:
+ * Used when rendering markup or with `*Attribute()`.
+ * attributeNamespace
+ * propertyName:
+ * Used on DOM node instances. (This includes properties that mutate due to
+ * external factors.)
+ * mutationMethod:
+ * If non-null, used instead of the property or `setAttribute()` after
+ * initial render.
+ * mustUseProperty:
+ * Whether the property must be accessed and mutated as an object property.
+ * hasBooleanValue:
+ * Whether the property should be removed when set to a falsey value.
+ * hasNumericValue:
+ * Whether the property must be numeric or parse as a numeric and should be
+ * removed when set to a falsey value.
+ * hasPositiveNumericValue:
+ * Whether the property must be positive numeric or parse as a positive
+ * numeric and should be removed when set to a falsey value.
+ * hasOverloadedBooleanValue:
+ * Whether the property can be used as a flag as well as with a value.
+ * Removed when strictly equal to false; present without a value when
+ * strictly equal to true; present with a value otherwise.
+ */
+ properties: {},
+
+ /**
+ * Mapping from lowercase property names to the properly cased version, used
+ * to warn in the case of missing properties. Available only in __DEV__.
+ *
+ * autofocus is predefined, because adding it to the property whitelist
+ * causes unintended side effects.
+ *
+ * @type {Object}
+ */
+ getPossibleStandardName: false ? { autofocus: 'autoFocus' } : null,
+
+ /**
+ * All of the isCustomAttribute() functions that have been injected.
+ */
+ _isCustomAttributeFunctions: [],
+
+ /**
+ * Checks whether a property name is a custom attribute.
+ * @method
+ */
+ isCustomAttribute: function (attributeName) {
+ for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
+ var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
+ if (isCustomAttributeFn(attributeName)) {
+ return true;
+ }
+ }
+ return false;
+ },
+
+ injection: DOMPropertyInjection
+};
+
+module.exports = DOMProperty;
+
+/***/ }),
+/* 68 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var EventPluginHub = __webpack_require__(69);
+var EventPluginUtils = __webpack_require__(103);
+
+var accumulateInto = __webpack_require__(217);
+var forEachAccumulated = __webpack_require__(218);
+var warning = __webpack_require__(12);
+
+var getListener = EventPluginHub.getListener;
+
+/**
+ * Some event types have a notion of different registration names for different
+ * "phases" of propagation. This finds listeners by a given phase.
+ */
+function listenerAtPhase(inst, event, propagationPhase) {
+ var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
+ return getListener(inst, registrationName);
+}
+
+/**
+ * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
+ * here, allows us to not have to bind or create functions for each event.
+ * Mutating the event's members allows us to not have to create a wrapping
+ * "dispatch" object that pairs the event with the listener.
+ */
+function accumulateDirectionalDispatches(inst, phase, event) {
+ if (false) {
+ process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;
+ }
+ var listener = listenerAtPhase(inst, event, phase);
+ if (listener) {
+ event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
+ event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
+ }
+}
+
+/**
+ * Collect dispatches (must be entirely collected before dispatching - see unit
+ * tests). Lazily allocate the array to conserve memory. We must loop through
+ * each event and perform the traversal for each one. We cannot perform a
+ * single traversal for the entire collection of events because each event may
+ * have a different target.
+ */
+function accumulateTwoPhaseDispatchesSingle(event) {
+ if (event && event.dispatchConfig.phasedRegistrationNames) {
+ EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
+ }
+}
+
+/**
+ * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
+ */
+function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
+ if (event && event.dispatchConfig.phasedRegistrationNames) {
+ var targetInst = event._targetInst;
+ var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
+ EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
+ }
+}
+
+/**
+ * Accumulates without regard to direction, does not look for phased
+ * registration names. Same as `accumulateDirectDispatchesSingle` but without
+ * requiring that the `dispatchMarker` be the same as the dispatched ID.
+ */
+function accumulateDispatches(inst, ignoredDirection, event) {
+ if (event && event.dispatchConfig.registrationName) {
+ var registrationName = event.dispatchConfig.registrationName;
+ var listener = getListener(inst, registrationName);
+ if (listener) {
+ event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
+ event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
+ }
+ }
+}
+
+/**
+ * Accumulates dispatches on an `SyntheticEvent`, but only for the
+ * `dispatchMarker`.
+ * @param {SyntheticEvent} event
+ */
+function accumulateDirectDispatchesSingle(event) {
+ if (event && event.dispatchConfig.registrationName) {
+ accumulateDispatches(event._targetInst, null, event);
+ }
+}
+
+function accumulateTwoPhaseDispatches(events) {
+ forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
+}
+
+function accumulateTwoPhaseDispatchesSkipTarget(events) {
+ forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
+}
+
+function accumulateEnterLeaveDispatches(leave, enter, from, to) {
+ EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
+}
+
+function accumulateDirectDispatches(events) {
+ forEachAccumulated(events, accumulateDirectDispatchesSingle);
+}
+
+/**
+ * A small set of propagation patterns, each of which will accept a small amount
+ * of information, and generate a set of "dispatch ready event objects" - which
+ * are sets of events that have already been annotated with a set of dispatched
+ * listener functions/ids. The API is designed this way to discourage these
+ * propagation strategies from actually executing the dispatches, since we
+ * always want to collect the entire set of dispatches before executing event a
+ * single one.
+ *
+ * @constructor EventPropagators
+ */
+var EventPropagators = {
+ accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
+ accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
+ accumulateDirectDispatches: accumulateDirectDispatches,
+ accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
+};
+
+module.exports = EventPropagators;
+
+/***/ }),
+/* 69 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var _prodInvariant = __webpack_require__(13);
+
+var EventPluginRegistry = __webpack_require__(140);
+var EventPluginUtils = __webpack_require__(103);
+var ReactErrorUtils = __webpack_require__(141);
+
+var accumulateInto = __webpack_require__(217);
+var forEachAccumulated = __webpack_require__(218);
+var invariant = __webpack_require__(9);
+
+/**
+ * Internal store for event listeners
+ */
+var listenerBank = {};
+
+/**
+ * Internal queue of events that have accumulated their dispatches and are
+ * waiting to have their dispatches executed.
+ */
+var eventQueue = null;
+
+/**
+ * Dispatches an event and releases it back into the pool, unless persistent.
+ *
+ * @param {?object} event Synthetic event to be dispatched.
+ * @param {boolean} simulated If the event is simulated (changes exn behavior)
+ * @private
+ */
+var executeDispatchesAndRelease = function (event, simulated) {
+ if (event) {
+ EventPluginUtils.executeDispatchesInOrder(event, simulated);
+
+ if (!event.isPersistent()) {
+ event.constructor.release(event);
+ }
+ }
+};
+var executeDispatchesAndReleaseSimulated = function (e) {
+ return executeDispatchesAndRelease(e, true);
+};
+var executeDispatchesAndReleaseTopLevel = function (e) {
+ return executeDispatchesAndRelease(e, false);
+};
+
+var getDictionaryKey = function (inst) {
+ // Prevents V8 performance issue:
+ // https://github.com/facebook/react/pull/7232
+ return '.' + inst._rootNodeID;
+};
+
+function isInteractive(tag) {
+ return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
+}
+
+function shouldPreventMouseEvent(name, type, props) {
+ switch (name) {
+ case 'onClick':
+ case 'onClickCapture':
+ case 'onDoubleClick':
+ case 'onDoubleClickCapture':
+ case 'onMouseDown':
+ case 'onMouseDownCapture':
+ case 'onMouseMove':
+ case 'onMouseMoveCapture':
+ case 'onMouseUp':
+ case 'onMouseUpCapture':
+ return !!(props.disabled && isInteractive(type));
+ default:
+ return false;
+ }
+}
+
+/**
+ * This is a unified interface for event plugins to be installed and configured.
+ *
+ * Event plugins can implement the following properties:
+ *
+ * `extractEvents` {function(string, DOMEventTarget, string, object): *}
+ * Required. When a top-level event is fired, this method is expected to
+ * extract synthetic events that will in turn be queued and dispatched.
+ *
+ * `eventTypes` {object}
+ * Optional, plugins that fire events must publish a mapping of registration
+ * names that are used to register listeners. Values of this mapping must
+ * be objects that contain `registrationName` or `phasedRegistrationNames`.
+ *
+ * `executeDispatch` {function(object, function, string)}
+ * Optional, allows plugins to override how an event gets dispatched. By
+ * default, the listener is simply invoked.
+ *
+ * Each plugin that is injected into `EventsPluginHub` is immediately operable.
+ *
+ * @public
+ */
+var EventPluginHub = {
+ /**
+ * Methods for injecting dependencies.
+ */
+ injection: {
+ /**
+ * @param {array} InjectedEventPluginOrder
+ * @public
+ */
+ injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
+
+ /**
+ * @param {object} injectedNamesToPlugins Map from names to plugin modules.
+ */
+ injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
+ },
+
+ /**
+ * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent.
+ *
+ * @param {object} inst The instance, which is the source of events.
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
+ * @param {function} listener The callback to store.
+ */
+ putListener: function (inst, registrationName, listener) {
+ !(typeof listener === 'function') ? false ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0;
+
+ var key = getDictionaryKey(inst);
+ var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
+ bankForRegistrationName[key] = listener;
+
+ var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
+ if (PluginModule && PluginModule.didPutListener) {
+ PluginModule.didPutListener(inst, registrationName, listener);
+ }
+ },
+
+ /**
+ * @param {object} inst The instance, which is the source of events.
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
+ * @return {?function} The stored callback.
+ */
+ getListener: function (inst, registrationName) {
+ // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
+ // live here; needs to be moved to a better place soon
+ var bankForRegistrationName = listenerBank[registrationName];
+ if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) {
+ return null;
+ }
+ var key = getDictionaryKey(inst);
+ return bankForRegistrationName && bankForRegistrationName[key];
+ },
+
+ /**
+ * Deletes a listener from the registration bank.
+ *
+ * @param {object} inst The instance, which is the source of events.
+ * @param {string} registrationName Name of listener (e.g. `onClick`).
+ */
+ deleteListener: function (inst, registrationName) {
+ var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
+ if (PluginModule && PluginModule.willDeleteListener) {
+ PluginModule.willDeleteListener(inst, registrationName);
+ }
+
+ var bankForRegistrationName = listenerBank[registrationName];
+ // TODO: This should never be null -- when is it?
+ if (bankForRegistrationName) {
+ var key = getDictionaryKey(inst);
+ delete bankForRegistrationName[key];
+ }
+ },
+
+ /**
+ * Deletes all listeners for the DOM element with the supplied ID.
+ *
+ * @param {object} inst The instance, which is the source of events.
+ */
+ deleteAllListeners: function (inst) {
+ var key = getDictionaryKey(inst);
+ for (var registrationName in listenerBank) {
+ if (!listenerBank.hasOwnProperty(registrationName)) {
+ continue;
+ }
+
+ if (!listenerBank[registrationName][key]) {
+ continue;
+ }
+
+ var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
+ if (PluginModule && PluginModule.willDeleteListener) {
+ PluginModule.willDeleteListener(inst, registrationName);
+ }
+
+ delete listenerBank[registrationName][key];
+ }
+ },
+
+ /**
+ * Allows registered plugins an opportunity to extract events from top-level
+ * native browser events.
+ *
+ * @return {*} An accumulation of synthetic events.
+ * @internal
+ */
+ extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
+ var events;
+ var plugins = EventPluginRegistry.plugins;
+ for (var i = 0; i < plugins.length; i++) {
+ // Not every plugin in the ordering may be loaded at runtime.
+ var possiblePlugin = plugins[i];
+ if (possiblePlugin) {
+ var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
+ if (extractedEvents) {
+ events = accumulateInto(events, extractedEvents);
+ }
+ }
+ }
+ return events;
+ },
+
+ /**
+ * Enqueues a synthetic event that should be dispatched when
+ * `processEventQueue` is invoked.
+ *
+ * @param {*} events An accumulation of synthetic events.
+ * @internal
+ */
+ enqueueEvents: function (events) {
+ if (events) {
+ eventQueue = accumulateInto(eventQueue, events);
+ }
+ },
+
+ /**
+ * Dispatches all synthetic events on the event queue.
+ *
+ * @internal
+ */
+ processEventQueue: function (simulated) {
+ // Set `eventQueue` to null before processing it so that we can tell if more
+ // events get enqueued while processing.
+ var processingEventQueue = eventQueue;
+ eventQueue = null;
+ if (simulated) {
+ forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
+ } else {
+ forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
+ }
+ !!eventQueue ? false ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0;
+ // This would be a good time to rethrow if any of the event handlers threw.
+ ReactErrorUtils.rethrowCaughtError();
+ },
+
+ /**
+ * These are needed for tests only. Do not use!
+ */
+ __purge: function () {
+ listenerBank = {};
+ },
+
+ __getListenerBank: function () {
+ return listenerBank;
+ }
+};
+
+module.exports = EventPluginHub;
+
+/***/ }),
+/* 70 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var ReactRef = __webpack_require__(362);
+var ReactInstrumentation = __webpack_require__(29);
+
+var warning = __webpack_require__(12);
+
+/**
+ * Helper to call ReactRef.attachRefs with this composite component, split out
+ * to avoid allocations in the transaction mount-ready queue.
+ */
+function attachRefs() {
+ ReactRef.attachRefs(this, this._currentElement);
+}
+
+var ReactReconciler = {
+ /**
+ * Initializes the component, renders markup, and registers event listeners.
+ *
+ * @param {ReactComponent} internalInstance
+ * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
+ * @param {?object} the containing host component instance
+ * @param {?object} info about the host container
+ * @return {?string} Rendered markup to be inserted into the DOM.
+ * @final
+ * @internal
+ */
+ mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) // 0 in production and for roots
+ {
+ if (false) {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
+ }
+ }
+ var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
+ if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
+ transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
+ }
+ if (false) {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
+ }
+ }
+ return markup;
+ },
+
+ /**
+ * Returns a value that can be passed to
+ * ReactComponentEnvironment.replaceNodeWithMarkup.
+ */
+ getHostNode: function (internalInstance) {
+ return internalInstance.getHostNode();
+ },
+
+ /**
+ * Releases any resources allocated by `mountComponent`.
+ *
+ * @final
+ * @internal
+ */
+ unmountComponent: function (internalInstance, safely) {
+ if (false) {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);
+ }
+ }
+ ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
+ internalInstance.unmountComponent(safely);
+ if (false) {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
+ }
+ }
+ },
+
+ /**
+ * Update a component using a new element.
+ *
+ * @param {ReactComponent} internalInstance
+ * @param {ReactElement} nextElement
+ * @param {ReactReconcileTransaction} transaction
+ * @param {object} context
+ * @internal
+ */
+ receiveComponent: function (internalInstance, nextElement, transaction, context) {
+ var prevElement = internalInstance._currentElement;
+
+ if (nextElement === prevElement && context === internalInstance._context) {
+ // Since elements are immutable after the owner is rendered,
+ // we can do a cheap identity compare here to determine if this is a
+ // superfluous reconcile. It's possible for state to be mutable but such
+ // change should trigger an update of the owner which would recreate
+ // the element. We explicitly check for the existence of an owner since
+ // it's possible for an element created outside a composite to be
+ // deeply mutated and reused.
+
+ // TODO: Bailing out early is just a perf optimization right?
+ // TODO: Removing the return statement should affect correctness?
+ return;
+ }
+
+ if (false) {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
+ }
+ }
+
+ var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
+
+ if (refsChanged) {
+ ReactRef.detachRefs(internalInstance, prevElement);
+ }
+
+ internalInstance.receiveComponent(nextElement, transaction, context);
+
+ if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
+ transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
+ }
+
+ if (false) {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
+ }
+ }
+ },
+
+ /**
+ * Flush any dirty changes in a component.
+ *
+ * @param {ReactComponent} internalInstance
+ * @param {ReactReconcileTransaction} transaction
+ * @internal
+ */
+ performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {
+ if (internalInstance._updateBatchNumber !== updateBatchNumber) {
+ // The component's enqueued batch number should always be the current
+ // batch or the following one.
+ false ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;
+ return;
+ }
+ if (false) {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);
+ }
+ }
+ internalInstance.performUpdateIfNecessary(transaction);
+ if (false) {
+ if (internalInstance._debugID !== 0) {
+ ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
+ }
+ }
+ }
+};
+
+module.exports = ReactReconciler;
+
+/***/ }),
+/* 71 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var SyntheticEvent = __webpack_require__(38);
+
+var getEventTarget = __webpack_require__(142);
+
+/**
+ * @interface UIEvent
+ * @see http://www.w3.org/TR/DOM-Level-3-Events/
+ */
+var UIEventInterface = {
+ view: function (event) {
+ if (event.view) {
+ return event.view;
+ }
+
+ var target = getEventTarget(event);
+ if (target.window === target) {
+ // target is a window object
+ return target;
+ }
+
+ var doc = target.ownerDocument;
+ // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
+ if (doc) {
+ return doc.defaultView || doc.parentWindow;
+ } else {
+ return window;
+ }
+ },
+ detail: function (event) {
+ return event.detail || 0;
+ }
+};
+
+/**
+ * @param {object} dispatchConfig Configuration used to dispatch this event.
+ * @param {string} dispatchMarker Marker identifying the event target.
+ * @param {object} nativeEvent Native browser event.
+ * @extends {SyntheticEvent}
+ */
+function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
+ return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
+}
+
+SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
+
+module.exports = SyntheticUIEvent;
+
+/***/ }),
+/* 72 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+/**
+ * Copyright 2015-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+
+
+var DOMNamespaces = __webpack_require__(147);
+var setInnerHTML = __webpack_require__(106);
+
+var createMicrosoftUnsafeLocalFunction = __webpack_require__(148);
+var setTextContent = __webpack_require__(224);
+
+var ELEMENT_NODE_TYPE = 1;
+var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
+
+/**
+ * In IE (8-11) and Edge, appending nodes with no children is dramatically
+ * faster than appending a full subtree, so we essentially queue up the
+ * .appendChild calls here and apply them so each node is added to its parent
+ * before any children are added.
+ *
+ * In other browsers, doing so is slower or neutral compared to the other order
+ * (in Firefox, twice as slow) so we only do this inversion in IE.
+ *
+ * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.
+ */
+var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
+
+function insertTreeChildren(tree) {
+ if (!enableLazy) {
+ return;
+ }
+ var node = tree.node;
+ var children = tree.children;
+ if (children.length) {
+ for (var i = 0; i < children.length; i++) {
+ insertTreeBefore(node, children[i], null);
+ }
+ } else if (tree.html != null) {
+ setInnerHTML(node, tree.html);
+ } else if (tree.text != null) {
+ setTextContent(node, tree.text);
+ }
+}
+
+var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
+ // DocumentFragments aren't actually part of the DOM after insertion so
+ // appending children won't update the DOM. We need to ensure the fragment
+ // is properly populated first, breaking out of our lazy approach for just
+ // this level. Also, some