@candulabs/models
Advanced tools
Comparing version 0.6.14-alpha.0 to 0.6.14-alpha.1
@@ -6,10 +6,13 @@ # Change Log | ||
## [0.6.14-alpha.0](https://github.com/candulabs/candu-sdk/tree/master/packages/candu-models/compare/v0.6.13...v0.6.14-alpha.0) (2021-02-08) | ||
## [0.6.14-alpha.1](https://github.com/candulabs/candu-sdk/tree/master/packages/candu-models/compare/v0.6.13...v0.6.14-alpha.1) (2021-02-24) | ||
**Note:** Version bump only for package @candulabs/models | ||
### Features | ||
* add card state ([#263](https://github.com/candulabs/candu-sdk/tree/master/packages/candu-models/issues/263)) ([49d230c](https://github.com/candulabs/candu-sdk/tree/master/packages/candu-models/commit/49d230ca1b59076f7a4212150494dfd6c45a1491)) | ||
## [0.6.13](https://github.com/candulabs/candu-sdk/tree/master/packages/candu-models/compare/v0.6.13-alpha.3...v0.6.13) (2021-02-02) | ||
@@ -16,0 +19,0 @@ |
@@ -9,2 +9,3 @@ import { PortalId, PortalSlug } from '../notebook/Portal'; | ||
portalSlug?: PortalSlug; | ||
parentTrackers?: Array<TrackingIdentifiers>; | ||
} |
@@ -16,3 +16,3 @@ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var DEFAULT_SEGMENT_ID="Everyone",commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},freeGlobal="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,_freeGlobal=freeGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=_freeGlobal||freeSelf||Function("return this")(),_root=root,Symbol=_root.Symbol,_Symbol=Symbol,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag=_Symbol?_Symbol.toStringTag:void 0;function getRawTag(e){var t=hasOwnProperty.call(e,symToStringTag),r=e[symToStringTag];try{e[symToStringTag]=void 0;var o=!0}catch(e){}var n=nativeObjectToString.call(e);return o&&(t?e[symToStringTag]=r:delete e[symToStringTag]),n}var _getRawTag=getRawTag,objectProto$1=Object.prototype,nativeObjectToString$1=objectProto$1.toString;function objectToString(e){return nativeObjectToString$1.call(e)}var _objectToString=objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag$1=_Symbol?_Symbol.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag$1&&symToStringTag$1 in Object(e)?_getRawTag(e):_objectToString(e)}var _baseGetTag=baseGetTag,isArray=Array.isArray,isArray_1=isArray;function isObjectLike(e){return null!=e&&"object"==typeof e}var isObjectLike_1=isObjectLike,stringTag="[object String]";function isString(e){return"string"==typeof e||!isArray_1(e)&&isObjectLike_1(e)&&_baseGetTag(e)==stringTag}var isString_1=isString,numberTag="[object Number]";function isNumber(e){return"number"==typeof e||isObjectLike_1(e)&&_baseGetTag(e)==numberTag}var isNumber_1=isNumber,identifierRegex=/^([a-zA-Z0-9]|_|-)+$/,isIdentifier=function(e){return isString_1(e)&&e.length>=3&&e.length<100&&identifierRegex.test(e)},IsNumericId=function(e){return isNumber_1(e)&&e>=0},isClientToken=function(e){return isString_1(e)&&!!e.match(/^[0-9a-zA-Z]*$/)&&e.length>=10},isUserId=function(e){return IsNumericId(e)||isString_1(e)&&e.trim().length>0};!function(e){e.SDK="SDK",e.PREVIEW="PREVIEW"}(exports.ACTORS||(exports.ACTORS={})); | ||
***************************************************************************** */ | ||
var __assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function __spreadArrays(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var o=Array(e),n=0;for(t=0;t<r;t++)for(var s=arguments[t],i=0,a=s.length;i<a;i++,n++)o[n]=s[i];return o}!function(e){e.BOOTSTRAP="Bootstrap",e.CHANGE_POSITION="ChangePosition",e.CLOSE_PREVIEW="ClosePreview",e.PREVIEW_LOADED="PreviewLoaded",e.SET_AVALIABLE_PORTALS="SetAvaliablePortals",e.SET_CONTENT="SetContent",e.SET_SELECTED_ELEMENT="SetSelectedElement",e.SET_VIEW_MODE="SetViewMode",e.ADD_ELEMENT="AddElement",e.REMOVE_ELEMENT="RemoveElement",e.UPDATE_ELEMENT="UpdateElement",e.SET_ELEMENT="SetElement"}(exports.MESSAGES||(exports.MESSAGES={}));var message=function(e,t){return void 0===t&&(t={}),__assign({type:e},t)},messages={bootstrap:function(e,t,r,o){return message(exports.MESSAGES.BOOTSTRAP,{clientToken:e,userId:t,version:r,preview:o})},changePosition:function(e,t){return message(exports.MESSAGES.CHANGE_POSITION,{mouseEvent:e,top:t})},closePreview:function(){return message(exports.MESSAGES.CLOSE_PREVIEW)},previewLoaded:function(){return message(exports.MESSAGES.PREVIEW_LOADED)},setAvaliablePortals:function(e){return message(exports.MESSAGES.SET_AVALIABLE_PORTALS,{avaliablePortals:e})},addElement:function(e){return message(exports.MESSAGES.ADD_ELEMENT,{element:e})},removeElement:function(e){return message(exports.MESSAGES.REMOVE_ELEMENT,{id:e})},updateElement:function(e){return message(exports.MESSAGES.UPDATE_ELEMENT,{element:e})},setContent:function(e){return message(exports.MESSAGES.SET_CONTENT,{content:e})},setViewMode:function(e){return message(exports.MESSAGES.SET_VIEW_MODE,{viewMode:e})},setSelectedElement:function(e){return message(exports.MESSAGES.SET_SELECTED_ELEMENT,{element:e})}},messageFactory=function(e){var t=e.source,r=e.destination;return{read:function(e){var t=e.actor,o=e.message;return t===r?o:null},write:function(e){return{actor:t,message:e}}}},windowStream=function(e){var t=e.source,r=e.destination,o=e.targetOrigin,n=e.targetWindow,s=e.originWindow,i=e.onRecieveMessage,a=messageFactory({source:t,destination:r}),u=a.read,c=a.write,E=function(e){var t=u(e.data);t&&i(t)};return s.addEventListener("message",E,!1),{close:function(){s.removeEventListener("message",E)},send:function(e){n.postMessage(c(e),o)}}};(exports.TRIGGERS||(exports.TRIGGERS={})).ON_CLICK="OnClick",function(e){e.NATIVE="Native",e.PENDO="Pendo"}(exports.CATEGORIES||(exports.CATEGORIES={})),function(e){e.NAVIGATE="Navigate",e.CHANGE_TUTORIAL="ChangeTutorial",e.OPEN_GUIDE="OpenGuide"}(exports.HANDLER_TYPES||(exports.HANDLER_TYPES={})),function(e){e.PRIMARY="primary",e.SECONDARY="primary",e.WARNING="warning",e.DANGER="danger",e.NEUTRAL="neutral",e.ACTIVE="active",e.INFO="info"}(exports.COLORS||(exports.COLORS={}));var DEFAULT_COLOR=exports.COLORS.PRIMARY;!function(e){e.U="U",e.B="B",e.Em="Em",e.InlineCode="InlineCode"}(exports.Mark||(exports.Mark={}));var isContentHashId=function(e){return isString_1(e)&&!!e.match(/^[0-9a-zA-Z]{40}$/)},isPortalId=function(e){return IsNumericId(e)},isPortalSlug=function(e){return isIdentifier(e)},isTutorialId=function(e){return IsNumericId(e)},isTutorialSlug=function(e){return isIdentifier(e)};!function(e){e.NotStared="NotStarted",e.InProgress="InProgress",e.Done="Done"}(exports.CheckListItemStatus||(exports.CheckListItemStatus={}));var CANDU_PORTAL_CLASS="candu_portal",canduPortalId=function(e){return"candu_portal_"+e};const PREVIEW_SCRIPT_URL="https://app.candu.ai/preview.html";var PREVIEW_COOKIE_NAME="candu.preview",PREVIEW_URL_PARAM="candu_preview",PREVIEW_FRAME_ID="canduPreview";!function(e){e.COLLAPSED="Collapsed",e.EXPANDED="Expanded",e.MINIMIZED="Minimized"}(exports.FRAME_SIZES||(exports.FRAME_SIZES={})),function(e){e.TUTORIAL="Tutorial",e.PORTAL="Portal"}(exports.PREVIEW_MODES||(exports.PREVIEW_MODES={}));var PREVIEW_SCRIPT_URL$1=PREVIEW_SCRIPT_URL;!function(e){e.Global="Global",e.Organization="Organization"}(exports.StyleguideScope||(exports.StyleguideScope={})),function(e){e.Root="root",e.Rule="rule",e.Atrule="atrule",e.Decl="decl",e.Any="any"}(exports.CSSNodeTypes||(exports.CSSNodeTypes={}));var stylguideClassNameMap={button:{childClassNames:{icon:"button-icon"},variants:{color:function(e){return"color-"+e},outline:function(e){return"outline-"+e}}},typography:{variants:{typography:function(e){return"typography-"+e}}}},toCssSelector=function(e,t){var r=__assign({className:"root",variant:void 0,selector:"",output:"css"},t||{}),o=r.className,n=r.variant,s=r.selector,i=r.output,a="candu-"+e;if("global"===o)return"html"===i?"":":root";var u=null,c=[],E=stylguideClassNameMap[e]||{};if(n&&E.variants){var l=E.variants;c=Object.keys(n).reduce((function(e,t){var r=n[t],o=l[t];return e.push(o?o(r):t+"-"+r),e}),[])}return"root"!==o&&E.childClassNames&&E.childClassNames[o]&&(u="candu-"+e+"--"+E.childClassNames[o]),"css"===i?[a,u,s].reduce((function(e,t,r){return t&&""!==t?0===r?"."+a+c.map((function(e){return"."+e})).join(""):1===r?e+" ."+t:""+e+t:e}),"")||"":"root"===o?__spreadArrays([a],c).filter((function(e){return!!e})).join(" ")||"":u||""},cssInputObjToString=function(e){return Object.keys(e).reduce((function(t,r){return""+t+r+": "+e[r]+";"}),"")},cssInputStringToObj=function(e){return e.split(";").reduce((function(e,t){var r,o=t.split(":"),n=o[0],s=o[1];return n&&s?__assign(__assign({},e),((r={})[n.trim()]=s.trim(),r)):e}),{})},toStyleguideDecl=function(e){return Object.keys(e).reduce((function(t,r){return __spreadArrays(t,[{type:exports.CSSNodeTypes.Decl,prop:r,value:e[r]}])}),[])};!function(e){e.Global="Global",e.Carried="Carried"}(exports.StateScope||(exports.StateScope={})),function(e){e.CanduCdn="CanduCdn",e.CheckListApi="CheckListApi"}(exports.StateResolverType||(exports.StateResolverType={})),function(e){e.User="User",e.Account="Account"}(exports.CheckListScope||(exports.CheckListScope={}));var isStatePath=function(e){return isString_1(e)&&!!e.match(/^@(\w|\d|_|-|\.){3,20}\$/)};exports.CANDU_PORTAL_CLASS=CANDU_PORTAL_CLASS,exports.DEFAULT_COLOR=DEFAULT_COLOR,exports.DEFAULT_SEGMENT_ID=DEFAULT_SEGMENT_ID,exports.IsNumericId=IsNumericId,exports.PREVIEW_COOKIE_NAME=PREVIEW_COOKIE_NAME,exports.PREVIEW_FRAME_ID=PREVIEW_FRAME_ID,exports.PREVIEW_SCRIPT_URL=PREVIEW_SCRIPT_URL$1,exports.PREVIEW_URL_PARAM=PREVIEW_URL_PARAM,exports.canduPortalId=canduPortalId,exports.cssInputObjToString=cssInputObjToString,exports.cssInputStringToObj=cssInputStringToObj,exports.isClientToken=isClientToken,exports.isContentHashId=isContentHashId,exports.isIdentifier=isIdentifier,exports.isPortalId=isPortalId,exports.isPortalSlug=isPortalSlug,exports.isStatePath=isStatePath,exports.isTutorialId=isTutorialId,exports.isTutorialSlug=isTutorialSlug,exports.isUserId=isUserId,exports.messageFactory=messageFactory,exports.messages=messages,exports.stylguideClassNameMap=stylguideClassNameMap,exports.toCssSelector=toCssSelector,exports.toStyleguideDecl=toStyleguideDecl,exports.windowStream=windowStream; | ||
var __assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function __spreadArrays(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var o=Array(e),n=0;for(t=0;t<r;t++)for(var s=arguments[t],i=0,a=s.length;i<a;i++,n++)o[n]=s[i];return o}!function(e){e.BOOTSTRAP="Bootstrap",e.CHANGE_POSITION="ChangePosition",e.CLOSE_PREVIEW="ClosePreview",e.PREVIEW_LOADED="PreviewLoaded",e.SET_AVALIABLE_PORTALS="SetAvaliablePortals",e.SET_CONTENT="SetContent",e.SET_SELECTED_ELEMENT="SetSelectedElement",e.SET_VIEW_MODE="SetViewMode",e.ADD_ELEMENT="AddElement",e.REMOVE_ELEMENT="RemoveElement",e.UPDATE_ELEMENT="UpdateElement",e.SET_ELEMENT="SetElement"}(exports.MESSAGES||(exports.MESSAGES={}));var message=function(e,t){return void 0===t&&(t={}),__assign({type:e},t)},messages={bootstrap:function(e,t,r,o){return message(exports.MESSAGES.BOOTSTRAP,{clientToken:e,userId:t,version:r,preview:o})},changePosition:function(e,t){return message(exports.MESSAGES.CHANGE_POSITION,{mouseEvent:e,top:t})},closePreview:function(){return message(exports.MESSAGES.CLOSE_PREVIEW)},previewLoaded:function(){return message(exports.MESSAGES.PREVIEW_LOADED)},setAvaliablePortals:function(e){return message(exports.MESSAGES.SET_AVALIABLE_PORTALS,{avaliablePortals:e})},addElement:function(e){return message(exports.MESSAGES.ADD_ELEMENT,{element:e})},removeElement:function(e){return message(exports.MESSAGES.REMOVE_ELEMENT,{id:e})},updateElement:function(e){return message(exports.MESSAGES.UPDATE_ELEMENT,{element:e})},setContent:function(e){return message(exports.MESSAGES.SET_CONTENT,{content:e})},setViewMode:function(e){return message(exports.MESSAGES.SET_VIEW_MODE,{viewMode:e})},setSelectedElement:function(e){return message(exports.MESSAGES.SET_SELECTED_ELEMENT,{element:e})}},messageFactory=function(e){var t=e.source,r=e.destination;return{read:function(e){var t=e.actor,o=e.message;return t===r?o:null},write:function(e){return{actor:t,message:e}}}},windowStream=function(e){var t=e.source,r=e.destination,o=e.targetOrigin,n=e.targetWindow,s=e.originWindow,i=e.onRecieveMessage,a=messageFactory({source:t,destination:r}),u=a.read,c=a.write,E=function(e){var t=u(e.data);t&&i(t)};return s.addEventListener("message",E,!1),{close:function(){s.removeEventListener("message",E)},send:function(e){n.postMessage(c(e),o)}}};(exports.TRIGGERS||(exports.TRIGGERS={})).ON_CLICK="OnClick",function(e){e.NATIVE="Native",e.PENDO="Pendo"}(exports.CATEGORIES||(exports.CATEGORIES={})),function(e){e.NAVIGATE="Navigate",e.CHANGE_TUTORIAL="ChangeTutorial",e.OPEN_GUIDE="OpenGuide"}(exports.HANDLER_TYPES||(exports.HANDLER_TYPES={})),function(e){e.PRIMARY="primary",e.SECONDARY="primary",e.WARNING="warning",e.DANGER="danger",e.NEUTRAL="neutral",e.ACTIVE="active",e.INFO="info"}(exports.COLORS||(exports.COLORS={}));var DEFAULT_COLOR=exports.COLORS.PRIMARY;!function(e){e.U="U",e.B="B",e.Em="Em",e.InlineCode="InlineCode"}(exports.Mark||(exports.Mark={}));var isContentHashId=function(e){return isString_1(e)&&!!e.match(/^[0-9a-zA-Z]{40}$/)},isPortalId=function(e){return IsNumericId(e)},isPortalSlug=function(e){return isIdentifier(e)},isTutorialId=function(e){return IsNumericId(e)},isTutorialSlug=function(e){return isIdentifier(e)};!function(e){e.NotStared="NotStarted",e.InProgress="InProgress",e.Done="Done"}(exports.CheckListItemStatus||(exports.CheckListItemStatus={})),function(e){e.User="User",e.Account="Account"}(exports.CheckListScope||(exports.CheckListScope={}));var CANDU_PORTAL_CLASS="candu_portal",canduPortalId=function(e){return"candu_portal_"+e};const PREVIEW_SCRIPT_URL="https://app.candu.ai/preview.html";var PREVIEW_COOKIE_NAME="candu.preview",PREVIEW_URL_PARAM="candu_preview",PREVIEW_FRAME_ID="canduPreview";!function(e){e.COLLAPSED="Collapsed",e.EXPANDED="Expanded",e.MINIMIZED="Minimized"}(exports.FRAME_SIZES||(exports.FRAME_SIZES={})),function(e){e.TUTORIAL="Tutorial",e.PORTAL="Portal"}(exports.PREVIEW_MODES||(exports.PREVIEW_MODES={}));var PREVIEW_SCRIPT_URL$1=PREVIEW_SCRIPT_URL;!function(e){e.Global="Global",e.Organization="Organization"}(exports.StyleguideScope||(exports.StyleguideScope={})),function(e){e.Root="root",e.Rule="rule",e.Atrule="atrule",e.Decl="decl",e.Any="any"}(exports.CSSNodeTypes||(exports.CSSNodeTypes={}));var stylguideClassNameMap={button:{childClassNames:{icon:"button-icon"},variants:{color:function(e){return"color-"+e},outline:function(e){return"outline-"+e}}},typography:{variants:{typography:function(e){return"typography-"+e}}}},toCssSelector=function(e,t){var r=__assign({className:"root",variant:void 0,selector:"",output:"css"},t||{}),o=r.className,n=r.variant,s=r.selector,i=r.output,a="candu-"+e;if("global"===o)return"html"===i?"":":root";var u=null,c=[],E=stylguideClassNameMap[e]||{};if(n&&E.variants){var l=E.variants;c=Object.keys(n).reduce((function(e,t){var r=n[t],o=l[t];return e.push(o?o(r):t+"-"+r),e}),[])}return"root"!==o&&E.childClassNames&&E.childClassNames[o]&&(u="candu-"+e+"--"+E.childClassNames[o]),"css"===i?[a,u,s].reduce((function(e,t,r){return t&&""!==t?0===r?"."+a+c.map((function(e){return"."+e})).join(""):1===r?e+" ."+t:""+e+t:e}),"")||"":"root"===o?__spreadArrays([a],c).filter((function(e){return!!e})).join(" ")||"":u||""},cssInputObjToString=function(e){return Object.keys(e).reduce((function(t,r){return""+t+r+": "+e[r]+";"}),"")},cssInputStringToObj=function(e){return e.split(";").reduce((function(e,t){var r,o=t.split(":"),n=o[0],s=o[1];return n&&s?__assign(__assign({},e),((r={})[n.trim()]=s.trim(),r)):e}),{})},toStyleguideDecl=function(e){return Object.keys(e).reduce((function(t,r){return __spreadArrays(t,[{type:exports.CSSNodeTypes.Decl,prop:r,value:e[r]}])}),[])};!function(e){e.Global="Global",e.Carried="Carried"}(exports.StateScope||(exports.StateScope={}));var isStatePath=function(e){return isString_1(e)&&!!e.match(/^@(\w|\d|_|-|\.){3,20}\$/)};exports.CANDU_PORTAL_CLASS=CANDU_PORTAL_CLASS,exports.DEFAULT_COLOR=DEFAULT_COLOR,exports.DEFAULT_SEGMENT_ID=DEFAULT_SEGMENT_ID,exports.IsNumericId=IsNumericId,exports.PREVIEW_COOKIE_NAME=PREVIEW_COOKIE_NAME,exports.PREVIEW_FRAME_ID=PREVIEW_FRAME_ID,exports.PREVIEW_SCRIPT_URL=PREVIEW_SCRIPT_URL$1,exports.PREVIEW_URL_PARAM=PREVIEW_URL_PARAM,exports.canduPortalId=canduPortalId,exports.cssInputObjToString=cssInputObjToString,exports.cssInputStringToObj=cssInputStringToObj,exports.isClientToken=isClientToken,exports.isContentHashId=isContentHashId,exports.isIdentifier=isIdentifier,exports.isPortalId=isPortalId,exports.isPortalSlug=isPortalSlug,exports.isStatePath=isStatePath,exports.isTutorialId=isTutorialId,exports.isTutorialSlug=isTutorialSlug,exports.isUserId=isUserId,exports.messageFactory=messageFactory,exports.messages=messages,exports.stylguideClassNameMap=stylguideClassNameMap,exports.toCssSelector=toCssSelector,exports.toStyleguideDecl=toStyleguideDecl,exports.windowStream=windowStream; | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -1,2 +0,2 @@ | ||
var n="Everyone",t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e="object"==typeof t&&t&&t.Object===Object&&t,r="object"==typeof self&&self&&self.Object===Object&&self,o=(e||r||Function("return this")()).Symbol,i=Object.prototype,u=i.hasOwnProperty,a=i.toString,c=o?o.toStringTag:void 0;var l=function(n){var t=u.call(n,c),e=n[c];try{n[c]=void 0;var r=!0}catch(n){}var o=a.call(n);return r&&(t?n[c]=e:delete n[c]),o},E=Object.prototype.toString;var s=function(n){return E.call(n)},f="[object Null]",d="[object Undefined]",v=o?o.toStringTag:void 0;var p=function(n){return null==n?void 0===n?d:f:v&&v in Object(n)?l(n):s(n)},T=Array.isArray;var A=function(n){return null!=n&&"object"==typeof n},O="[object String]";var g=function(n){return"string"==typeof n||!T(n)&&A(n)&&p(n)==O},m="[object Number]";var N,S=function(n){return"number"==typeof n||A(n)&&p(n)==m},P=/^([a-zA-Z0-9]|_|-)+$/,_=function(n){return g(n)&&n.length>=3&&n.length<100&&P.test(n)},b=function(n){return S(n)&&n>=0},y=function(n){return g(n)&&!!n.match(/^[0-9a-zA-Z]*$/)&&n.length>=10},C=function(n){return b(n)||g(n)&&n.trim().length>0};!function(n){n.SDK="SDK",n.PREVIEW="PREVIEW"}(N||(N={})); | ||
var n="Everyone",e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t="object"==typeof e&&e&&e.Object===Object&&e,r="object"==typeof self&&self&&self.Object===Object&&self,o=(t||r||Function("return this")()).Symbol,i=Object.prototype,u=i.hasOwnProperty,a=i.toString,c=o?o.toStringTag:void 0;var l=function(n){var e=u.call(n,c),t=n[c];try{n[c]=void 0;var r=!0}catch(n){}var o=a.call(n);return r&&(e?n[c]=t:delete n[c]),o},E=Object.prototype.toString;var s=function(n){return E.call(n)},f="[object Null]",d="[object Undefined]",v=o?o.toStringTag:void 0;var p=function(n){return null==n?void 0===n?d:f:v&&v in Object(n)?l(n):s(n)},T=Array.isArray;var O=function(n){return null!=n&&"object"==typeof n},A="[object String]";var g=function(n){return"string"==typeof n||!T(n)&&O(n)&&p(n)==A},m="[object Number]";var N,S=function(n){return"number"==typeof n||O(n)&&p(n)==m},P=/^([a-zA-Z0-9]|_|-)+$/,_=function(n){return g(n)&&n.length>=3&&n.length<100&&P.test(n)},b=function(n){return S(n)&&n>=0},y=function(n){return g(n)&&!!n.match(/^[0-9a-zA-Z]*$/)&&n.length>=10},I=function(n){return b(n)||g(n)&&n.trim().length>0};!function(n){n.SDK="SDK",n.PREVIEW="PREVIEW"}(N||(N={})); | ||
/*! ***************************************************************************** | ||
@@ -16,3 +16,3 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
***************************************************************************** */ | ||
var I,L=function(){return(L=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}).apply(this,arguments)};function h(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;var r=Array(n),o=0;for(t=0;t<e;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r}!function(n){n.BOOTSTRAP="Bootstrap",n.CHANGE_POSITION="ChangePosition",n.CLOSE_PREVIEW="ClosePreview",n.PREVIEW_LOADED="PreviewLoaded",n.SET_AVALIABLE_PORTALS="SetAvaliablePortals",n.SET_CONTENT="SetContent",n.SET_SELECTED_ELEMENT="SetSelectedElement",n.SET_VIEW_MODE="SetViewMode",n.ADD_ELEMENT="AddElement",n.REMOVE_ELEMENT="RemoveElement",n.UPDATE_ELEMENT="UpdateElement",n.SET_ELEMENT="SetElement"}(I||(I={}));var R,D,w,M,j=function(n,t){return void 0===t&&(t={}),L({type:n},t)},V={bootstrap:function(n,t,e,r){return j(I.BOOTSTRAP,{clientToken:n,userId:t,version:e,preview:r})},changePosition:function(n,t){return j(I.CHANGE_POSITION,{mouseEvent:n,top:t})},closePreview:function(){return j(I.CLOSE_PREVIEW)},previewLoaded:function(){return j(I.PREVIEW_LOADED)},setAvaliablePortals:function(n){return j(I.SET_AVALIABLE_PORTALS,{avaliablePortals:n})},addElement:function(n){return j(I.ADD_ELEMENT,{element:n})},removeElement:function(n){return j(I.REMOVE_ELEMENT,{id:n})},updateElement:function(n){return j(I.UPDATE_ELEMENT,{element:n})},setContent:function(n){return j(I.SET_CONTENT,{content:n})},setViewMode:function(n){return j(I.SET_VIEW_MODE,{viewMode:n})},setSelectedElement:function(n){return j(I.SET_SELECTED_ELEMENT,{element:n})}},U=function(n){var t=n.source,e=n.destination;return{read:function(n){var t=n.actor,r=n.message;return t===e?r:null},write:function(n){return{actor:t,message:n}}}},G=function(n){var t=n.source,e=n.destination,r=n.targetOrigin,o=n.targetWindow,i=n.originWindow,u=n.onRecieveMessage,a=U({source:t,destination:e}),c=a.read,l=a.write,E=function(n){var t=c(n.data);t&&u(t)};return i.addEventListener("message",E,!1),{close:function(){i.removeEventListener("message",E)},send:function(n){o.postMessage(l(n),r)}}};!function(n){n.ON_CLICK="OnClick"}(R||(R={})),function(n){n.NATIVE="Native",n.PENDO="Pendo"}(D||(D={})),function(n){n.NAVIGATE="Navigate",n.CHANGE_TUTORIAL="ChangeTutorial",n.OPEN_GUIDE="OpenGuide"}(w||(w={})),function(n){n.PRIMARY="primary",n.SECONDARY="primary",n.WARNING="warning",n.DANGER="danger",n.NEUTRAL="neutral",n.ACTIVE="active",n.INFO="info"}(M||(M={}));var W,k=M.PRIMARY;!function(n){n.U="U",n.B="B",n.Em="Em",n.InlineCode="InlineCode"}(W||(W={}));var B,z=function(n){return g(n)&&!!n.match(/^[0-9a-zA-Z]{40}$/)},Z=function(n){return b(n)},$=function(n){return _(n)},H=function(n){return b(n)},K=function(n){return _(n)};!function(n){n.NotStared="NotStarted",n.InProgress="InProgress",n.Done="Done"}(B||(B={}));var Y="candu_portal",x=function(n){return"candu_portal_"+n};var F,X,q="candu.preview",J="candu_preview",Q="canduPreview";!function(n){n.COLLAPSED="Collapsed",n.EXPANDED="Expanded",n.MINIMIZED="Minimized"}(F||(F={})),function(n){n.TUTORIAL="Tutorial",n.PORTAL="Portal"}(X||(X={}));var nn,tn,en="https://app.candu.ai/preview.html";!function(n){n.Global="Global",n.Organization="Organization"}(nn||(nn={})),function(n){n.Root="root",n.Rule="rule",n.Atrule="atrule",n.Decl="decl",n.Any="any"}(tn||(tn={}));var rn,on,un,an={button:{childClassNames:{icon:"button-icon"},variants:{color:function(n){return"color-"+n},outline:function(n){return"outline-"+n}}},typography:{variants:{typography:function(n){return"typography-"+n}}}},cn=function(n,t){var e=L({className:"root",variant:void 0,selector:"",output:"css"},t||{}),r=e.className,o=e.variant,i=e.selector,u=e.output,a="candu-"+n;if("global"===r)return"html"===u?"":":root";var c=null,l=[],E=an[n]||{};if(o&&E.variants){var s=E.variants;l=Object.keys(o).reduce((function(n,t){var e=o[t],r=s[t];return n.push(r?r(e):t+"-"+e),n}),[])}return"root"!==r&&E.childClassNames&&E.childClassNames[r]&&(c="candu-"+n+"--"+E.childClassNames[r]),"css"===u?[a,c,i].reduce((function(n,t,e){return t&&""!==t?0===e?"."+a+l.map((function(n){return"."+n})).join(""):1===e?n+" ."+t:""+n+t:n}),"")||"":"root"===r?h([a],l).filter((function(n){return!!n})).join(" ")||"":c||""},ln=function(n){return Object.keys(n).reduce((function(t,e){return""+t+e+": "+n[e]+";"}),"")},En=function(n){return n.split(";").reduce((function(n,t){var e,r=t.split(":"),o=r[0],i=r[1];return o&&i?L(L({},n),((e={})[o.trim()]=i.trim(),e)):n}),{})},sn=function(n){return Object.keys(n).reduce((function(t,e){return h(t,[{type:tn.Decl,prop:e,value:n[e]}])}),[])};!function(n){n.Global="Global",n.Carried="Carried"}(rn||(rn={})),function(n){n.CanduCdn="CanduCdn",n.CheckListApi="CheckListApi"}(on||(on={})),function(n){n.User="User",n.Account="Account"}(un||(un={}));var fn=function(n){return g(n)&&!!n.match(/^@(\w|\d|_|-|\.){3,20}\$/)};export{N as ACTORS,Y as CANDU_PORTAL_CLASS,D as CATEGORIES,M as COLORS,tn as CSSNodeTypes,B as CheckListItemStatus,un as CheckListScope,k as DEFAULT_COLOR,n as DEFAULT_SEGMENT_ID,F as FRAME_SIZES,w as HANDLER_TYPES,b as IsNumericId,I as MESSAGES,W as Mark,q as PREVIEW_COOKIE_NAME,Q as PREVIEW_FRAME_ID,X as PREVIEW_MODES,en as PREVIEW_SCRIPT_URL,J as PREVIEW_URL_PARAM,on as StateResolverType,rn as StateScope,nn as StyleguideScope,R as TRIGGERS,x as canduPortalId,ln as cssInputObjToString,En as cssInputStringToObj,y as isClientToken,z as isContentHashId,_ as isIdentifier,Z as isPortalId,$ as isPortalSlug,fn as isStatePath,H as isTutorialId,K as isTutorialSlug,C as isUserId,U as messageFactory,V as messages,an as stylguideClassNameMap,cn as toCssSelector,sn as toStyleguideDecl,G as windowStream}; | ||
var L,h=function(){return(h=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}).apply(this,arguments)};function C(){for(var n=0,e=0,t=arguments.length;e<t;e++)n+=arguments[e].length;var r=Array(n),o=0;for(e=0;e<t;e++)for(var i=arguments[e],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r}!function(n){n.BOOTSTRAP="Bootstrap",n.CHANGE_POSITION="ChangePosition",n.CLOSE_PREVIEW="ClosePreview",n.PREVIEW_LOADED="PreviewLoaded",n.SET_AVALIABLE_PORTALS="SetAvaliablePortals",n.SET_CONTENT="SetContent",n.SET_SELECTED_ELEMENT="SetSelectedElement",n.SET_VIEW_MODE="SetViewMode",n.ADD_ELEMENT="AddElement",n.REMOVE_ELEMENT="RemoveElement",n.UPDATE_ELEMENT="UpdateElement",n.SET_ELEMENT="SetElement"}(L||(L={}));var R,D,w,M,j=function(n,e){return void 0===e&&(e={}),h({type:n},e)},V={bootstrap:function(n,e,t,r){return j(L.BOOTSTRAP,{clientToken:n,userId:e,version:t,preview:r})},changePosition:function(n,e){return j(L.CHANGE_POSITION,{mouseEvent:n,top:e})},closePreview:function(){return j(L.CLOSE_PREVIEW)},previewLoaded:function(){return j(L.PREVIEW_LOADED)},setAvaliablePortals:function(n){return j(L.SET_AVALIABLE_PORTALS,{avaliablePortals:n})},addElement:function(n){return j(L.ADD_ELEMENT,{element:n})},removeElement:function(n){return j(L.REMOVE_ELEMENT,{id:n})},updateElement:function(n){return j(L.UPDATE_ELEMENT,{element:n})},setContent:function(n){return j(L.SET_CONTENT,{content:n})},setViewMode:function(n){return j(L.SET_VIEW_MODE,{viewMode:n})},setSelectedElement:function(n){return j(L.SET_SELECTED_ELEMENT,{element:n})}},U=function(n){var e=n.source,t=n.destination;return{read:function(n){var e=n.actor,r=n.message;return e===t?r:null},write:function(n){return{actor:e,message:n}}}},G=function(n){var e=n.source,t=n.destination,r=n.targetOrigin,o=n.targetWindow,i=n.originWindow,u=n.onRecieveMessage,a=U({source:e,destination:t}),c=a.read,l=a.write,E=function(n){var e=c(n.data);e&&u(e)};return i.addEventListener("message",E,!1),{close:function(){i.removeEventListener("message",E)},send:function(n){o.postMessage(l(n),r)}}};!function(n){n.ON_CLICK="OnClick"}(R||(R={})),function(n){n.NATIVE="Native",n.PENDO="Pendo"}(D||(D={})),function(n){n.NAVIGATE="Navigate",n.CHANGE_TUTORIAL="ChangeTutorial",n.OPEN_GUIDE="OpenGuide"}(w||(w={})),function(n){n.PRIMARY="primary",n.SECONDARY="primary",n.WARNING="warning",n.DANGER="danger",n.NEUTRAL="neutral",n.ACTIVE="active",n.INFO="info"}(M||(M={}));var W,B=M.PRIMARY;!function(n){n.U="U",n.B="B",n.Em="Em",n.InlineCode="InlineCode"}(W||(W={}));var z,k,Z=function(n){return g(n)&&!!n.match(/^[0-9a-zA-Z]{40}$/)},$=function(n){return b(n)},H=function(n){return _(n)},K=function(n){return b(n)},Y=function(n){return _(n)};!function(n){n.NotStared="NotStarted",n.InProgress="InProgress",n.Done="Done"}(z||(z={})),function(n){n.User="User",n.Account="Account"}(k||(k={}));var x="candu_portal",F=function(n){return"candu_portal_"+n};var X,q,J="candu.preview",Q="candu_preview",nn="canduPreview";!function(n){n.COLLAPSED="Collapsed",n.EXPANDED="Expanded",n.MINIMIZED="Minimized"}(X||(X={})),function(n){n.TUTORIAL="Tutorial",n.PORTAL="Portal"}(q||(q={}));var en,tn,rn="https://app.candu.ai/preview.html";!function(n){n.Global="Global",n.Organization="Organization"}(en||(en={})),function(n){n.Root="root",n.Rule="rule",n.Atrule="atrule",n.Decl="decl",n.Any="any"}(tn||(tn={}));var on,un={button:{childClassNames:{icon:"button-icon"},variants:{color:function(n){return"color-"+n},outline:function(n){return"outline-"+n}}},typography:{variants:{typography:function(n){return"typography-"+n}}}},an=function(n,e){var t=h({className:"root",variant:void 0,selector:"",output:"css"},e||{}),r=t.className,o=t.variant,i=t.selector,u=t.output,a="candu-"+n;if("global"===r)return"html"===u?"":":root";var c=null,l=[],E=un[n]||{};if(o&&E.variants){var s=E.variants;l=Object.keys(o).reduce((function(n,e){var t=o[e],r=s[e];return n.push(r?r(t):e+"-"+t),n}),[])}return"root"!==r&&E.childClassNames&&E.childClassNames[r]&&(c="candu-"+n+"--"+E.childClassNames[r]),"css"===u?[a,c,i].reduce((function(n,e,t){return e&&""!==e?0===t?"."+a+l.map((function(n){return"."+n})).join(""):1===t?n+" ."+e:""+n+e:n}),"")||"":"root"===r?C([a],l).filter((function(n){return!!n})).join(" ")||"":c||""},cn=function(n){return Object.keys(n).reduce((function(e,t){return""+e+t+": "+n[t]+";"}),"")},ln=function(n){return n.split(";").reduce((function(n,e){var t,r=e.split(":"),o=r[0],i=r[1];return o&&i?h(h({},n),((t={})[o.trim()]=i.trim(),t)):n}),{})},En=function(n){return Object.keys(n).reduce((function(e,t){return C(e,[{type:tn.Decl,prop:t,value:n[t]}])}),[])};!function(n){n.Global="Global",n.Carried="Carried"}(on||(on={}));var sn=function(n){return g(n)&&!!n.match(/^@(\w|\d|_|-|\.){3,20}\$/)};export{N as ACTORS,x as CANDU_PORTAL_CLASS,D as CATEGORIES,M as COLORS,tn as CSSNodeTypes,z as CheckListItemStatus,k as CheckListScope,B as DEFAULT_COLOR,n as DEFAULT_SEGMENT_ID,X as FRAME_SIZES,w as HANDLER_TYPES,b as IsNumericId,L as MESSAGES,W as Mark,J as PREVIEW_COOKIE_NAME,nn as PREVIEW_FRAME_ID,q as PREVIEW_MODES,rn as PREVIEW_SCRIPT_URL,Q as PREVIEW_URL_PARAM,on as StateScope,en as StyleguideScope,R as TRIGGERS,F as canduPortalId,cn as cssInputObjToString,ln as cssInputStringToObj,y as isClientToken,Z as isContentHashId,_ as isIdentifier,$ as isPortalId,H as isPortalSlug,sn as isStatePath,K as isTutorialId,Y as isTutorialSlug,I as isUserId,U as messageFactory,V as messages,un as stylguideClassNameMap,an as toCssSelector,En as toStyleguideDecl,G as windowStream}; | ||
//# sourceMappingURL=index.es.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self)["@candulabs/models"]={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n="object"==typeof t&&t&&t.Object===Object&&t,r="object"==typeof self&&self&&self.Object===Object&&self,o=(n||r||Function("return this")()).Symbol,i=Object.prototype,a=i.hasOwnProperty,u=i.toString,E=o?o.toStringTag:void 0;var c=function(e){var t=a.call(e,E),n=e[E];try{e[E]=void 0;var r=!0}catch(e){}var o=u.call(e);return r&&(t?e[E]=n:delete e[E]),o},s=Object.prototype.toString;var l=function(e){return s.call(e)},S="[object Null]",d="[object Undefined]",f=o?o.toStringTag:void 0;var p=function(e){return null==e?void 0===e?d:S:f&&f in Object(e)?c(e):l(e)},A=Array.isArray;var T=function(e){return null!=e&&"object"==typeof e},v="[object String]";var O=function(e){return"string"==typeof e||!A(e)&&T(e)&&p(e)==v},I="[object Number]";var C,R=function(e){return"number"==typeof e||T(e)&&p(e)==I},_=/^([a-zA-Z0-9]|_|-)+$/,g=function(e){return O(e)&&e.length>=3&&e.length<100&&_.test(e)},m=function(e){return R(e)&&e>=0};(C=e.ACTORS||(e.ACTORS={})).SDK="SDK",C.PREVIEW="PREVIEW"; | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self)["@candulabs/models"]={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n="object"==typeof t&&t&&t.Object===Object&&t,r="object"==typeof self&&self&&self.Object===Object&&self,o=(n||r||Function("return this")()).Symbol,i=Object.prototype,a=i.hasOwnProperty,u=i.toString,E=o?o.toStringTag:void 0;var c=function(e){var t=a.call(e,E),n=e[E];try{e[E]=void 0;var r=!0}catch(e){}var o=u.call(e);return r&&(t?e[E]=n:delete e[E]),o},l=Object.prototype.toString;var s=function(e){return l.call(e)},S="[object Null]",d="[object Undefined]",f=o?o.toStringTag:void 0;var A=function(e){return null==e?void 0===e?d:S:f&&f in Object(e)?c(e):s(e)},p=Array.isArray;var T=function(e){return null!=e&&"object"==typeof e},v="[object String]";var O=function(e){return"string"==typeof e||!p(e)&&T(e)&&A(e)==v},I="[object Number]";var _,g=function(e){return"number"==typeof e||T(e)&&A(e)==I},R=/^([a-zA-Z0-9]|_|-)+$/,m=function(e){return O(e)&&e.length>=3&&e.length<100&&R.test(e)},N=function(e){return g(e)&&e>=0};(_=e.ACTORS||(e.ACTORS={})).SDK="SDK",_.PREVIEW="PREVIEW"; | ||
/*! ***************************************************************************** | ||
@@ -16,3 +16,3 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
***************************************************************************** */ | ||
var N,P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}(N=e.MESSAGES||(e.MESSAGES={})).BOOTSTRAP="Bootstrap",N.CHANGE_POSITION="ChangePosition",N.CLOSE_PREVIEW="ClosePreview",N.PREVIEW_LOADED="PreviewLoaded",N.SET_AVALIABLE_PORTALS="SetAvaliablePortals",N.SET_CONTENT="SetContent",N.SET_SELECTED_ELEMENT="SetSelectedElement",N.SET_VIEW_MODE="SetViewMode",N.ADD_ELEMENT="AddElement",N.REMOVE_ELEMENT="RemoveElement",N.UPDATE_ELEMENT="UpdateElement",N.SET_ELEMENT="SetElement";var L,M,b,h=function(e,t){return void 0===t&&(t={}),P({type:e},t)},D={bootstrap:function(t,n,r,o){return h(e.MESSAGES.BOOTSTRAP,{clientToken:t,userId:n,version:r,preview:o})},changePosition:function(t,n){return h(e.MESSAGES.CHANGE_POSITION,{mouseEvent:t,top:n})},closePreview:function(){return h(e.MESSAGES.CLOSE_PREVIEW)},previewLoaded:function(){return h(e.MESSAGES.PREVIEW_LOADED)},setAvaliablePortals:function(t){return h(e.MESSAGES.SET_AVALIABLE_PORTALS,{avaliablePortals:t})},addElement:function(t){return h(e.MESSAGES.ADD_ELEMENT,{element:t})},removeElement:function(t){return h(e.MESSAGES.REMOVE_ELEMENT,{id:t})},updateElement:function(t){return h(e.MESSAGES.UPDATE_ELEMENT,{element:t})},setContent:function(t){return h(e.MESSAGES.SET_CONTENT,{content:t})},setViewMode:function(t){return h(e.MESSAGES.SET_VIEW_MODE,{viewMode:t})},setSelectedElement:function(t){return h(e.MESSAGES.SET_SELECTED_ELEMENT,{element:t})}},G=function(e){var t=e.source,n=e.destination;return{read:function(e){var t=e.actor,r=e.message;return t===n?r:null},write:function(e){return{actor:t,message:e}}}};(e.TRIGGERS||(e.TRIGGERS={})).ON_CLICK="OnClick",(L=e.CATEGORIES||(e.CATEGORIES={})).NATIVE="Native",L.PENDO="Pendo",(M=e.HANDLER_TYPES||(e.HANDLER_TYPES={})).NAVIGATE="Navigate",M.CHANGE_TUTORIAL="ChangeTutorial",M.OPEN_GUIDE="OpenGuide",(b=e.COLORS||(e.COLORS={})).PRIMARY="primary",b.SECONDARY="primary",b.WARNING="warning",b.DANGER="danger",b.NEUTRAL="neutral",b.ACTIVE="active",b.INFO="info";var w,j=e.COLORS.PRIMARY;(w=e.Mark||(e.Mark={})).U="U",w.B="B",w.Em="Em",w.InlineCode="InlineCode";var V;(V=e.CheckListItemStatus||(e.CheckListItemStatus={})).NotStared="NotStarted",V.InProgress="InProgress",V.Done="Done";var U,W;(U=e.FRAME_SIZES||(e.FRAME_SIZES={})).COLLAPSED="Collapsed",U.EXPANDED="Expanded",U.MINIMIZED="Minimized",(W=e.PREVIEW_MODES||(e.PREVIEW_MODES={})).TUTORIAL="Tutorial",W.PORTAL="Portal";var k,F;(k=e.StyleguideScope||(e.StyleguideScope={})).Global="Global",k.Organization="Organization",(F=e.CSSNodeTypes||(e.CSSNodeTypes={})).Root="root",F.Rule="rule",F.Atrule="atrule",F.Decl="decl",F.Any="any";var B,z,H,Z={button:{childClassNames:{icon:"button-icon"},variants:{color:function(e){return"color-"+e},outline:function(e){return"outline-"+e}}},typography:{variants:{typography:function(e){return"typography-"+e}}}};(B=e.StateScope||(e.StateScope={})).Global="Global",B.Carried="Carried",(z=e.StateResolverType||(e.StateResolverType={})).CanduCdn="CanduCdn",z.CheckListApi="CheckListApi",(H=e.CheckListScope||(e.CheckListScope={})).User="User",H.Account="Account";e.CANDU_PORTAL_CLASS="candu_portal",e.DEFAULT_COLOR=j,e.DEFAULT_SEGMENT_ID="Everyone",e.IsNumericId=m,e.PREVIEW_COOKIE_NAME="candu.preview",e.PREVIEW_FRAME_ID="canduPreview",e.PREVIEW_SCRIPT_URL="https://app.candu.ai/preview.html",e.PREVIEW_URL_PARAM="candu_preview",e.canduPortalId=function(e){return"candu_portal_"+e},e.cssInputObjToString=function(e){return Object.keys(e).reduce((function(t,n){return""+t+n+": "+e[n]+";"}),"")},e.cssInputStringToObj=function(e){return e.split(";").reduce((function(e,t){var n,r=t.split(":"),o=r[0],i=r[1];return o&&i?P(P({},e),((n={})[o.trim()]=i.trim(),n)):e}),{})},e.isClientToken=function(e){return O(e)&&!!e.match(/^[0-9a-zA-Z]*$/)&&e.length>=10},e.isContentHashId=function(e){return O(e)&&!!e.match(/^[0-9a-zA-Z]{40}$/)},e.isIdentifier=g,e.isPortalId=function(e){return m(e)},e.isPortalSlug=function(e){return g(e)},e.isStatePath=function(e){return O(e)&&!!e.match(/^@(\w|\d|_|-|\.){3,20}\$/)},e.isTutorialId=function(e){return m(e)},e.isTutorialSlug=function(e){return g(e)},e.isUserId=function(e){return m(e)||O(e)&&e.trim().length>0},e.messageFactory=G,e.messages=D,e.stylguideClassNameMap=Z,e.toCssSelector=function(e,t){var n=P({className:"root",variant:void 0,selector:"",output:"css"},t||{}),r=n.className,o=n.variant,i=n.selector,a=n.output,u="candu-"+e;if("global"===r)return"html"===a?"":":root";var E=null,c=[],s=Z[e]||{};if(o&&s.variants){var l=s.variants;c=Object.keys(o).reduce((function(e,t){var n=o[t],r=l[t];return e.push(r?r(n):t+"-"+n),e}),[])}return"root"!==r&&s.childClassNames&&s.childClassNames[r]&&(E="candu-"+e+"--"+s.childClassNames[r]),"css"===a?[u,E,i].reduce((function(e,t,n){return t&&""!==t?0===n?"."+u+c.map((function(e){return"."+e})).join(""):1===n?e+" ."+t:""+e+t:e}),"")||"":"root"===r?y([u],c).filter((function(e){return!!e})).join(" ")||"":E||""},e.toStyleguideDecl=function(t){return Object.keys(t).reduce((function(n,r){return y(n,[{type:e.CSSNodeTypes.Decl,prop:r,value:t[r]}])}),[])},e.windowStream=function(e){var t=e.source,n=e.destination,r=e.targetOrigin,o=e.targetWindow,i=e.originWindow,a=e.onRecieveMessage,u=G({source:t,destination:n}),E=u.read,c=u.write,s=function(e){var t=E(e.data);t&&a(t)};return i.addEventListener("message",s,!1),{close:function(){i.removeEventListener("message",s)},send:function(e){o.postMessage(c(e),r)}}},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
var C,P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}(C=e.MESSAGES||(e.MESSAGES={})).BOOTSTRAP="Bootstrap",C.CHANGE_POSITION="ChangePosition",C.CLOSE_PREVIEW="ClosePreview",C.PREVIEW_LOADED="PreviewLoaded",C.SET_AVALIABLE_PORTALS="SetAvaliablePortals",C.SET_CONTENT="SetContent",C.SET_SELECTED_ELEMENT="SetSelectedElement",C.SET_VIEW_MODE="SetViewMode",C.ADD_ELEMENT="AddElement",C.REMOVE_ELEMENT="RemoveElement",C.UPDATE_ELEMENT="UpdateElement",C.SET_ELEMENT="SetElement";var L,M,b,h=function(e,t){return void 0===t&&(t={}),P({type:e},t)},D={bootstrap:function(t,n,r,o){return h(e.MESSAGES.BOOTSTRAP,{clientToken:t,userId:n,version:r,preview:o})},changePosition:function(t,n){return h(e.MESSAGES.CHANGE_POSITION,{mouseEvent:t,top:n})},closePreview:function(){return h(e.MESSAGES.CLOSE_PREVIEW)},previewLoaded:function(){return h(e.MESSAGES.PREVIEW_LOADED)},setAvaliablePortals:function(t){return h(e.MESSAGES.SET_AVALIABLE_PORTALS,{avaliablePortals:t})},addElement:function(t){return h(e.MESSAGES.ADD_ELEMENT,{element:t})},removeElement:function(t){return h(e.MESSAGES.REMOVE_ELEMENT,{id:t})},updateElement:function(t){return h(e.MESSAGES.UPDATE_ELEMENT,{element:t})},setContent:function(t){return h(e.MESSAGES.SET_CONTENT,{content:t})},setViewMode:function(t){return h(e.MESSAGES.SET_VIEW_MODE,{viewMode:t})},setSelectedElement:function(t){return h(e.MESSAGES.SET_SELECTED_ELEMENT,{element:t})}},G=function(e){var t=e.source,n=e.destination;return{read:function(e){var t=e.actor,r=e.message;return t===n?r:null},write:function(e){return{actor:t,message:e}}}};(e.TRIGGERS||(e.TRIGGERS={})).ON_CLICK="OnClick",(L=e.CATEGORIES||(e.CATEGORIES={})).NATIVE="Native",L.PENDO="Pendo",(M=e.HANDLER_TYPES||(e.HANDLER_TYPES={})).NAVIGATE="Navigate",M.CHANGE_TUTORIAL="ChangeTutorial",M.OPEN_GUIDE="OpenGuide",(b=e.COLORS||(e.COLORS={})).PRIMARY="primary",b.SECONDARY="primary",b.WARNING="warning",b.DANGER="danger",b.NEUTRAL="neutral",b.ACTIVE="active",b.INFO="info";var w,j=e.COLORS.PRIMARY;(w=e.Mark||(e.Mark={})).U="U",w.B="B",w.Em="Em",w.InlineCode="InlineCode";var V,U;(V=e.CheckListItemStatus||(e.CheckListItemStatus={})).NotStared="NotStarted",V.InProgress="InProgress",V.Done="Done",(U=e.CheckListScope||(e.CheckListScope={})).User="User",U.Account="Account";var W,k;(W=e.FRAME_SIZES||(e.FRAME_SIZES={})).COLLAPSED="Collapsed",W.EXPANDED="Expanded",W.MINIMIZED="Minimized",(k=e.PREVIEW_MODES||(e.PREVIEW_MODES={})).TUTORIAL="Tutorial",k.PORTAL="Portal";var F,B;(F=e.StyleguideScope||(e.StyleguideScope={})).Global="Global",F.Organization="Organization",(B=e.CSSNodeTypes||(e.CSSNodeTypes={})).Root="root",B.Rule="rule",B.Atrule="atrule",B.Decl="decl",B.Any="any";var z,H={button:{childClassNames:{icon:"button-icon"},variants:{color:function(e){return"color-"+e},outline:function(e){return"outline-"+e}}},typography:{variants:{typography:function(e){return"typography-"+e}}}};(z=e.StateScope||(e.StateScope={})).Global="Global",z.Carried="Carried";e.CANDU_PORTAL_CLASS="candu_portal",e.DEFAULT_COLOR=j,e.DEFAULT_SEGMENT_ID="Everyone",e.IsNumericId=N,e.PREVIEW_COOKIE_NAME="candu.preview",e.PREVIEW_FRAME_ID="canduPreview",e.PREVIEW_SCRIPT_URL="https://app.candu.ai/preview.html",e.PREVIEW_URL_PARAM="candu_preview",e.canduPortalId=function(e){return"candu_portal_"+e},e.cssInputObjToString=function(e){return Object.keys(e).reduce((function(t,n){return""+t+n+": "+e[n]+";"}),"")},e.cssInputStringToObj=function(e){return e.split(";").reduce((function(e,t){var n,r=t.split(":"),o=r[0],i=r[1];return o&&i?P(P({},e),((n={})[o.trim()]=i.trim(),n)):e}),{})},e.isClientToken=function(e){return O(e)&&!!e.match(/^[0-9a-zA-Z]*$/)&&e.length>=10},e.isContentHashId=function(e){return O(e)&&!!e.match(/^[0-9a-zA-Z]{40}$/)},e.isIdentifier=m,e.isPortalId=function(e){return N(e)},e.isPortalSlug=function(e){return m(e)},e.isStatePath=function(e){return O(e)&&!!e.match(/^@(\w|\d|_|-|\.){3,20}\$/)},e.isTutorialId=function(e){return N(e)},e.isTutorialSlug=function(e){return m(e)},e.isUserId=function(e){return N(e)||O(e)&&e.trim().length>0},e.messageFactory=G,e.messages=D,e.stylguideClassNameMap=H,e.toCssSelector=function(e,t){var n=P({className:"root",variant:void 0,selector:"",output:"css"},t||{}),r=n.className,o=n.variant,i=n.selector,a=n.output,u="candu-"+e;if("global"===r)return"html"===a?"":":root";var E=null,c=[],l=H[e]||{};if(o&&l.variants){var s=l.variants;c=Object.keys(o).reduce((function(e,t){var n=o[t],r=s[t];return e.push(r?r(n):t+"-"+n),e}),[])}return"root"!==r&&l.childClassNames&&l.childClassNames[r]&&(E="candu-"+e+"--"+l.childClassNames[r]),"css"===a?[u,E,i].reduce((function(e,t,n){return t&&""!==t?0===n?"."+u+c.map((function(e){return"."+e})).join(""):1===n?e+" ."+t:""+e+t:e}),"")||"":"root"===r?y([u],c).filter((function(e){return!!e})).join(" ")||"":E||""},e.toStyleguideDecl=function(t){return Object.keys(t).reduce((function(n,r){return y(n,[{type:e.CSSNodeTypes.Decl,prop:r,value:t[r]}])}),[])},e.windowStream=function(e){var t=e.source,n=e.destination,r=e.targetOrigin,o=e.targetWindow,i=e.originWindow,a=e.onRecieveMessage,u=G({source:t,destination:n}),E=u.read,c=u.write,l=function(e){var t=E(e.data);t&&a(t)};return i.addEventListener("message",l,!1),{close:function(){i.removeEventListener("message",l)},send:function(e){o.postMessage(c(e),r)}}},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,2 @@ | ||
import { CanduState } from './CanduState'; | ||
export declare enum CheckListItemStatus { | ||
@@ -6,5 +7,6 @@ NotStared = "NotStarted", | ||
} | ||
export interface CheckListItemModel { | ||
id: string; | ||
state: CheckListItemStatus; | ||
export declare type CheckListItemModel = CanduState<CheckListItemStatus>; | ||
export declare enum CheckListScope { | ||
User = "User", | ||
Account = "Account" | ||
} |
@@ -11,1 +11,3 @@ export * from './Actions'; | ||
export * from './CheckList'; | ||
export * from './Card'; | ||
export * from './CanduState'; |
import { StateResolver } from './StateResolver'; | ||
export declare type StateProviderId = string; | ||
export declare type StateInstance = any; | ||
export declare type StateInstances = Record<StateProviderId, StateInstance>; | ||
export interface StateProvider { | ||
resolver: StateResolver; | ||
export interface StateProvider<R extends StateResolver = any> { | ||
resolver: R; | ||
} | ||
export declare type StateProviders = Record<StateProviderId, StateProvider>; |
@@ -1,19 +0,14 @@ | ||
export declare enum StateResolverType { | ||
CanduCdn = "CanduCdn", | ||
CheckListApi = "CheckListApi" | ||
} | ||
import { CheckListScope } from '../notebook/CheckList'; | ||
export interface StateResolver { | ||
type: StateResolverType; | ||
type: string; | ||
} | ||
export interface CanduCdnStateResolver extends StateResolver { | ||
type: StateResolverType.CanduCdn; | ||
} | ||
export declare enum CheckListScope { | ||
User = "User", | ||
Account = "Account" | ||
} | ||
export interface CheckListApiStateResolver extends StateResolver { | ||
type: StateResolverType.CheckListApi; | ||
export interface CheckListResolverOptions { | ||
scope?: CheckListScope; | ||
scopeTrait?: string; | ||
} | ||
export declare type CheckListResolver = StateResolver & { | ||
type: 'CheckListApi'; | ||
} & CheckListResolverOptions; | ||
export declare type CardResolver = StateResolver & { | ||
type: 'CardApi'; | ||
}; |
@@ -12,3 +12,3 @@ { | ||
}, | ||
"version": "0.6.14-alpha.0", | ||
"version": "0.6.14-alpha.1", | ||
"main": "dist/index.js", | ||
@@ -30,3 +30,3 @@ "module": "dist/index.es.js", | ||
}, | ||
"gitHead": "8abe525e4328801e42486abb1baa7f09d7b664f3" | ||
"gitHead": "51deff38e5a2ccb8c8d2e8b00c381fcff193ae54" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57
190442
678