@useinsider/guido 1.0.3-beta.6204034 → 1.0.3-beta.63633cd
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/README.md +3 -147
- package/dist/components/Guido.vue.js +9 -11
- package/dist/components/Guido.vue2.js +74 -77
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +15 -16
- package/dist/components/organisms/header/RightSlot.vue.js +11 -11
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +9 -9
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +17 -30
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +10 -12
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +18 -19
- package/dist/composables/useStripo.js +50 -39
- package/dist/config/migrator/index.js +6 -7
- package/dist/enums/defaults.js +8 -15
- package/dist/enums/onboarding.js +1 -2
- package/dist/extensions/Blocks/Checkbox/extension.js +2 -2
- package/dist/extensions/Blocks/CouponBlock/extension.js +2 -2
- package/dist/extensions/Blocks/Recommendation/block.js +3 -6
- package/dist/extensions/Blocks/Recommendation/control.js +40 -69
- package/dist/extensions/Blocks/Recommendation/extension.js +7 -42
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +22 -107
- package/dist/extensions/Blocks/Recommendation/template.js +200 -0
- package/dist/extensions/Blocks/common-control.js +43 -125
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +100 -307
- package/dist/services/stripoApi.js +1 -1
- package/dist/src/@types/generic.d.ts +0 -34
- package/dist/src/components/Guido.vue.d.ts +0 -1
- package/dist/src/components/organisms/onboarding/NewVersionPopup.vue.d.ts +1 -3
- package/dist/src/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +1 -3
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/enums/onboarding.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -1
- package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -6
- package/dist/src/extensions/Blocks/Recommendation/template.d.ts +6 -0
- package/dist/src/extensions/Blocks/common-control.d.ts +0 -21
- package/dist/src/stores/config.d.ts +0 -41
- package/dist/src/utils/dateUtil.d.ts +0 -21
- package/dist/static/styles/components/narrow-panel.css.js +0 -10
- package/dist/static/styles/customEditorStyle.css.js +0 -5
- package/dist/utils/dateUtil.js +3 -24
- package/package.json +2 -3
- package/dist/composables/useBlocksConfig.js +0 -49
- package/dist/config/migrator/recommendationMigrator.js +0 -293
- package/dist/enums/date.js +0 -6
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -103
- package/dist/extensions/Blocks/Recommendation/constants.js +0 -5
- package/dist/extensions/Blocks/Recommendation/controls/button/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/border.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/text.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/image/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/name/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/align.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/background.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/color.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/size.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/price/style.js +0 -13
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -160
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -152
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -180
- package/dist/src/composables/useBlocksConfig.d.ts +0 -11
- package/dist/src/config/migrator/recommendationMigrator.d.ts +0 -1
- package/dist/src/enums/date.d.ts +0 -4
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +0 -28
- package/dist/src/extensions/Blocks/Recommendation/constants.d.ts +0 -51
- package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +0 -5
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/migrationTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -44
- package/dist/src/utils/sentry.d.ts +0 -28
- package/dist/utils/sentry.js +0 -168
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode, TextBlockBackgroundBuiltInControl } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
export declare class NameBackgroundControl extends TextBlockBackgroundBuiltInControl {
|
|
3
|
-
getId(): string;
|
|
4
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
5
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode, TextBlockBackgroundBuiltInControl } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
export declare class OldPriceBackgroundControl extends TextBlockBackgroundBuiltInControl {
|
|
3
|
-
getId(): string;
|
|
4
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
5
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode, TextFontFamilyBuiltInControl } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
export declare class OldPriceFontFamilyControl extends TextFontFamilyBuiltInControl {
|
|
3
|
-
getId(): string;
|
|
4
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
5
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ImmutableHtmlNode, TextBlockBackgroundBuiltInControl } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
export declare class PriceBackgroundControl extends TextBlockBackgroundBuiltInControl {
|
|
3
|
-
getId(): string;
|
|
4
|
-
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
5
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
2
|
-
import { DEFAULTS, getDefaultProducts, DEFAULT_CARD_COMPOSITION } from './templateUtils';
|
|
3
|
-
declare const blockTemplate = "\n <td align=\"left\" class=\"ins-recommendation-v3-block-v2 esd-block-recommendation-v3-block es-p20\">\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td align=\"center\">\n <table\n class=\"container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n <td>\n <table\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <BLOCK_TEXT\n class=\"es-p10t es-p10b es-p20l es-p20r\"\n align=\"center\">\n <p path=\"1\" style=\"font-size: 28px; color: #333333;\">\n <strong path=\"1,0\">{-{-TITLE-}-}</strong>\n </p>\n </BLOCK_TEXT>\n </tbody>\n </table>\n </td>\n </tr>\n \n <tr>\n <td class=\"spacer\" style=\"height: 20px;\"></td>\n </tr>\n\n <tr>\n <td>\n <table\n class=\"ins-recommendation-product-container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\"\n >\n {-{-PRODUCT_ROWS-}-}\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </table>\n </td>\n";
|
|
4
|
-
export declare function getDefaultTemplate(): string;
|
|
5
|
-
/**
|
|
6
|
-
* Generates a custom template with specified products and layout
|
|
7
|
-
* @param products - Array of products to display
|
|
8
|
-
* @param productsPerRow - Number of products per row
|
|
9
|
-
* @param title - Optional title for the block
|
|
10
|
-
* @param composition - Optional array defining order of card elements
|
|
11
|
-
* @returns Complete HTML template
|
|
12
|
-
*/
|
|
13
|
-
export declare function generateBlockTemplate(products: RecommendationProduct[], productsPerRow: number, title?: string, composition?: string[]): string;
|
|
14
|
-
export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, composition?: string[]): string;
|
|
15
|
-
export { DEFAULTS, DEFAULT_CARD_COMPOSITION, getDefaultProducts, };
|
|
16
|
-
export default blockTemplate;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
2
|
-
import { DEFAULTS, getDefaultProducts } from './templateUtils';
|
|
3
|
-
declare const migrationTemplate = "\n <td\n align=\"left\"\n esd-extension-block-id=\"recommendation-block\"\n esd-handler-name=\"esd-extension-RecommendationBlock\"\n class=\"ins-recommendation-v3-block-v2 esd-block-recommendation-v3-block esd-extension-block es-p20\"\n >\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td align=\"center\">\n <table\n class=\"container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n <td>\n <table\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\">\n <tbody>\n <tr>\n {-{-TITLE-}-}\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td class=\"spacer\" style=\"height: 20px;\"></td>\n </tr>\n <tr>\n <td>\n <table\n class=\"ins-recommendation-product-container\"\n width=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\"\n >\n {-{-PRODUCT_ROWS-}-}\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </table>\n </td>\n";
|
|
4
|
-
export declare function getMigrationTemplate(): string;
|
|
5
|
-
/**
|
|
6
|
-
* Generates a custom migration template with specified products and layout
|
|
7
|
-
* @param products - Array of products to display
|
|
8
|
-
* @param productsPerRow - Number of products per row
|
|
9
|
-
* @param title - Optional title for the block
|
|
10
|
-
* @param composition - Optional array defining order of card elements
|
|
11
|
-
* @returns Complete HTML template
|
|
12
|
-
*/
|
|
13
|
-
export declare function generateMigrationTemplate(products: RecommendationProduct[], productsPerRow: number, title?: string, composition?: string[]): string;
|
|
14
|
-
export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, composition?: string[]): string;
|
|
15
|
-
export { DEFAULTS, getDefaultProducts };
|
|
16
|
-
export default migrationTemplate;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
2
|
-
export interface ElementRenderer {
|
|
3
|
-
productImage: (product: RecommendationProduct) => string;
|
|
4
|
-
productName: (product: RecommendationProduct) => string;
|
|
5
|
-
productPrice: (product: RecommendationProduct) => string;
|
|
6
|
-
productOldPrice: (product: RecommendationProduct) => string;
|
|
7
|
-
productButton: (product: RecommendationProduct) => string;
|
|
8
|
-
}
|
|
9
|
-
export interface TemplateConfig {
|
|
10
|
-
spacer: string;
|
|
11
|
-
blockTemplate: string;
|
|
12
|
-
productRow: string;
|
|
13
|
-
productCardWrapper: string;
|
|
14
|
-
elementRenderer: ElementRenderer;
|
|
15
|
-
}
|
|
16
|
-
export declare const DEFAULTS: {
|
|
17
|
-
TITLE: string;
|
|
18
|
-
DESCRIPTION: string;
|
|
19
|
-
};
|
|
20
|
-
export declare const spacer = "\n <tr>\n <td class=\"spacer\" style=\"height: 20px;\"></td>\n </tr>\n";
|
|
21
|
-
export declare const productRow = "\n <tr>\n <td>\n <table width=\"100%\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n {-{-PRODUCTS-}-}\n </table>\n </td>\n </tr>\n";
|
|
22
|
-
export declare const productCardWrapper = "\n <td width=\"{-{-COLUMN_WIDTH-}-}\" style=\"padding: 0 5px;\" valign=\"top\" height=\"100%\">\n <table\n width=\"100%\"\n height=\"100%\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n border=\"0\"\n class=\"product-card-wrapper\">\n <tr>\n <td\n class=\"product-attribute-cell\"\n valign=\"top\">\n <table cellpadding=\"0\" cellspacing=\"0\" role=\"presentation\" width=\"100%\">\n <tbody>\n {-{-PRODUCT_CONTENT-}-}\n </tbody>\n </table>\n </td>\n </tr>\n </table>\n </td>\n";
|
|
23
|
-
export declare const DEFAULT_CARD_COMPOSITION: string[];
|
|
24
|
-
export declare function getDefaultProducts(): RecommendationProduct[];
|
|
25
|
-
/**
|
|
26
|
-
* Core template generation logic that works with any element renderer
|
|
27
|
-
* @param products - Array of products to display
|
|
28
|
-
* @param productsPerRow - Number of products per row
|
|
29
|
-
* @param elementRenderer - Object with methods to render each product element
|
|
30
|
-
* @param composition - Optional array defining order of card elements
|
|
31
|
-
* @returns HTML string for product rows
|
|
32
|
-
*/
|
|
33
|
-
export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, composition?: string[]): string;
|
|
34
|
-
/**
|
|
35
|
-
* Generates complete HTML template with dynamic products and layout
|
|
36
|
-
* @param blockTemplate - The base block template string
|
|
37
|
-
* @param products - Array of products to display
|
|
38
|
-
* @param productsPerRow - Number of products per row
|
|
39
|
-
* @param elementRenderer - Element renderer for generating product HTML
|
|
40
|
-
* @param title - Title for the block
|
|
41
|
-
* @param composition - Optional array defining order of card elements
|
|
42
|
-
* @returns Complete HTML template
|
|
43
|
-
*/
|
|
44
|
-
export declare function generateTemplate(blockTemplate: string, products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, title?: string, composition?: string[]): string;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { SentryConfig } from '@@/Types/generic';
|
|
2
|
-
import type Vue from 'vue';
|
|
3
|
-
/**
|
|
4
|
-
* Internal SentryConfig with DSN (DSN is bundled at build time)
|
|
5
|
-
*/
|
|
6
|
-
type InternalSentryConfig = SentryConfig & {
|
|
7
|
-
dsn: string;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Initializes Sentry for Guido with complete isolation from parent app's Sentry
|
|
11
|
-
* This ensures errors only go to Guido's Sentry project, not the parent app's
|
|
12
|
-
*
|
|
13
|
-
* Key isolation features:
|
|
14
|
-
* - Uses Guido's own DSN (separate from parent app)
|
|
15
|
-
* - beforeSend filter ensures only Guido/Stripo errors are captured
|
|
16
|
-
* - Error path matching includes npm package paths (@useinsider/guido)
|
|
17
|
-
* - Tags identify errors as coming from Guido package
|
|
18
|
-
*
|
|
19
|
-
* This should be called once when the Guido component is mounted
|
|
20
|
-
*/
|
|
21
|
-
export declare function initSentry(VueInstance: typeof Vue, config: InternalSentryConfig): void;
|
|
22
|
-
/**
|
|
23
|
-
* Creates SentryConfig from build-time environment variables
|
|
24
|
-
* All Sentry configuration is bundled with Guido at build time
|
|
25
|
-
* Parent apps don't need to provide any Sentry config - it's completely internal
|
|
26
|
-
*/
|
|
27
|
-
export declare function createSentryConfig(): InternalSentryConfig | null;
|
|
28
|
-
export {};
|
package/dist/utils/sentry.js
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { browserTracingIntegration as h, httpClientIntegration as C, moduleMetadataIntegration as S, init as x, setTags as E, getCurrentHub as y } from "@sentry/vue";
|
|
2
|
-
function j(e) {
|
|
3
|
-
var s, a, d, c, t;
|
|
4
|
-
const o = (c = (d = (a = (s = e == null ? void 0 : e.exception) == null ? void 0 : s.values) == null ? void 0 : a[0]) == null ? void 0 : d.stacktrace) == null ? void 0 : c.frames, i = [
|
|
5
|
-
"/client-injected",
|
|
6
|
-
"/s/fs.js",
|
|
7
|
-
"/webpack",
|
|
8
|
-
"/ins.js"
|
|
9
|
-
], r = e, n = ((t = r == null ? void 0 : r.metadata) == null ? void 0 : t.filename) || "";
|
|
10
|
-
return n && i.some((u) => n.includes(u)) ? !0 : !o || o.length === 0 ? !1 : o.some((u) => i.some((l) => {
|
|
11
|
-
var p;
|
|
12
|
-
return (p = u.filename) == null ? void 0 : p.includes(l);
|
|
13
|
-
}));
|
|
14
|
-
}
|
|
15
|
-
function N(e, o) {
|
|
16
|
-
var a, d, c;
|
|
17
|
-
const i = ((c = (d = (a = e == null ? void 0 : e.exception) == null ? void 0 : a.values) == null ? void 0 : d[0]) == null ? void 0 : c.value) || "", r = o == null ? void 0 : o.originalException, n = r && typeof r == "object" && "message" in r ? String(r.message) : "";
|
|
18
|
-
return [
|
|
19
|
-
"Non-Error exception captured",
|
|
20
|
-
"Object captured as exception with keys",
|
|
21
|
-
"Object captured as promise rejection with keys",
|
|
22
|
-
"Cannot read properties of null (reading 'cmd')",
|
|
23
|
-
// cspell:ignore zalo
|
|
24
|
-
"Can't find variable: zaloJSV2",
|
|
25
|
-
"ResizeObserver loop completed with undelivered notifications"
|
|
26
|
-
].some((t) => i.includes(t) || n.includes(t));
|
|
27
|
-
}
|
|
28
|
-
function k(e) {
|
|
29
|
-
var r, n, s, a, d;
|
|
30
|
-
const o = (a = (s = (n = (r = e == null ? void 0 : e.exception) == null ? void 0 : r.values) == null ? void 0 : n[0]) == null ? void 0 : s.stacktrace) == null ? void 0 : a.frames;
|
|
31
|
-
if (!o || o.length === 0) {
|
|
32
|
-
const c = (e == null ? void 0 : e.message) || "", t = e, u = ((d = t == null ? void 0 : t.metadata) == null ? void 0 : d.filename) || "", l = `${c}${u}`.toLowerCase();
|
|
33
|
-
return l.includes("guido") || l.includes("stripo") || l.includes("uieditor");
|
|
34
|
-
}
|
|
35
|
-
const i = [
|
|
36
|
-
// Source patterns
|
|
37
|
-
"guido",
|
|
38
|
-
"Guido.vue",
|
|
39
|
-
"composables",
|
|
40
|
-
"extensions",
|
|
41
|
-
"stores",
|
|
42
|
-
"services",
|
|
43
|
-
"utils/sentry",
|
|
44
|
-
"components/Guido",
|
|
45
|
-
// Built/dist patterns (when installed as npm package)
|
|
46
|
-
"@useinsider/guido",
|
|
47
|
-
"useinsider/guido",
|
|
48
|
-
"guido/dist",
|
|
49
|
-
"guido/library",
|
|
50
|
-
// Stripo patterns - since Guido wraps Stripo, these errors are relevant
|
|
51
|
-
"stripo",
|
|
52
|
-
// cspell:ignore uieditor
|
|
53
|
-
"uieditor",
|
|
54
|
-
"UIEditor",
|
|
55
|
-
"/stripo/"
|
|
56
|
-
];
|
|
57
|
-
return o.some((c) => {
|
|
58
|
-
const t = c.filename || "", u = c.abs_path || "", l = `${t}${u}`.toLowerCase();
|
|
59
|
-
return i.some((p) => l.includes(p.toLowerCase()));
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
function $(e) {
|
|
63
|
-
var d, c, t, u, l;
|
|
64
|
-
const o = (u = (t = (c = (d = e == null ? void 0 : e.exception) == null ? void 0 : d.values) == null ? void 0 : c[0]) == null ? void 0 : t.stacktrace) == null ? void 0 : u.frames, i = (e == null ? void 0 : e.message) || "", r = e, n = ((l = r == null ? void 0 : r.metadata) == null ? void 0 : l.filename) || "", s = `${i}${n}`.toLowerCase();
|
|
65
|
-
if (s.includes("stripo") || s.includes("uieditor"))
|
|
66
|
-
return !0;
|
|
67
|
-
if (!o || o.length === 0)
|
|
68
|
-
return !1;
|
|
69
|
-
const a = ["stripo", "uieditor", "UIEditor"];
|
|
70
|
-
return o.some((p) => {
|
|
71
|
-
const f = p.filename || "", w = p.abs_path || "", g = `${f}${w}`.toLowerCase();
|
|
72
|
-
return a.some((b) => g.includes(b.toLowerCase()));
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
function I() {
|
|
76
|
-
return !0;
|
|
77
|
-
}
|
|
78
|
-
function m() {
|
|
79
|
-
var i, r;
|
|
80
|
-
if (typeof window > "u")
|
|
81
|
-
return;
|
|
82
|
-
const e = window;
|
|
83
|
-
if ((r = (i = e.GuidoConfig) == null ? void 0 : i.partner) != null && r.partnerName)
|
|
84
|
-
return e.GuidoConfig.partner.partnerName;
|
|
85
|
-
try {
|
|
86
|
-
const { hostname: n } = window.location;
|
|
87
|
-
if (n) {
|
|
88
|
-
const s = n.split(".");
|
|
89
|
-
return s.length > 2 ? s[0] : n;
|
|
90
|
-
}
|
|
91
|
-
} catch {
|
|
92
|
-
}
|
|
93
|
-
const o = window;
|
|
94
|
-
if (o.projectName)
|
|
95
|
-
return o.projectName;
|
|
96
|
-
if (o.appName)
|
|
97
|
-
return o.appName;
|
|
98
|
-
}
|
|
99
|
-
function L(e, o) {
|
|
100
|
-
if (typeof window < "u" && window.isSessionExpired || !k(e) || j(e) || N(e, o))
|
|
101
|
-
return null;
|
|
102
|
-
const i = $(e), r = m();
|
|
103
|
-
return e.tags = {
|
|
104
|
-
...e.tags,
|
|
105
|
-
source: "guido",
|
|
106
|
-
errorSource: i ? "stripo" : "guido"
|
|
107
|
-
}, r && (e.tags.parentApp = r, e.contexts = {
|
|
108
|
-
...e.contexts,
|
|
109
|
-
parentApp: {
|
|
110
|
-
name: r,
|
|
111
|
-
url: typeof window < "u" ? window.location.href : void 0
|
|
112
|
-
}
|
|
113
|
-
}), e;
|
|
114
|
-
}
|
|
115
|
-
function A(e, o) {
|
|
116
|
-
if (!(!o.enabled || !o.dsn))
|
|
117
|
-
try {
|
|
118
|
-
const i = {
|
|
119
|
-
Vue: e,
|
|
120
|
-
dsn: o.dsn,
|
|
121
|
-
// Guido's DSN - errors will only go here, not to parent app's Sentry
|
|
122
|
-
release: o.release,
|
|
123
|
-
environment: o.environment || "production",
|
|
124
|
-
ignoreErrors: o.ignoreErrors || [
|
|
125
|
-
"ResizeObserver loop completed with undelivered notifications",
|
|
126
|
-
"Non-Error exception captured",
|
|
127
|
-
"Non-Error promise rejection captured",
|
|
128
|
-
"Cannot read properties of null (reading 'cmd')",
|
|
129
|
-
// cspell:ignore zalo
|
|
130
|
-
"Can't find variable: zaloJSV2"
|
|
131
|
-
],
|
|
132
|
-
shouldSendCallback: o.shouldSendCallback || I,
|
|
133
|
-
allowUrls: o.whitelistUrls || [],
|
|
134
|
-
integrations: [
|
|
135
|
-
h(),
|
|
136
|
-
// No router needed for Guido
|
|
137
|
-
C(),
|
|
138
|
-
S()
|
|
139
|
-
],
|
|
140
|
-
beforeSend: o.beforeSend || L
|
|
141
|
-
// Ensure we only capture errors from Guido/Stripo, never from parent app
|
|
142
|
-
// This is critical for npm package usage
|
|
143
|
-
};
|
|
144
|
-
x(i);
|
|
145
|
-
const r = m(), n = {
|
|
146
|
-
package: "@useinsider/guido",
|
|
147
|
-
...r ? { parentApp: r } : {},
|
|
148
|
-
...o.tags
|
|
149
|
-
};
|
|
150
|
-
if (E(n), r && typeof window < "u") {
|
|
151
|
-
const a = y().getScope();
|
|
152
|
-
a && a.setContext("parentApp", {
|
|
153
|
-
name: r,
|
|
154
|
-
url: window.location.href,
|
|
155
|
-
hostname: window.location.hostname
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
} catch (i) {
|
|
159
|
-
console.warn("Failed to initialize Sentry:", i);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
function G() {
|
|
163
|
-
return null;
|
|
164
|
-
}
|
|
165
|
-
export {
|
|
166
|
-
G as createSentryConfig,
|
|
167
|
-
A as initSentry
|
|
168
|
-
};
|