Skip to content

Commit

Permalink
Revert "explicitly include index in imports to allow Launch packager …
Browse files Browse the repository at this point in the history
…to work"

This reverts commit a5e7a39.
  • Loading branch information
jonsnyder committed Jan 21, 2021
1 parent a5e7a39 commit ff5b019
Show file tree
Hide file tree
Showing 81 changed files with 105 additions and 120 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { noop } from "../../utils/index";
import { noop } from "../../utils";

const createClickHandler = ({ eventManager, lifecycle, handleError }) => {
return clickEvent => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ActivityCollector/configValidators.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { string, boolean } from "../../utils/validation/index";
import { string, boolean } from "../../utils/validation";

export default {
clickCollectionEnabled: boolean().default(true),
Expand Down
2 changes: 1 addition & 1 deletion src/components/Audiences/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { fireReferrerHideableImage } from "../../utils/index";
import { fireReferrerHideableImage } from "../../utils";
import injectProcessDestinations from "./injectProcessDestinations";

const createAudiences = ({ logger }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Audiences/injectProcessDestinations.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { cookieJar, noop } from "../../utils/index";
import { cookieJar, noop } from "../../utils";

const createResultLogMessage = (urlDestination, success) => {
return `URL destination ${success ? "succeeded" : "failed"}: ${
Expand Down
2 changes: 1 addition & 1 deletion src/components/Context/createComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { flatMap } from "../../utils/index";
import { flatMap } from "../../utils";

export default (config, logger, availableContexts, requiredContexts) => {
const configuredContexts = config.context;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Context/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import injectImplementationDetails from "./injectImplementationDetails";
import libraryVersion from "../../constants/libraryVersion";
import libraryName from "../../constants/libraryName";
import createComponent from "./createComponent";
import { arrayOf, string } from "../../utils/validation/index";
import { arrayOf, string } from "../../utils/validation";

const web = injectWeb(window);
const device = injectDevice(window);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Context/injectDevice.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { deepAssign } from "../../utils/index";
import { deepAssign } from "../../utils";

const getScreenOrientationViaProperty = window => {
const {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Context/injectEnvironment.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { deepAssign } from "../../utils/index";
import { deepAssign } from "../../utils";

export default window => {
return xdm => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Context/injectImplementationDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
import { deepAssign } from "../../utils/index";
import { deepAssign } from "../../utils";

export default implementationDetails => {
return xdm => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Context/injectPlaceContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
import { deepAssign, toISOStringLocal } from "../../utils/index";
import { deepAssign, toISOStringLocal } from "../../utils";

export default dateProvider => {
return xdm => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Context/injectTimestamp.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { deepAssign } from "../../utils/index";
import { deepAssign } from "../../utils";

export default dateProvider => {
return xdm => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Context/injectWeb.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { deepAssign } from "../../utils/index";
import { deepAssign } from "../../utils";

export default window => {
return xdm => {
Expand Down
9 changes: 2 additions & 7 deletions src/components/DataCollector/validateUserEventOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import {
string,
objectOf,
boolean,
arrayOf
} from "../../utils/validation/index";
import { validateIdentityMap } from "../../utils/index";
import { string, objectOf, boolean, arrayOf } from "../../utils/validation";
import { validateIdentityMap } from "../../utils";
/**
* Verifies user provided event options.
* @param {*} options The user event options to validate
Expand Down
2 changes: 1 addition & 1 deletion src/components/EventMerge/createEventMergeId.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { uuid } from "../../utils/index";
import { uuid } from "../../utils";

export default () => {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Identity/configValidators.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { boolean } from "../../utils/validation/index";
import { boolean } from "../../utils/validation";

const configValidators = {
thirdPartyCookiesEnabled: boolean().default(true),
Expand Down
2 changes: 1 addition & 1 deletion src/components/Identity/createLegacyIdentity.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { getApexDomain, cookieJar } from "../../utils/index";
import { getApexDomain, cookieJar } from "../../utils";

// TODO: We are already retrieving the apex in core; find a way to reuse it.
// Maybe default the domain in the cookieJar to apex while allowing overrides.
Expand Down
2 changes: 1 addition & 1 deletion src/components/Identity/getEcidFromResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { find } from "../../utils/index";
import { find } from "../../utils";
import ecidNamespace from "../../constants/ecidNamespace";

export default response => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { objectOf, literal, arrayOf } from "../../../utils/validation/index";
import { objectOf, literal, arrayOf } from "../../../utils/validation";
/**
* Verifies user provided event options.
* @param {*} options The user event options to validate
Expand Down
2 changes: 1 addition & 1 deletion src/components/Identity/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ governing permissions and limitations under the License.
import {
fireReferrerHideableImage,
areThirdPartyCookiesSupportedByDefault
} from "../../utils/index";
} from "../../utils";
import injectProcessIdSyncs from "./injectProcessIdSyncs";
import configValidators from "./configValidators";

Expand Down
2 changes: 1 addition & 1 deletion src/components/Identity/injectDoesIdentityCookieExist.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { cookieJar, getNamespacedCookieName } from "../../utils/index";
import { cookieJar, getNamespacedCookieName } from "../../utils";
import { IDENTITY } from "../../constants/cookieNameKey";

export default ({ orgId }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Identity/injectProcessIdSyncs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
import { noop } from "../../utils/index";
import { noop } from "../../utils";

const createResultLogMessage = (idSync, success) => {
return `ID sync ${success ? "succeeded" : "failed"}: ${idSync.spec.url}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { isObject } from "../../../utils/index";
import { isObject } from "../../../utils";

export default ({ logger }) => {
return new Promise((resolve, reject) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Identity/visitorService/getVisitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { isFunction } from "../../../utils/index";
import { isFunction } from "../../../utils";

export default window => {
const Visitor = window.Visitor;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Personalization/createComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { noop, defer } from "../../utils/index";
import { noop, defer } from "../../utils";
import createPersonalizationDetails from "./createPersonalizationDetails";

export default ({
Expand Down
2 changes: 1 addition & 1 deletion src/components/Personalization/createExecuteDecisions.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { assign, flatMap, isNonEmptyArray } from "../../utils/index";
import { assign, flatMap, isNonEmptyArray } from "../../utils";

const identity = item => item;

Expand Down
2 changes: 1 addition & 1 deletion src/components/Personalization/createOnClickHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { isNonEmptyArray } from "../../utils/index";
import { isNonEmptyArray } from "../../utils";

export default ({ mergeMeta, collectClicks, clickStorage }) => {
return ({ event, clickedElement }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Personalization/createOnResponseHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTA
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/
import { isEmptyObject } from "../../utils/index";
import { isEmptyObject } from "../../utils";
import { DOM_ACTION } from "./constants/schema";
import PAGE_WIDE_SCOPE from "./constants/scope";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { includes } from "../../utils/index";
import { includes } from "../../utils";
import PAGE_WIDE_SCOPE from "./constants/scope";
import {
DOM_ACTION,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Personalization/createViewCacheManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { assign } from "../../utils/index";
import { assign } from "../../utils";
import defer from "../../utils/defer";

export default () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Personalization/createViewCollect.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { isNonEmptyArray } from "../../utils/index";
import { isNonEmptyArray } from "../../utils";

export default ({ eventManager, mergeMeta }) => {
return ({ meta, xdm = {} }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Personalization/decisionsExtractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { isNonEmptyArray } from "../../utils/index";
import { isNonEmptyArray } from "../../utils";

const splitItems = (items, schema) => {
const matched = [];
Expand Down
6 changes: 3 additions & 3 deletions src/components/Personalization/dom-actions/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { awaitSelector } from "../../../utils/dom/index";
import { hideElements, showElements } from "../flicker/index";
import { selectNodesWithEq } from "./dom/index";
import { awaitSelector } from "../../../utils/dom";
import { hideElements, showElements } from "../flicker";
import { selectNodesWithEq } from "./dom";

export { default as setText } from "./setText";
export { default as setHtml } from "./setHtml";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { selectNodes } from "../../../utils/dom/index";
import { selectNodes } from "../../../utils/dom";
import { SRC, STYLE } from "../../../constants/tagName";
import { getAttribute, getNonce } from "./dom/index";
import { getAttribute, getNonce } from "./dom";

const is = (element, tagName) => element.tagName === tagName;
const isInlineStyleElement = element =>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Personalization/dom-actions/appendHtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { appendNode } from "../../../utils/dom/index";
import { createFragment, getChildNodes } from "./dom/index";
import { appendNode } from "../../../utils/dom";
import { createFragment, getChildNodes } from "./dom";
import { loadImages } from "./images";
import addNonceToInlineStyleElements from "./addNonceToInlineStyleElements";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { createNode } from "../../../../utils/dom/index";
import { createNode } from "../../../../utils/dom";
import { DIV } from "../../../../constants/tagName";

export default content => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { toArray } from "../../../../utils/index";
import { toArray } from "../../../../utils";

export default element => {
const { childNodes } = element;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { toArray } from "../../../../utils/index";
import { toArray } from "../../../../utils";

export default element => {
const { children } = element;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { isNonEmptyString } from "../../../../utils/index";
import { isNonEmptyString } from "../../../../utils";

const EQ_START = ":eq(";
const EQ_PATTERN = /:eq\((\d+)\)/g;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { matchesSelector } from "../../../../utils/dom/index";
import { matchesSelector } from "../../../../utils/dom";
import { isNotEqSelector } from "./helperForEq";
import { selectNodesWithEq } from "./selectNodesWithEq";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ governing permissions and limitations under the License.
*/

import escape from "css.escape";
import { selectNodes } from "../../../../utils/dom/index";
import { selectNodes } from "../../../../utils/dom";
import { isNotEqSelector, splitWithEq } from "./helperForEq";

// Trying to match ID or CSS class
Expand Down
4 changes: 2 additions & 2 deletions src/components/Personalization/dom-actions/images.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { createNode, selectNodes } from "../../../utils/dom/index";
import { createNode, selectNodes } from "../../../utils/dom";
import { IMG, SRC } from "../../../constants/tagName";
import { getAttribute } from "./dom/index";
import { getAttribute } from "./dom";

export const isImage = element => element.tagName === IMG;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

import { removeNode } from "../../../utils/dom/index";
import { removeNode } from "../../../utils/dom";
import {
createAction,
setHtml,
Expand Down
Loading

0 comments on commit ff5b019

Please sign in to comment.