add
This commit is contained in:
parent
d91b974610
commit
9155de472f
2
.babelrc
2
.babelrc
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"presets": ["es2015-loose", "stage-1"],
|
||||
"plugins": ["transform-object-assign", "transform-object-entries"],
|
||||
"plugins": ["transform-object-assign", "transform-es2017-object-entries"],
|
||||
|
||||
"env": {
|
||||
"test": {
|
||||
|
|
|
@ -2,9 +2,12 @@
|
|||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="13e53469-557a-48fa-83c0-132d8e5c2bf1" name="Default" comment="">
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/js/Align.js" afterPath="$PROJECT_DIR$/js/Align.js" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.babelrc" afterPath="$PROJECT_DIR$/.babelrc" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/Align.js" afterPath="$PROJECT_DIR$/lib/Align.js" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/keyCode.js" afterPath="$PROJECT_DIR$/lib/keyCode.js" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/splitComponent.js" afterPath="$PROJECT_DIR$/lib/splitComponent.js" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/package.json" afterPath="$PROJECT_DIR$/package.json" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/.tmp/" />
|
||||
<ignored path="$PROJECT_DIR$/temp/" />
|
||||
|
@ -18,44 +21,42 @@
|
|||
</component>
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
||||
<component name="FileEditorManager">
|
||||
<leaf>
|
||||
<file leaf-file-name="README.md" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/README.md">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file leaf-file-name="splitComponent.js" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/lib/splitComponent.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="844">
|
||||
<caret line="154" column="4" lean-forward="false" selection-start-line="154" selection-start-column="4" selection-end-line="154" selection-end-column="4" />
|
||||
<state relative-caret-position="244">
|
||||
<caret line="16" column="28" lean-forward="false" selection-start-line="16" selection-start-column="9" selection-end-line="16" selection-end-column="28" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="componentOrElement.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/componentOrElement.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="806">
|
||||
<caret line="31" column="50" lean-forward="false" selection-start-line="31" selection-start-column="42" selection-end-line="31" selection-end-column="50" />
|
||||
<folding>
|
||||
<element signature="e#0#26#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="createChainableTypeChecker.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/utils/createChainableTypeChecker.js">
|
||||
<entry file="file://$PROJECT_DIR$/lib/utils/createChainableTypeChecker.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-468">
|
||||
<state relative-caret-position="-316">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="all.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/all.js">
|
||||
<file leaf-file-name="addEventListener.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/lib/addEventListener.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="286">
|
||||
<caret line="11" column="30" lean-forward="false" selection-start-line="11" selection-start-column="21" selection-end-line="11" selection-end-column="30" />
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="splitComponent.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/splitComponent.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="390">
|
||||
<caret line="15" column="12" lean-forward="false" selection-start-line="15" selection-start-column="12" selection-end-line="15" selection-end-column="12" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -64,62 +65,48 @@
|
|||
<file leaf-file-name="Align.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/Align.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1196">
|
||||
<state relative-caret-position="-1186">
|
||||
<caret line="64" column="20" lean-forward="false" selection-start-line="64" selection-start-column="2" selection-end-line="64" selection-end-column="20" />
|
||||
<folding>
|
||||
<element signature="e#0#52#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="addEventListener.js" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/js/addEventListener.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="130">
|
||||
<caret line="5" column="51" lean-forward="false" selection-start-line="5" selection-start-column="28" selection-end-line="5" selection-end-column="51" />
|
||||
<folding>
|
||||
<element signature="e#0#57#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="deprecated.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/deprecated.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="104">
|
||||
<caret line="4" column="34" lean-forward="false" selection-start-line="4" selection-start-column="24" selection-end-line="4" selection-end-column="34" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="cssAnimation.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/cssAnimation.js">
|
||||
<file leaf-file-name="package.json" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/package.json">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-2798">
|
||||
<caret line="38" column="3" lean-forward="true" selection-start-line="38" selection-start-column="3" selection-end-line="38" selection-end-column="3" />
|
||||
<state relative-caret-position="499">
|
||||
<caret line="28" column="53" lean-forward="false" selection-start-line="28" selection-start-column="53" selection-end-line="28" selection-end-column="53" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="createChainedFunction.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/createChainedFunction.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="78">
|
||||
<caret line="3" column="24" lean-forward="true" selection-start-line="3" selection-start-column="24" selection-end-line="3" selection-end-column="24" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="contains.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/contains.js">
|
||||
<file leaf-file-name="index.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/index.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="32" lean-forward="false" selection-start-line="0" selection-start-column="24" selection-end-line="0" selection-end-column="32" />
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="addEventListener.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/js/addEventListener.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="104">
|
||||
<caret line="5" column="51" lean-forward="false" selection-start-line="5" selection-start-column="28" selection-end-line="5" selection-end-column="51" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name=".babelrc" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/.babelrc">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="260">
|
||||
<caret line="10" column="0" lean-forward="false" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -127,6 +114,24 @@
|
|||
</file>
|
||||
</leaf>
|
||||
</component>
|
||||
<component name="FindInProjectRecents">
|
||||
<findStrings>
|
||||
<find>e</find>
|
||||
<find>entr</find>
|
||||
<find>ent</find>
|
||||
<find>a</find>
|
||||
<find>ass</find>
|
||||
<find>assi</find>
|
||||
<find>assig</find>
|
||||
<find>assign</find>
|
||||
<find>splitComponentProps</find>
|
||||
</findStrings>
|
||||
<dirStrings>
|
||||
<dir>I:\yonyou\iuap\tinper-bee-core</dir>
|
||||
<dir>I:\yonyou\iuap\tinper-bee-core\js</dir>
|
||||
<dir>I:\yonyou\iuap\tinper-bee-core\lib</dir>
|
||||
</dirStrings>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
|
@ -136,6 +141,8 @@
|
|||
<option value="$PROJECT_DIR$/lib/keyCode.js" />
|
||||
<option value="$PROJECT_DIR$/README.md" />
|
||||
<option value="$PROJECT_DIR$/js/Align.js" />
|
||||
<option value="$PROJECT_DIR$/.babelrc" />
|
||||
<option value="$PROJECT_DIR$/package.json" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
|
@ -147,9 +154,12 @@
|
|||
<detection-done>true</detection-done>
|
||||
<sorting>DEFINITION_ORDER</sorting>
|
||||
</component>
|
||||
<component name="NodeModulesDirectoryManager">
|
||||
<handled-path value="$PROJECT_DIR$/node_modules" />
|
||||
</component>
|
||||
<component name="ProjectFrameBounds">
|
||||
<option name="x" value="-8" />
|
||||
<option name="y" value="-8" />
|
||||
<option name="x" value="-34" />
|
||||
<option name="y" value="17" />
|
||||
<option name="width" value="1924" />
|
||||
<option name="height" value="1084" />
|
||||
</component>
|
||||
|
@ -168,8 +178,6 @@
|
|||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="Scratches" />
|
||||
<pane id="Scope" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<PATH>
|
||||
|
@ -210,26 +218,10 @@
|
|||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="tinper-bee-core" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="tinper-bee-core" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="js" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="utils" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="Scratches" />
|
||||
<pane id="Scope" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
|
@ -294,6 +286,12 @@
|
|||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
|
||||
<node-interpreter>project</node-interpreter>
|
||||
<node-options />
|
||||
<gulpfile />
|
||||
<tasks />
|
||||
<arguments />
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="js.build_tools.npm" factoryName="npm">
|
||||
|
@ -328,32 +326,33 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1503105208947</updated>
|
||||
<workItem from="1503105210332" duration="6232000" />
|
||||
<workItem from="1504593414893" duration="2913000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="6232000" />
|
||||
<option name="totallyTimeSpent" value="9145000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="-8" y="-8" width="1924" height="1084" extended-state="0" />
|
||||
<frame x="-34" y="17" width="1924" height="1084" extended-state="0" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2497349" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
</layout>
|
||||
</component>
|
||||
|
@ -368,23 +367,25 @@
|
|||
<watches-manager />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/lib/keyCode.js">
|
||||
<entry file="file://$PROJECT_DIR$/README.md">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-1524">
|
||||
<caret line="427" column="3" lean-forward="true" selection-start-line="427" selection-start-column="3" selection-end-line="427" selection-end-column="3" />
|
||||
<state relative-caret-position="4004">
|
||||
<caret line="154" column="4" lean-forward="false" selection-start-line="154" selection-start-column="4" selection-end-line="154" selection-end-column="4" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/index.js">
|
||||
<entry file="file://$PROJECT_DIR$/js/componentOrElement.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-1186">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
<state relative-caret-position="754">
|
||||
<caret line="31" column="50" lean-forward="false" selection-start-line="31" selection-start-column="42" selection-end-line="31" selection-end-column="50" />
|
||||
<folding>
|
||||
<element signature="e#0#26#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/toArray.js">
|
||||
<entry file="file://$PROJECT_DIR$/js/utils/createChainableTypeChecker.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
|
@ -392,11 +393,67 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/all.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="286">
|
||||
<caret line="11" column="30" lean-forward="false" selection-start-line="11" selection-start-column="21" selection-end-line="11" selection-end-column="30" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/Align.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1586">
|
||||
<caret line="64" column="20" lean-forward="false" selection-start-line="64" selection-start-column="2" selection-end-line="64" selection-end-column="20" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/deprecated.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="104">
|
||||
<caret line="4" column="34" lean-forward="false" selection-start-line="4" selection-start-column="24" selection-end-line="4" selection-end-column="34" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/cssAnimation.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="988">
|
||||
<caret line="38" column="3" lean-forward="true" selection-start-line="38" selection-start-column="3" selection-end-line="38" selection-end-column="3" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/createChainedFunction.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="78">
|
||||
<caret line="3" column="24" lean-forward="true" selection-start-line="3" selection-start-column="24" selection-end-line="3" selection-end-column="24" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/contains.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="32" lean-forward="false" selection-start-line="0" selection-start-column="24" selection-end-line="0" selection-end-column="32" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/addEventListener.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="104">
|
||||
<caret line="5" column="51" lean-forward="false" selection-start-line="5" selection-start-column="28" selection-end-line="5" selection-end-column="51" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/index.js" />
|
||||
<entry file="file://$PROJECT_DIR$/js/keyCode.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-12782">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -404,15 +461,6 @@
|
|||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="52">
|
||||
<caret line="2" column="31" lean-forward="false" selection-start-line="2" selection-start-column="24" selection-end-line="2" selection-end-column="31" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/splitComponent.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="520">
|
||||
<caret line="20" column="34" lean-forward="false" selection-start-line="20" selection-start-column="9" selection-end-line="20" selection-end-column="34" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
@ -445,7 +493,7 @@
|
|||
<state relative-caret-position="104">
|
||||
<caret line="4" column="20" lean-forward="false" selection-start-line="4" selection-start-column="9" selection-end-line="4" selection-end-column="20" />
|
||||
<folding>
|
||||
<element signature="e#0#26#0" expanded="true" />
|
||||
<element signature="e#0#26#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -460,8 +508,8 @@
|
|||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/cssAnimation.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-2798">
|
||||
<caret line="38" column="3" lean-forward="true" selection-start-line="38" selection-start-column="3" selection-end-line="38" selection-end-column="3" />
|
||||
<state relative-caret-position="988">
|
||||
<caret line="38" column="3" lean-forward="false" selection-start-line="38" selection-start-column="3" selection-end-line="38" selection-end-column="3" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -469,7 +517,7 @@
|
|||
<entry file="file://$PROJECT_DIR$/js/createChainedFunction.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="78">
|
||||
<caret line="3" column="24" lean-forward="true" selection-start-line="3" selection-start-column="24" selection-end-line="3" selection-end-column="24" />
|
||||
<caret line="3" column="24" lean-forward="false" selection-start-line="3" selection-start-column="24" selection-end-line="3" selection-end-column="24" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -484,7 +532,7 @@
|
|||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/README.md">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="844">
|
||||
<state relative-caret-position="4004">
|
||||
<caret line="154" column="4" lean-forward="false" selection-start-line="154" selection-start-column="4" selection-end-line="154" selection-end-column="4" />
|
||||
<folding />
|
||||
</state>
|
||||
|
@ -492,17 +540,17 @@
|
|||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/componentOrElement.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="806">
|
||||
<state relative-caret-position="754">
|
||||
<caret line="31" column="50" lean-forward="false" selection-start-line="31" selection-start-column="42" selection-end-line="31" selection-end-column="50" />
|
||||
<folding>
|
||||
<element signature="e#0#26#0" expanded="true" />
|
||||
<element signature="e#0#26#0" expanded="false" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/utils/createChainableTypeChecker.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-468">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
|
@ -516,23 +564,171 @@
|
|||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/Align.js">
|
||||
<entry file="file://$PROJECT_DIR$/lib/toArray.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1196">
|
||||
<caret line="64" column="20" lean-forward="false" selection-start-line="64" selection-start-column="2" selection-end-line="64" selection-end-column="20" />
|
||||
<folding>
|
||||
<element signature="e#0#52#0" expanded="true" />
|
||||
</folding>
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/keyCode.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-5070">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/isRequiredForA11y.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/getContainerRenderMixin.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/Event.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/elementType.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/cssAnimation.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/createChainedFunction.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/contains.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/componentOrElement.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/all.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/Align.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/utils/createChainableTypeChecker.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-316">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/addEventListener.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/addEventListener.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="130">
|
||||
<state relative-caret-position="104">
|
||||
<caret line="5" column="51" lean-forward="false" selection-start-line="5" selection-start-column="28" selection-end-line="5" selection-end-column="51" />
|
||||
<folding>
|
||||
<element signature="e#0#57#0" expanded="true" />
|
||||
</folding>
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/Align.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-1186">
|
||||
<caret line="64" column="20" lean-forward="false" selection-start-line="64" selection-start-column="2" selection-end-line="64" selection-end-column="20" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/index.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/.babelrc">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="260">
|
||||
<caret line="10" column="0" lean-forward="false" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/package.json">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="499">
|
||||
<caret line="28" column="53" lean-forward="false" selection-start-line="28" selection-start-column="53" selection-end-line="28" selection-end-column="53" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/js/splitComponent.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="390">
|
||||
<caret line="15" column="12" lean-forward="false" selection-start-line="15" selection-start-column="12" selection-end-line="15" selection-end-column="12" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/lib/splitComponent.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="244">
|
||||
<caret line="16" column="28" lean-forward="false" selection-start-line="16" selection-start-column="9" selection-end-line="16" selection-end-column="28" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
|
|
127
lib/Align.js
127
lib/Align.js
|
@ -10,10 +10,6 @@ var _reactDom = require('react-dom');
|
|||
|
||||
var _reactDom2 = _interopRequireDefault(_reactDom);
|
||||
|
||||
var _createReactClass = require('create-react-class');
|
||||
|
||||
var _createReactClass2 = _interopRequireDefault(_createReactClass);
|
||||
|
||||
var _domAlign = require('dom-align');
|
||||
|
||||
var _domAlign2 = _interopRequireDefault(_domAlign);
|
||||
|
@ -24,6 +20,12 @@ var _addEventListener2 = _interopRequireDefault(_addEventListener);
|
|||
|
||||
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; }
|
||||
|
||||
//import isWindow from './isWindow';
|
||||
|
||||
function isWindow(obj) {
|
||||
|
@ -52,39 +54,48 @@ function buffer(fn, ms) {
|
|||
return bufferFn;
|
||||
}
|
||||
|
||||
var Align = _react2.default.createClass({
|
||||
propTypes: {
|
||||
childrenProps: _react.PropTypes.object,
|
||||
align: _react.PropTypes.object.isRequired,
|
||||
target: _react.PropTypes.func,
|
||||
onAlign: _react.PropTypes.func,
|
||||
monitorBufferTime: _react.PropTypes.number,
|
||||
monitorWindowResize: _react.PropTypes.bool,
|
||||
disabled: _react.PropTypes.bool,
|
||||
children: _react.PropTypes.any
|
||||
},
|
||||
var Align = function (_Component) {
|
||||
_inherits(Align, _Component);
|
||||
|
||||
getDefaultProps: function getDefaultProps() {
|
||||
return {
|
||||
target: function target() {
|
||||
return window;
|
||||
},
|
||||
onAlign: function onAlign() {},
|
||||
function Align() {
|
||||
var _temp, _this, _ret;
|
||||
|
||||
monitorBufferTime: 50,
|
||||
monitorWindowResize: false,
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
componentDidMount: function componentDidMount() {
|
||||
_classCallCheck(this, Align);
|
||||
|
||||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.startMonitorWindowResize = function () {
|
||||
if (!_this.resizeHandler) {
|
||||
_this.bufferMonitor = buffer(_this.forceAlign, _this.props.monitorBufferTime);
|
||||
_this.resizeHandler = (0, _addEventListener2.default)(window, 'resize', _this.bufferMonitor);
|
||||
}
|
||||
}, _this.stopMonitorWindowResize = function () {
|
||||
if (_this.resizeHandler) {
|
||||
_this.bufferMonitor.clear();
|
||||
_this.resizeHandler.remove();
|
||||
_this.resizeHandler = null;
|
||||
}
|
||||
}, _this.forceAlign = function () {
|
||||
var props = _this.props;
|
||||
if (!props.disabled) {
|
||||
var source = _reactDom2.default.findDOMNode(_this);
|
||||
props.onAlign(source, (0, _domAlign2.default)(source, props.target(), props.align));
|
||||
}
|
||||
}, _temp), _possibleConstructorReturn(_this, _ret);
|
||||
}
|
||||
|
||||
Align.prototype.componentDidMount = function componentDidMount() {
|
||||
var props = this.props;
|
||||
// if parent ref not attached .... use document.getElementById
|
||||
this.forceAlign();
|
||||
if (!props.disabled && props.monitorWindowResize) {
|
||||
this.startMonitorWindowResize();
|
||||
}
|
||||
},
|
||||
componentDidUpdate: function componentDidUpdate(prevProps) {
|
||||
};
|
||||
|
||||
Align.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
|
||||
var reAlign = false;
|
||||
var props = this.props;
|
||||
|
||||
|
@ -111,31 +122,13 @@ var Align = _react2.default.createClass({
|
|||
} else {
|
||||
this.stopMonitorWindowResize();
|
||||
}
|
||||
},
|
||||
componentWillUnmount: function componentWillUnmount() {
|
||||
};
|
||||
|
||||
Align.prototype.componentWillUnmount = function componentWillUnmount() {
|
||||
this.stopMonitorWindowResize();
|
||||
},
|
||||
startMonitorWindowResize: function startMonitorWindowResize() {
|
||||
if (!this.resizeHandler) {
|
||||
this.bufferMonitor = buffer(this.forceAlign, this.props.monitorBufferTime);
|
||||
this.resizeHandler = (0, _addEventListener2.default)(window, 'resize', this.bufferMonitor);
|
||||
}
|
||||
},
|
||||
stopMonitorWindowResize: function stopMonitorWindowResize() {
|
||||
if (this.resizeHandler) {
|
||||
this.bufferMonitor.clear();
|
||||
this.resizeHandler.remove();
|
||||
this.resizeHandler = null;
|
||||
}
|
||||
},
|
||||
forceAlign: function forceAlign() {
|
||||
var props = this.props;
|
||||
if (!props.disabled) {
|
||||
var source = _reactDom2.default.findDOMNode(this);
|
||||
props.onAlign(source, (0, _domAlign2.default)(source, props.target(), props.align));
|
||||
}
|
||||
},
|
||||
render: function render() {
|
||||
};
|
||||
|
||||
Align.prototype.render = function render() {
|
||||
var _props = this.props,
|
||||
childrenProps = _props.childrenProps,
|
||||
children = _props.children;
|
||||
|
@ -151,7 +144,31 @@ var Align = _react2.default.createClass({
|
|||
return _react2.default.cloneElement(child, newProps);
|
||||
}
|
||||
return child;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return Align;
|
||||
}(_react.Component);
|
||||
|
||||
Align.propTypes = {
|
||||
childrenProps: _react.PropTypes.object,
|
||||
align: _react.PropTypes.object.isRequired,
|
||||
target: _react.PropTypes.func,
|
||||
onAlign: _react.PropTypes.func,
|
||||
monitorBufferTime: _react.PropTypes.number,
|
||||
monitorWindowResize: _react.PropTypes.bool,
|
||||
disabled: _react.PropTypes.bool,
|
||||
children: _react.PropTypes.any
|
||||
};
|
||||
Align.defaultProps = {
|
||||
target: function target() {
|
||||
return window;
|
||||
},
|
||||
onAlign: function onAlign() {},
|
||||
|
||||
monitorBufferTime: 50,
|
||||
monitorWindowResize: false,
|
||||
disabled: false
|
||||
};
|
||||
;
|
||||
|
||||
exports.default = Align;
|
|
@ -1,4 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
* some key-codes definition and utils from closure-library
|
||||
* @author yiminghe@gmail.com
|
||||
*/
|
||||
|
||||
var KeyCode = {
|
||||
/**
|
||||
|
@ -424,7 +430,7 @@ var KeyCode = {
|
|||
};
|
||||
|
||||
/*
|
||||
是否是同时输入文本和特殊的按键的组合键
|
||||
whether text and modified key is entered at the same time.
|
||||
*/
|
||||
KeyCode.isTextModifyingKeyEvent = function isTextModifyingKeyEvent(e) {
|
||||
var keyCode = e.keyCode;
|
||||
|
@ -467,7 +473,7 @@ KeyCode.isTextModifyingKeyEvent = function isTextModifyingKeyEvent(e) {
|
|||
};
|
||||
|
||||
/*
|
||||
是否是文本按键
|
||||
whether character is entered.
|
||||
*/
|
||||
KeyCode.isCharacterKey = function isCharacterKey(keyCode) {
|
||||
if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
(exports.__esModule = true, exports.default = splitComponentProps, function _objectEntries(obj) {
|
||||
var entries = [];
|
||||
var keys = Object.keys(obj);
|
||||
|
||||
var _entries = require("babel-runtime/core-js/object/entries");
|
||||
|
||||
var _entries2 = _interopRequireDefault(_entries);
|
||||
|
||||
exports.default = splitComponentProps;
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
for (var k = 0; k < keys.length; ++k) entries.push([keys[k], obj[keys[k]]]);
|
||||
|
||||
return entries;
|
||||
})
|
||||
/**
|
||||
* 分割要传入父元素和子元素的props
|
||||
* @param {[object]} props 传入的属性
|
||||
|
@ -22,7 +20,7 @@ function splitComponentProps(props, Component) {
|
|||
var parentProps = {};
|
||||
var childProps = {};
|
||||
|
||||
(0, _entries2.default)(props).forEach(function (_ref) {
|
||||
_objectEntries(props).forEach(function (_ref) {
|
||||
var propName = _ref[0],
|
||||
propValue = _ref[1];
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "tinper-bee-core",
|
||||
"version": "0.2.5",
|
||||
"version": "0.3.0",
|
||||
"description": "style core and js util for tinper-bee",
|
||||
"main": "lib/index.js",
|
||||
"engines": {
|
||||
|
@ -25,8 +25,9 @@
|
|||
"devDependencies": {
|
||||
"babel-cli": "^6.18.0",
|
||||
"babel-plugin-istanbul": "^3.0.0",
|
||||
"babel-plugin-transform-es2017-object-entries": "0.0.4",
|
||||
"babel-plugin-transform-object-assign": "^6.8.0",
|
||||
"babel-plugin-transform-object-entries": "^1.0.0",
|
||||
"babel-plugin-transform-runtime": "^6.23.0",
|
||||
"babel-preset-es2015": "^6.18.0",
|
||||
"babel-preset-es2015-loose": "^8.0.0",
|
||||
"babel-preset-stage-1": "^6.16.0",
|
||||
|
|
Loading…
Reference in New Issue