This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* OPTIMIZELY POLL FOR DELAYED CONTENT: | |
* | |
* The pollForDelayedContent() helper function is an alternative solution to some of the approaches listed here: https://help.optimizely.com/hc/en-us/articles/200457495. | |
* It will be able to be used as many times as it's needed within an experiment or variation. When the Optimizely snippet is implemented correctly, it should provide a way to eliminate all content flashing. | |
* The function allows for a an "options" element, to allow for more flexibility as well. | |
* Feel free to file a ticket at optimizely.com/support with any feedback or questions - as the comments on this page will not be responded to. | |
* | |
* SIMPLE USAGE EXAMPLE: this does not use the optional options object to specify selectorToHide, timeoutInSeconds, or intervalInMilliseconds, causing them to default to hide the no timeout and 50 milliseconds. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* OPTIMIZELY POLL FOR DELAYED CONTENT v2 (with Truthy option): | |
* | |
* The pollForDelayedContent() helper function is an alternative solution to some of the approaches listed here: https://help.optimizely.com/hc/en-us/articles/200457495. | |
* It will be able to be used as many times as it's needed within an experiment or variation. When the Optimizely snippet is implemented correctly, it should provide a way to eliminate all content flashing. | |
* The function allows for a an "options" element, to allow for more flexibility as well. | |
* Feel free to file a ticket at optimizely.com/support with any feedback or questions - as the comments on this page will not be responded to. | |
* | |
* SIMPLE USAGE EXAMPLE: this does not use the optional options object to specify selectorToHide, timeoutInSeconds, or intervalInMilliseconds, causing them to default to hide the no timeout and 50 milliseconds. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* sortByImmutableKey: sort given an Immutable List, key, and ascending/descending | |
* | |
* | |
* @param immutableList(Immutable.List) | |
* @param sortKey(string) | |
* @param ascending(boolean) | |
*/ | |
export const sortByImmutableKey(immutableList, sortKey, ascending=false) { | |
if (__DEV__ && typeof immutableList === 'undefined') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SECRETS!! ACTUAL VALUES SHOULD BE OMMITTED FROM GIST | |
var ACCOUNT_PASSWORD = 'SECRET'; | |
var ACCOUNT_API_TOKEN = 'SECRET'; | |
/** | |
* Gist link: https://gist.github.com/circAssimilate/31d7ea6a24a22532b50fcd2b6af2ffb3 | |
* | |
* OWNERS: | |
* - derek@optimizely.com | |
* - siddhartha.kakarla@optimizely.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ATTN: This file will NOT be merged. It's just for manually testing this via the existing Full Stack Experiment manager | |
*/ | |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import { Button, Container, Row, Col, EmptyDashboard } from 'optimizely-oui'; | |
import ui from 'core/ui'; | |
import Immutable, { toImmutable, toJS } from 'optly/immutable'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2021-01-22T19:56:55.940Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deleteField(obj: any, path: string) { | |
let res = clone(obj); // this keeps inheritance when obj is a class | |
let resVal = res; | |
let i = 0; | |
let pathArray = toPath(path); | |
for (; i < pathArray.length - 1; i++) { | |
var currentPath = pathArray[i]; | |
let currentObj = get(obj, pathArray.slice(0, i + 1)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @see https://stackoverflow.com/questions/14962018/detecting-and-fixing-circular-references-in-javascript | |
*/ | |
export function isCyclic(obj: Record<string, unknown>): boolean { | |
const seenObjects: unknown[] = []; | |
function detect(objToDetect: unknown) { | |
if (objToDetect && typeof objToDetect === 'object') { | |
if (seenObjects.includes(objToDetect)) { | |
return true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable @typescript-eslint/no-explicit-any */ | |
import { | |
Context, | |
createContext, | |
useContextSelector, | |
} from '@fluentui/react-context-selector'; | |
type CreateNamedContextReturn<T> = [ | |
Provider: React.Provider<T>, | |
useContext: <V = T>() => V, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Menu Key Bindings</key> | |
<dict> | |
<key>Key Bindings</key> | |
<array> | |
<dict> | |
<key>Action</key> |
OlderNewer