@chili-publish/studio-sdk 1.46.2 → 1.47.0
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.
- package/_bundles/main.js +2 -2
- package/_bundles/main.js.map +1 -1
- package/lib/src/controllers/ComponentGridController.cjs.js.map +1 -1
- package/lib/src/controllers/ComponentGridController.es.js.map +1 -1
- package/lib/src/controllers/FrameController.cjs.js +8 -0
- package/lib/src/controllers/FrameController.cjs.js.map +1 -1
- package/lib/src/controllers/FrameController.d.ts +14 -0
- package/lib/src/controllers/FrameController.es.js +8 -0
- package/lib/src/controllers/FrameController.es.js.map +1 -1
- package/lib/src/controllers/UtilsController.cjs.js +4 -1
- package/lib/src/controllers/UtilsController.cjs.js.map +1 -1
- package/lib/src/controllers/UtilsController.es.js +4 -1
- package/lib/src/controllers/UtilsController.es.js.map +1 -1
- package/lib/src/next/controllers/PageController.cjs.js +1 -0
- package/lib/src/next/controllers/PageController.cjs.js.map +1 -1
- package/lib/src/next/controllers/PageController.es.js +1 -0
- package/lib/src/next/controllers/PageController.es.js.map +1 -1
- package/lib/src/sdk/editor-engine.json.cjs.js +1 -1
- package/lib/src/sdk/editor-engine.json.es.js +1 -1
- package/lib/src/sdk/package.json.cjs.js +1 -1
- package/lib/src/sdk/package.json.es.js +1 -1
- package/lib/src/sdk.cjs.js +26 -13
- package/lib/src/sdk.cjs.js.map +1 -1
- package/lib/src/sdk.d.ts +14 -0
- package/lib/src/sdk.es.js +26 -13
- package/lib/src/sdk.es.js.map +1 -1
- package/lib/src/types/BarcodeTypes.cjs.js.map +1 -1
- package/lib/src/types/BarcodeTypes.d.ts +3 -1
- package/lib/src/types/BarcodeTypes.es.js.map +1 -1
- package/lib/src/types/BrandKitTypes.d.ts +4 -2
- package/lib/src/types/CharacterStyleTypes.d.ts +6 -2
- package/lib/src/types/ColorStyleTypes.cjs.js.map +1 -1
- package/lib/src/types/ColorStyleTypes.es.js.map +1 -1
- package/lib/src/types/ComponentGridTypes.cjs.js.map +1 -1
- package/lib/src/types/ComponentGridTypes.es.js.map +1 -1
- package/lib/src/types/ConnectorTypes.cjs.js.map +1 -1
- package/lib/src/types/ConnectorTypes.es.js.map +1 -1
- package/lib/src/types/FrameTypes.cjs.js.map +1 -1
- package/lib/src/types/FrameTypes.d.ts +5 -0
- package/lib/src/types/FrameTypes.es.js.map +1 -1
- package/lib/src/types/ParagraphStyleTypes.cjs.js.map +1 -1
- package/lib/src/types/ParagraphStyleTypes.d.ts +6 -2
- package/lib/src/types/ParagraphStyleTypes.es.js.map +1 -1
- package/lib/src/types/RichTextRuleTypes.cjs.js.map +1 -1
- package/lib/src/types/RichTextRuleTypes.es.js.map +1 -1
- package/lib/src/types/ShapeTypes.cjs.js.map +1 -1
- package/lib/src/types/ShapeTypes.d.ts +2 -0
- package/lib/src/types/ShapeTypes.es.js.map +1 -1
- package/lib/src/types/TextStyleTypes.cjs.js.map +1 -1
- package/lib/src/types/TextStyleTypes.d.ts +2 -1
- package/lib/src/types/TextStyleTypes.es.js.map +1 -1
- package/lib/src/types/VariableTypes.cjs.js.map +1 -1
- package/lib/src/types/VariableTypes.es.js.map +1 -1
- package/lib/src/utils/EngineCallbackHandler.cjs.js.map +1 -1
- package/lib/src/utils/EngineCallbackHandler.es.js.map +1 -1
- package/lib/src/utils/EngineEvent.cjs.js.map +1 -1
- package/lib/src/utils/EngineEvent.es.js.map +1 -1
- package/package.json +17 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextRuleTypes.es.js","sources":["../../../src/types/RichTextRuleTypes.ts"],"sourcesContent":["import { Scripting } from './TextStyleTypes';\n\n/**\n * Defines a text flow and all style rules that are applied to it.\n */\nexport interface StructuredTextTextFlowDefinition {\n id: string;\n styleRules: StructuredTextStyleRule[];\n}\n\n/**\n * Supported style kinds for structured text rules.\n */\nexport enum StructuredTextStyleKind {\n paragraph = 'paragraph',\n character = 'character',\n lineBreak = 'lineBreak',\n inlineStyle = 'inlineStyle',\n}\n\n/**\n * A style rule for rich text parsing.\n */\nexport type StructuredTextStyleRule =\n
|
|
1
|
+
{"version":3,"file":"RichTextRuleTypes.es.js","sources":["../../../src/types/RichTextRuleTypes.ts"],"sourcesContent":["import { Scripting } from './TextStyleTypes';\n\n/**\n * Defines a text flow and all style rules that are applied to it.\n */\nexport interface StructuredTextTextFlowDefinition {\n id: string;\n styleRules: StructuredTextStyleRule[];\n}\n\n/**\n * Supported style kinds for structured text rules.\n */\nexport enum StructuredTextStyleKind {\n paragraph = 'paragraph',\n character = 'character',\n lineBreak = 'lineBreak',\n inlineStyle = 'inlineStyle',\n}\n\n/**\n * A style rule for rich text parsing.\n */\nexport type StructuredTextStyleRule =\n ParagraphTextStyleRule | CharacterTextStyleRule | LineBreakTextStyleRule | InlineStyleTextStyleRule;\n\nexport interface ParagraphTextStyleRule {\n matcher: StructuredTextNodeMatcher;\n paragraphStyleName: string;\n styleKind: StructuredTextStyleKind.paragraph;\n}\n\nexport interface CharacterTextStyleRule {\n matcher: StructuredTextNodeMatcher;\n characterStyleName: string;\n styleKind: StructuredTextStyleKind.character;\n}\n\nexport interface LineBreakTextStyleRule {\n matcher: StructuredTextNodeMatcher;\n styleKind: StructuredTextStyleKind.lineBreak;\n}\n\n/**\n * A style rule that applies inline character styling directly to matched\n * elements without requiring a named style.\n */\nexport interface InlineStyleTextStyleRule {\n matcher: StructuredTextNodeMatcher;\n inlineStyleDefinition: StructuredTextInlineStyleDefinition;\n styleKind: StructuredTextStyleKind.inlineStyle;\n}\n\n/**\n * Defines inline character style properties applied by inline style rules.\n *\n * Every property is optional. If a property is left `undefined`, it is not\n * overridden by the rule.\n */\nexport interface StructuredTextInlineStyleDefinition {\n underline?: boolean;\n lineThrough?: boolean;\n subSuperScript?: Scripting;\n}\n\n/**\n * Matcher for structured text nodes.\n */\nexport interface StructuredTextNodeMatcher {\n tag?: string;\n attributeMatchers: StructuredTextAttributeMatcher[];\n caseSensitive: boolean;\n}\n\n/**\n * Supported operators for matching attributes.\n */\nexport enum StructuredTextAttributeMatchOperator {\n exists = 'exists',\n missing = 'missing',\n equals = 'equals',\n notEquals = 'notEquals',\n contains = 'contains',\n startsWith = 'startsWith',\n endsWith = 'endsWith',\n}\n\n/**\n * Matcher used to evaluate a node attribute.\n */\nexport type StructuredTextAttributeMatcher =\n | ExistsStructuredTextAttributeMatcher\n | MissingStructuredTextAttributeMatcher\n | EqualsStructuredTextAttributeMatcher\n | NotEqualsStructuredTextAttributeMatcher\n | ContainsStructuredTextAttributeMatcher\n | StartsWithStructuredTextAttributeMatcher\n | EndsWithStructuredTextAttributeMatcher;\n\nexport interface ExistsStructuredTextAttributeMatcher {\n name: string;\n caseSensitive: boolean;\n matchOperator: StructuredTextAttributeMatchOperator.exists;\n}\n\nexport interface MissingStructuredTextAttributeMatcher {\n name: string;\n caseSensitive: boolean;\n matchOperator: StructuredTextAttributeMatchOperator.missing;\n}\n\nexport interface EqualsStructuredTextAttributeMatcher {\n name: string;\n caseSensitive: boolean;\n value: string;\n matchOperator: StructuredTextAttributeMatchOperator.equals;\n}\n\nexport interface NotEqualsStructuredTextAttributeMatcher {\n name: string;\n caseSensitive: boolean;\n value: string;\n matchOperator: StructuredTextAttributeMatchOperator.notEquals;\n}\n\nexport interface ContainsStructuredTextAttributeMatcher {\n name: string;\n caseSensitive: boolean;\n value: string;\n matchOperator: StructuredTextAttributeMatchOperator.contains;\n}\n\nexport interface StartsWithStructuredTextAttributeMatcher {\n name: string;\n caseSensitive: boolean;\n value: string;\n matchOperator: StructuredTextAttributeMatchOperator.startsWith;\n}\n\nexport interface EndsWithStructuredTextAttributeMatcher {\n name: string;\n caseSensitive: boolean;\n value: string;\n matchOperator: StructuredTextAttributeMatchOperator.endsWith;\n}\n"],"names":["StructuredTextStyleKind","StructuredTextAttributeMatchOperator"],"mappings":"AAaO,IAAK,4CAAAA,6BAAL;AACHA,2BAAA,WAAA,IAAY;AACZA,2BAAA,WAAA,IAAY;AACZA,2BAAA,WAAA,IAAY;AACZA,2BAAA,aAAA,IAAc;AAJN,SAAAA;AAAA,GAAA,2BAAA,CAAA,CAAA;AAgEL,IAAK,yDAAAC,0CAAL;AACHA,wCAAA,QAAA,IAAS;AACTA,wCAAA,SAAA,IAAU;AACVA,wCAAA,QAAA,IAAS;AACTA,wCAAA,WAAA,IAAY;AACZA,wCAAA,UAAA,IAAW;AACXA,wCAAA,YAAA,IAAa;AACbA,wCAAA,UAAA,IAAW;AAPH,SAAAA;AAAA,GAAA,wCAAA,CAAA,CAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShapeTypes.cjs.js","sources":["../../../src/types/ShapeTypes.ts"],"sourcesContent":["import { ColorUsage } from './ColorStyleTypes';\n\nexport enum ShapeType {\n ellipse = 'ellipse',\n rectangle = 'rectangle',\n polygon = 'polygon',\n custom = 'custom',\n}\n\nexport interface ShapeProperties {\n enableFill?: boolean;\n fillColor?: ColorUsage;\n enableStroke?: boolean;\n strokeColor?: ColorUsage;\n strokeWeight?: number;\n allCornersSame?: boolean;\n}\n\nexport interface ShapeContainerProperties {\n enableStroke: boolean;\n strokeColor: ColorUsage;\n strokeWeight: number;\n allCornersSame: boolean;\n}\n\nexport interface CornerRadiusUpdateModel {\n radiusAll?: number;\n topLeft?: number;\n bottomLeft?: number;\n topRight?: number;\n bottomRight?: number;\n allCornersSame?: boolean;\n}\n\nexport interface CornerRadiusNone {\n type: string;\n}\n\nexport interface CornerRadiusAll {\n type: string;\n radius: number;\n}\n\nexport interface CornerRadiusOnly {\n type: string;\n topLeft: number;\n bottomLeft: number;\n topRight: number;\n bottomRight: number;\n}\n\nexport enum CornerRadiusType {\n all = 'all',\n only = 'only',\n none = 'none',\n}\n\nexport type CornerRadius = CornerRadiusNone | CornerRadiusAll | CornerRadiusOnly;\n\nexport type ShapeFrameRectSource = {\n type: ShapeType.rectangle;\n cornerRadius?: CornerRadius;\n};\n\nexport type ShapeFrameEllipseSource = {\n type: ShapeType.ellipse;\n};\n\nexport type ShapeFramePolygonSource = {\n type: ShapeType.polygon;\n sides?: number;\n cornerRadius?: CornerRadius;\n};\n\nexport type ShapeFrameCustomSource = {\n type: ShapeType.custom;\n
|
|
1
|
+
{"version":3,"file":"ShapeTypes.cjs.js","sources":["../../../src/types/ShapeTypes.ts"],"sourcesContent":["import { ColorUsage } from './ColorStyleTypes';\n\nexport enum ShapeType {\n ellipse = 'ellipse',\n rectangle = 'rectangle',\n polygon = 'polygon',\n custom = 'custom',\n}\n\nexport interface ShapeProperties {\n enableFill?: boolean;\n fillColor?: ColorUsage;\n fillOverprint?: boolean;\n enableStroke?: boolean;\n strokeColor?: ColorUsage;\n strokeOverprint?: boolean;\n strokeWeight?: number;\n allCornersSame?: boolean;\n}\n\nexport interface ShapeContainerProperties {\n enableStroke: boolean;\n strokeColor: ColorUsage;\n strokeWeight: number;\n allCornersSame: boolean;\n}\n\nexport interface CornerRadiusUpdateModel {\n radiusAll?: number;\n topLeft?: number;\n bottomLeft?: number;\n topRight?: number;\n bottomRight?: number;\n allCornersSame?: boolean;\n}\n\nexport interface CornerRadiusNone {\n type: string;\n}\n\nexport interface CornerRadiusAll {\n type: string;\n radius: number;\n}\n\nexport interface CornerRadiusOnly {\n type: string;\n topLeft: number;\n bottomLeft: number;\n topRight: number;\n bottomRight: number;\n}\n\nexport enum CornerRadiusType {\n all = 'all',\n only = 'only',\n none = 'none',\n}\n\nexport type CornerRadius = CornerRadiusNone | CornerRadiusAll | CornerRadiusOnly;\n\nexport type ShapeFrameRectSource = {\n type: ShapeType.rectangle;\n cornerRadius?: CornerRadius;\n};\n\nexport type ShapeFrameEllipseSource = {\n type: ShapeType.ellipse;\n};\n\nexport type ShapeFramePolygonSource = {\n type: ShapeType.polygon;\n sides?: number;\n cornerRadius?: CornerRadius;\n};\n\nexport type ShapeFrameCustomSource = {\n type: ShapeType.custom;\n /**\n * The shape path is in relative coordinates to the frame,\n * with the top left corner of the frame being (0, 0) and the\n * bottom right corner being (1, 1). The path should be a valid SVG path string.\n */\n path: string;\n};\n\nexport type ShapeFrameSource =\n ShapeFrameRectSource | ShapeFrameEllipseSource | ShapeFramePolygonSource | ShapeFrameCustomSource;\n"],"names":["ShapeType","CornerRadiusType"],"mappings":";;AAEO,IAAK,8BAAAA,eAAL;AACHA,aAAA,SAAA,IAAU;AACVA,aAAA,WAAA,IAAY;AACZA,aAAA,SAAA,IAAU;AACVA,aAAA,QAAA,IAAS;AAJD,SAAAA;AAAA,GAAA,aAAA,CAAA,CAAA;AAmDL,IAAK,qCAAAC,sBAAL;AACHA,oBAAA,KAAA,IAAM;AACNA,oBAAA,MAAA,IAAO;AACPA,oBAAA,MAAA,IAAO;AAHC,SAAAA;AAAA,GAAA,oBAAA,CAAA,CAAA;;;"}
|
|
@@ -8,8 +8,10 @@ export declare enum ShapeType {
|
|
|
8
8
|
export interface ShapeProperties {
|
|
9
9
|
enableFill?: boolean;
|
|
10
10
|
fillColor?: ColorUsage;
|
|
11
|
+
fillOverprint?: boolean;
|
|
11
12
|
enableStroke?: boolean;
|
|
12
13
|
strokeColor?: ColorUsage;
|
|
14
|
+
strokeOverprint?: boolean;
|
|
13
15
|
strokeWeight?: number;
|
|
14
16
|
allCornersSame?: boolean;
|
|
15
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShapeTypes.es.js","sources":["../../../src/types/ShapeTypes.ts"],"sourcesContent":["import { ColorUsage } from './ColorStyleTypes';\n\nexport enum ShapeType {\n ellipse = 'ellipse',\n rectangle = 'rectangle',\n polygon = 'polygon',\n custom = 'custom',\n}\n\nexport interface ShapeProperties {\n enableFill?: boolean;\n fillColor?: ColorUsage;\n enableStroke?: boolean;\n strokeColor?: ColorUsage;\n strokeWeight?: number;\n allCornersSame?: boolean;\n}\n\nexport interface ShapeContainerProperties {\n enableStroke: boolean;\n strokeColor: ColorUsage;\n strokeWeight: number;\n allCornersSame: boolean;\n}\n\nexport interface CornerRadiusUpdateModel {\n radiusAll?: number;\n topLeft?: number;\n bottomLeft?: number;\n topRight?: number;\n bottomRight?: number;\n allCornersSame?: boolean;\n}\n\nexport interface CornerRadiusNone {\n type: string;\n}\n\nexport interface CornerRadiusAll {\n type: string;\n radius: number;\n}\n\nexport interface CornerRadiusOnly {\n type: string;\n topLeft: number;\n bottomLeft: number;\n topRight: number;\n bottomRight: number;\n}\n\nexport enum CornerRadiusType {\n all = 'all',\n only = 'only',\n none = 'none',\n}\n\nexport type CornerRadius = CornerRadiusNone | CornerRadiusAll | CornerRadiusOnly;\n\nexport type ShapeFrameRectSource = {\n type: ShapeType.rectangle;\n cornerRadius?: CornerRadius;\n};\n\nexport type ShapeFrameEllipseSource = {\n type: ShapeType.ellipse;\n};\n\nexport type ShapeFramePolygonSource = {\n type: ShapeType.polygon;\n sides?: number;\n cornerRadius?: CornerRadius;\n};\n\nexport type ShapeFrameCustomSource = {\n type: ShapeType.custom;\n
|
|
1
|
+
{"version":3,"file":"ShapeTypes.es.js","sources":["../../../src/types/ShapeTypes.ts"],"sourcesContent":["import { ColorUsage } from './ColorStyleTypes';\n\nexport enum ShapeType {\n ellipse = 'ellipse',\n rectangle = 'rectangle',\n polygon = 'polygon',\n custom = 'custom',\n}\n\nexport interface ShapeProperties {\n enableFill?: boolean;\n fillColor?: ColorUsage;\n fillOverprint?: boolean;\n enableStroke?: boolean;\n strokeColor?: ColorUsage;\n strokeOverprint?: boolean;\n strokeWeight?: number;\n allCornersSame?: boolean;\n}\n\nexport interface ShapeContainerProperties {\n enableStroke: boolean;\n strokeColor: ColorUsage;\n strokeWeight: number;\n allCornersSame: boolean;\n}\n\nexport interface CornerRadiusUpdateModel {\n radiusAll?: number;\n topLeft?: number;\n bottomLeft?: number;\n topRight?: number;\n bottomRight?: number;\n allCornersSame?: boolean;\n}\n\nexport interface CornerRadiusNone {\n type: string;\n}\n\nexport interface CornerRadiusAll {\n type: string;\n radius: number;\n}\n\nexport interface CornerRadiusOnly {\n type: string;\n topLeft: number;\n bottomLeft: number;\n topRight: number;\n bottomRight: number;\n}\n\nexport enum CornerRadiusType {\n all = 'all',\n only = 'only',\n none = 'none',\n}\n\nexport type CornerRadius = CornerRadiusNone | CornerRadiusAll | CornerRadiusOnly;\n\nexport type ShapeFrameRectSource = {\n type: ShapeType.rectangle;\n cornerRadius?: CornerRadius;\n};\n\nexport type ShapeFrameEllipseSource = {\n type: ShapeType.ellipse;\n};\n\nexport type ShapeFramePolygonSource = {\n type: ShapeType.polygon;\n sides?: number;\n cornerRadius?: CornerRadius;\n};\n\nexport type ShapeFrameCustomSource = {\n type: ShapeType.custom;\n /**\n * The shape path is in relative coordinates to the frame,\n * with the top left corner of the frame being (0, 0) and the\n * bottom right corner being (1, 1). The path should be a valid SVG path string.\n */\n path: string;\n};\n\nexport type ShapeFrameSource =\n ShapeFrameRectSource | ShapeFrameEllipseSource | ShapeFramePolygonSource | ShapeFrameCustomSource;\n"],"names":["ShapeType","CornerRadiusType"],"mappings":"AAEO,IAAK,8BAAAA,eAAL;AACHA,aAAA,SAAA,IAAU;AACVA,aAAA,WAAA,IAAY;AACZA,aAAA,SAAA,IAAU;AACVA,aAAA,QAAA,IAAS;AAJD,SAAAA;AAAA,GAAA,aAAA,CAAA,CAAA;AAmDL,IAAK,qCAAAC,sBAAL;AACHA,oBAAA,KAAA,IAAM;AACNA,oBAAA,MAAA,IAAO;AACPA,oBAAA,MAAA,IAAO;AAHC,SAAAA;AAAA,GAAA,oBAAA,CAAA,CAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextStyleTypes.cjs.js","sources":["../../../src/types/TextStyleTypes.ts"],"sourcesContent":["import { ColorUsage } from './ColorStyleTypes';\nimport { VerticalAlign } from './FrameTypes';\n\nexport enum FontWeights {\n BOLD = 'Bold',\n ITALIC = 'Italic',\n REGULAR = 'Regular',\n}\nexport enum Alignment {\n LEFT = 'left',\n CENTER = 'center',\n RIGHT = 'right',\n JUSTIFY = 'justify',\n}\n\nexport enum TextPosition {\n TOP = 'top',\n CENTER = 'center',\n BOTTOM = 'bottom',\n}\nexport enum Case {\n TO_LOWER_CASE = 'lowercase',\n TO_UPPER_CASE = 'uppercase',\n NORMAL = 'normal',\n}\nexport enum Scripting {\n SUPERSCRIPT = 'superscript',\n SUBSCRIPT = 'subscript',\n NORMAL = 'normal',\n}\n\nexport type DisplayColor = ColorUsage & {\n isApplied: boolean;\n};\nexport interface TextProperties {\n fontKey?: string;\n fontStyle?: FontWeights;\n fontSize?: number;\n textAlign?: Alignment;\n verticalAlign?: VerticalAlign;\n underline?: boolean;\n lineThrough?: boolean;\n letterSpacing?: string;\n trackingRight?: string;\n lineHeight?: number;\n SUB_SUPER_SCRIPT?: Scripting;\n typographicCase?: Case;\n color?: DisplayColor;\n [key: string]: number | string | Record<string, unknown> | null | boolean | undefined;\n}\n\nexport interface TextStyle {\n paragraph?: string;\n character?: string;\n [key: string]: number | string | Record<string, unknown> | null | boolean | undefined;\n}\nexport type TextStyleUpdateType = {\n [key in keyof typeof SelectedTextStyles]?: {\n value: number | string | boolean;\n };\n};\n\nexport interface AppearanceProperties {\n blendMode?: string;\n opacity?: string;\n useFill?: boolean;\n useStroke?: boolean;\n useBackground?: boolean;\n useDropShadow?: boolean;\n fillColor?: string;\n strokeColor?: string;\n backgroundColor?: string;\n dropShadowColor?: string;\n}\n\nexport interface SelectedTextStyle {\n paragraphStyleId?: string;\n characterStyleId?: string;\n fontKey?: string;\n fontSize?: number;\n typographicCase?: Case;\n kerningOn?: boolean;\n subSuperScript?: Scripting;\n trackingLeft?: number;\n trackingRight?: number;\n paragraphIndentStart?: string;\n paragraphIndentEnd?: string;\n paragraphSpaceBefore?: string;\n paragraphSpaceAfter?: string;\n textIndent?: string;\n alignToBaseLine?: boolean;\n baselineShiftValue?: string;\n lineHeight?: number;\n verticalAlign?: VerticalAlign;\n copyfittingScale?: number;\n textAlign?: HorizontalAlign;\n textAlignLast?: HorizontalAlign;\n
|
|
1
|
+
{"version":3,"file":"TextStyleTypes.cjs.js","sources":["../../../src/types/TextStyleTypes.ts"],"sourcesContent":["import { ColorUsage } from './ColorStyleTypes';\nimport { VerticalAlign } from './FrameTypes';\n\nexport enum FontWeights {\n BOLD = 'Bold',\n ITALIC = 'Italic',\n REGULAR = 'Regular',\n}\nexport enum Alignment {\n LEFT = 'left',\n CENTER = 'center',\n RIGHT = 'right',\n JUSTIFY = 'justify',\n}\n\nexport enum TextPosition {\n TOP = 'top',\n CENTER = 'center',\n BOTTOM = 'bottom',\n}\nexport enum Case {\n TO_LOWER_CASE = 'lowercase',\n TO_UPPER_CASE = 'uppercase',\n NORMAL = 'normal',\n}\nexport enum Scripting {\n SUPERSCRIPT = 'superscript',\n SUBSCRIPT = 'subscript',\n NORMAL = 'normal',\n}\n\nexport type DisplayColor = ColorUsage & {\n isApplied: boolean;\n};\nexport interface TextProperties {\n fontKey?: string;\n fontStyle?: FontWeights;\n fontSize?: number;\n textAlign?: Alignment;\n verticalAlign?: VerticalAlign;\n underline?: boolean;\n lineThrough?: boolean;\n letterSpacing?: string;\n trackingRight?: string;\n lineHeight?: number;\n SUB_SUPER_SCRIPT?: Scripting;\n typographicCase?: Case;\n color?: DisplayColor;\n [key: string]: number | string | Record<string, unknown> | null | boolean | undefined;\n}\n\nexport interface TextStyle {\n paragraph?: string;\n character?: string;\n [key: string]: number | string | Record<string, unknown> | null | boolean | undefined;\n}\nexport type TextStyleUpdateType = {\n [key in keyof typeof SelectedTextStyles]?: {\n value: number | string | boolean;\n };\n};\n\nexport interface AppearanceProperties {\n blendMode?: string;\n opacity?: string;\n useFill?: boolean;\n useStroke?: boolean;\n useBackground?: boolean;\n useDropShadow?: boolean;\n fillColor?: string;\n strokeColor?: string;\n backgroundColor?: string;\n dropShadowColor?: string;\n}\n\nexport interface SelectedTextStyle {\n paragraphStyleId?: string;\n characterStyleId?: string;\n fontKey?: string;\n fontSize?: number;\n typographicCase?: Case;\n kerningOn?: boolean;\n subSuperScript?: Scripting;\n trackingLeft?: number;\n trackingRight?: number;\n paragraphIndentStart?: string;\n paragraphIndentEnd?: string;\n paragraphSpaceBefore?: string;\n paragraphSpaceAfter?: string;\n textIndent?: string;\n alignToBaseLine?: boolean;\n baselineShiftValue?: string;\n lineHeight?: number;\n verticalAlign?: VerticalAlign;\n copyfittingScale?: number;\n textAlign?: HorizontalAlign;\n textAlignLast?: HorizontalAlign;\n fillOverprint?: boolean;\n strokeOverprint?: boolean;\n color?: DisplayColor;\n strokeColor?: DisplayColor;\n backgroundColor?: DisplayColor;\n fillColorApplied?: boolean;\n strokeColorApplied?: boolean;\n backgroundColorApplied?: boolean;\n strokeWidth?: number;\n underline?: boolean;\n lineThrough?: boolean;\n hasLocalFormatting: boolean;\n markedListType?: MarkedListType;\n markedListGroup?: string;\n markedListLevel?: number;\n}\n\nexport enum HorizontalAlign {\n left = 'left',\n center = 'center',\n right = 'right',\n justify = 'justify',\n}\n\nexport enum MarkedListType {\n none = 'none',\n bullet = 'bullet',\n number = 'number',\n}\n\nexport enum SelectedTextStyleSections {\n STYLE = 'textStyle',\n PROPERTIES = 'textProperties',\n APPEARANCE = 'appearance',\n}\n\nexport enum SelectedTextStyles {\n PARAGRAPH = 'paragraphStyleId',\n CHARACTER = 'characterStyleId',\n FONT_FAMILY = 'fontKey',\n FONT_STYLE = 'fontStyle',\n FONT_SIZE = 'fontSize',\n LETTER_SPACING = 'letterSpacing',\n LINE_HEIGHT = 'lineHeight',\n TEXT_ALIGN = 'textAlign',\n VERTICAL_ALIGN = 'verticalAlign',\n TYPOGRAPHIC_CASE = 'typographicCase',\n SUB_SUPER_SCRIPT = 'subSuperScript',\n UNDERLINE = 'underline',\n LINE_THROUGH = 'lineThrough',\n FILL_COLOR = 'fillColor',\n COLOR = 'color',\n FILL_COLOR_APPLIED = 'fillColorApplied',\n STROKE_COLOR = 'strokeColor',\n STROKE_COLOR_APPLIED = 'strokeColorApplied',\n BACKGROUND_COLOR = 'backgroundColor',\n BACKGROUND_COLOR_APPLIED = 'backgroundColorApplied',\n DROP_SHADOW_COLOR = 'dropShadowColor',\n BLEND_MODE = 'blendMode',\n OPACITY = 'opacity',\n TRACKING_RIGHT = 'trackingRight',\n BASELINE_SHIFT = 'baselineShiftValue',\n STROKE_WIDTH = 'strokeWidth',\n MARKED_LIST_TYPE = 'markedListType',\n MARKED_LIST_GROUP = 'markedListGroup',\n MARKED_LIST_LEVEL = 'markedListLevel',\n}\n\nexport interface UpdateStyleType {\n path: { value: number | string | Record<string, unknown> | null | boolean | undefined };\n}\n"],"names":["FontWeights","Alignment","TextPosition","Case","Scripting","MarkedListType","SelectedTextStyleSections","SelectedTextStyles"],"mappings":";;AAGO,IAAK,gCAAAA,iBAAL;AACHA,eAAA,MAAA,IAAO;AACPA,eAAA,QAAA,IAAS;AACTA,eAAA,SAAA,IAAU;AAHF,SAAAA;AAAA,GAAA,eAAA,CAAA,CAAA;AAKL,IAAK,8BAAAC,eAAL;AACHA,aAAA,MAAA,IAAO;AACPA,aAAA,QAAA,IAAS;AACTA,aAAA,OAAA,IAAQ;AACRA,aAAA,SAAA,IAAU;AAJF,SAAAA;AAAA,GAAA,aAAA,CAAA,CAAA;AAOL,IAAK,iCAAAC,kBAAL;AACHA,gBAAA,KAAA,IAAM;AACNA,gBAAA,QAAA,IAAS;AACTA,gBAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,gBAAA,CAAA,CAAA;AAKL,IAAK,yBAAAC,UAAL;AACHA,QAAA,eAAA,IAAgB;AAChBA,QAAA,eAAA,IAAgB;AAChBA,QAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,QAAA,CAAA,CAAA;AAKL,IAAK,8BAAAC,eAAL;AACHA,aAAA,aAAA,IAAc;AACdA,aAAA,WAAA,IAAY;AACZA,aAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,aAAA,CAAA,CAAA;AAgGL,IAAK,mCAAAC,oBAAL;AACHA,kBAAA,MAAA,IAAO;AACPA,kBAAA,QAAA,IAAS;AACTA,kBAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,kBAAA,CAAA,CAAA;AAML,IAAK,8CAAAC,+BAAL;AACHA,6BAAA,OAAA,IAAQ;AACRA,6BAAA,YAAA,IAAa;AACbA,6BAAA,YAAA,IAAa;AAHL,SAAAA;AAAA,GAAA,6BAAA,CAAA,CAAA;AAML,IAAK,uCAAAC,wBAAL;AACHA,sBAAA,WAAA,IAAY;AACZA,sBAAA,WAAA,IAAY;AACZA,sBAAA,aAAA,IAAc;AACdA,sBAAA,YAAA,IAAa;AACbA,sBAAA,WAAA,IAAY;AACZA,sBAAA,gBAAA,IAAiB;AACjBA,sBAAA,aAAA,IAAc;AACdA,sBAAA,YAAA,IAAa;AACbA,sBAAA,gBAAA,IAAiB;AACjBA,sBAAA,kBAAA,IAAmB;AACnBA,sBAAA,kBAAA,IAAmB;AACnBA,sBAAA,WAAA,IAAY;AACZA,sBAAA,cAAA,IAAe;AACfA,sBAAA,YAAA,IAAa;AACbA,sBAAA,OAAA,IAAQ;AACRA,sBAAA,oBAAA,IAAqB;AACrBA,sBAAA,cAAA,IAAe;AACfA,sBAAA,sBAAA,IAAuB;AACvBA,sBAAA,kBAAA,IAAmB;AACnBA,sBAAA,0BAAA,IAA2B;AAC3BA,sBAAA,mBAAA,IAAoB;AACpBA,sBAAA,YAAA,IAAa;AACbA,sBAAA,SAAA,IAAU;AACVA,sBAAA,gBAAA,IAAiB;AACjBA,sBAAA,gBAAA,IAAiB;AACjBA,sBAAA,cAAA,IAAe;AACfA,sBAAA,kBAAA,IAAmB;AACnBA,sBAAA,mBAAA,IAAoB;AACpBA,sBAAA,mBAAA,IAAoB;AA7BZ,SAAAA;AAAA,GAAA,sBAAA,CAAA,CAAA;;;;;;;;;"}
|
|
@@ -89,7 +89,8 @@ export interface SelectedTextStyle {
|
|
|
89
89
|
copyfittingScale?: number;
|
|
90
90
|
textAlign?: HorizontalAlign;
|
|
91
91
|
textAlignLast?: HorizontalAlign;
|
|
92
|
-
|
|
92
|
+
fillOverprint?: boolean;
|
|
93
|
+
strokeOverprint?: boolean;
|
|
93
94
|
color?: DisplayColor;
|
|
94
95
|
strokeColor?: DisplayColor;
|
|
95
96
|
backgroundColor?: DisplayColor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextStyleTypes.es.js","sources":["../../../src/types/TextStyleTypes.ts"],"sourcesContent":["import { ColorUsage } from './ColorStyleTypes';\nimport { VerticalAlign } from './FrameTypes';\n\nexport enum FontWeights {\n BOLD = 'Bold',\n ITALIC = 'Italic',\n REGULAR = 'Regular',\n}\nexport enum Alignment {\n LEFT = 'left',\n CENTER = 'center',\n RIGHT = 'right',\n JUSTIFY = 'justify',\n}\n\nexport enum TextPosition {\n TOP = 'top',\n CENTER = 'center',\n BOTTOM = 'bottom',\n}\nexport enum Case {\n TO_LOWER_CASE = 'lowercase',\n TO_UPPER_CASE = 'uppercase',\n NORMAL = 'normal',\n}\nexport enum Scripting {\n SUPERSCRIPT = 'superscript',\n SUBSCRIPT = 'subscript',\n NORMAL = 'normal',\n}\n\nexport type DisplayColor = ColorUsage & {\n isApplied: boolean;\n};\nexport interface TextProperties {\n fontKey?: string;\n fontStyle?: FontWeights;\n fontSize?: number;\n textAlign?: Alignment;\n verticalAlign?: VerticalAlign;\n underline?: boolean;\n lineThrough?: boolean;\n letterSpacing?: string;\n trackingRight?: string;\n lineHeight?: number;\n SUB_SUPER_SCRIPT?: Scripting;\n typographicCase?: Case;\n color?: DisplayColor;\n [key: string]: number | string | Record<string, unknown> | null | boolean | undefined;\n}\n\nexport interface TextStyle {\n paragraph?: string;\n character?: string;\n [key: string]: number | string | Record<string, unknown> | null | boolean | undefined;\n}\nexport type TextStyleUpdateType = {\n [key in keyof typeof SelectedTextStyles]?: {\n value: number | string | boolean;\n };\n};\n\nexport interface AppearanceProperties {\n blendMode?: string;\n opacity?: string;\n useFill?: boolean;\n useStroke?: boolean;\n useBackground?: boolean;\n useDropShadow?: boolean;\n fillColor?: string;\n strokeColor?: string;\n backgroundColor?: string;\n dropShadowColor?: string;\n}\n\nexport interface SelectedTextStyle {\n paragraphStyleId?: string;\n characterStyleId?: string;\n fontKey?: string;\n fontSize?: number;\n typographicCase?: Case;\n kerningOn?: boolean;\n subSuperScript?: Scripting;\n trackingLeft?: number;\n trackingRight?: number;\n paragraphIndentStart?: string;\n paragraphIndentEnd?: string;\n paragraphSpaceBefore?: string;\n paragraphSpaceAfter?: string;\n textIndent?: string;\n alignToBaseLine?: boolean;\n baselineShiftValue?: string;\n lineHeight?: number;\n verticalAlign?: VerticalAlign;\n copyfittingScale?: number;\n textAlign?: HorizontalAlign;\n textAlignLast?: HorizontalAlign;\n
|
|
1
|
+
{"version":3,"file":"TextStyleTypes.es.js","sources":["../../../src/types/TextStyleTypes.ts"],"sourcesContent":["import { ColorUsage } from './ColorStyleTypes';\nimport { VerticalAlign } from './FrameTypes';\n\nexport enum FontWeights {\n BOLD = 'Bold',\n ITALIC = 'Italic',\n REGULAR = 'Regular',\n}\nexport enum Alignment {\n LEFT = 'left',\n CENTER = 'center',\n RIGHT = 'right',\n JUSTIFY = 'justify',\n}\n\nexport enum TextPosition {\n TOP = 'top',\n CENTER = 'center',\n BOTTOM = 'bottom',\n}\nexport enum Case {\n TO_LOWER_CASE = 'lowercase',\n TO_UPPER_CASE = 'uppercase',\n NORMAL = 'normal',\n}\nexport enum Scripting {\n SUPERSCRIPT = 'superscript',\n SUBSCRIPT = 'subscript',\n NORMAL = 'normal',\n}\n\nexport type DisplayColor = ColorUsage & {\n isApplied: boolean;\n};\nexport interface TextProperties {\n fontKey?: string;\n fontStyle?: FontWeights;\n fontSize?: number;\n textAlign?: Alignment;\n verticalAlign?: VerticalAlign;\n underline?: boolean;\n lineThrough?: boolean;\n letterSpacing?: string;\n trackingRight?: string;\n lineHeight?: number;\n SUB_SUPER_SCRIPT?: Scripting;\n typographicCase?: Case;\n color?: DisplayColor;\n [key: string]: number | string | Record<string, unknown> | null | boolean | undefined;\n}\n\nexport interface TextStyle {\n paragraph?: string;\n character?: string;\n [key: string]: number | string | Record<string, unknown> | null | boolean | undefined;\n}\nexport type TextStyleUpdateType = {\n [key in keyof typeof SelectedTextStyles]?: {\n value: number | string | boolean;\n };\n};\n\nexport interface AppearanceProperties {\n blendMode?: string;\n opacity?: string;\n useFill?: boolean;\n useStroke?: boolean;\n useBackground?: boolean;\n useDropShadow?: boolean;\n fillColor?: string;\n strokeColor?: string;\n backgroundColor?: string;\n dropShadowColor?: string;\n}\n\nexport interface SelectedTextStyle {\n paragraphStyleId?: string;\n characterStyleId?: string;\n fontKey?: string;\n fontSize?: number;\n typographicCase?: Case;\n kerningOn?: boolean;\n subSuperScript?: Scripting;\n trackingLeft?: number;\n trackingRight?: number;\n paragraphIndentStart?: string;\n paragraphIndentEnd?: string;\n paragraphSpaceBefore?: string;\n paragraphSpaceAfter?: string;\n textIndent?: string;\n alignToBaseLine?: boolean;\n baselineShiftValue?: string;\n lineHeight?: number;\n verticalAlign?: VerticalAlign;\n copyfittingScale?: number;\n textAlign?: HorizontalAlign;\n textAlignLast?: HorizontalAlign;\n fillOverprint?: boolean;\n strokeOverprint?: boolean;\n color?: DisplayColor;\n strokeColor?: DisplayColor;\n backgroundColor?: DisplayColor;\n fillColorApplied?: boolean;\n strokeColorApplied?: boolean;\n backgroundColorApplied?: boolean;\n strokeWidth?: number;\n underline?: boolean;\n lineThrough?: boolean;\n hasLocalFormatting: boolean;\n markedListType?: MarkedListType;\n markedListGroup?: string;\n markedListLevel?: number;\n}\n\nexport enum HorizontalAlign {\n left = 'left',\n center = 'center',\n right = 'right',\n justify = 'justify',\n}\n\nexport enum MarkedListType {\n none = 'none',\n bullet = 'bullet',\n number = 'number',\n}\n\nexport enum SelectedTextStyleSections {\n STYLE = 'textStyle',\n PROPERTIES = 'textProperties',\n APPEARANCE = 'appearance',\n}\n\nexport enum SelectedTextStyles {\n PARAGRAPH = 'paragraphStyleId',\n CHARACTER = 'characterStyleId',\n FONT_FAMILY = 'fontKey',\n FONT_STYLE = 'fontStyle',\n FONT_SIZE = 'fontSize',\n LETTER_SPACING = 'letterSpacing',\n LINE_HEIGHT = 'lineHeight',\n TEXT_ALIGN = 'textAlign',\n VERTICAL_ALIGN = 'verticalAlign',\n TYPOGRAPHIC_CASE = 'typographicCase',\n SUB_SUPER_SCRIPT = 'subSuperScript',\n UNDERLINE = 'underline',\n LINE_THROUGH = 'lineThrough',\n FILL_COLOR = 'fillColor',\n COLOR = 'color',\n FILL_COLOR_APPLIED = 'fillColorApplied',\n STROKE_COLOR = 'strokeColor',\n STROKE_COLOR_APPLIED = 'strokeColorApplied',\n BACKGROUND_COLOR = 'backgroundColor',\n BACKGROUND_COLOR_APPLIED = 'backgroundColorApplied',\n DROP_SHADOW_COLOR = 'dropShadowColor',\n BLEND_MODE = 'blendMode',\n OPACITY = 'opacity',\n TRACKING_RIGHT = 'trackingRight',\n BASELINE_SHIFT = 'baselineShiftValue',\n STROKE_WIDTH = 'strokeWidth',\n MARKED_LIST_TYPE = 'markedListType',\n MARKED_LIST_GROUP = 'markedListGroup',\n MARKED_LIST_LEVEL = 'markedListLevel',\n}\n\nexport interface UpdateStyleType {\n path: { value: number | string | Record<string, unknown> | null | boolean | undefined };\n}\n"],"names":["FontWeights","Alignment","TextPosition","Case","Scripting","MarkedListType","SelectedTextStyleSections","SelectedTextStyles"],"mappings":"AAGO,IAAK,gCAAAA,iBAAL;AACHA,eAAA,MAAA,IAAO;AACPA,eAAA,QAAA,IAAS;AACTA,eAAA,SAAA,IAAU;AAHF,SAAAA;AAAA,GAAA,eAAA,CAAA,CAAA;AAKL,IAAK,8BAAAC,eAAL;AACHA,aAAA,MAAA,IAAO;AACPA,aAAA,QAAA,IAAS;AACTA,aAAA,OAAA,IAAQ;AACRA,aAAA,SAAA,IAAU;AAJF,SAAAA;AAAA,GAAA,aAAA,CAAA,CAAA;AAOL,IAAK,iCAAAC,kBAAL;AACHA,gBAAA,KAAA,IAAM;AACNA,gBAAA,QAAA,IAAS;AACTA,gBAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,gBAAA,CAAA,CAAA;AAKL,IAAK,yBAAAC,UAAL;AACHA,QAAA,eAAA,IAAgB;AAChBA,QAAA,eAAA,IAAgB;AAChBA,QAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,QAAA,CAAA,CAAA;AAKL,IAAK,8BAAAC,eAAL;AACHA,aAAA,aAAA,IAAc;AACdA,aAAA,WAAA,IAAY;AACZA,aAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,aAAA,CAAA,CAAA;AAgGL,IAAK,mCAAAC,oBAAL;AACHA,kBAAA,MAAA,IAAO;AACPA,kBAAA,QAAA,IAAS;AACTA,kBAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,kBAAA,CAAA,CAAA;AAML,IAAK,8CAAAC,+BAAL;AACHA,6BAAA,OAAA,IAAQ;AACRA,6BAAA,YAAA,IAAa;AACbA,6BAAA,YAAA,IAAa;AAHL,SAAAA;AAAA,GAAA,6BAAA,CAAA,CAAA;AAML,IAAK,uCAAAC,wBAAL;AACHA,sBAAA,WAAA,IAAY;AACZA,sBAAA,WAAA,IAAY;AACZA,sBAAA,aAAA,IAAc;AACdA,sBAAA,YAAA,IAAa;AACbA,sBAAA,WAAA,IAAY;AACZA,sBAAA,gBAAA,IAAiB;AACjBA,sBAAA,aAAA,IAAc;AACdA,sBAAA,YAAA,IAAa;AACbA,sBAAA,gBAAA,IAAiB;AACjBA,sBAAA,kBAAA,IAAmB;AACnBA,sBAAA,kBAAA,IAAmB;AACnBA,sBAAA,WAAA,IAAY;AACZA,sBAAA,cAAA,IAAe;AACfA,sBAAA,YAAA,IAAa;AACbA,sBAAA,OAAA,IAAQ;AACRA,sBAAA,oBAAA,IAAqB;AACrBA,sBAAA,cAAA,IAAe;AACfA,sBAAA,sBAAA,IAAuB;AACvBA,sBAAA,kBAAA,IAAmB;AACnBA,sBAAA,0BAAA,IAA2B;AAC3BA,sBAAA,mBAAA,IAAoB;AACpBA,sBAAA,YAAA,IAAa;AACbA,sBAAA,SAAA,IAAU;AACVA,sBAAA,gBAAA,IAAiB;AACjBA,sBAAA,gBAAA,IAAiB;AACjBA,sBAAA,cAAA,IAAe;AACfA,sBAAA,kBAAA,IAAmB;AACnBA,sBAAA,mBAAA,IAAoB;AACpBA,sBAAA,mBAAA,IAAoB;AA7BZ,SAAAA;AAAA,GAAA,sBAAA,CAAA,CAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VariableTypes.cjs.js","sources":["../../../src/types/VariableTypes.ts"],"sourcesContent":["import { DataModelProperty, Dictionary } from '@chili-studio/connector-types';\nimport { Id, PrivateData } from './CommonTypes';\n\nexport interface ConnectorImageVariableSource {\n connectorId: string;\n /**\n * The requested asset id or name\n */\n assetId: string;\n /**\n * If the connector was able to query, this will contain\n * the actual resolved media Id.\n */\n resolved?: ResolvedMedia;\n\n /**\n * The context of the variable that will be passed to the connector\n */\n context: Dictionary;\n}\n\n/**\n * Image variable query lookup result\n */\nexport interface ResolvedMedia {\n /**\n * The resolved media Id.\n * This id can be used to perform the download call.\n */\n mediaId: string;\n}\n\nexport enum VariableType {\n shortText = 'shortText',\n longText = 'longText',\n richText = 'richText',\n image = 'image',\n list = 'list',\n boolean = 'boolean',\n group = 'group',\n number = 'number',\n date = 'date',\n dataSource = 'dataSource',\n}\n\nexport interface Variable {\n id: string;\n type: VariableType;\n parentId?: string;\n name: string;\n label?: string | null;\n isVisible: boolean;\n visibility: VariableVisibility;\n isReadonly: boolean;\n isRequired: boolean;\n occurrences: number;\n placeholder?: string | null;\n helpText?: string | null;\n privateData: PrivateData;\n}\n\nexport interface ImageVariable extends Variable {\n value?: ConnectorImageVariableSource;\n allowQuery: boolean;\n allowUpload: boolean;\n uploadMinHeight?: number | null;\n uploadMinWidth?: number | null;\n}\n\nexport interface ListVariableItem {\n value: string;\n displayValue?: string;\n}\n\nexport interface ListVariable extends Variable {\n items: string[];\n selected?: string;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface BooleanVariable extends Variable {\n value: boolean;\n}\n\nexport interface ShortTextVariable extends Variable {\n value: string;\n removeParagraphIfEmpty: boolean;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n isDontBreak: boolean;\n maxCharacters?: number;\n}\n\nexport interface NumberVariable extends Variable {\n value: number;\n numberOfDecimals: number;\n decimalCharacterStyleId?: string;\n decimalSeparator: string;\n thousandsSeparator: string;\n minValue?: number;\n maxValue?: number;\n showStepper: boolean;\n stepSize: number;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface DateVariable extends Variable {\n value?: string;\n removeParagraphIfEmpty: boolean;\n displayFormat: string;\n startDate?: DateRestriction;\n endDate?: DateRestriction;\n excludedDays: Day[];\n locale: Locale;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport type LongTextVariable = ShortTextVariable;\n\nexport type GroupVariable = Variable;\n\nexport interface DataSourceVariable extends Variable {\n value?: DataSourceVariableSource;\n displayOptions: DataSourceVariableDisplayOptions;\n entryId?: RowId;\n}\n\nexport interface RichTextVariable extends Variable {\n value: null;\n ruleSetId: string;\n}\n\nexport type DateRestriction = RelativeDate | AbsoluteDate;\n\nexport interface ValueWithStyle {\n value?: string;\n style?: string;\n}\n\nexport interface RelativeDate {\n offset: number;\n type: 'relative';\n}\n\nexport interface AbsoluteDate {\n value: string;\n type: 'absolute';\n}\n\nexport enum Day {\n Monday = 'monday',\n Tuesday = 'tuesday',\n Wednesday = 'wednesday',\n Thursday = 'thursday',\n Friday = 'friday',\n Saturday = 'saturday',\n Sunday = 'sunday',\n}\n\nexport enum Locale {\n en_US = 'en_US',\n cs = 'cs',\n da = 'da',\n nl = 'nl',\n fi = 'fi',\n fr = 'fr',\n de = 'de',\n it = 'it',\n no = 'no',\n pl = 'pl',\n pt_PT = 'pt_PT',\n es_ES = 'es_ES',\n sv = 'sv',\n}\n\nexport interface DateVariablePropertiesDeltaUpdate {\n startDate?: {\n value: DateRestriction | null;\n };\n endDate?: {\n value: DateRestriction | null;\n };\n excludedDays?: {\n value: Day[] | null;\n };\n locale?: {\n value: Locale;\n };\n displayFormat?: {\n value: string;\n };\n}\n\nexport interface NumberVariablePropertiesDeltaUpdate {\n minValue?: {\n value: number | null;\n };\n maxValue?: {\n value: number | null;\n };\n showStepper?: {\n value: boolean;\n };\n stepSize?: {\n value: number;\n };\n numberOfDecimals?: {\n value: number;\n };\n decimalCharacterStyleId?: {\n value: string | null;\n };\n decimalSeparator?: {\n value: string;\n };\n thousandsSeparator?: {\n value: string;\n };\n}\n\nexport interface PrefixSuffixDeltaUpdate {\n prefix?: {\n value: string | null;\n };\n suffix?: {\n value: string | null;\n };\n prefixCharacterStyleId?: {\n value: string | null;\n };\n suffixCharacterStyleId?: {\n value: string | null;\n };\n}\n\nexport enum VariableVisibilityType {\n visible = 'visible',\n invisible = 'invisible',\n conditional = 'conditional',\n}\n\nexport enum VariableVisibilityTargetType {\n boolean = 'boolean',\n text = 'text',\n number = 'number',\n}\n\nexport enum VariableVisibilityOperator {\n equals = '=',\n notEquals = '!=',\n greaterThan = '>',\n greaterThanOrEquals = '>=',\n lessThan = '<',\n lessThanOrEquals = '<=',\n}\n\nexport interface VariableVisibilityBase {\n type: VariableVisibilityType;\n}\n\nexport interface VariableVisibilityVisible extends VariableVisibilityBase {\n type: VariableVisibilityType.visible;\n}\n\nexport interface VariableVisibilityInvisible extends VariableVisibilityBase {\n type: VariableVisibilityType.invisible;\n}\n\nexport interface VariableVisibilityConditional extends VariableVisibilityBase {\n type: VariableVisibilityType.conditional;\n layouts: VariableVisibilityLayout[];\n variables: VariableWithValue[];\n}\n\nexport type VariableVisibility =\n | VariableVisibilityVisible\n | VariableVisibilityInvisible\n | VariableVisibilityConditional;\n\nexport interface VariableVisibilityLayout {\n layoutId: string;\n includeChildren: boolean;\n}\n\nexport interface VariableWithValue {\n id: string;\n value: VariableVisibilityConditionValue;\n}\n\nexport interface VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType;\n}\n\nexport interface VariableVisibilityConditionValueBoolean extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.boolean;\n value: boolean;\n}\n\nexport interface VariableVisibilityConditionValueText extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.text;\n value: string;\n operator: VariableVisibilityOperator;\n}\n\nexport interface VariableVisibilityConditionValueNumber extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.number;\n value: number;\n operator: VariableVisibilityOperator;\n}\n\nexport type VariableVisibilityConditionValue =\n | VariableVisibilityConditionValueBoolean\n | VariableVisibilityConditionValueText\n | VariableVisibilityConditionValueNumber;\n\nexport type VariableUsagesReport = {\n pages: Id[];\n frames: Id[];\n actionTrigger: Id[];\n variables: Id[];\n outputDataSource: boolean;\n};\n\n// Data Source Variable Types\n\nexport type RowId = string;\n\nexport enum DataSourceVariableSourceType {\n injected = 'injected',\n connector = 'connector',\n}\n\nexport type InjectedDataSourceVariableSource = {\n type: DataSourceVariableSourceType.injected;\n model: DataModelProperty[];\n itemIdPropertyName: string;\n};\n\nexport type ConnectorDataSourceVariableSource = {\n type: DataSourceVariableSourceType.connector;\n connectorId: string;\n};\n\nexport type DataSourceVariableSource = InjectedDataSourceVariableSource | ConnectorDataSourceVariableSource;\n\nexport enum DataSourceVariableDisplayOptionsType {\n table = 'table',\n list = 'list',\n}\n\nexport interface DataSourceVariableDisplayOptionsTable {\n type: DataSourceVariableDisplayOptionsType.table;\n}\n\nexport interface DataSourceVariableDisplayOptionsList {\n type: DataSourceVariableDisplayOptionsType.list;\n displayColumn: string;\n}\n\nexport type DataSourceVariableDisplayOptions =\n | DataSourceVariableDisplayOptionsTable\n | DataSourceVariableDisplayOptionsList;\n"],"names":["VariableType","Day","Locale","VariableVisibilityType","VariableVisibilityTargetType","VariableVisibilityOperator","DataSourceVariableSourceType","DataSourceVariableDisplayOptionsType"],"mappings":";;AAgCO,IAAK,iCAAAA,kBAAL;AACHA,gBAAA,WAAA,IAAY;AACZA,gBAAA,UAAA,IAAW;AACXA,gBAAA,UAAA,IAAW;AACXA,gBAAA,OAAA,IAAQ;AACRA,gBAAA,MAAA,IAAO;AACPA,gBAAA,SAAA,IAAU;AACVA,gBAAA,OAAA,IAAQ;AACRA,gBAAA,QAAA,IAAS;AACTA,gBAAA,MAAA,IAAO;AACPA,gBAAA,YAAA,IAAa;AAVL,SAAAA;AAAA,GAAA,gBAAA,CAAA,CAAA;AAwHL,IAAK,wBAAAC,SAAL;AACHA,OAAA,QAAA,IAAS;AACTA,OAAA,SAAA,IAAU;AACVA,OAAA,WAAA,IAAY;AACZA,OAAA,UAAA,IAAW;AACXA,OAAA,QAAA,IAAS;AACTA,OAAA,UAAA,IAAW;AACXA,OAAA,QAAA,IAAS;AAPD,SAAAA;AAAA,GAAA,OAAA,CAAA,CAAA;AAUL,IAAK,2BAAAC,YAAL;AACHA,UAAA,OAAA,IAAQ;AACRA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,OAAA,IAAQ;AACRA,UAAA,OAAA,IAAQ;AACRA,UAAA,IAAA,IAAK;AAbG,SAAAA;AAAA,GAAA,UAAA,CAAA,CAAA;AA4EL,IAAK,2CAAAC,4BAAL;AACHA,0BAAA,SAAA,IAAU;AACVA,0BAAA,WAAA,IAAY;AACZA,0BAAA,aAAA,IAAc;AAHN,SAAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;AAML,IAAK,iDAAAC,kCAAL;AACHA,gCAAA,SAAA,IAAU;AACVA,gCAAA,MAAA,IAAO;AACPA,gCAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,gCAAA,CAAA,CAAA;AAML,IAAK,+CAAAC,gCAAL;AACHA,8BAAA,QAAA,IAAS;AACTA,8BAAA,WAAA,IAAY;AACZA,8BAAA,aAAA,IAAc;AACdA,8BAAA,qBAAA,IAAsB;AACtBA,8BAAA,UAAA,IAAW;AACXA,8BAAA,kBAAA,IAAmB;AANX,SAAAA;AAAA,GAAA,8BAAA,CAAA,CAAA;AAgFL,IAAK,iDAAAC,kCAAL;AACHA,gCAAA,UAAA,IAAW;AACXA,gCAAA,WAAA,IAAY;AAFJ,SAAAA;AAAA,GAAA,gCAAA,CAAA,CAAA;AAkBL,IAAK,yDAAAC,0CAAL;AACHA,wCAAA,OAAA,IAAQ;AACRA,wCAAA,MAAA,IAAO;AAFC,SAAAA;AAAA,GAAA,wCAAA,CAAA,CAAA;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"VariableTypes.cjs.js","sources":["../../../src/types/VariableTypes.ts"],"sourcesContent":["import { DataModelProperty, Dictionary } from '@chili-studio/connector-types';\nimport { Id, PrivateData } from './CommonTypes';\n\nexport interface ConnectorImageVariableSource {\n connectorId: string;\n /**\n * The requested asset id or name\n */\n assetId: string;\n /**\n * If the connector was able to query, this will contain\n * the actual resolved media Id.\n */\n resolved?: ResolvedMedia;\n\n /**\n * The context of the variable that will be passed to the connector\n */\n context: Dictionary;\n}\n\n/**\n * Image variable query lookup result\n */\nexport interface ResolvedMedia {\n /**\n * The resolved media Id.\n * This id can be used to perform the download call.\n */\n mediaId: string;\n}\n\nexport enum VariableType {\n shortText = 'shortText',\n longText = 'longText',\n richText = 'richText',\n image = 'image',\n list = 'list',\n boolean = 'boolean',\n group = 'group',\n number = 'number',\n date = 'date',\n dataSource = 'dataSource',\n}\n\nexport interface Variable {\n id: string;\n type: VariableType;\n parentId?: string;\n name: string;\n label?: string | null;\n isVisible: boolean;\n visibility: VariableVisibility;\n isReadonly: boolean;\n isRequired: boolean;\n occurrences: number;\n placeholder?: string | null;\n helpText?: string | null;\n privateData: PrivateData;\n}\n\nexport interface ImageVariable extends Variable {\n value?: ConnectorImageVariableSource;\n allowQuery: boolean;\n allowUpload: boolean;\n uploadMinHeight?: number | null;\n uploadMinWidth?: number | null;\n}\n\nexport interface ListVariableItem {\n value: string;\n displayValue?: string;\n}\n\nexport interface ListVariable extends Variable {\n items: string[];\n selected?: string;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface BooleanVariable extends Variable {\n value: boolean;\n}\n\nexport interface ShortTextVariable extends Variable {\n value: string;\n removeParagraphIfEmpty: boolean;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n isDontBreak: boolean;\n maxCharacters?: number;\n}\n\nexport interface NumberVariable extends Variable {\n value: number;\n numberOfDecimals: number;\n decimalCharacterStyleId?: string;\n decimalSeparator: string;\n thousandsSeparator: string;\n minValue?: number;\n maxValue?: number;\n showStepper: boolean;\n stepSize: number;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface DateVariable extends Variable {\n value?: string;\n removeParagraphIfEmpty: boolean;\n displayFormat: string;\n startDate?: DateRestriction;\n endDate?: DateRestriction;\n excludedDays: Day[];\n locale: Locale;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport type LongTextVariable = ShortTextVariable;\n\nexport type GroupVariable = Variable;\n\nexport interface DataSourceVariable extends Variable {\n value?: DataSourceVariableSource;\n displayOptions: DataSourceVariableDisplayOptions;\n entryId?: RowId;\n}\n\nexport interface RichTextVariable extends Variable {\n value: null;\n ruleSetId: string;\n}\n\nexport type DateRestriction = RelativeDate | AbsoluteDate;\n\nexport interface ValueWithStyle {\n value?: string;\n style?: string;\n}\n\nexport interface RelativeDate {\n offset: number;\n type: 'relative';\n}\n\nexport interface AbsoluteDate {\n value: string;\n type: 'absolute';\n}\n\nexport enum Day {\n Monday = 'monday',\n Tuesday = 'tuesday',\n Wednesday = 'wednesday',\n Thursday = 'thursday',\n Friday = 'friday',\n Saturday = 'saturday',\n Sunday = 'sunday',\n}\n\nexport enum Locale {\n en_US = 'en_US',\n cs = 'cs',\n da = 'da',\n nl = 'nl',\n fi = 'fi',\n fr = 'fr',\n de = 'de',\n it = 'it',\n no = 'no',\n pl = 'pl',\n pt_PT = 'pt_PT',\n es_ES = 'es_ES',\n sv = 'sv',\n}\n\nexport interface DateVariablePropertiesDeltaUpdate {\n startDate?: {\n value: DateRestriction | null;\n };\n endDate?: {\n value: DateRestriction | null;\n };\n excludedDays?: {\n value: Day[] | null;\n };\n locale?: {\n value: Locale;\n };\n displayFormat?: {\n value: string;\n };\n}\n\nexport interface NumberVariablePropertiesDeltaUpdate {\n minValue?: {\n value: number | null;\n };\n maxValue?: {\n value: number | null;\n };\n showStepper?: {\n value: boolean;\n };\n stepSize?: {\n value: number;\n };\n numberOfDecimals?: {\n value: number;\n };\n decimalCharacterStyleId?: {\n value: string | null;\n };\n decimalSeparator?: {\n value: string;\n };\n thousandsSeparator?: {\n value: string;\n };\n}\n\nexport interface PrefixSuffixDeltaUpdate {\n prefix?: {\n value: string | null;\n };\n suffix?: {\n value: string | null;\n };\n prefixCharacterStyleId?: {\n value: string | null;\n };\n suffixCharacterStyleId?: {\n value: string | null;\n };\n}\n\nexport enum VariableVisibilityType {\n visible = 'visible',\n invisible = 'invisible',\n conditional = 'conditional',\n}\n\nexport enum VariableVisibilityTargetType {\n boolean = 'boolean',\n text = 'text',\n number = 'number',\n}\n\nexport enum VariableVisibilityOperator {\n equals = '=',\n notEquals = '!=',\n greaterThan = '>',\n greaterThanOrEquals = '>=',\n lessThan = '<',\n lessThanOrEquals = '<=',\n}\n\nexport interface VariableVisibilityBase {\n type: VariableVisibilityType;\n}\n\nexport interface VariableVisibilityVisible extends VariableVisibilityBase {\n type: VariableVisibilityType.visible;\n}\n\nexport interface VariableVisibilityInvisible extends VariableVisibilityBase {\n type: VariableVisibilityType.invisible;\n}\n\nexport interface VariableVisibilityConditional extends VariableVisibilityBase {\n type: VariableVisibilityType.conditional;\n layouts: VariableVisibilityLayout[];\n variables: VariableWithValue[];\n}\n\nexport type VariableVisibility =\n VariableVisibilityVisible | VariableVisibilityInvisible | VariableVisibilityConditional;\n\nexport interface VariableVisibilityLayout {\n layoutId: string;\n includeChildren: boolean;\n}\n\nexport interface VariableWithValue {\n id: string;\n value: VariableVisibilityConditionValue;\n}\n\nexport interface VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType;\n}\n\nexport interface VariableVisibilityConditionValueBoolean extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.boolean;\n value: boolean;\n}\n\nexport interface VariableVisibilityConditionValueText extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.text;\n value: string;\n operator: VariableVisibilityOperator;\n}\n\nexport interface VariableVisibilityConditionValueNumber extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.number;\n value: number;\n operator: VariableVisibilityOperator;\n}\n\nexport type VariableVisibilityConditionValue =\n | VariableVisibilityConditionValueBoolean\n | VariableVisibilityConditionValueText\n | VariableVisibilityConditionValueNumber;\n\nexport type VariableUsagesReport = {\n pages: Id[];\n frames: Id[];\n actionTrigger: Id[];\n variables: Id[];\n outputDataSource: boolean;\n};\n\n// Data Source Variable Types\n\nexport type RowId = string;\n\nexport enum DataSourceVariableSourceType {\n injected = 'injected',\n connector = 'connector',\n}\n\nexport type InjectedDataSourceVariableSource = {\n type: DataSourceVariableSourceType.injected;\n model: DataModelProperty[];\n itemIdPropertyName: string;\n};\n\nexport type ConnectorDataSourceVariableSource = {\n type: DataSourceVariableSourceType.connector;\n connectorId: string;\n};\n\nexport type DataSourceVariableSource = InjectedDataSourceVariableSource | ConnectorDataSourceVariableSource;\n\nexport enum DataSourceVariableDisplayOptionsType {\n table = 'table',\n list = 'list',\n}\n\nexport interface DataSourceVariableDisplayOptionsTable {\n type: DataSourceVariableDisplayOptionsType.table;\n}\n\nexport interface DataSourceVariableDisplayOptionsList {\n type: DataSourceVariableDisplayOptionsType.list;\n displayColumn: string;\n}\n\nexport type DataSourceVariableDisplayOptions =\n DataSourceVariableDisplayOptionsTable | DataSourceVariableDisplayOptionsList;\n"],"names":["VariableType","Day","Locale","VariableVisibilityType","VariableVisibilityTargetType","VariableVisibilityOperator","DataSourceVariableSourceType","DataSourceVariableDisplayOptionsType"],"mappings":";;AAgCO,IAAK,iCAAAA,kBAAL;AACHA,gBAAA,WAAA,IAAY;AACZA,gBAAA,UAAA,IAAW;AACXA,gBAAA,UAAA,IAAW;AACXA,gBAAA,OAAA,IAAQ;AACRA,gBAAA,MAAA,IAAO;AACPA,gBAAA,SAAA,IAAU;AACVA,gBAAA,OAAA,IAAQ;AACRA,gBAAA,QAAA,IAAS;AACTA,gBAAA,MAAA,IAAO;AACPA,gBAAA,YAAA,IAAa;AAVL,SAAAA;AAAA,GAAA,gBAAA,CAAA,CAAA;AAwHL,IAAK,wBAAAC,SAAL;AACHA,OAAA,QAAA,IAAS;AACTA,OAAA,SAAA,IAAU;AACVA,OAAA,WAAA,IAAY;AACZA,OAAA,UAAA,IAAW;AACXA,OAAA,QAAA,IAAS;AACTA,OAAA,UAAA,IAAW;AACXA,OAAA,QAAA,IAAS;AAPD,SAAAA;AAAA,GAAA,OAAA,CAAA,CAAA;AAUL,IAAK,2BAAAC,YAAL;AACHA,UAAA,OAAA,IAAQ;AACRA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,OAAA,IAAQ;AACRA,UAAA,OAAA,IAAQ;AACRA,UAAA,IAAA,IAAK;AAbG,SAAAA;AAAA,GAAA,UAAA,CAAA,CAAA;AA4EL,IAAK,2CAAAC,4BAAL;AACHA,0BAAA,SAAA,IAAU;AACVA,0BAAA,WAAA,IAAY;AACZA,0BAAA,aAAA,IAAc;AAHN,SAAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;AAML,IAAK,iDAAAC,kCAAL;AACHA,gCAAA,SAAA,IAAU;AACVA,gCAAA,MAAA,IAAO;AACPA,gCAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,gCAAA,CAAA,CAAA;AAML,IAAK,+CAAAC,gCAAL;AACHA,8BAAA,QAAA,IAAS;AACTA,8BAAA,WAAA,IAAY;AACZA,8BAAA,aAAA,IAAc;AACdA,8BAAA,qBAAA,IAAsB;AACtBA,8BAAA,UAAA,IAAW;AACXA,8BAAA,kBAAA,IAAmB;AANX,SAAAA;AAAA,GAAA,8BAAA,CAAA,CAAA;AA8EL,IAAK,iDAAAC,kCAAL;AACHA,gCAAA,UAAA,IAAW;AACXA,gCAAA,WAAA,IAAY;AAFJ,SAAAA;AAAA,GAAA,gCAAA,CAAA,CAAA;AAkBL,IAAK,yDAAAC,0CAAL;AACHA,wCAAA,OAAA,IAAQ;AACRA,wCAAA,MAAA,IAAO;AAFC,SAAAA;AAAA,GAAA,wCAAA,CAAA,CAAA;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VariableTypes.es.js","sources":["../../../src/types/VariableTypes.ts"],"sourcesContent":["import { DataModelProperty, Dictionary } from '@chili-studio/connector-types';\nimport { Id, PrivateData } from './CommonTypes';\n\nexport interface ConnectorImageVariableSource {\n connectorId: string;\n /**\n * The requested asset id or name\n */\n assetId: string;\n /**\n * If the connector was able to query, this will contain\n * the actual resolved media Id.\n */\n resolved?: ResolvedMedia;\n\n /**\n * The context of the variable that will be passed to the connector\n */\n context: Dictionary;\n}\n\n/**\n * Image variable query lookup result\n */\nexport interface ResolvedMedia {\n /**\n * The resolved media Id.\n * This id can be used to perform the download call.\n */\n mediaId: string;\n}\n\nexport enum VariableType {\n shortText = 'shortText',\n longText = 'longText',\n richText = 'richText',\n image = 'image',\n list = 'list',\n boolean = 'boolean',\n group = 'group',\n number = 'number',\n date = 'date',\n dataSource = 'dataSource',\n}\n\nexport interface Variable {\n id: string;\n type: VariableType;\n parentId?: string;\n name: string;\n label?: string | null;\n isVisible: boolean;\n visibility: VariableVisibility;\n isReadonly: boolean;\n isRequired: boolean;\n occurrences: number;\n placeholder?: string | null;\n helpText?: string | null;\n privateData: PrivateData;\n}\n\nexport interface ImageVariable extends Variable {\n value?: ConnectorImageVariableSource;\n allowQuery: boolean;\n allowUpload: boolean;\n uploadMinHeight?: number | null;\n uploadMinWidth?: number | null;\n}\n\nexport interface ListVariableItem {\n value: string;\n displayValue?: string;\n}\n\nexport interface ListVariable extends Variable {\n items: string[];\n selected?: string;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface BooleanVariable extends Variable {\n value: boolean;\n}\n\nexport interface ShortTextVariable extends Variable {\n value: string;\n removeParagraphIfEmpty: boolean;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n isDontBreak: boolean;\n maxCharacters?: number;\n}\n\nexport interface NumberVariable extends Variable {\n value: number;\n numberOfDecimals: number;\n decimalCharacterStyleId?: string;\n decimalSeparator: string;\n thousandsSeparator: string;\n minValue?: number;\n maxValue?: number;\n showStepper: boolean;\n stepSize: number;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface DateVariable extends Variable {\n value?: string;\n removeParagraphIfEmpty: boolean;\n displayFormat: string;\n startDate?: DateRestriction;\n endDate?: DateRestriction;\n excludedDays: Day[];\n locale: Locale;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport type LongTextVariable = ShortTextVariable;\n\nexport type GroupVariable = Variable;\n\nexport interface DataSourceVariable extends Variable {\n value?: DataSourceVariableSource;\n displayOptions: DataSourceVariableDisplayOptions;\n entryId?: RowId;\n}\n\nexport interface RichTextVariable extends Variable {\n value: null;\n ruleSetId: string;\n}\n\nexport type DateRestriction = RelativeDate | AbsoluteDate;\n\nexport interface ValueWithStyle {\n value?: string;\n style?: string;\n}\n\nexport interface RelativeDate {\n offset: number;\n type: 'relative';\n}\n\nexport interface AbsoluteDate {\n value: string;\n type: 'absolute';\n}\n\nexport enum Day {\n Monday = 'monday',\n Tuesday = 'tuesday',\n Wednesday = 'wednesday',\n Thursday = 'thursday',\n Friday = 'friday',\n Saturday = 'saturday',\n Sunday = 'sunday',\n}\n\nexport enum Locale {\n en_US = 'en_US',\n cs = 'cs',\n da = 'da',\n nl = 'nl',\n fi = 'fi',\n fr = 'fr',\n de = 'de',\n it = 'it',\n no = 'no',\n pl = 'pl',\n pt_PT = 'pt_PT',\n es_ES = 'es_ES',\n sv = 'sv',\n}\n\nexport interface DateVariablePropertiesDeltaUpdate {\n startDate?: {\n value: DateRestriction | null;\n };\n endDate?: {\n value: DateRestriction | null;\n };\n excludedDays?: {\n value: Day[] | null;\n };\n locale?: {\n value: Locale;\n };\n displayFormat?: {\n value: string;\n };\n}\n\nexport interface NumberVariablePropertiesDeltaUpdate {\n minValue?: {\n value: number | null;\n };\n maxValue?: {\n value: number | null;\n };\n showStepper?: {\n value: boolean;\n };\n stepSize?: {\n value: number;\n };\n numberOfDecimals?: {\n value: number;\n };\n decimalCharacterStyleId?: {\n value: string | null;\n };\n decimalSeparator?: {\n value: string;\n };\n thousandsSeparator?: {\n value: string;\n };\n}\n\nexport interface PrefixSuffixDeltaUpdate {\n prefix?: {\n value: string | null;\n };\n suffix?: {\n value: string | null;\n };\n prefixCharacterStyleId?: {\n value: string | null;\n };\n suffixCharacterStyleId?: {\n value: string | null;\n };\n}\n\nexport enum VariableVisibilityType {\n visible = 'visible',\n invisible = 'invisible',\n conditional = 'conditional',\n}\n\nexport enum VariableVisibilityTargetType {\n boolean = 'boolean',\n text = 'text',\n number = 'number',\n}\n\nexport enum VariableVisibilityOperator {\n equals = '=',\n notEquals = '!=',\n greaterThan = '>',\n greaterThanOrEquals = '>=',\n lessThan = '<',\n lessThanOrEquals = '<=',\n}\n\nexport interface VariableVisibilityBase {\n type: VariableVisibilityType;\n}\n\nexport interface VariableVisibilityVisible extends VariableVisibilityBase {\n type: VariableVisibilityType.visible;\n}\n\nexport interface VariableVisibilityInvisible extends VariableVisibilityBase {\n type: VariableVisibilityType.invisible;\n}\n\nexport interface VariableVisibilityConditional extends VariableVisibilityBase {\n type: VariableVisibilityType.conditional;\n layouts: VariableVisibilityLayout[];\n variables: VariableWithValue[];\n}\n\nexport type VariableVisibility =\n | VariableVisibilityVisible\n | VariableVisibilityInvisible\n | VariableVisibilityConditional;\n\nexport interface VariableVisibilityLayout {\n layoutId: string;\n includeChildren: boolean;\n}\n\nexport interface VariableWithValue {\n id: string;\n value: VariableVisibilityConditionValue;\n}\n\nexport interface VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType;\n}\n\nexport interface VariableVisibilityConditionValueBoolean extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.boolean;\n value: boolean;\n}\n\nexport interface VariableVisibilityConditionValueText extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.text;\n value: string;\n operator: VariableVisibilityOperator;\n}\n\nexport interface VariableVisibilityConditionValueNumber extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.number;\n value: number;\n operator: VariableVisibilityOperator;\n}\n\nexport type VariableVisibilityConditionValue =\n | VariableVisibilityConditionValueBoolean\n | VariableVisibilityConditionValueText\n | VariableVisibilityConditionValueNumber;\n\nexport type VariableUsagesReport = {\n pages: Id[];\n frames: Id[];\n actionTrigger: Id[];\n variables: Id[];\n outputDataSource: boolean;\n};\n\n// Data Source Variable Types\n\nexport type RowId = string;\n\nexport enum DataSourceVariableSourceType {\n injected = 'injected',\n connector = 'connector',\n}\n\nexport type InjectedDataSourceVariableSource = {\n type: DataSourceVariableSourceType.injected;\n model: DataModelProperty[];\n itemIdPropertyName: string;\n};\n\nexport type ConnectorDataSourceVariableSource = {\n type: DataSourceVariableSourceType.connector;\n connectorId: string;\n};\n\nexport type DataSourceVariableSource = InjectedDataSourceVariableSource | ConnectorDataSourceVariableSource;\n\nexport enum DataSourceVariableDisplayOptionsType {\n table = 'table',\n list = 'list',\n}\n\nexport interface DataSourceVariableDisplayOptionsTable {\n type: DataSourceVariableDisplayOptionsType.table;\n}\n\nexport interface DataSourceVariableDisplayOptionsList {\n type: DataSourceVariableDisplayOptionsType.list;\n displayColumn: string;\n}\n\nexport type DataSourceVariableDisplayOptions =\n | DataSourceVariableDisplayOptionsTable\n | DataSourceVariableDisplayOptionsList;\n"],"names":["VariableType","Day","Locale","VariableVisibilityType","VariableVisibilityTargetType","VariableVisibilityOperator","DataSourceVariableSourceType","DataSourceVariableDisplayOptionsType"],"mappings":"AAgCO,IAAK,iCAAAA,kBAAL;AACHA,gBAAA,WAAA,IAAY;AACZA,gBAAA,UAAA,IAAW;AACXA,gBAAA,UAAA,IAAW;AACXA,gBAAA,OAAA,IAAQ;AACRA,gBAAA,MAAA,IAAO;AACPA,gBAAA,SAAA,IAAU;AACVA,gBAAA,OAAA,IAAQ;AACRA,gBAAA,QAAA,IAAS;AACTA,gBAAA,MAAA,IAAO;AACPA,gBAAA,YAAA,IAAa;AAVL,SAAAA;AAAA,GAAA,gBAAA,CAAA,CAAA;AAwHL,IAAK,wBAAAC,SAAL;AACHA,OAAA,QAAA,IAAS;AACTA,OAAA,SAAA,IAAU;AACVA,OAAA,WAAA,IAAY;AACZA,OAAA,UAAA,IAAW;AACXA,OAAA,QAAA,IAAS;AACTA,OAAA,UAAA,IAAW;AACXA,OAAA,QAAA,IAAS;AAPD,SAAAA;AAAA,GAAA,OAAA,CAAA,CAAA;AAUL,IAAK,2BAAAC,YAAL;AACHA,UAAA,OAAA,IAAQ;AACRA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,OAAA,IAAQ;AACRA,UAAA,OAAA,IAAQ;AACRA,UAAA,IAAA,IAAK;AAbG,SAAAA;AAAA,GAAA,UAAA,CAAA,CAAA;AA4EL,IAAK,2CAAAC,4BAAL;AACHA,0BAAA,SAAA,IAAU;AACVA,0BAAA,WAAA,IAAY;AACZA,0BAAA,aAAA,IAAc;AAHN,SAAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;AAML,IAAK,iDAAAC,kCAAL;AACHA,gCAAA,SAAA,IAAU;AACVA,gCAAA,MAAA,IAAO;AACPA,gCAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,gCAAA,CAAA,CAAA;AAML,IAAK,+CAAAC,gCAAL;AACHA,8BAAA,QAAA,IAAS;AACTA,8BAAA,WAAA,IAAY;AACZA,8BAAA,aAAA,IAAc;AACdA,8BAAA,qBAAA,IAAsB;AACtBA,8BAAA,UAAA,IAAW;AACXA,8BAAA,kBAAA,IAAmB;AANX,SAAAA;AAAA,GAAA,8BAAA,CAAA,CAAA;AAgFL,IAAK,iDAAAC,kCAAL;AACHA,gCAAA,UAAA,IAAW;AACXA,gCAAA,WAAA,IAAY;AAFJ,SAAAA;AAAA,GAAA,gCAAA,CAAA,CAAA;AAkBL,IAAK,yDAAAC,0CAAL;AACHA,wCAAA,OAAA,IAAQ;AACRA,wCAAA,MAAA,IAAO;AAFC,SAAAA;AAAA,GAAA,wCAAA,CAAA,CAAA;"}
|
|
1
|
+
{"version":3,"file":"VariableTypes.es.js","sources":["../../../src/types/VariableTypes.ts"],"sourcesContent":["import { DataModelProperty, Dictionary } from '@chili-studio/connector-types';\nimport { Id, PrivateData } from './CommonTypes';\n\nexport interface ConnectorImageVariableSource {\n connectorId: string;\n /**\n * The requested asset id or name\n */\n assetId: string;\n /**\n * If the connector was able to query, this will contain\n * the actual resolved media Id.\n */\n resolved?: ResolvedMedia;\n\n /**\n * The context of the variable that will be passed to the connector\n */\n context: Dictionary;\n}\n\n/**\n * Image variable query lookup result\n */\nexport interface ResolvedMedia {\n /**\n * The resolved media Id.\n * This id can be used to perform the download call.\n */\n mediaId: string;\n}\n\nexport enum VariableType {\n shortText = 'shortText',\n longText = 'longText',\n richText = 'richText',\n image = 'image',\n list = 'list',\n boolean = 'boolean',\n group = 'group',\n number = 'number',\n date = 'date',\n dataSource = 'dataSource',\n}\n\nexport interface Variable {\n id: string;\n type: VariableType;\n parentId?: string;\n name: string;\n label?: string | null;\n isVisible: boolean;\n visibility: VariableVisibility;\n isReadonly: boolean;\n isRequired: boolean;\n occurrences: number;\n placeholder?: string | null;\n helpText?: string | null;\n privateData: PrivateData;\n}\n\nexport interface ImageVariable extends Variable {\n value?: ConnectorImageVariableSource;\n allowQuery: boolean;\n allowUpload: boolean;\n uploadMinHeight?: number | null;\n uploadMinWidth?: number | null;\n}\n\nexport interface ListVariableItem {\n value: string;\n displayValue?: string;\n}\n\nexport interface ListVariable extends Variable {\n items: string[];\n selected?: string;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface BooleanVariable extends Variable {\n value: boolean;\n}\n\nexport interface ShortTextVariable extends Variable {\n value: string;\n removeParagraphIfEmpty: boolean;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n isDontBreak: boolean;\n maxCharacters?: number;\n}\n\nexport interface NumberVariable extends Variable {\n value: number;\n numberOfDecimals: number;\n decimalCharacterStyleId?: string;\n decimalSeparator: string;\n thousandsSeparator: string;\n minValue?: number;\n maxValue?: number;\n showStepper: boolean;\n stepSize: number;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface DateVariable extends Variable {\n value?: string;\n removeParagraphIfEmpty: boolean;\n displayFormat: string;\n startDate?: DateRestriction;\n endDate?: DateRestriction;\n excludedDays: Day[];\n locale: Locale;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport type LongTextVariable = ShortTextVariable;\n\nexport type GroupVariable = Variable;\n\nexport interface DataSourceVariable extends Variable {\n value?: DataSourceVariableSource;\n displayOptions: DataSourceVariableDisplayOptions;\n entryId?: RowId;\n}\n\nexport interface RichTextVariable extends Variable {\n value: null;\n ruleSetId: string;\n}\n\nexport type DateRestriction = RelativeDate | AbsoluteDate;\n\nexport interface ValueWithStyle {\n value?: string;\n style?: string;\n}\n\nexport interface RelativeDate {\n offset: number;\n type: 'relative';\n}\n\nexport interface AbsoluteDate {\n value: string;\n type: 'absolute';\n}\n\nexport enum Day {\n Monday = 'monday',\n Tuesday = 'tuesday',\n Wednesday = 'wednesday',\n Thursday = 'thursday',\n Friday = 'friday',\n Saturday = 'saturday',\n Sunday = 'sunday',\n}\n\nexport enum Locale {\n en_US = 'en_US',\n cs = 'cs',\n da = 'da',\n nl = 'nl',\n fi = 'fi',\n fr = 'fr',\n de = 'de',\n it = 'it',\n no = 'no',\n pl = 'pl',\n pt_PT = 'pt_PT',\n es_ES = 'es_ES',\n sv = 'sv',\n}\n\nexport interface DateVariablePropertiesDeltaUpdate {\n startDate?: {\n value: DateRestriction | null;\n };\n endDate?: {\n value: DateRestriction | null;\n };\n excludedDays?: {\n value: Day[] | null;\n };\n locale?: {\n value: Locale;\n };\n displayFormat?: {\n value: string;\n };\n}\n\nexport interface NumberVariablePropertiesDeltaUpdate {\n minValue?: {\n value: number | null;\n };\n maxValue?: {\n value: number | null;\n };\n showStepper?: {\n value: boolean;\n };\n stepSize?: {\n value: number;\n };\n numberOfDecimals?: {\n value: number;\n };\n decimalCharacterStyleId?: {\n value: string | null;\n };\n decimalSeparator?: {\n value: string;\n };\n thousandsSeparator?: {\n value: string;\n };\n}\n\nexport interface PrefixSuffixDeltaUpdate {\n prefix?: {\n value: string | null;\n };\n suffix?: {\n value: string | null;\n };\n prefixCharacterStyleId?: {\n value: string | null;\n };\n suffixCharacterStyleId?: {\n value: string | null;\n };\n}\n\nexport enum VariableVisibilityType {\n visible = 'visible',\n invisible = 'invisible',\n conditional = 'conditional',\n}\n\nexport enum VariableVisibilityTargetType {\n boolean = 'boolean',\n text = 'text',\n number = 'number',\n}\n\nexport enum VariableVisibilityOperator {\n equals = '=',\n notEquals = '!=',\n greaterThan = '>',\n greaterThanOrEquals = '>=',\n lessThan = '<',\n lessThanOrEquals = '<=',\n}\n\nexport interface VariableVisibilityBase {\n type: VariableVisibilityType;\n}\n\nexport interface VariableVisibilityVisible extends VariableVisibilityBase {\n type: VariableVisibilityType.visible;\n}\n\nexport interface VariableVisibilityInvisible extends VariableVisibilityBase {\n type: VariableVisibilityType.invisible;\n}\n\nexport interface VariableVisibilityConditional extends VariableVisibilityBase {\n type: VariableVisibilityType.conditional;\n layouts: VariableVisibilityLayout[];\n variables: VariableWithValue[];\n}\n\nexport type VariableVisibility =\n VariableVisibilityVisible | VariableVisibilityInvisible | VariableVisibilityConditional;\n\nexport interface VariableVisibilityLayout {\n layoutId: string;\n includeChildren: boolean;\n}\n\nexport interface VariableWithValue {\n id: string;\n value: VariableVisibilityConditionValue;\n}\n\nexport interface VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType;\n}\n\nexport interface VariableVisibilityConditionValueBoolean extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.boolean;\n value: boolean;\n}\n\nexport interface VariableVisibilityConditionValueText extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.text;\n value: string;\n operator: VariableVisibilityOperator;\n}\n\nexport interface VariableVisibilityConditionValueNumber extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.number;\n value: number;\n operator: VariableVisibilityOperator;\n}\n\nexport type VariableVisibilityConditionValue =\n | VariableVisibilityConditionValueBoolean\n | VariableVisibilityConditionValueText\n | VariableVisibilityConditionValueNumber;\n\nexport type VariableUsagesReport = {\n pages: Id[];\n frames: Id[];\n actionTrigger: Id[];\n variables: Id[];\n outputDataSource: boolean;\n};\n\n// Data Source Variable Types\n\nexport type RowId = string;\n\nexport enum DataSourceVariableSourceType {\n injected = 'injected',\n connector = 'connector',\n}\n\nexport type InjectedDataSourceVariableSource = {\n type: DataSourceVariableSourceType.injected;\n model: DataModelProperty[];\n itemIdPropertyName: string;\n};\n\nexport type ConnectorDataSourceVariableSource = {\n type: DataSourceVariableSourceType.connector;\n connectorId: string;\n};\n\nexport type DataSourceVariableSource = InjectedDataSourceVariableSource | ConnectorDataSourceVariableSource;\n\nexport enum DataSourceVariableDisplayOptionsType {\n table = 'table',\n list = 'list',\n}\n\nexport interface DataSourceVariableDisplayOptionsTable {\n type: DataSourceVariableDisplayOptionsType.table;\n}\n\nexport interface DataSourceVariableDisplayOptionsList {\n type: DataSourceVariableDisplayOptionsType.list;\n displayColumn: string;\n}\n\nexport type DataSourceVariableDisplayOptions =\n DataSourceVariableDisplayOptionsTable | DataSourceVariableDisplayOptionsList;\n"],"names":["VariableType","Day","Locale","VariableVisibilityType","VariableVisibilityTargetType","VariableVisibilityOperator","DataSourceVariableSourceType","DataSourceVariableDisplayOptionsType"],"mappings":"AAgCO,IAAK,iCAAAA,kBAAL;AACHA,gBAAA,WAAA,IAAY;AACZA,gBAAA,UAAA,IAAW;AACXA,gBAAA,UAAA,IAAW;AACXA,gBAAA,OAAA,IAAQ;AACRA,gBAAA,MAAA,IAAO;AACPA,gBAAA,SAAA,IAAU;AACVA,gBAAA,OAAA,IAAQ;AACRA,gBAAA,QAAA,IAAS;AACTA,gBAAA,MAAA,IAAO;AACPA,gBAAA,YAAA,IAAa;AAVL,SAAAA;AAAA,GAAA,gBAAA,CAAA,CAAA;AAwHL,IAAK,wBAAAC,SAAL;AACHA,OAAA,QAAA,IAAS;AACTA,OAAA,SAAA,IAAU;AACVA,OAAA,WAAA,IAAY;AACZA,OAAA,UAAA,IAAW;AACXA,OAAA,QAAA,IAAS;AACTA,OAAA,UAAA,IAAW;AACXA,OAAA,QAAA,IAAS;AAPD,SAAAA;AAAA,GAAA,OAAA,CAAA,CAAA;AAUL,IAAK,2BAAAC,YAAL;AACHA,UAAA,OAAA,IAAQ;AACRA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,IAAA,IAAK;AACLA,UAAA,OAAA,IAAQ;AACRA,UAAA,OAAA,IAAQ;AACRA,UAAA,IAAA,IAAK;AAbG,SAAAA;AAAA,GAAA,UAAA,CAAA,CAAA;AA4EL,IAAK,2CAAAC,4BAAL;AACHA,0BAAA,SAAA,IAAU;AACVA,0BAAA,WAAA,IAAY;AACZA,0BAAA,aAAA,IAAc;AAHN,SAAAA;AAAA,GAAA,0BAAA,CAAA,CAAA;AAML,IAAK,iDAAAC,kCAAL;AACHA,gCAAA,SAAA,IAAU;AACVA,gCAAA,MAAA,IAAO;AACPA,gCAAA,QAAA,IAAS;AAHD,SAAAA;AAAA,GAAA,gCAAA,CAAA,CAAA;AAML,IAAK,+CAAAC,gCAAL;AACHA,8BAAA,QAAA,IAAS;AACTA,8BAAA,WAAA,IAAY;AACZA,8BAAA,aAAA,IAAc;AACdA,8BAAA,qBAAA,IAAsB;AACtBA,8BAAA,UAAA,IAAW;AACXA,8BAAA,kBAAA,IAAmB;AANX,SAAAA;AAAA,GAAA,8BAAA,CAAA,CAAA;AA8EL,IAAK,iDAAAC,kCAAL;AACHA,gCAAA,UAAA,IAAW;AACXA,gCAAA,WAAA,IAAY;AAFJ,SAAAA;AAAA,GAAA,gCAAA,CAAA,CAAA;AAkBL,IAAK,yDAAAC,0CAAL;AACHA,wCAAA,OAAA,IAAQ;AACRA,wCAAA,MAAA,IAAO;AAFC,SAAAA;AAAA,GAAA,wCAAA,CAAA,CAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineCallbackHandler.cjs.js","sources":["../../../src/utils/EngineCallbackHandler.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { CallbackErrorBehavior, LoggerFunction } from '../types/CommonTypes';\nimport { EngineEventTrigger } from './EngineEventTrigger';\n\nexport class EngineCallbackHandler<T extends (...args: any[]) => any> extends EngineEventTrigger<T> {\n constructor(private handler: () => T | undefined
|
|
1
|
+
{"version":3,"file":"EngineCallbackHandler.cjs.js","sources":["../../../src/utils/EngineCallbackHandler.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { CallbackErrorBehavior, LoggerFunction } from '../types/CommonTypes';\nimport { EngineEventTrigger } from './EngineEventTrigger';\n\nexport class EngineCallbackHandler<T extends (...args: any[]) => any> extends EngineEventTrigger<T> {\n constructor(\n private handler: () => T | undefined,\n logger?: LoggerFunction,\n ) {\n super(logger);\n }\n /**\n * Executes the defined handler with the provided arguments.\n *\n * @param args The arguments to pass to the callbacks.\n * @returns The result of executing the callbacks.\n */\n trigger(...args: Parameters<T>): ReturnType<T> {\n const handler = this.handler();\n if (handler) {\n return this.createEventHandlerFn(handler, CallbackErrorBehavior.throw)(...args);\n }\n return undefined as ReturnType<T>;\n }\n}\n"],"names":["EngineEventTrigger","CallbackErrorBehavior"],"mappings":";;;;AAIO,MAAM,8BAAiEA,mBAAAA,mBAAsB;AAAA,EAChG,YACY,SACR,QACF;AACE,UAAM,MAAM;AAHJ,SAAA,UAAA;AAAA,EAIZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,WAAW,MAAoC;AAC3C,UAAM,UAAU,KAAK,QAAA;AACrB,QAAI,SAAS;AACT,aAAO,KAAK,qBAAqB,SAASC,YAAAA,sBAAsB,KAAK,EAAE,GAAG,IAAI;AAAA,IAClF;AACA,WAAO;AAAA,EACX;AACJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineCallbackHandler.es.js","sources":["../../../src/utils/EngineCallbackHandler.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { CallbackErrorBehavior, LoggerFunction } from '../types/CommonTypes';\nimport { EngineEventTrigger } from './EngineEventTrigger';\n\nexport class EngineCallbackHandler<T extends (...args: any[]) => any> extends EngineEventTrigger<T> {\n constructor(private handler: () => T | undefined
|
|
1
|
+
{"version":3,"file":"EngineCallbackHandler.es.js","sources":["../../../src/utils/EngineCallbackHandler.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { CallbackErrorBehavior, LoggerFunction } from '../types/CommonTypes';\nimport { EngineEventTrigger } from './EngineEventTrigger';\n\nexport class EngineCallbackHandler<T extends (...args: any[]) => any> extends EngineEventTrigger<T> {\n constructor(\n private handler: () => T | undefined,\n logger?: LoggerFunction,\n ) {\n super(logger);\n }\n /**\n * Executes the defined handler with the provided arguments.\n *\n * @param args The arguments to pass to the callbacks.\n * @returns The result of executing the callbacks.\n */\n trigger(...args: Parameters<T>): ReturnType<T> {\n const handler = this.handler();\n if (handler) {\n return this.createEventHandlerFn(handler, CallbackErrorBehavior.throw)(...args);\n }\n return undefined as ReturnType<T>;\n }\n}\n"],"names":[],"mappings":";;AAIO,MAAM,8BAAiE,mBAAsB;AAAA,EAChG,YACY,SACR,QACF;AACE,UAAM,MAAM;AAHJ,SAAA,UAAA;AAAA,EAIZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,WAAW,MAAoC;AAC3C,UAAM,UAAU,KAAK,QAAA;AACrB,QAAI,SAAS;AACT,aAAO,KAAK,qBAAqB,SAAS,sBAAsB,KAAK,EAAE,GAAG,IAAI;AAAA,IAClF;AACA,WAAO;AAAA,EACX;AACJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineEvent.cjs.js","sources":["../../../src/utils/EngineEvent.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { CallbackErrorBehavior, LoggerFunction } from '../types/CommonTypes';\nimport { EngineEventTrigger } from './EngineEventTrigger';\n\ninterface Unsubscriber {\n (): void;\n}\n\nexport class EngineEvent<T extends (...args: any[]) => void> extends EngineEventTrigger<T> {\n private subscriptions: Set<T> = new Set();\n\n constructor(private legacyHandler: () => T | undefined
|
|
1
|
+
{"version":3,"file":"EngineEvent.cjs.js","sources":["../../../src/utils/EngineEvent.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { CallbackErrorBehavior, LoggerFunction } from '../types/CommonTypes';\nimport { EngineEventTrigger } from './EngineEventTrigger';\n\ninterface Unsubscriber {\n (): void;\n}\n\nexport class EngineEvent<T extends (...args: any[]) => void> extends EngineEventTrigger<T> {\n private subscriptions: Set<T> = new Set();\n\n constructor(\n private legacyHandler: () => T | undefined,\n logger?: LoggerFunction,\n ) {\n super(logger);\n }\n\n /**\n * Executes the registered callbacks with provided arguments\n *\n * @param args The arguments to pass to the callbacks.\n * @returns The result of executing the callbacks.\n */\n trigger(...args: Parameters<T>): ReturnType<T> {\n const handler = this.legacyHandler();\n if (handler) {\n this.createEventHandlerFn(handler, CallbackErrorBehavior.log)(...args);\n }\n for (const callback of this.subscriptions) {\n callback(...args);\n }\n return undefined as ReturnType<T>;\n }\n\n /**\n * Registers a callback function.\n *\n * @param callback - The callback function to register. This function will be invoked when the event occurs.\n * @param errorBehavior - An optional parameter to define how to handle errors that appear in the callback function.\n * Accepted values are:\n * - \"log\": Logs the error to the console (default behavior)\n * - \"throw\": Throws an error. Keep in mind that throwing of error in one of the callback will prevent calling of others\n * @returns A function to unsubscribe the callback, preventing it from being invoked in the future.\n */\n registerCallback(callback: T, errorBehavior: CallbackErrorBehavior = CallbackErrorBehavior.log): Unsubscriber {\n const callbackFn = this.createEventHandlerFn(callback, errorBehavior);\n this.subscriptions.add(callbackFn);\n\n return () => {\n this.subscriptions.delete(callbackFn);\n };\n }\n}\n"],"names":["EngineEventTrigger","CallbackErrorBehavior"],"mappings":";;;;AAQO,MAAM,oBAAwDA,mBAAAA,mBAAsB;AAAA,EAGvF,YACY,eACR,QACF;AACE,UAAM,MAAM;AAHJ,SAAA,gBAAA;AAHZ,SAAQ,oCAA4B,IAAA;AAAA,EAOpC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,WAAW,MAAoC;AAC3C,UAAM,UAAU,KAAK,cAAA;AACrB,QAAI,SAAS;AACT,WAAK,qBAAqB,SAASC,YAAAA,sBAAsB,GAAG,EAAE,GAAG,IAAI;AAAA,IACzE;AACA,eAAW,YAAY,KAAK,eAAe;AACvC,eAAS,GAAG,IAAI;AAAA,IACpB;AACA,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,iBAAiB,UAAa,gBAAuCA,YAAAA,sBAAsB,KAAmB;AAC1G,UAAM,aAAa,KAAK,qBAAqB,UAAU,aAAa;AACpE,SAAK,cAAc,IAAI,UAAU;AAEjC,WAAO,MAAM;AACT,WAAK,cAAc,OAAO,UAAU;AAAA,IACxC;AAAA,EACJ;AACJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineEvent.es.js","sources":["../../../src/utils/EngineEvent.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { CallbackErrorBehavior, LoggerFunction } from '../types/CommonTypes';\nimport { EngineEventTrigger } from './EngineEventTrigger';\n\ninterface Unsubscriber {\n (): void;\n}\n\nexport class EngineEvent<T extends (...args: any[]) => void> extends EngineEventTrigger<T> {\n private subscriptions: Set<T> = new Set();\n\n constructor(private legacyHandler: () => T | undefined
|
|
1
|
+
{"version":3,"file":"EngineEvent.es.js","sources":["../../../src/utils/EngineEvent.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { CallbackErrorBehavior, LoggerFunction } from '../types/CommonTypes';\nimport { EngineEventTrigger } from './EngineEventTrigger';\n\ninterface Unsubscriber {\n (): void;\n}\n\nexport class EngineEvent<T extends (...args: any[]) => void> extends EngineEventTrigger<T> {\n private subscriptions: Set<T> = new Set();\n\n constructor(\n private legacyHandler: () => T | undefined,\n logger?: LoggerFunction,\n ) {\n super(logger);\n }\n\n /**\n * Executes the registered callbacks with provided arguments\n *\n * @param args The arguments to pass to the callbacks.\n * @returns The result of executing the callbacks.\n */\n trigger(...args: Parameters<T>): ReturnType<T> {\n const handler = this.legacyHandler();\n if (handler) {\n this.createEventHandlerFn(handler, CallbackErrorBehavior.log)(...args);\n }\n for (const callback of this.subscriptions) {\n callback(...args);\n }\n return undefined as ReturnType<T>;\n }\n\n /**\n * Registers a callback function.\n *\n * @param callback - The callback function to register. This function will be invoked when the event occurs.\n * @param errorBehavior - An optional parameter to define how to handle errors that appear in the callback function.\n * Accepted values are:\n * - \"log\": Logs the error to the console (default behavior)\n * - \"throw\": Throws an error. Keep in mind that throwing of error in one of the callback will prevent calling of others\n * @returns A function to unsubscribe the callback, preventing it from being invoked in the future.\n */\n registerCallback(callback: T, errorBehavior: CallbackErrorBehavior = CallbackErrorBehavior.log): Unsubscriber {\n const callbackFn = this.createEventHandlerFn(callback, errorBehavior);\n this.subscriptions.add(callbackFn);\n\n return () => {\n this.subscriptions.delete(callbackFn);\n };\n }\n}\n"],"names":[],"mappings":";;AAQO,MAAM,oBAAwD,mBAAsB;AAAA,EAGvF,YACY,eACR,QACF;AACE,UAAM,MAAM;AAHJ,SAAA,gBAAA;AAHZ,SAAQ,oCAA4B,IAAA;AAAA,EAOpC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,WAAW,MAAoC;AAC3C,UAAM,UAAU,KAAK,cAAA;AACrB,QAAI,SAAS;AACT,WAAK,qBAAqB,SAAS,sBAAsB,GAAG,EAAE,GAAG,IAAI;AAAA,IACzE;AACA,eAAW,YAAY,KAAK,eAAe;AACvC,eAAS,GAAG,IAAI;AAAA,IACpB;AACA,WAAO;AAAA,EACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,iBAAiB,UAAa,gBAAuC,sBAAsB,KAAmB;AAC1G,UAAM,aAAa,KAAK,qBAAqB,UAAU,aAAa;AACpE,SAAK,cAAc,IAAI,UAAU;AAEjC,WAAO,MAAM;AACT,WAAK,cAAc,OAAO,UAAU;AAAA,IACxC;AAAA,EACJ;AACJ;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chili-publish/studio-sdk",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.47.0",
|
|
5
5
|
"description": "The sdk for the chili editor",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -18,32 +18,34 @@
|
|
|
18
18
|
"@babel/preset-env": "^7.14.8",
|
|
19
19
|
"@babel/preset-typescript": "^7.14.5",
|
|
20
20
|
"@babel/runtime": "^7.14.8",
|
|
21
|
-
"
|
|
21
|
+
"@eslint/js": "^9.32.0",
|
|
22
22
|
"@inthepocket/npm-license-scraper": "^2.3.0",
|
|
23
23
|
"@testing-library/jest-dom": "^5.14.1",
|
|
24
24
|
"@types/jest": "^29.5.0",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"eslint": "^
|
|
28
|
-
"eslint-
|
|
29
|
-
"eslint-plugin-import": "^2.
|
|
30
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
31
|
-
"eslint-plugin-prettier": "^
|
|
32
|
-
"
|
|
33
|
-
"jest": "^
|
|
25
|
+
"cross-env": "^7.0.3",
|
|
26
|
+
"eslint": "^9.39.1",
|
|
27
|
+
"eslint-config-prettier": "^9.1.0",
|
|
28
|
+
"eslint-import-resolver-node": "^0.4.0",
|
|
29
|
+
"eslint-plugin-import": "^2.32.0",
|
|
30
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
31
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
32
|
+
"globals": "^15.15.0",
|
|
33
|
+
"jest": "^29.7.0",
|
|
34
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
34
35
|
"jest-junit": "^12.3.0",
|
|
35
|
-
"prettier": "^
|
|
36
|
-
"pretty-quick": "^
|
|
36
|
+
"prettier": "^3.2.5",
|
|
37
|
+
"pretty-quick": "^4.2.2",
|
|
37
38
|
"shx": "^0.3.3",
|
|
38
39
|
"ts-jest": "^29.2.5",
|
|
39
40
|
"typedoc": "^0.27.9",
|
|
40
41
|
"typedoc-plugin-markdown": "^3.13.4",
|
|
41
42
|
"typescript": "^5.7.3",
|
|
43
|
+
"typescript-eslint": "^8.53.1",
|
|
42
44
|
"vite": "^6.1.6",
|
|
43
45
|
"vite-plugin-dts": "^4.5.3"
|
|
44
46
|
},
|
|
45
47
|
"engines": {
|
|
46
|
-
"node": ">=
|
|
48
|
+
"node": ">=22.0.0 <25.0.0"
|
|
47
49
|
},
|
|
48
50
|
"scripts": {
|
|
49
51
|
"clean": "shx rm -rf _bundles lib connector-types",
|
|
@@ -61,11 +63,6 @@
|
|
|
61
63
|
"build-docs-md": "npx typedoc --out ./docs/md",
|
|
62
64
|
"build-docs-html": "npx typedoc --out ./docs/html --readme ./src/README_HTML.md"
|
|
63
65
|
},
|
|
64
|
-
"husky": {
|
|
65
|
-
"hooks": {
|
|
66
|
-
"pre-commit": "npm run format-staged"
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
66
|
"main": "./_bundles/main.js",
|
|
70
67
|
"module": "./lib/src/index.es.js",
|
|
71
68
|
"browser": "./_bundles/main.js",
|
|
@@ -97,4 +94,4 @@
|
|
|
97
94
|
"doc": "docs",
|
|
98
95
|
"lib": "lib"
|
|
99
96
|
}
|
|
100
|
-
}
|
|
97
|
+
}
|