@claspo/common 6.0.4-theme.22 → 6.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ export declare enum InAppLayoutType {
2
+ SLIDE_UP = "SLIDE_UP",
3
+ POP_UP = "POP_UP",
4
+ FULL = "FULL",
5
+ BOTTOM_BAR = "BOTTOM_BAR"
6
+ }
@@ -0,0 +1 @@
1
+ export var InAppLayoutType;!function(p){p.SLIDE_UP="SLIDE_UP",p.POP_UP="POP_UP",p.FULL="FULL",p.BOTTOM_BAR="BOTTOM_BAR"}(InAppLayoutType||(InAppLayoutType={}));
@@ -0,0 +1,8 @@
1
+ export declare enum LayoutType {
2
+ BUILT_IN = "BUILT_IN",
3
+ DETACHED = "DETACHED",
4
+ FLOATING_BOX = "FLOATING_BOX",
5
+ FLOATING_BAR = "FLOATING_BAR",
6
+ LAUNCHER = "LAUNCHER",
7
+ CONTENT_LOCKER = "CONTENT_LOCKER"
8
+ }
package/LayoutType.js ADDED
@@ -0,0 +1 @@
1
+ export var LayoutType;!function(T){T.BUILT_IN="BUILT_IN",T.DETACHED="DETACHED",T.FLOATING_BOX="FLOATING_BOX",T.FLOATING_BAR="FLOATING_BAR",T.LAUNCHER="LAUNCHER",T.CONTENT_LOCKER="CONTENT_LOCKER"}(LayoutType||(LayoutType={}));
package/RenderMode.d.ts CHANGED
@@ -1,6 +1,4 @@
1
- declare const RenderMode: {
2
- readonly STATIC: "STATIC";
3
- readonly UPDATING: "UPDATING";
4
- };
5
- export type RenderModeT = typeof RenderMode[keyof typeof RenderMode];
6
- export default RenderMode;
1
+ export declare enum RenderMode {
2
+ STATIC = "STATIC",
3
+ UPDATING = "UPDATING"
4
+ }
package/RenderMode.js CHANGED
@@ -1 +1 @@
1
- const RenderMode={STATIC:"STATIC",UPDATING:"UPDATING"};export default RenderMode;
1
+ export var RenderMode;!function(e){e.STATIC="STATIC",e.UPDATING="UPDATING"}(RenderMode||(RenderMode={}));
@@ -1,6 +1,8 @@
1
1
  import { PrizePoolModelI } from './PrizePool.interface';
2
2
  import { ClDocumentI } from './document/Document.interface';
3
- import type { RenderModeT } from './RenderMode';
3
+ import { WidgetType } from './WidgetType';
4
+ import { LayoutType } from './LayoutType';
5
+ import { RenderMode } from './RenderMode';
4
6
  export interface TrackingServiceI {
5
7
  send: (eventName: string, payload?: any) => void;
6
8
  trackClick: (elementId: string, payload?: any) => void;
@@ -9,13 +11,16 @@ export interface TrackingServiceI {
9
11
  export type TranslationsI = Record<string, Record<string, string>>;
10
12
  export interface WidgetInitConfigI {
11
13
  documentModel: ClDocumentI;
14
+ layoutType: LayoutType;
15
+ widgetType: WidgetType;
16
+ staticResourcesUrl: string;
12
17
  formVariantId?: string;
13
- staticResourcesUrl?: string;
14
18
  siteId?: string;
15
19
  browserLanguage?: string;
16
20
  optionalDocumentStyles?: Record<string, string>;
17
21
  previewMode?: boolean;
18
22
  editorPreviewMode?: boolean;
23
+ demoMode?: boolean;
19
24
  branded?: boolean;
20
25
  upgradePlanButton?: boolean;
21
26
  viewIndex?: number;
@@ -23,8 +28,6 @@ export interface WidgetInitConfigI {
23
28
  actionFactoryClass?: any;
24
29
  widgetId?: number;
25
30
  prizePoolModels?: PrizePoolModelI[];
26
- layoutType?: string;
27
- widgetType?: string;
28
31
  bundledComponentClasses?: any[];
29
32
  translations?: TranslationsI;
30
33
  trackingService?: TrackingServiceI;
@@ -37,6 +40,6 @@ export interface WidgetInitConfigI {
37
40
  disableScrollbarCalculation?: boolean;
38
41
  disableLayoutAnimations?: boolean;
39
42
  displayPosition?: string;
40
- renderMode?: RenderModeT;
43
+ renderMode?: RenderMode;
41
44
  [key: string]: any;
42
45
  }
@@ -0,0 +1,8 @@
1
+ export declare enum WidgetType {
2
+ SUBSCRIPTION_FORM = "SUBSCRIPTION_FORM",
3
+ INFORMER = "INFORMER",
4
+ REQUEST_FORM = "REQUEST_FORM",
5
+ LAUNCHER = "LAUNCHER",
6
+ AGE_VERIFY = "AGE_VERIFY",
7
+ TEASER = "TEASER"
8
+ }
package/WidgetType.js ADDED
@@ -0,0 +1 @@
1
+ export var WidgetType;!function(R){R.SUBSCRIPTION_FORM="SUBSCRIPTION_FORM",R.INFORMER="INFORMER",R.REQUEST_FORM="REQUEST_FORM",R.LAUNCHER="LAUNCHER",R.AGE_VERIFY="AGE_VERIFY",R.TEASER="TEASER"}(WidgetType||(WidgetType={}));
@@ -193,8 +193,7 @@ export declare enum ClPropertyPaneManifestModelName {
193
193
  FEEDBACK_TYPE = "FEEDBACK_TYPE",
194
194
  FEEDBACK_ICONS_SELECT = "FEEDBACK_ICONS_SELECT",
195
195
  FEEDBACK_ACTIONS = "FEEDBACK_ACTIONS",
196
- FLOATING_BOX_POSITION = "FLOATING_BOX_POSITION",
197
- WIDGET_THEME_SELECT = "WIDGET_THEME_SELECT"
196
+ FLOATING_BOX_POSITION = "FLOATING_BOX_POSITION"
198
197
  }
199
198
  export interface DisableControlIfPropPathMatchValueParamsI {
200
199
  propPath: string[];
@@ -1 +1 @@
1
- export var ManifestMappingType;!function(T){T.TEXT="TEXT",T.TEXT_AREA="TEXT_AREA",T.INTEGER="INTEGER",T.FLOAT="FLOAT",T.SELECT="SELECT",T.CHECKBOX_LIST="CHECKBOX_LIST",T.CHECKBOX="CHECKBOX",T.DATE="DATE",T.DATE_TIME="DATE_TIME"}(ManifestMappingType||(ManifestMappingType={}));export var ContextMenuManifestModelType;!function(T){T.GROUP="GROUP",T.CONTROL="CONTROL"}(ContextMenuManifestModelType||(ContextMenuManifestModelType={}));export var ContextMenuManifestModelName;!function(T){T.FOCUS_PARENT_COMPONENT="FOCUS_PARENT_COMPONENT",T.COMPONENT_OPERATIONS="COMPONENT_OPERATIONS",T.BRING_BACK_FORWARD="BRING_BACK_FORWARD"}(ContextMenuManifestModelName||(ContextMenuManifestModelName={}));export var FloatingControlManifestModelType;!function(T){T.GROUP="GROUP",T.CONTROL="CONTROL"}(FloatingControlManifestModelType||(FloatingControlManifestModelType={}));export var FloatingControlManifestModelName;!function(T){T.SIZE="SIZE",T.MARGIN="MARGIN",T.PARENT_ALIGNMENT="PARENT_ALIGNMENT",T.CONTAINER_PADDING="CONTAINER_PADDING",T.SLIDES_MANAGEMENT="SLIDES_MANAGEMENT",T.COLUMNS_PROPORTIONS="COLUMNS_PROPORTIONS",T.VIEW_SWITCHER="VIEW_SWITCHER",T.ROTATION="ROTATION"}(FloatingControlManifestModelName||(FloatingControlManifestModelName={}));export var PropertyPaneManifestModelType;!function(T){T.CONTROL="CONTROL",T.TEXT="TEXT",T.GROUP="GROUP"}(PropertyPaneManifestModelType||(PropertyPaneManifestModelType={}));export var ClPropertyPaneManifestModelName;!function(T){T.SIZE="SIZE",T.INDENTATION="INDENTATION",T.ALIGNMENT="ALIGNMENT",T.BACKGROUND="BACKGROUND",T.BACKDROP_FILTER="BACKDROP_FILTER",T.BACKGROUND_MARKER_SELECTED="BACKGROUND_MARKER_SELECTED",T.BORDERS="BORDERS",T.BOX_SHADOW="BOX_SHADOW",T.BORDER_RADIUS="BORDER_RADIUS",T.TEXT_PARAMS="TEXT_PARAMS",T.TEXT_INPUT="TEXT_INPUT",T.SWITCH="SWITCH",T.SWITCH_WITH_INPUT="SWITCH_WITH_INPUT",T.INPUT_VALIDATION="INPUT_VALIDATION",T.INPUT_LABEL="INPUT_LABEL",T.TEXT_COLOR="TEXT_COLOR",T.SELECT="SELECT",T.RADIO_BUTTONS="RADIO_BUTTONS",T.IMAGE_SOURCES="IMAGE_SOURCES",T.COUNTRY_PHONE_SELECT="COUNTRY_PHONE_SELECT",T.HOVER_ANIMATION="HOVER_ANIMATION",T.ACTIONS="ACTIONS",T.NPS_ACTIONS="NPS_ACTIONS",T.DATEPICKER="DATEPICKER",T.DATEPICKER_COUNTDOWN_TIMER="DATEPICKER_COUNTDOWN_TIMER",T.DISPLAY="DISPLAY",T.COMPONENT_OPTIONS="COMPONENT_OPTIONS",T.COLOR_SELECT="COLOR_SELECT",T.FLOATING_COMPONENT_POSITION="FLOATING_COMPONENT_POSITION",T.LOOP_ANIMATION="LOOP_ANIMATION",T.VIDEO_URL="VIDEO_URL",T.VIDEO_CUSTOM_COVER="VIDEO_CUSTOM_COVER",T.WIDGET_LAYOUT_SELECT="WIDGET_LAYOUT_SELECT",T.MULTIPLE_INPUT_SIZE="MULTIPLE_INPUT_SIZE",T.DATE_FORMAT="DATE_FORMAT",T.ICON="ICON",T.PROMOCODE_ICON="PROMOCODE_ICON",T.ICON_SELECT="ICON_SELECT",T.TEXT_VISIBILITY="TEXT_VISIBILITY",T.SLIDER_SETTINGS="SLIDER_SETTINGS",T.SLIDER_MANAGE_SLIDES="SLIDER_MANAGE_SLIDES",T.SLIDER_MODES="SLIDER_MODES",T.SLIDER_NAVIGATION_BUTTONS="SLIDER_NAVIGATION_BUTTONS",T.SLIDER_INDICATION="SLIDER_INDICATION",T.SLIDER_SLIDESHOW_ANIMATION="SLIDER_SLIDESHOW_ANIMATION",T.INTEGRATION_FIELD_MAPPING="INTEGRATION_FIELD_MAPPING",T.SUPPORTED_LANGUAGES="SUPPORTED_LANGUAGES",T.LIST_POSITION="LIST_POSITION",T.SOCIAL_ICON_SIZE="SOCIAL_ICON_SIZE",T.SOCIAL_TYPE_AND_ICON_SELECT="SOCIAL_TYPE_AND_ICON_SELECT",T.COLUMNS="COLUMNS",T.INSERT_BLOCK="INSERT_BLOCK",T.NUMBER_INPUT="NUMBER_INPUT",T.PRIZE_SETTINGS="PRIZE_SETTINGS",T.ROOT_COMPONENT_SELECT="ROOT_COMPONENT_SELECT",T.FEEDBACK_TYPE="FEEDBACK_TYPE",T.FEEDBACK_ICONS_SELECT="FEEDBACK_ICONS_SELECT",T.FEEDBACK_ACTIONS="FEEDBACK_ACTIONS",T.FLOATING_BOX_POSITION="FLOATING_BOX_POSITION",T.WIDGET_THEME_SELECT="WIDGET_THEME_SELECT"}(ClPropertyPaneManifestModelName||(ClPropertyPaneManifestModelName={}));
1
+ export var ManifestMappingType;!function(T){T.TEXT="TEXT",T.TEXT_AREA="TEXT_AREA",T.INTEGER="INTEGER",T.FLOAT="FLOAT",T.SELECT="SELECT",T.CHECKBOX_LIST="CHECKBOX_LIST",T.CHECKBOX="CHECKBOX",T.DATE="DATE",T.DATE_TIME="DATE_TIME"}(ManifestMappingType||(ManifestMappingType={}));export var ContextMenuManifestModelType;!function(T){T.GROUP="GROUP",T.CONTROL="CONTROL"}(ContextMenuManifestModelType||(ContextMenuManifestModelType={}));export var ContextMenuManifestModelName;!function(T){T.FOCUS_PARENT_COMPONENT="FOCUS_PARENT_COMPONENT",T.COMPONENT_OPERATIONS="COMPONENT_OPERATIONS",T.BRING_BACK_FORWARD="BRING_BACK_FORWARD"}(ContextMenuManifestModelName||(ContextMenuManifestModelName={}));export var FloatingControlManifestModelType;!function(T){T.GROUP="GROUP",T.CONTROL="CONTROL"}(FloatingControlManifestModelType||(FloatingControlManifestModelType={}));export var FloatingControlManifestModelName;!function(T){T.SIZE="SIZE",T.MARGIN="MARGIN",T.PARENT_ALIGNMENT="PARENT_ALIGNMENT",T.CONTAINER_PADDING="CONTAINER_PADDING",T.SLIDES_MANAGEMENT="SLIDES_MANAGEMENT",T.COLUMNS_PROPORTIONS="COLUMNS_PROPORTIONS",T.VIEW_SWITCHER="VIEW_SWITCHER",T.ROTATION="ROTATION"}(FloatingControlManifestModelName||(FloatingControlManifestModelName={}));export var PropertyPaneManifestModelType;!function(T){T.CONTROL="CONTROL",T.TEXT="TEXT",T.GROUP="GROUP"}(PropertyPaneManifestModelType||(PropertyPaneManifestModelType={}));export var ClPropertyPaneManifestModelName;!function(T){T.SIZE="SIZE",T.INDENTATION="INDENTATION",T.ALIGNMENT="ALIGNMENT",T.BACKGROUND="BACKGROUND",T.BACKDROP_FILTER="BACKDROP_FILTER",T.BACKGROUND_MARKER_SELECTED="BACKGROUND_MARKER_SELECTED",T.BORDERS="BORDERS",T.BOX_SHADOW="BOX_SHADOW",T.BORDER_RADIUS="BORDER_RADIUS",T.TEXT_PARAMS="TEXT_PARAMS",T.TEXT_INPUT="TEXT_INPUT",T.SWITCH="SWITCH",T.SWITCH_WITH_INPUT="SWITCH_WITH_INPUT",T.INPUT_VALIDATION="INPUT_VALIDATION",T.INPUT_LABEL="INPUT_LABEL",T.TEXT_COLOR="TEXT_COLOR",T.SELECT="SELECT",T.RADIO_BUTTONS="RADIO_BUTTONS",T.IMAGE_SOURCES="IMAGE_SOURCES",T.COUNTRY_PHONE_SELECT="COUNTRY_PHONE_SELECT",T.HOVER_ANIMATION="HOVER_ANIMATION",T.ACTIONS="ACTIONS",T.NPS_ACTIONS="NPS_ACTIONS",T.DATEPICKER="DATEPICKER",T.DATEPICKER_COUNTDOWN_TIMER="DATEPICKER_COUNTDOWN_TIMER",T.DISPLAY="DISPLAY",T.COMPONENT_OPTIONS="COMPONENT_OPTIONS",T.COLOR_SELECT="COLOR_SELECT",T.FLOATING_COMPONENT_POSITION="FLOATING_COMPONENT_POSITION",T.LOOP_ANIMATION="LOOP_ANIMATION",T.VIDEO_URL="VIDEO_URL",T.VIDEO_CUSTOM_COVER="VIDEO_CUSTOM_COVER",T.WIDGET_LAYOUT_SELECT="WIDGET_LAYOUT_SELECT",T.MULTIPLE_INPUT_SIZE="MULTIPLE_INPUT_SIZE",T.DATE_FORMAT="DATE_FORMAT",T.ICON="ICON",T.PROMOCODE_ICON="PROMOCODE_ICON",T.ICON_SELECT="ICON_SELECT",T.TEXT_VISIBILITY="TEXT_VISIBILITY",T.SLIDER_SETTINGS="SLIDER_SETTINGS",T.SLIDER_MANAGE_SLIDES="SLIDER_MANAGE_SLIDES",T.SLIDER_MODES="SLIDER_MODES",T.SLIDER_NAVIGATION_BUTTONS="SLIDER_NAVIGATION_BUTTONS",T.SLIDER_INDICATION="SLIDER_INDICATION",T.SLIDER_SLIDESHOW_ANIMATION="SLIDER_SLIDESHOW_ANIMATION",T.INTEGRATION_FIELD_MAPPING="INTEGRATION_FIELD_MAPPING",T.SUPPORTED_LANGUAGES="SUPPORTED_LANGUAGES",T.LIST_POSITION="LIST_POSITION",T.SOCIAL_ICON_SIZE="SOCIAL_ICON_SIZE",T.SOCIAL_TYPE_AND_ICON_SELECT="SOCIAL_TYPE_AND_ICON_SELECT",T.COLUMNS="COLUMNS",T.INSERT_BLOCK="INSERT_BLOCK",T.NUMBER_INPUT="NUMBER_INPUT",T.PRIZE_SETTINGS="PRIZE_SETTINGS",T.ROOT_COMPONENT_SELECT="ROOT_COMPONENT_SELECT",T.FEEDBACK_TYPE="FEEDBACK_TYPE",T.FEEDBACK_ICONS_SELECT="FEEDBACK_ICONS_SELECT",T.FEEDBACK_ACTIONS="FEEDBACK_ACTIONS",T.FLOATING_BOX_POSITION="FLOATING_BOX_POSITION"}(ClPropertyPaneManifestModelName||(ClPropertyPaneManifestModelName={}));
@@ -1,7 +1,6 @@
1
- declare const ComponentInsertType: {
2
- BEFORE: string;
3
- AFTER: string;
4
- INSIDE: string;
5
- INSTEAD: string;
6
- };
7
- export default ComponentInsertType;
1
+ export declare enum ComponentInsertType {
2
+ BEFORE = "BEFORE",
3
+ AFTER = "AFTER",
4
+ INSIDE = "INSIDE",
5
+ INSTEAD = "INSTEAD"
6
+ }
@@ -1 +1 @@
1
- const ComponentInsertType={BEFORE:"BEFORE",AFTER:"AFTER",INSIDE:"INSIDE",INSTEAD:"INSTEAD"};export default ComponentInsertType;
1
+ export var ComponentInsertType;!function(n){n.BEFORE="BEFORE",n.AFTER="AFTER",n.INSIDE="INSIDE",n.INSTEAD="INSTEAD"}(ComponentInsertType||(ComponentInsertType={}));
@@ -71,13 +71,6 @@ export interface ClDocumentHandlerI {
71
71
  export declare enum ClDocumentHandlerType {
72
72
  CLICK = "CLICK"
73
73
  }
74
- export declare enum DefaultSchemaTokens {
75
- ACCENT = "accent"
76
- }
77
- export type ThemeColorSchemaI = Record<string, string>;
78
- export interface ThemeI {
79
- schema: ThemeColorSchemaI;
80
- }
81
74
  export interface ClDocumentActionI<T = any> {
82
75
  type: ClDocumentActionType;
83
76
  params?: T;
@@ -166,7 +159,6 @@ export interface ClDocumentSharedI {
166
159
  linkParams?: ClDocumentLinkParamsI;
167
160
  mobileBreakpointWidth?: number;
168
161
  zIndex?: number;
169
- theme?: ThemeI;
170
162
  }
171
163
  export interface ClDialogParamsI {
172
164
  background: string;
@@ -1 +1 @@
1
- export var ClComponentType;!function(T){T.VIEW="VIEW",T.CONTAINER="CONTAINER",T.TEXT="TEXT",T.INPUT="INPUT",T.BUTTON="BUTTON",T.IMAGE="IMAGE",T.CONSENT="CONSENT",T.COUNTDOWN_TIMER="COUNTDOWN_TIMER",T.PROMO_CODE="PROMO_CODE",T.MULTIPLE_INPUT="MULTIPLE_INPUT",T.VIDEO="VIDEO",T.SLIDER="SLIDER",T.SLIDE="SLIDE",T.SOCIAL="SOCIAL",T.COLUMNS="COLUMNS",T.COLUMN="COLUMN",T.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING"}(ClComponentType||(ClComponentType={}));export var ClDocumentHandlerType;!function(T){T.CLICK="CLICK"}(ClDocumentHandlerType||(ClDocumentHandlerType={}));export var DefaultSchemaTokens;!function(T){T.ACCENT="accent"}(DefaultSchemaTokens||(DefaultSchemaTokens={}));export var ClDocumentActionType;!function(T){T.SHOW_WIDGET="SHOW_WIDGET",T.OPEN_LINK="OPEN_LINK",T.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",T.REQUEST="REQUEST",T.CLOSE_WIDGET="CLOSE_WIDGET",T.GO_TO_VIEW="GO_TO_VIEW",T.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",T.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",T.CLICK="CLICK"}(ClDocumentActionType||(ClDocumentActionType={}));export var ClDocumentOpenLinkActionTarget;!function(T){T.SELF="_self",T.BLANK="_blank"}(ClDocumentOpenLinkActionTarget||(ClDocumentOpenLinkActionTarget={}));export var ClWidgetVerticalPosition;!function(T){T.TOP="TOP",T.CENTER="CENTER",T.BOTTOM="BOTTOM"}(ClWidgetVerticalPosition||(ClWidgetVerticalPosition={}));export var ClWidgetHorizontalPosition;!function(T){T.LEFT="LEFT",T.CENTER="CENTER",T.RIGHT="RIGHT"}(ClWidgetHorizontalPosition||(ClWidgetHorizontalPosition={}));export var ClLauncherEntryAnimationType;!function(T){T.SLIDE_TO_TOP="SLIDE_TO_TOP",T.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",T.SLIDE_TO_LEFT="SLIDE_TO_LEFT",T.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(ClLauncherEntryAnimationType||(ClLauncherEntryAnimationType={}));export var ClLoopAnimationType;!function(T){T.PULSE="PULSE",T.VIBRATE="VIBRATE",T.WOBBLE="WOBBLE",T.SHAKE="SHAKE",T.JELLO="JELLO",T.BOUNCE="BOUNCE",T.BLINK="BLINK",T.FLICKER="FLICKER",T.PING="PING"}(ClLoopAnimationType||(ClLoopAnimationType={}));export var ClCloseButtonHorizontalPosition;!function(T){T.LEFT="LEFT",T.RIGHT="RIGHT"}(ClCloseButtonHorizontalPosition||(ClCloseButtonHorizontalPosition={}));
1
+ export var ClComponentType;!function(T){T.VIEW="VIEW",T.CONTAINER="CONTAINER",T.TEXT="TEXT",T.INPUT="INPUT",T.BUTTON="BUTTON",T.IMAGE="IMAGE",T.CONSENT="CONSENT",T.COUNTDOWN_TIMER="COUNTDOWN_TIMER",T.PROMO_CODE="PROMO_CODE",T.MULTIPLE_INPUT="MULTIPLE_INPUT",T.VIDEO="VIDEO",T.SLIDER="SLIDER",T.SLIDE="SLIDE",T.SOCIAL="SOCIAL",T.COLUMNS="COLUMNS",T.COLUMN="COLUMN",T.PRIZE_BASED_GAMING="PRIZE_BASED_GAMING"}(ClComponentType||(ClComponentType={}));export var ClDocumentHandlerType;!function(T){T.CLICK="CLICK"}(ClDocumentHandlerType||(ClDocumentHandlerType={}));export var ClDocumentActionType;!function(T){T.SHOW_WIDGET="SHOW_WIDGET",T.OPEN_LINK="OPEN_LINK",T.SUBSCRIBE_CONTACT="SUBSCRIBE_CONTACT",T.REQUEST="REQUEST",T.CLOSE_WIDGET="CLOSE_WIDGET",T.GO_TO_VIEW="GO_TO_VIEW",T.GO_TO_PREVIOUS_VIEW="GO_TO_PREVIOUS_VIEW",T.GO_TO_NEXT_VIEW="GO_TO_NEXT_VIEW",T.CLICK="CLICK"}(ClDocumentActionType||(ClDocumentActionType={}));export var ClDocumentOpenLinkActionTarget;!function(T){T.SELF="_self",T.BLANK="_blank"}(ClDocumentOpenLinkActionTarget||(ClDocumentOpenLinkActionTarget={}));export var ClWidgetVerticalPosition;!function(T){T.TOP="TOP",T.CENTER="CENTER",T.BOTTOM="BOTTOM"}(ClWidgetVerticalPosition||(ClWidgetVerticalPosition={}));export var ClWidgetHorizontalPosition;!function(T){T.LEFT="LEFT",T.CENTER="CENTER",T.RIGHT="RIGHT"}(ClWidgetHorizontalPosition||(ClWidgetHorizontalPosition={}));export var ClLauncherEntryAnimationType;!function(T){T.SLIDE_TO_TOP="SLIDE_TO_TOP",T.SLIDE_TO_BOTTOM="SLIDE_TO_BOTTOM",T.SLIDE_TO_LEFT="SLIDE_TO_LEFT",T.SLIDE_TO_RIGHT="SLIDE_TO_RIGHT"}(ClLauncherEntryAnimationType||(ClLauncherEntryAnimationType={}));export var ClLoopAnimationType;!function(T){T.PULSE="PULSE",T.VIBRATE="VIBRATE",T.WOBBLE="WOBBLE",T.SHAKE="SHAKE",T.JELLO="JELLO",T.BOUNCE="BOUNCE",T.BLINK="BLINK",T.FLICKER="FLICKER",T.PING="PING"}(ClLoopAnimationType||(ClLoopAnimationType={}));export var ClCloseButtonHorizontalPosition;!function(T){T.LEFT="LEFT",T.RIGHT="RIGHT"}(ClCloseButtonHorizontalPosition||(ClCloseButtonHorizontalPosition={}));
@@ -1 +1 @@
1
- import ComponentInsertType from"./ComponentInsertType";import HandlerTypes from"../handler/HandlerTypes";export default class DocumentUtils{static removeNode(t,e){const n=this.getParentPath(e),r=e[e.length-1],i=this.getNodeByPath(t,n);if(i&&i.children&&i.path){const t=i.children.splice(r,1)[0];return t.prevPath=e,t.path=null,DocumentUtils.reIndex(i,i.path),t}{const n=t.splice(r,1)[0];return n.prevPath=e,n.path=null,t.forEach((t,e)=>{t.path=[e],DocumentUtils.reIndex(t,t.path)}),n}}static insertNode(t,e,n,r){const i=DocumentUtils.getPathToInsert(e,r,n,t),l=r===ComponentInsertType.INSIDE?e:this.getParentPath(i),o=this.getNodeByPath(n,l),s=i[i.length-1];return o&&o.children&&o.path?(o.children.splice(s,0,t),DocumentUtils.reIndex(o,o.path),t):(n.splice(s,0,t),n.forEach((t,e)=>{t.path=[e],DocumentUtils.reIndex(t,t.path)}),t)}static moveNode(t,e,n,r){const i=DocumentUtils.getNodeByPath(t,n);if(!i)return;const l=DocumentUtils.removeNode(t,e),o=DocumentUtils.getNodeById(t,i.id);o&&o.path&&DocumentUtils.insertNode(l,o.path,t,r)}static iterateDepthFirst(t,e){return iterateDepthFirst(t,e)}static reIndex(t,e){t.path=e,t.children&&t.children.forEach((t,n)=>{DocumentUtils.reIndex(t,e.concat(n))})}static getRelativePath(t){return t.slice(1,t.length)}static getParentPath(t){return t.slice(0,-1)}static getNodeByPath(t,e){let n=t;for(let t=0;t<e.length;t++){if(t===e.length-1)return n[e[t]]||null;if(!n[e[t]]||!n[e[t]].children)return null;n=n[e[t]].children}return null}static getNodeById(t,e){let n=null;for(let r=0;r<t.length;r++){const i=t[r];if(n)break;if(i.id===e){n=i;break}i.children&&i.children.length&&(n=this.getNodeById(i.children,e))}return n}static getPathToInsert(t,e,n,r){var i,l;let o;const s=t[t.length-1];switch(e){case ComponentInsertType.BEFORE:o=t;break;case ComponentInsertType.AFTER:o=t.slice(),o[t.length-1]=s+1;break;case ComponentInsertType.INSIDE:{const e=DocumentUtils.getNodeByPath(n,t),r=null!==(l=null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)&&void 0!==l?l:0;o=t.concat([r]);break}case ComponentInsertType.INSTEAD:{const e=null==r?void 0:r.prevPath;o=(null==e?void 0:e.at(-1))<=s?[...t.slice(0,-1),s+1]:t;break}default:o=t}return o}static getNodeOnClickData(t){let e=[],n={};return DocumentUtils.iterateDepthFirst(t,t=>{var r,i,l,o;const s=null===(l=null===(i=null===(r=t.props)||void 0===r?void 0:r.handlers)||void 0===i?void 0:i.find(t=>t.type===HandlerTypes.CLICK))||void 0===l?void 0:l.actions;(null==s?void 0:s.length)&&(e=[...e,...s]),Object.keys((null===(o=t.props)||void 0===o?void 0:o.content)||{}).filter(t=>["detractor","passive","promoter"].includes(t)).map(e=>{var n;return((null===(n=t.props)||void 0===n?void 0:n.content)||{})[e]||null}).filter(t=>t).forEach(t=>n[t]=t)}),{actions:e,npsViewIds:Object.keys(n)}}}export function iterateDepthFirst(t,e){t.children&&t.children.forEach(t=>iterateDepthFirst(t,e)),e(t)}
1
+ import{ClDocumentHandlerType}from"./Document.interface";import{ComponentInsertType}from"./ComponentInsertType";export default class DocumentUtils{static removeNode(t,e){const n=this.getParentPath(e),r=e[e.length-1],i=this.getNodeByPath(t,n);if(i&&i.children&&i.path){const t=i.children.splice(r,1)[0];return t.prevPath=e,t.path=null,DocumentUtils.reIndex(i,i.path),t}{const n=t.splice(r,1)[0];return n.prevPath=e,n.path=null,t.forEach((t,e)=>{t.path=[e],DocumentUtils.reIndex(t,t.path)}),n}}static insertNode(t,e,n,r){const i=DocumentUtils.getPathToInsert(e,r,n,t),o=r===ComponentInsertType.INSIDE?e:this.getParentPath(i),l=this.getNodeByPath(n,o),c=i[i.length-1];return l&&l.children&&l.path?(l.children.splice(c,0,t),DocumentUtils.reIndex(l,l.path),t):(n.splice(c,0,t),n.forEach((t,e)=>{t.path=[e],DocumentUtils.reIndex(t,t.path)}),t)}static moveNode(t,e,n,r){const i=DocumentUtils.getNodeByPath(t,n);if(!i)return;const o=DocumentUtils.removeNode(t,e),l=DocumentUtils.getNodeById(t,i.id);l&&l.path&&DocumentUtils.insertNode(o,l.path,t,r)}static iterateDepthFirst(t,e){return iterateDepthFirst(t,e)}static reIndex(t,e){t.path=e,t.children&&t.children.forEach((t,n)=>{DocumentUtils.reIndex(t,e.concat(n))})}static getRelativePath(t){return t.slice(1,t.length)}static getParentPath(t){return t.slice(0,-1)}static getNodeByPath(t,e){let n=t;for(let t=0;t<e.length;t++){if(t===e.length-1)return n[e[t]]||null;if(!n[e[t]]||!n[e[t]].children)return null;n=n[e[t]].children}return null}static getNodeById(t,e){let n=null;for(let r=0;r<t.length;r++){const i=t[r];if(n)break;if(i.id===e){n=i;break}i.children&&i.children.length&&(n=this.getNodeById(i.children,e))}return n}static getPathToInsert(t,e,n,r){var i,o;let l;const c=t[t.length-1];switch(e){case ComponentInsertType.BEFORE:l=t;break;case ComponentInsertType.AFTER:l=t.slice(),l[t.length-1]=c+1;break;case ComponentInsertType.INSIDE:{const e=DocumentUtils.getNodeByPath(n,t),r=null!==(o=null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)&&void 0!==o?o:0;l=t.concat([r]);break}case ComponentInsertType.INSTEAD:{const e=null==r?void 0:r.prevPath;l=(null==e?void 0:e.at(-1))<=c?[...t.slice(0,-1),c+1]:t;break}default:l=t}return l}static getNodeOnClickData(t){let e=[],n={};return DocumentUtils.iterateDepthFirst(t,t=>{var r,i,o,l;const c=null===(o=null===(i=null===(r=t.props)||void 0===r?void 0:r.handlers)||void 0===i?void 0:i.find(t=>t.type===ClDocumentHandlerType.CLICK))||void 0===o?void 0:o.actions;(null==c?void 0:c.length)&&(e=[...e,...c]),Object.keys((null===(l=t.props)||void 0===l?void 0:l.content)||{}).filter(t=>["detractor","passive","promoter"].includes(t)).map(e=>{var n;return((null===(n=t.props)||void 0===n?void 0:n.content)||{})[e]||null}).filter(t=>t).forEach(t=>n[t]=t)}),{actions:e,npsViewIds:Object.keys(n)}}}export function iterateDepthFirst(t,e){t.children&&t.children.forEach(t=>iterateDepthFirst(t,e)),e(t)}
@@ -1,5 +1,4 @@
1
- declare const HandlerTypes: {
2
- CLICK: string;
3
- COMPONENT_EVENT: string;
4
- };
5
- export default HandlerTypes;
1
+ export declare enum HandlerTypes {
2
+ CLICK = "CLICK",
3
+ COMPONENT_EVENT = "COMPONENT_EVENT"
4
+ }
@@ -1 +1 @@
1
- const HandlerTypes={CLICK:"CLICK",COMPONENT_EVENT:"COMPONENT_EVENT"};export default HandlerTypes;
1
+ export var HandlerTypes;!function(e){e.CLICK="CLICK",e.COMPONENT_EVENT="COMPONENT_EVENT"}(HandlerTypes||(HandlerTypes={}));
@@ -1,5 +1,4 @@
1
- declare const HttpStatus: {
2
- EMPTY_RESPONSE: number;
3
- TOO_MANY_REQUESTS: number;
4
- };
5
- export default HttpStatus;
1
+ export declare enum HttpStatus {
2
+ EMPTY_RESPONSE = 204,
3
+ TOO_MANY_REQUESTS = 429
4
+ }
@@ -1 +1 @@
1
- const HttpStatus={EMPTY_RESPONSE:204,TOO_MANY_REQUESTS:429};export default HttpStatus;
1
+ export var HttpStatus;!function(t){t[t.EMPTY_RESPONSE=204]="EMPTY_RESPONSE",t[t.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS"}(HttpStatus||(HttpStatus={}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claspo/common",
3
- "version": "6.0.4-theme.22",
3
+ "version": "6.0.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "engines": {
@@ -1,7 +0,0 @@
1
- export function prepareKeys(schema: any): {};
2
- export default class ThemeCssVars extends CssVarsOperations {
3
- static override(schema: {} | undefined, element: any): void;
4
- static apply(schema: {} | undefined, element: any): void;
5
- static get(varName: any, element: any): string;
6
- }
7
- import CssVarsOperations from "./CssVarsOperations";
@@ -1 +0,0 @@
1
- import CssVarsOperations from"./CssVarsOperations";function toCssVarToken(r){return`cl-schema-${r}`}function getRgbaColor(r){return(null==r?void 0:r.startsWith("rgb("))?r.replace("rgb(","rgba(").replace(")",", 1)"):r}function hex(r){var t="0123456789abcdef",e=parseInt(r);return 0==e||isNaN(r)?"00":(e=Math.round(Math.min(Math.max(0,e),255)),t.charAt((e-e%16)/16)+t.charAt(e%16))}function convertToHex(r){return hex(r[0])+hex(r[1])+hex(r[2])}function trim(r){return"#"==r.charAt(0)?r.substring(1,7):r}function convertToRGB(r){var t=[];return t[0]=parseInt(trim(r).substring(0,2),16),t[1]=parseInt(trim(r).substring(2,4),16),t[2]=parseInt(trim(r).substring(4,6),16),t}function parseColorToRGB(r){if(!r)return[0,0,0,1];const t=r.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(t){return[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3],10),t[4]?parseFloat(t[4]):1]}if(r.startsWith("#")){const t=trim(r);if(3===t.length){return[parseInt(t[0]+t[0],16),parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),1]}if(6===t.length){const r=convertToRGB(t);return[r[0],r[1],r[2],1]}}return[0,0,0,1]}function generateGradientColors(r,t,e){if(!r||!t||e<=0)return[];const n=parseColorToRGB(r),s=parseColorToRGB(t),o=[];for(let r=0;r<e;r++){const t=r/(e-1||1),a=Math.round(n[0]+(s[0]-n[0])*t),i=Math.round(n[1]+(s[1]-n[1])*t),u=Math.round(n[2]+(s[2]-n[2])*t),c=void 0!==n[3]&&void 0!==s[3]?n[3]+(s[3]-n[3])*t:1;o.push(`rgba(${a}, ${i}, ${u}, ${c})`)}return o}export function prepareKeys(r){const t=Object.keys(r).reduce((t,e)=>(t[toCssVarToken(e)]=r[e],t),{}),e=getRgbaColor(r.text),n=generateGradientColors(getRgbaColor(r.background),e,18);return n.pop(),n.shift(),n.forEach((r,e)=>{t[toCssVarToken(`background-${e+1}`)]=r}),t}export default class ThemeCssVars extends CssVarsOperations{static override(r={},t){const e=prepareKeys(r);super.override(e,t)}static apply(r={},t){const e=prepareKeys(r);super.apply(e,t)}static get(r,t){const e=toCssVarToken(r);return super.get(e,t)}}
@@ -1,7 +0,0 @@
1
- declare const InAppLayoutType: {
2
- SLIDE_UP: string;
3
- POP_UP: string;
4
- FULL: string;
5
- BOTTOM_BAR: string;
6
- };
7
- export default InAppLayoutType;
@@ -1 +0,0 @@
1
- const InAppLayoutType={SLIDE_UP:"SLIDE_UP",POP_UP:"POP_UP",FULL:"FULL",BOTTOM_BAR:"BOTTOM_BAR"};export default InAppLayoutType;
@@ -1,9 +0,0 @@
1
- declare const LayoutType: {
2
- BUILT_IN: string;
3
- DETACHED: string;
4
- FLOATING_BOX: string;
5
- FLOATING_BAR: string;
6
- LAUNCHER: string;
7
- CONTENT_LOCKER: string;
8
- };
9
- export default LayoutType;
@@ -1 +0,0 @@
1
- const LayoutType={BUILT_IN:"BUILT_IN",DETACHED:"DETACHED",FLOATING_BOX:"FLOATING_BOX",FLOATING_BAR:"FLOATING_BAR",LAUNCHER:"LAUNCHER",CONTENT_LOCKER:"CONTENT_LOCKER"};export default LayoutType;
@@ -1,9 +0,0 @@
1
- declare const WidgetType: {
2
- SUBSCRIPTION_FORM: string;
3
- INFORMER: string;
4
- REQUEST_FORM: string;
5
- LAUNCHER: string;
6
- AGE_VERIFY: string;
7
- TEASER: string;
8
- };
9
- export default WidgetType;
@@ -1 +0,0 @@
1
- const WidgetType={SUBSCRIPTION_FORM:"SUBSCRIPTION_FORM",INFORMER:"INFORMER",REQUEST_FORM:"REQUEST_FORM",LAUNCHER:"LAUNCHER",AGE_VERIFY:"AGE_VERIFY",TEASER:"TEASER"};export default WidgetType;
@@ -1,5 +0,0 @@
1
- import { ThemeI } from "../document/Document.interface";
2
- export declare const THEME_CSS_VAR_PREFIX = "cl-schema-";
3
- export declare function toCssVarToken(token: string): string;
4
- export declare function formCssVarToSchemaToken(cssVar?: string): string;
5
- export declare function createTheme(schema?: Record<string, string>): ThemeI;
@@ -1 +0,0 @@
1
- import{DefaultSchemaTokens}from"../document/Document.interface";export const THEME_CSS_VAR_PREFIX="cl-schema-";export function toCssVarToken(e){return`cl-schema-${e}`}export function formCssVarToSchemaToken(e=""){return e.replace(/var\(\s*(--[^,\s)]+).*\)/,"$1").replace("--cl-schema-","")}export function createTheme(e={}){return 0===Object.keys(e).length&&(e={[DefaultSchemaTokens.ACCENT]:"#000000"}),{schema:Object.assign({},e)}}