fix: prevent asset conflicts between React and Grid.js versions

Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
dwindown
2026-04-18 17:02:14 +07:00
parent bd9cdac02e
commit e8fbfb14c1
74973 changed files with 6658406 additions and 71 deletions

1
node_modules/requestidlecallback/.idea/.name generated vendored Normal file
View File

@@ -0,0 +1 @@
requestIdleCallback

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<file url="file://$PROJECT_DIR$" libraries="{requestIdleCallback/node_modules}" />
</component>
</project>

19
node_modules/requestidlecallback/.idea/misc.xml generated vendored Normal file
View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectInspectionProfilesVisibleTreeState">
<entry key="Project Default">
<profile-state />
</entry>
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</component>
<component name="ProjectRootManager" version="2" />
</project>

8
node_modules/requestidlecallback/.idea/modules.xml generated vendored 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/requestIdleCallback.iml" filepath="$PROJECT_DIR$/.idea/requestIdleCallback.iml" />
</modules>
</component>
</project>

View File

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

6
node_modules/requestidlecallback/.idea/vcs.xml generated vendored 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>

725
node_modules/requestidlecallback/.idea/workspace.xml generated vendored Normal file
View File

@@ -0,0 +1,725 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="688fa6b4-1f0f-49ee-ba48-ee9722ab1613" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/package.json" afterPath="$PROJECT_DIR$/package.json" />
</list>
<ignored path="requestIdleCallback.iws" />
<ignored path=".idea/workspace.xml" />
<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="CreatePatchCommitExecutor">
<option name="PATCH_PATH" value="" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
<component name="FavoritesManager">
<favorites_list name="requestIdleCallback" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<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="600">
<caret line="40" column="9" selection-start-line="40" selection-start-column="9" selection-end-line="40" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="index.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="369">
<caret line="195" column="41" selection-start-line="195" selection-start-column="41" selection-end-line="195" selection-end-column="41" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="index.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/tmp/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="16" column="38" selection-start-line="16" selection-start-column="38" selection-end-line="16" selection-end-column="38" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="package.json" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="9" column="20" selection-start-line="9" selection-start-column="20" selection-end-line="9" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name=".travis.yml" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/.travis.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="9" selection-start-line="2" selection-start-column="9" selection-end-line="2" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="index.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165">
<caret line="11" column="58" selection-start-line="11" selection-start-column="58" selection-end-line="11" selection-end-column="58" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="test.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/test.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="JavaScript File" />
<option value="Html5" />
</list>
</option>
</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$/test/index.html" />
<option value="$PROJECT_DIR$/t.js" />
<option value="$PROJECT_DIR$/.travis.yml" />
<option value="$PROJECT_DIR$/test/test.js" />
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/tmp/index.html" />
<option value="$PROJECT_DIR$/index.js" />
<option value="$PROJECT_DIR$/package.json" />
</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="NodeModulesDirectoryManager">
<handled-path value="$PROJECT_DIR$/node_modules" />
</component>
<component name="ProjectFrameBounds">
<option name="x" value="97" />
<option name="y" value="23" />
<option name="width" value="1327" />
<option name="height" value="873" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
<OptionsSetting value="true" id="Add" />
<OptionsSetting value="true" id="Remove" />
<OptionsSetting value="true" id="Checkout" />
<OptionsSetting value="true" id="Update" />
<OptionsSetting value="true" id="Status" />
<OptionsSetting value="true" id="Edit" />
<ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" />
</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="ProjectPane">
<subPane>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="requestIdleCallback" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="requestIdleCallback" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="requestIdleCallback" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="requestIdleCallback" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="requestIdleCallback" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="tmp" />
<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">
<property name="options.lastSelected" value="vcs.Subversion" />
<property name="options.splitter.main.proportions" value="0.3" />
<property name="options.splitter.details.proportions" value="0.2" />
<property name="options.searchVisible" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="FullScreen" value="false" />
<property name="HbShouldOpenHtmlAsHb" value="" />
<property name="DefaultHtmlFileTemplate" value="Html5" />
<property name="ChangesBrowser.SHOW_FLATTEN" value="true" />
<property name="js-jscs-nodeInterpreter" value="$USER_HOME$/.nvm/versions/node/v4.5.0/bin/node" />
<property name="nodejs.mocha.mocha_node_package_dir" value="$PROJECT_DIR$/node_modules/mocha" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$" />
</key>
</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="JavaScriptTestRunnerKarma" factoryName="Karma">
<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">
<node-interpreter>project</node-interpreter>
<node-options />
<gulpfile />
<tasks />
<arguments />
<pass-parent-envs>true</pass-parent-envs>
<envs />
<method />
</configuration>
<configuration default="true" type="js.build_tools.npm" factoryName="npm">
<command value="run-script" />
<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="SvnConfiguration" SSL_PROTOCOLS="tlsv1">
<configuration useDefault="false">$USER_HOME$/.subversion</configuration>
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="688fa6b4-1f0f-49ee-ba48-ee9722ab1613" name="Default" comment="" />
<created>1446328283262</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1446328283262</updated>
<workItem from="1477260882180" duration="125000" />
</task>
<task id="LOCAL-00001" summary="first commit">
<created>1446380325121</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1446380325122</updated>
</task>
<task id="LOCAL-00002" summary="add travis">
<created>1446382533296</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1446382533296</updated>
</task>
<task id="LOCAL-00003" summary="fixes tests and adds readme">
<created>1446382698179</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1446382698179</updated>
</task>
<task id="LOCAL-00004" summary="add documentation">
<created>1446386721062</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1446386721062</updated>
</task>
<task id="LOCAL-00005" summary="fix typo">
<created>1446386795953</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1446386795953</updated>
</task>
<task id="LOCAL-00006" summary="improves inactivity heuristics">
<created>1446390290004</created>
<option name="number" value="00006" />
<option name="presentableId" value="LOCAL-00006" />
<option name="project" value="LOCAL" />
<updated>1446390290004</updated>
</task>
<task id="LOCAL-00007" summary="fix old chrome implementation">
<created>1446394025221</created>
<option name="number" value="00007" />
<option name="presentableId" value="LOCAL-00007" />
<option name="project" value="LOCAL" />
<updated>1446394025221</updated>
</task>
<task id="LOCAL-00008" summary="improves inactive throttle">
<created>1446402916347</created>
<option name="number" value="00008" />
<option name="presentableId" value="LOCAL-00008" />
<option name="project" value="LOCAL" />
<updated>1446402916347</updated>
</task>
<task id="LOCAL-00009" summary="0.2.0">
<created>1446403355178</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1446403355178</updated>
</task>
<task id="LOCAL-00010" summary="improves documentation and handle non browser environments">
<created>1446448755573</created>
<option name="number" value="00010" />
<option name="presentableId" value="LOCAL-00010" />
<option name="project" value="LOCAL" />
<updated>1446448755573</updated>
</task>
<task id="LOCAL-00011" summary="improve timeremaining check">
<created>1477260965298</created>
<option name="number" value="00011" />
<option name="presentableId" value="LOCAL-00011" />
<option name="project" value="LOCAL" />
<updated>1477260965298</updated>
</task>
<option name="localTasksCounter" value="12" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="125000" />
</component>
<component name="ToolWindowManager">
<frame x="97" y="23" width="1327" height="873" extended-state="6" />
<editor active="false" />
<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.24961714" 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="7" 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.32980132" 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="-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="true" show_stripe_button="true" weight="0.32980132" sideWeight="0.5" order="7" 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="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="Messages" 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="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="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Application Servers" 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="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="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="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="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="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" />
<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" />
</layout>
</component>
<component name="Vcs.Log.UiProperties">
<option name="RECENTLY_FILTERED_USER_GROUPS">
<collection />
</option>
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
<collection />
</option>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="first commit" />
<MESSAGE value="add travis" />
<MESSAGE value="fixes tests and adds readme" />
<MESSAGE value="add documentation" />
<MESSAGE value="fix typo" />
<MESSAGE value="improves inactivity heuristics" />
<MESSAGE value="fix old chrome implementation" />
<MESSAGE value="improves inactive throttle" />
<MESSAGE value="0.2.0" />
<MESSAGE value="improves documentation and handle non browser environments" />
<MESSAGE value="improve timeremaining check" />
<option name="LAST_COMMIT_MESSAGE" value="improve timeremaining check" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="600">
<caret line="40" column="9" selection-start-line="40" selection-start-column="9" selection-end-line="40" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" 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$/tmp/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="16" column="38" selection-start-line="16" selection-start-column="38" selection-end-line="16" selection-end-column="38" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="17" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.travis.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="9" selection-start-line="2" selection-start-column="9" selection-end-line="2" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165">
<caret line="11" column="58" selection-start-line="11" selection-start-column="58" selection-end-line="11" selection-end-column="58" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/test.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="40" column="9" selection-start-line="40" selection-start-column="9" selection-end-line="40" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="168" column="0" selection-start-line="168" selection-start-column="0" selection-end-line="168" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tmp/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="22" column="10" selection-start-line="22" selection-start-column="10" selection-end-line="22" selection-end-column="10" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="2" column="17" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.travis.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="2" column="9" selection-start-line="2" selection-start-column="9" selection-end-line="2" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="11" column="58" selection-start-line="11" selection-start-column="58" selection-end-line="11" selection-end-column="58" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/test.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="10" column="389" selection-start-line="10" selection-start-column="389" selection-end-line="10" selection-end-column="389" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="168" column="0" selection-start-line="168" selection-start-column="0" selection-end-line="168" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tmp/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="5" column="28" selection-start-line="5" selection-start-column="28" selection-end-line="5" selection-end-column="28" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="2" column="17" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.travis.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="2" column="9" selection-start-line="2" selection-start-column="9" selection-end-line="2" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="11" column="58" selection-start-line="11" selection-start-column="58" selection-end-line="11" selection-end-column="58" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/test.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="7" column="125" selection-start-line="7" selection-start-column="125" selection-end-line="7" selection-end-column="125" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" 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$/tmp/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="5" column="28" selection-start-line="5" selection-start-column="28" selection-end-line="5" selection-end-column="28" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="2" column="17" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.travis.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="2" column="9" selection-start-line="2" selection-start-column="9" selection-end-line="2" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="11" column="58" selection-start-line="11" selection-start-column="58" selection-end-line="11" selection-end-column="58" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/test.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/node_modules/sinon/pkg/sinon.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/node_modules/sinon/lib/sinon.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="22" column="29" selection-start-line="22" selection-start-column="18" selection-end-line="22" selection-end-column="29" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.travis.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="9" selection-start-line="2" selection-start-column="9" selection-end-line="2" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/test.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165">
<caret line="11" column="58" selection-start-line="11" selection-start-column="58" selection-end-line="11" selection-end-column="58" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="600">
<caret line="40" column="9" selection-start-line="40" selection-start-column="9" selection-end-line="40" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tmp/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="16" column="38" selection-start-line="16" selection-start-column="38" selection-end-line="16" selection-end-column="38" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="369">
<caret line="195" column="41" selection-start-line="195" selection-start-column="41" selection-end-line="195" selection-end-column="41" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="9" column="20" selection-start-line="9" selection-start-column="20" selection-end-line="9" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
</component>
</project>

5
node_modules/requestidlecallback/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,5 @@
language: node_js
node_js:
- "0.10"
script:
- "npm test"

51
node_modules/requestidlecallback/README.md generated vendored Normal file
View File

@@ -0,0 +1,51 @@
#`requestIdleCallback` polyfill/shim [![Build Status](https://api.travis-ci.org/aFarkas/requestIdleCallback.svg?branch=master)](https://travis-ci.org/aFarkas/requestIdleCallback)
This is a polyfill/shim for the `requestIdleCallback` and `cancelIdleCallback` API. Also fixes early API implementation.
For more information see the [Cooperative Scheduling of Background Tasks Draft](http://www.w3.org/TR/requestidlecallback/).
##Installation
Include the "index.js" in your website and use `requestIdleCallback` and `cancelIdleCallback` according to the specification.
##How it works
`requestIdleCallback` can't be really polyfilled. Therefore `requestIdleCallback` basically includes a throttle like function, that uses some heuristics to detect a) long running frames and b) user input as also DOM mutations to adapt accordingly. `requestIdleCallback` also tries to get the time right after a frame commit. The `deadline.timeRemaining()` either starts with 7ms or with 22ms for the first scheduled callback.
If multiple functions are scheduled with the `requestIdleCallback` shim for the same idle time, the shim makes sure to split those functions as soon as `timeRemaining()` is exceeded.
##Usage
If you have a fast or a non-splittable task:
```js
requstIdleCallback(function(){
//your task
});
```
In case you have a heavy and splittable task you can use efficient script yielding technique:
```js
requestIdleCallback(function(deadline){
while(tasks.length && deadline.timeRemaining() > 0){
tasks.shift()();
}
if(tasks.length){
requestIdleCallback(runTasks);
}
});
```
**Reading vs writing layout:** `requestIdleCallback` is mainly for layout neutral or layout reading/measuring tasks. In case you want to write layout/manipulate the DOM consider using `requestAnimationFrame` instead.
Of course `requestIdleCallback` can also be combined with `requestAnimationFrame`:
```js
requstIdleCallback(function(){
var width = element.offsetWidth;
requestAnimationFrame(function(){
element.classList[width > 600 ? 'add' : 'remove']('is-large');
});
});
```

213
node_modules/requestidlecallback/index.js generated vendored Normal file
View File

@@ -0,0 +1,213 @@
(function (factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);
} else if (typeof module === 'object' && module.exports) {
module.exports = factory();
} else {
window.idleCallbackShim = factory();
}
}(function(){
'use strict';
var scheduleStart, throttleDelay, lazytimer, lazyraf;
var root = typeof window != 'undefined' ?
window :
typeof global != undefined ?
global :
this || {};
var requestAnimationFrame = root.cancelRequestAnimationFrame && root.requestAnimationFrame || setTimeout;
var cancelRequestAnimationFrame = root.cancelRequestAnimationFrame || clearTimeout;
var tasks = [];
var runAttempts = 0;
var isRunning = false;
var remainingTime = 7;
var minThrottle = 35;
var throttle = 125;
var index = 0;
var taskStart = 0;
var tasklength = 0;
var IdleDeadline = {
get didTimeout(){
return false;
},
timeRemaining: function(){
var timeRemaining = remainingTime - (Date.now() - taskStart);
return timeRemaining < 0 ? 0 : timeRemaining;
},
};
var setInactive = debounce(function(){
remainingTime = 22;
throttle = 66;
minThrottle = 0;
});
function debounce(fn){
var id, timestamp;
var wait = 99;
var check = function(){
var last = (Date.now()) - timestamp;
if (last < wait) {
id = setTimeout(check, wait - last);
} else {
id = null;
fn();
}
};
return function(){
timestamp = Date.now();
if(!id){
id = setTimeout(check, wait);
}
};
}
function abortRunning(){
if(isRunning){
if(lazyraf){
cancelRequestAnimationFrame(lazyraf);
}
if(lazytimer){
clearTimeout(lazytimer);
}
isRunning = false;
}
}
function onInputorMutation(){
if(throttle != 125){
remainingTime = 7;
throttle = 125;
minThrottle = 35;
if(isRunning) {
abortRunning();
scheduleLazy();
}
}
setInactive();
}
function scheduleAfterRaf() {
lazyraf = null;
lazytimer = setTimeout(runTasks, 0);
}
function scheduleRaf(){
lazytimer = null;
requestAnimationFrame(scheduleAfterRaf);
}
function scheduleLazy(){
if(isRunning){return;}
throttleDelay = throttle - (Date.now() - taskStart);
scheduleStart = Date.now();
isRunning = true;
if(minThrottle && throttleDelay < minThrottle){
throttleDelay = minThrottle;
}
if(throttleDelay > 9){
lazytimer = setTimeout(scheduleRaf, throttleDelay);
} else {
throttleDelay = 0;
scheduleRaf();
}
}
function runTasks(){
var task, i, len;
var timeThreshold = remainingTime > 9 ?
9 :
1
;
taskStart = Date.now();
isRunning = false;
lazytimer = null;
if(runAttempts > 2 || taskStart - throttleDelay - 50 < scheduleStart){
for(i = 0, len = tasks.length; i < len && IdleDeadline.timeRemaining() > timeThreshold; i++){
task = tasks.shift();
tasklength++;
if(task){
task(IdleDeadline);
}
}
}
if(tasks.length){
scheduleLazy();
} else {
runAttempts = 0;
}
}
function requestIdleCallbackShim(task){
index++;
tasks.push(task);
scheduleLazy();
return index;
}
function cancelIdleCallbackShim(id){
var index = id - 1 - tasklength;
if(tasks[index]){
tasks[index] = null;
}
}
if(!root.requestIdleCallback || !root.cancelIdleCallback){
root.requestIdleCallback = requestIdleCallbackShim;
root.cancelIdleCallback = cancelIdleCallbackShim;
if(root.document && document.addEventListener){
root.addEventListener('scroll', onInputorMutation, true);
root.addEventListener('resize', onInputorMutation);
document.addEventListener('focus', onInputorMutation, true);
document.addEventListener('mouseover', onInputorMutation, true);
['click', 'keypress', 'touchstart', 'mousedown'].forEach(function(name){
document.addEventListener(name, onInputorMutation, {capture: true, passive: true});
});
if(root.MutationObserver){
new MutationObserver( onInputorMutation ).observe( document.documentElement, {childList: true, subtree: true, attributes: true} );
}
}
} else {
try{
root.requestIdleCallback(function(){}, {timeout: 0});
} catch(e){
(function(rIC){
var timeRemainingProto, timeRemaining;
root.requestIdleCallback = function(fn, timeout){
if(timeout && typeof timeout.timeout == 'number'){
return rIC(fn, timeout.timeout);
}
return rIC(fn);
};
if(root.IdleCallbackDeadline && (timeRemainingProto = IdleCallbackDeadline.prototype)){
timeRemaining = Object.getOwnPropertyDescriptor(timeRemainingProto, 'timeRemaining');
if(!timeRemaining || !timeRemaining.configurable || !timeRemaining.get){return;}
Object.defineProperty(timeRemainingProto, 'timeRemaining', {
value: function(){
return timeRemaining.get.call(this);
},
enumerable: true,
configurable: true,
});
}
})(root.requestIdleCallback)
}
}
return {
request: requestIdleCallbackShim,
cancel: cancelIdleCallbackShim,
};
}));

23
node_modules/requestidlecallback/package.json generated vendored Normal file
View File

@@ -0,0 +1,23 @@
{
"name": "requestidlecallback",
"version": "0.3.0",
"description": "A polyfill for the requestIdleCallback.",
"main": "index.js",
"filename": "index.js",
"author": "Alexander Farkas <info@corrupt-system.de>",
"repository": {
"type": "git",
"url": "git@github.com:aFarkas/requestIdleCallback.git"
},
"scripts": {
"test": "mocha-phantomjs test/index.html"
},
"license": "MIT",
"devDependencies": {
"chai": "^3.4.0",
"jshint": "^2.8.0",
"mocha": "^2.3.3",
"mocha-phantomjs": "^4.0.1",
"sinon": "^1.17.2"
}
}

22
node_modules/requestidlecallback/test/index.html generated vendored Normal file
View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Mocha Tests</title>
<link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
</head>
<body>
<div id="mocha"></div>
<script src="../node_modules/mocha/mocha.js"></script>
<script src="../node_modules/chai/chai.js"></script>
<script src="../node_modules/sinon/pkg/sinon.js"></script>
<script>mocha.setup('tdd')</script>
<script src="../index.js"></script>
<script src="test.js"></script>
<script>
mocha.checkLeaks();
if (window.mochaPhantomJS) mochaPhantomJS.run();
else mocha.run();
</script>
</body>
</html>

113
node_modules/requestidlecallback/test/test.js generated vendored Normal file
View File

@@ -0,0 +1,113 @@
suite('idleCallbackShim', function() {
test('should have api methods', function(){
chai.assert(idleCallbackShim.request);
chai.assert(idleCallbackShim.cancel);
});
test('should invoke callback async', function(done){
var isRun = false;
var callback = sinon.spy();
var timeoutCall = sinon.spy();
var run = function(){
if(isRun){return;}
isRun = true;
chai.assert(timeoutCall.calledBefore(callback));
done();
};
idleCallbackShim.request(callback);
setTimeout(timeoutCall, 0);
idleCallbackShim.request(run);
setTimeout(run, 999);
});
test('should schedule nested callback later', function(done){
idleCallbackShim.request(function(){
var isRun = false;
var callback = sinon.spy();
var timeoutCall = sinon.spy();
var run = function(){
if(isRun){return;}
isRun = true;
chai.assert(timeoutCall.calledBefore(callback));
done();
};
idleCallbackShim.request(callback);
setTimeout(timeoutCall, 0);
idleCallbackShim.request(run);
setTimeout(run, 999);
});
});
test('should invoke with the deadline argument', function(done){
idleCallbackShim.request(function(deadline){
chai.assert('didTimeout' in deadline);
chai.assert(!deadline.didTimeout);
try {
deadline.didTimeout = true;
} catch(e){}
chai.assert(!deadline.didTimeout);
chai.assert(typeof deadline.timeRemaining() == 'number');
chai.assert(deadline.timeRemaining() >= 0 && deadline.timeRemaining() <= 50);
done();
});
});
test('timeRemaining counts down', function(done){
idleCallbackShim.request(function(deadline){
var now = Date.now();
var timeRemaining = deadline.timeRemaining();
while(Date.now() - now <= 2){
}
chai.assert(timeRemaining > deadline.timeRemaining());
done();
});
});
test('cancels callback', function(done){
var canceledID1, canceledID2, canceledID3;
var run1 = sinon.spy();
var run2 = sinon.spy();
var run3 = sinon.spy();
var canceled1 = sinon.spy();
var canceled2 = sinon.spy();
var canceled3 = sinon.spy();
idleCallbackShim.request(run1);
canceledID1 = idleCallbackShim.request(canceled1);
idleCallbackShim.request(function(){
idleCallbackShim.request(run3);
idleCallbackShim.cancel(canceledID2);
canceledID3 = idleCallbackShim.request(canceled3);
idleCallbackShim.cancel(canceledID3);
idleCallbackShim.request(function(){
chai.assert(run1.called);
chai.assert(run2.called);
chai.assert(run3.called);
chai.assert(!canceled1.called);
chai.assert(!canceled2.called);
chai.assert(!canceled3.called);
done();
});
});
idleCallbackShim.request(run2);
canceledID2 = idleCallbackShim.request(canceled2);
setTimeout(function(){
idleCallbackShim.cancel(canceledID1);
});
});
});