This commit is contained in:
BoyuZhou 2017-08-29 19:16:00 +08:00
parent f722681f1a
commit 4c8f08f457
9 changed files with 713 additions and 29 deletions

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="ERROR" enabled_by_default="true" />
</profile>
</component>

38
.idea/misc.xml Normal file
View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="JsFlowSettings">
<service-enabled>true</service-enabled>
<exe-path />
<annotation-enable>false</annotation-enable>
<other-services-enabled>true</other-services-enabled>
</component>
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state>
<expanded-state>
<State>
<id />
</State>
<State>
<id>CSS</id>
</State>
<State>
<id>Code quality toolsCSS</id>
</State>
<State>
<id>GeneralJavaScript</id>
</State>
<State>
<id>JavaScript</id>
</State>
<State>
<id>Node.jsJavaScript</id>
</State>
</expanded-state>
</profile-state>
</entry>
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/tinper-bee-core.iml" filepath="$PROJECT_DIR$/.idea/tinper-bee-core.iml" />
</modules>
</component>
</project>

12
.idea/tinper-bee-core.iml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

540
.idea/workspace.xml Normal file
View File

@ -0,0 +1,540 @@
<?xml version="1.0" encoding="UTF-8"?>
<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$/lib/keyCode.js" afterPath="$PROJECT_DIR$/lib/keyCode.js" />
</list>
<ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" />
<ignored path="$PROJECT_DIR$/tmp/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</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">
<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" />
<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">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-468">
<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">
<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>
</file>
<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">
<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">
<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" />
<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">
<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>
</file>
</leaf>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/lib/keyCode.js" />
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/js/Align.js" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER">
<package-json value="$PROJECT_DIR$/package.json" />
</component>
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="-8" />
<option name="y" value="-8" />
<option name="width" value="1924" />
<option name="height" value="1084" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scratches" />
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<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>
<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="lib" />
<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>
<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>
</panes>
</component>
<component name="PropertiesComponent">
<property name="settings.editor.selected.configurable" value="Settings.JavaScript" />
<property name="JavaScriptPreferStrict" value="false" />
<property name="JavaScriptWeakerCompletionTypeGuess" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="node.js.path.for.package.eslint" value="project" />
<property name="nodejs_interpreter_path" value="C:/Program Files/nodejs/node" />
<property name="node.js.detected.package.eslint" value="true" />
<property name="node.js.selected.package.eslint" value="" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager">
<configuration default="true" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application">
<method />
</configuration>
<configuration default="true" type="DartTestRunConfigurationType" factoryName="Dart Test">
<method />
</configuration>
<configuration default="true" type="JavaScriptTestRunnerJest" factoryName="Jest">
<node-interpreter value="project" />
<working-dir value="" />
<envs />
<scope-kind value="ALL" />
<method />
</configuration>
<configuration default="true" type="JavaScriptTestRunnerKarma" factoryName="Karma">
<config-file value="" />
<node-interpreter value="project" />
<envs />
<method />
</configuration>
<configuration default="true" type="JavaScriptTestRunnerProtractor" factoryName="Protractor">
<config-file value="" />
<node-interpreter value="project" />
<envs />
<method />
</configuration>
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
<method />
</configuration>
<configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="project" working-dir="">
<method />
</configuration>
<configuration default="true" type="cucumber.js" factoryName="Cucumber.js">
<option name="cucumberJsArguments" value="" />
<option name="executablePath" />
<option name="filePath" />
<method />
</configuration>
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
<method />
</configuration>
<configuration default="true" type="js.build_tools.npm" factoryName="npm">
<command value="run" />
<scripts />
<node-interpreter value="project" />
<envs />
<method />
</configuration>
<configuration default="true" type="mocha-javascript-test-runner" factoryName="Mocha">
<node-interpreter>project</node-interpreter>
<node-options />
<working-directory />
<pass-parent-env>true</pass-parent-env>
<envs />
<ui />
<extra-mocha-options />
<test-kind>DIRECTORY</test-kind>
<test-directory />
<recursive>false</recursive>
<method />
</configuration>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="13e53469-557a-48fa-83c0-132d8e5c2bf1" name="Default" comment="" />
<created>1503105208947</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1503105208947</updated>
<workItem from="1503105210332" duration="6232000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="6232000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" 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="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="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="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="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="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>
<component name="TypeScriptGeneratedFilesManager">
<option name="processedProjectFiles" value="true" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/lib/keyCode.js">
<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" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/index.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>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/toArray.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/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>
<entry file="file://$PROJECT_DIR$/js/toArray.js">
<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>
<entry file="file://$PROJECT_DIR$/js/isRequiredForA11y.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="41" lean-forward="false" selection-start-line="0" selection-start-column="24" selection-end-line="0" selection-end-column="41" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/getContainerRenderMixin.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="208">
<caret line="41" column="15" lean-forward="false" selection-start-line="41" selection-start-column="6" selection-end-line="41" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/js/Event.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-624">
<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/elementType.js">
<provider selected="true" editor-type-id="text-editor">
<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" />
</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="-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" />
<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$/README.md">
<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" />
<folding />
</state>
</provider>
</entry>
<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>
<entry file="file://$PROJECT_DIR$/js/utils/createChainableTypeChecker.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-468">
<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/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="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>
</provider>
</entry>
<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>
</component>
</project>

View File

@ -71,3 +71,86 @@ tinper-bee组件库的核心样式及公用方法库
- 阴影
- 常用z-index值设定
- UI组件的预设
### js方法
#### keyCode对象
引入方法:
```
import keyCode from 'tinper-bee-core/lib/keyCode';
//或者
import { keyCode } from 'tinper-bee-core';
```
方法:
- isTextModifyingKeyEvent 验证是否是特殊按键或组合按键
```
handleKeyDown = (e) => {
if(keyCode.isTextModifyingKeyEvent(e)){
//一些操作
}
}
...
<Input onKeyDown={this.handleKeyDown} />
```
- isCharacterKey 验证是否是文本键
```
handleKeyDown = (e) => {
if(keyCode.isCharacterKey(e)){
//一些操作
}
}
...
<Input onKeyDown={this.handleKeyDown} />
```
#### toArray 将数组安全的转换为react element 数组
#### splitComponentProps 通过父组件的propTypes拆分分别传给父子组件的props
```
const propTypes = {
color: PropTypes.string,
size: PropTypes.string
}
class ParentClass extends React.Component{
render() {
let props = this.props;
let [parentProps, childProps] = splitComponentProps(props);
return (
<div>
<ChildrenClass {...childProps} />
</div>
)
}
}
ParentClass.propTypes = propTypes;
```
#### createChainedFunction 创建链式调用方法
用法:
```
```
#### contains 检验是否包含
####

View File

@ -1,6 +1,5 @@
import React, { PropTypes } from 'react';
import React, { PropTypes, Component } from 'react';
import ReactDOM from 'react-dom';
import createReactClass from 'create-react-class';
import align from 'dom-align';
import addEventListener from './addEventListener';
//import isWindow from './isWindow';
@ -31,8 +30,8 @@ function buffer(fn, ms) {
return bufferFn;
}
const Align = React.createClass({
propTypes: {
class Align extends Component{
static propTypes = {
childrenProps: PropTypes.object,
align: PropTypes.object.isRequired,
target: PropTypes.func,
@ -41,10 +40,9 @@ const Align = React.createClass({
monitorWindowResize: PropTypes.bool,
disabled: PropTypes.bool,
children: PropTypes.any,
},
};
getDefaultProps() {
return {
static defaultProps = {
target() {
return window;
},
@ -53,8 +51,7 @@ const Align = React.createClass({
monitorBufferTime: 50,
monitorWindowResize: false,
disabled: false,
};
},
}
componentDidMount() {
const props = this.props;
@ -63,7 +60,7 @@ const Align = React.createClass({
if (!props.disabled && props.monitorWindowResize) {
this.startMonitorWindowResize();
}
},
}
componentDidUpdate(prevProps) {
let reAlign = false;
@ -92,34 +89,34 @@ const Align = React.createClass({
} else {
this.stopMonitorWindowResize();
}
},
}
componentWillUnmount() {
this.stopMonitorWindowResize();
},
}
startMonitorWindowResize() {
startMonitorWindowResize = () => {
if (!this.resizeHandler) {
this.bufferMonitor = buffer(this.forceAlign, this.props.monitorBufferTime);
this.resizeHandler = addEventListener(window, 'resize', this.bufferMonitor);
}
},
}
stopMonitorWindowResize() {
stopMonitorWindowResize = () => {
if (this.resizeHandler) {
this.bufferMonitor.clear();
this.resizeHandler.remove();
this.resizeHandler = null;
}
},
}
forceAlign() {
forceAlign = () => {
const props = this.props;
if (!props.disabled) {
const source = ReactDOM.findDOMNode(this);
props.onAlign(source, align(source, props.target(), props.align));
}
},
}
render() {
const { childrenProps, children } = this.props;
@ -134,7 +131,7 @@ const Align = React.createClass({
return React.cloneElement(child, newProps);
}
return child;
},
});
}
};
export default Align;

View File

@ -1,10 +1,4 @@
'use strict';
/**
* @ignore
* some key-codes definition and utils from closure-library
* @author yiminghe@gmail.com
*/
var KeyCode = {
/**
@ -430,7 +424,7 @@ var KeyCode = {
};
/*
whether text and modified key is entered at the same time.
是否是同时输入文本和特殊的按键的组合键
*/
KeyCode.isTextModifyingKeyEvent = function isTextModifyingKeyEvent(e) {
var keyCode = e.keyCode;
@ -473,7 +467,7 @@ KeyCode.isTextModifyingKeyEvent = function isTextModifyingKeyEvent(e) {
};
/*
whether character is entered.
是否是文本按键
*/
KeyCode.isCharacterKey = function isCharacterKey(keyCode) {
if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {