Skip to content

Commit

Permalink
added masElement log and changed imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mirafedas committed Feb 13, 2025
1 parent 9baafa1 commit be4444b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 20 deletions.
10 changes: 4 additions & 6 deletions libs/blocks/merch/three-in-one.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { createTag, getConfig } from '../../utils/utils.js';
/* eslint-disable import/no-relative-packages */
import { createTag } from '../../utils/utils.js';
import { MODAL_TYPE_3_IN_1 } from '../../deps/mas/constants.js';
import '../../features/spectrum-web-components/dist/theme.js';
import '../../features/spectrum-web-components/dist/progress-circle.js';

export const MSG_SUBTYPE = {
AppLoaded: 'AppLoaded',
Expand Down Expand Up @@ -54,11 +57,6 @@ export const handle3in1IFrameEvents = ({ data: msgData }) => {
};

export async function createContent(iframeUrl, modalType) {
const { base } = getConfig();
await Promise.all([
import(`${base}/features/spectrum-web-components/dist/theme.js`),
import(`${base}/features/spectrum-web-components/dist/progress-circle.js`),
]);
const content = createTag('div', { class: 'milo-iframe' });
const title = modalType === MODAL_TYPE_3_IN_1.CRM ? 'Single App' : modalType;
const iframe = createTag('iframe', {
Expand Down
2 changes: 1 addition & 1 deletion libs/deps/mas/commerce.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions libs/deps/mas/mas.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/deps/mas/merch-card.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions libs/features/mas/dist/mas.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions libs/features/mas/src/checkout-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export function CheckoutMixin(Base) {
}
return newUrl.toString();
} catch (error) {
// do nothing
this.masElement.log?.error('Failed to add 3-in-1 modal parameters', error);
}
}

Expand All @@ -178,7 +178,7 @@ export function CheckoutMixin(Base) {
return modalParam;
}
} catch (error) {
// do nothing
this.masElement.log?.error('Failed to set modal type', error);
}
}

Expand Down

0 comments on commit be4444b

Please sign in to comment.