crmbonus-component-wake 2.1.34 → 2.1.36-homolog
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/dist/cjs/app-modal.cjs.entry.js +1 -1
- package/dist/cjs/{cart.helper-701ea6b2.js → cart.helper-abdd9916.js} +3 -3
- package/dist/cjs/{cart.helper-701ea6b2.js.map → cart.helper-abdd9916.js.map} +1 -1
- package/dist/cjs/container-empty.cjs.entry.js +19 -0
- package/dist/cjs/container-empty.cjs.entry.js.map +1 -0
- package/dist/cjs/countdown-timer_11.cjs.entry.js +979 -0
- package/dist/cjs/countdown-timer_11.cjs.entry.js.map +1 -0
- package/dist/cjs/crm-bonus-note.cjs.entry.js +44 -69
- package/dist/cjs/crm-bonus-note.cjs.entry.js.map +1 -1
- package/dist/cjs/crmbonus-component-wake.cjs.js +1 -1
- package/dist/cjs/{i18n-1ce6cb94.js → info.config.helper-d4b1291b.js} +14 -1
- package/dist/cjs/info.config.helper-d4b1291b.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pedido-finalizado.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -3
- package/dist/collection/components/crm-bonus/crm-bonus.js +13 -15
- package/dist/collection/components/crm-bonus/crm-bonus.js.map +1 -1
- package/dist/collection/components/giftback-form/giftback-form.js +10 -12
- package/dist/collection/components/giftback-form/giftback-form.js.map +1 -1
- package/dist/collection/components/giftback-form/subcomponents/giftback-info/giftback-info.js +5 -5
- package/dist/collection/components/giftback-form/subcomponents/phone-form/phone-form.js +1 -1
- package/dist/collection/components/giftback-form/subcomponents/pin-form/pin-form.js +1 -1
- package/dist/collection/components/loading-container/container-empty.js +9 -0
- package/dist/collection/components/loading-container/container-empty.js.map +1 -0
- package/dist/collection/components/loading-container/loading-container.css +9 -2
- package/dist/collection/components/loading-container/loading-container.js +20 -1
- package/dist/collection/components/loading-container/loading-container.js.map +1 -1
- package/dist/collection/components/loading-spinner/loading-spinner.js +1 -1
- package/dist/collection/components/modal/app-modal.js +1 -1
- package/dist/collection/components/note/crm-bonus-note.js +26 -64
- package/dist/collection/components/note/crm-bonus-note.js.map +1 -1
- package/dist/collection/components/pedido/pedido.js +1 -1
- package/dist/collection/components/phone/phone-input-mask.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/collection/utils/retry.utils.js +13 -0
- package/dist/collection/utils/retry.utils.js.map +1 -0
- package/dist/components/app-modal.js +1 -1
- package/dist/components/{crm-bonus-2.d.ts → container-empty.d.ts} +4 -4
- package/dist/components/container-empty.js +33 -0
- package/dist/components/container-empty.js.map +1 -0
- package/dist/components/crm-bonus-note.js +40 -64
- package/dist/components/crm-bonus-note.js.map +1 -1
- package/dist/components/crm-bonus.js +72 -26
- package/dist/components/crm-bonus.js.map +1 -1
- package/dist/components/crm-button.js +1 -1
- package/dist/components/crm-giftback-form.js +1 -1
- package/dist/components/crm-tooltip.js +1 -1
- package/dist/components/giftback-info.js +1 -1
- package/dist/components/loading-container.js +1 -1
- package/dist/components/loading-spinner.js +1 -1
- package/dist/components/{p-8fda6382.js → p-0a7ccd8c.js} +4 -4
- package/dist/components/{p-8fda6382.js.map → p-0a7ccd8c.js.map} +1 -1
- package/dist/components/{p-c5be72a0.js → p-2cece106.js} +6 -4
- package/dist/components/p-2cece106.js.map +1 -0
- package/dist/components/{p-f1823a52.js → p-786485b2.js} +2 -2
- package/dist/components/{p-f1823a52.js.map → p-786485b2.js.map} +1 -1
- package/dist/components/{p-890dc5d5.js → p-8274e2c4.js} +2 -2
- package/dist/components/{p-890dc5d5.js.map → p-8274e2c4.js.map} +1 -1
- package/dist/components/{p-ce77a841.js → p-9b5c07d8.js} +2 -2
- package/dist/components/{p-ce77a841.js.map → p-9b5c07d8.js.map} +1 -1
- package/dist/components/{p-e2a6a4cf.js → p-a7d4e578.js} +19 -21
- package/dist/components/p-a7d4e578.js.map +1 -0
- package/dist/components/{p-417b4f7f.js → p-bea5a5c2.js} +3 -3
- package/dist/components/{p-417b4f7f.js.map → p-bea5a5c2.js.map} +1 -1
- package/dist/components/{p-bc930dfe.js → p-c250687d.js} +2 -2
- package/dist/components/{p-bc930dfe.js.map → p-c250687d.js.map} +1 -1
- package/dist/components/{p-488a119c.js → p-d49313cb.js} +8 -8
- package/dist/components/{p-488a119c.js.map → p-d49313cb.js.map} +1 -1
- package/dist/components/{p-ee1c025b.js → p-e6863cf5.js} +5 -5
- package/dist/components/{p-ee1c025b.js.map → p-e6863cf5.js.map} +1 -1
- package/dist/components/pedido-finalizado.js +2 -2
- package/dist/components/phone-form.js +1 -1
- package/dist/components/phone-input-mask.js +1 -1
- package/dist/components/pin-form.js +1 -1
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js +1 -1
- package/dist/crmbonus-component-wake/crmbonus-component-wake.esm.js.map +1 -1
- package/dist/crmbonus-component-wake/p-1644deef.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-1644deef.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-4bfd518e.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-4bfd518e.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-5d014ac9.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-5d014ac9.entry.js.map +1 -0
- package/dist/crmbonus-component-wake/p-622d5644.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-7e52727e.entry.js +2 -0
- package/dist/crmbonus-component-wake/{p-702d5a6f.js → p-b4f52f79.js} +2 -2
- package/dist/crmbonus-component-wake/p-b4f52f79.js.map +1 -0
- package/dist/crmbonus-component-wake/{p-b5da6ce1.js → p-bea5a5c2.js} +2 -2
- package/dist/crmbonus-component-wake/{p-b5da6ce1.js.map → p-bea5a5c2.js.map} +1 -1
- package/dist/env.js +2 -2
- package/dist/env.js.map +1 -1
- package/dist/esm/app-modal.entry.js +1 -1
- package/dist/esm/{cart.helper-4f1913ce.js → cart.helper-89391005.js} +4 -4
- package/dist/esm/{cart.helper-4f1913ce.js.map → cart.helper-89391005.js.map} +1 -1
- package/dist/esm/container-empty.entry.js +15 -0
- package/dist/esm/container-empty.entry.js.map +1 -0
- package/dist/esm/countdown-timer_11.entry.js +965 -0
- package/dist/esm/countdown-timer_11.entry.js.map +1 -0
- package/dist/esm/crm-bonus-note.entry.js +40 -65
- package/dist/esm/crm-bonus-note.entry.js.map +1 -1
- package/dist/esm/crmbonus-component-wake.js +1 -1
- package/dist/esm/{i18n-7938fb86.js → info.config.helper-e4b8c478.js} +14 -2
- package/dist/esm/info.config.helper-e4b8c478.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pedido-finalizado.entry.js +2 -2
- package/dist/types/Users/Darlison/Projects/Bycoders/crmbonus/crmbonus-component/.stencil/env.d.ts +1 -1
- package/dist/types/components/giftback-form/giftback-form.d.ts +0 -1
- package/dist/types/components/loading-container/container-empty.d.ts +3 -0
- package/dist/types/components/loading-container/loading-container.d.ts +1 -0
- package/dist/types/components/note/crm-bonus-note.d.ts +1 -3
- package/dist/types/components.d.ts +15 -26
- package/dist/types/utils/retry.utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/build.payload.helper-cfd3173e.js +0 -54
- package/dist/cjs/build.payload.helper-cfd3173e.js.map +0 -1
- package/dist/cjs/countdown-timer_2.cjs.entry.js +0 -74
- package/dist/cjs/countdown-timer_2.cjs.entry.js.map +0 -1
- package/dist/cjs/crm-bonus-2.cjs.entry.js +0 -33
- package/dist/cjs/crm-bonus-2.cjs.entry.js.map +0 -1
- package/dist/cjs/crm-bonus-tray.cjs.entry.js +0 -18
- package/dist/cjs/crm-bonus-tray.cjs.entry.js.map +0 -1
- package/dist/cjs/crm-bonus.cjs.entry.js +0 -284
- package/dist/cjs/crm-bonus.cjs.entry.js.map +0 -1
- package/dist/cjs/crm-giftback-form.cjs.entry.js +0 -282
- package/dist/cjs/crm-giftback-form.cjs.entry.js.map +0 -1
- package/dist/cjs/crm-tooltip_5.cjs.entry.js +0 -292
- package/dist/cjs/crm-tooltip_5.cjs.entry.js.map +0 -1
- package/dist/cjs/i18n-1ce6cb94.js.map +0 -1
- package/dist/cjs/info.config.helper-e35e6e20.js +0 -17
- package/dist/cjs/info.config.helper-e35e6e20.js.map +0 -1
- package/dist/cjs/loading-container.cjs.entry.js +0 -23
- package/dist/cjs/loading-container.cjs.entry.js.map +0 -1
- package/dist/cjs/loading-spinner.cjs.entry.js +0 -24
- package/dist/cjs/loading-spinner.cjs.entry.js.map +0 -1
- package/dist/collection/components/crm-bonus/crmbonus.js +0 -38
- package/dist/collection/components/crm-bonus/crmbonus.js.map +0 -1
- package/dist/collection/tray-ecommerce/crm-bonus-tray.js +0 -8
- package/dist/collection/tray-ecommerce/crm-bonus-tray.js.map +0 -1
- package/dist/components/crm-bonus-2.js +0 -57
- package/dist/components/crm-bonus-2.js.map +0 -1
- package/dist/components/crm-bonus-tray.d.ts +0 -11
- package/dist/components/crm-bonus-tray.js +0 -32
- package/dist/components/crm-bonus-tray.js.map +0 -1
- package/dist/components/p-b0ef2c0b.js +0 -52
- package/dist/components/p-b0ef2c0b.js.map +0 -1
- package/dist/components/p-c5be72a0.js.map +0 -1
- package/dist/components/p-e2a6a4cf.js.map +0 -1
- package/dist/crmbonus-component-wake/p-17b97fd2.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-1b441909.js +0 -2
- package/dist/crmbonus-component-wake/p-1b441909.js.map +0 -1
- package/dist/crmbonus-component-wake/p-3a4d7622.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-3a4d7622.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-54b8f32b.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-54b8f32b.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-59033825.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-59033825.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-61ea41c9.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-6532623f.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-6532623f.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-702d5a6f.js.map +0 -1
- package/dist/crmbonus-component-wake/p-87cb8341.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-87cb8341.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-9d926857.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-9d926857.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-b0ef2c0b.js +0 -2
- package/dist/crmbonus-component-wake/p-b0ef2c0b.js.map +0 -1
- package/dist/crmbonus-component-wake/p-ce2819cc.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-ce2819cc.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-e992d997.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-e992d997.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-eace8d0e.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-eace8d0e.entry.js.map +0 -1
- package/dist/esm/build.payload.helper-699a48ca.js +0 -52
- package/dist/esm/build.payload.helper-699a48ca.js.map +0 -1
- package/dist/esm/countdown-timer_2.entry.js +0 -69
- package/dist/esm/countdown-timer_2.entry.js.map +0 -1
- package/dist/esm/crm-bonus-2.entry.js +0 -29
- package/dist/esm/crm-bonus-2.entry.js.map +0 -1
- package/dist/esm/crm-bonus-tray.entry.js +0 -14
- package/dist/esm/crm-bonus-tray.entry.js.map +0 -1
- package/dist/esm/crm-bonus.entry.js +0 -280
- package/dist/esm/crm-bonus.entry.js.map +0 -1
- package/dist/esm/crm-giftback-form.entry.js +0 -278
- package/dist/esm/crm-giftback-form.entry.js.map +0 -1
- package/dist/esm/crm-tooltip_5.entry.js +0 -284
- package/dist/esm/crm-tooltip_5.entry.js.map +0 -1
- package/dist/esm/i18n-7938fb86.js.map +0 -1
- package/dist/esm/info.config.helper-7cad7a9c.js +0 -15
- package/dist/esm/info.config.helper-7cad7a9c.js.map +0 -1
- package/dist/esm/loading-container.entry.js +0 -19
- package/dist/esm/loading-container.entry.js.map +0 -1
- package/dist/esm/loading-spinner.entry.js +0 -20
- package/dist/esm/loading-spinner.entry.js.map +0 -1
- package/dist/types/components/crm-bonus/crmbonus.d.ts +0 -8
- package/dist/types/tray-ecommerce/crm-bonus-tray.d.ts +0 -3
- /package/dist/crmbonus-component-wake/{p-17b97fd2.entry.js.map → p-622d5644.entry.js.map} +0 -0
- /package/dist/crmbonus-component-wake/{p-61ea41c9.entry.js.map → p-7e52727e.entry.js.map} +0 -0
@@ -20,6 +20,8 @@ export namespace Components {
|
|
20
20
|
"isOpen": boolean;
|
21
21
|
"modalTitle": string;
|
22
22
|
}
|
23
|
+
interface ContainerEmpty {
|
24
|
+
}
|
23
25
|
interface CountdownTimer {
|
24
26
|
"dataCriacao": string;
|
25
27
|
"downtime": () => void;
|
@@ -38,13 +40,9 @@ export namespace Components {
|
|
38
40
|
"resetBonus": () => Promise<void>;
|
39
41
|
"setloading": () => Promise<void>;
|
40
42
|
}
|
41
|
-
interface CrmBonus2 {
|
42
|
-
}
|
43
43
|
interface CrmBonusNote {
|
44
44
|
"cart": any;
|
45
45
|
}
|
46
|
-
interface CrmBonusTray {
|
47
|
-
}
|
48
46
|
interface CrmButton {
|
49
47
|
"handleClick": () => void;
|
50
48
|
"loading": boolean;
|
@@ -78,6 +76,7 @@ export namespace Components {
|
|
78
76
|
}
|
79
77
|
interface LoadingContainer {
|
80
78
|
"loading": boolean;
|
79
|
+
"text": string;
|
81
80
|
}
|
82
81
|
interface LoadingSpinner {
|
83
82
|
"color": string;
|
@@ -129,6 +128,12 @@ declare global {
|
|
129
128
|
prototype: HTMLAppModalElement;
|
130
129
|
new (): HTMLAppModalElement;
|
131
130
|
};
|
131
|
+
interface HTMLContainerEmptyElement extends Components.ContainerEmpty, HTMLStencilElement {
|
132
|
+
}
|
133
|
+
var HTMLContainerEmptyElement: {
|
134
|
+
prototype: HTMLContainerEmptyElement;
|
135
|
+
new (): HTMLContainerEmptyElement;
|
136
|
+
};
|
132
137
|
interface HTMLCountdownTimerElement extends Components.CountdownTimer, HTMLStencilElement {
|
133
138
|
}
|
134
139
|
var HTMLCountdownTimerElement: {
|
@@ -147,24 +152,12 @@ declare global {
|
|
147
152
|
prototype: HTMLCrmBonusElement;
|
148
153
|
new (): HTMLCrmBonusElement;
|
149
154
|
};
|
150
|
-
interface HTMLCrmBonus2Element extends Components.CrmBonus2, HTMLStencilElement {
|
151
|
-
}
|
152
|
-
var HTMLCrmBonus2Element: {
|
153
|
-
prototype: HTMLCrmBonus2Element;
|
154
|
-
new (): HTMLCrmBonus2Element;
|
155
|
-
};
|
156
155
|
interface HTMLCrmBonusNoteElement extends Components.CrmBonusNote, HTMLStencilElement {
|
157
156
|
}
|
158
157
|
var HTMLCrmBonusNoteElement: {
|
159
158
|
prototype: HTMLCrmBonusNoteElement;
|
160
159
|
new (): HTMLCrmBonusNoteElement;
|
161
160
|
};
|
162
|
-
interface HTMLCrmBonusTrayElement extends Components.CrmBonusTray, HTMLStencilElement {
|
163
|
-
}
|
164
|
-
var HTMLCrmBonusTrayElement: {
|
165
|
-
prototype: HTMLCrmBonusTrayElement;
|
166
|
-
new (): HTMLCrmBonusTrayElement;
|
167
|
-
};
|
168
161
|
interface HTMLCrmButtonElement extends Components.CrmButton, HTMLStencilElement {
|
169
162
|
}
|
170
163
|
var HTMLCrmButtonElement: {
|
@@ -227,12 +220,11 @@ declare global {
|
|
227
220
|
};
|
228
221
|
interface HTMLElementTagNameMap {
|
229
222
|
"app-modal": HTMLAppModalElement;
|
223
|
+
"container-empty": HTMLContainerEmptyElement;
|
230
224
|
"countdown-timer": HTMLCountdownTimerElement;
|
231
225
|
"countdown-timer-v2": HTMLCountdownTimerV2Element;
|
232
226
|
"crm-bonus": HTMLCrmBonusElement;
|
233
|
-
"crm-bonus-2": HTMLCrmBonus2Element;
|
234
227
|
"crm-bonus-note": HTMLCrmBonusNoteElement;
|
235
|
-
"crm-bonus-tray": HTMLCrmBonusTrayElement;
|
236
228
|
"crm-button": HTMLCrmButtonElement;
|
237
229
|
"crm-giftback-form": HTMLCrmGiftbackFormElement;
|
238
230
|
"crm-tooltip": HTMLCrmTooltipElement;
|
@@ -251,6 +243,8 @@ declare namespace LocalJSX {
|
|
251
243
|
"modalTitle"?: string;
|
252
244
|
"onModalClosed"?: (event: AppModalCustomEvent<void>) => void;
|
253
245
|
}
|
246
|
+
interface ContainerEmpty {
|
247
|
+
}
|
254
248
|
interface CountdownTimer {
|
255
249
|
"dataCriacao"?: string;
|
256
250
|
"downtime"?: () => void;
|
@@ -266,13 +260,9 @@ declare namespace LocalJSX {
|
|
266
260
|
"canhidden"?: boolean;
|
267
261
|
"cart"?: any;
|
268
262
|
}
|
269
|
-
interface CrmBonus2 {
|
270
|
-
}
|
271
263
|
interface CrmBonusNote {
|
272
264
|
"cart"?: any;
|
273
265
|
}
|
274
|
-
interface CrmBonusTray {
|
275
|
-
}
|
276
266
|
interface CrmButton {
|
277
267
|
"handleClick"?: () => void;
|
278
268
|
"loading"?: boolean;
|
@@ -304,6 +294,7 @@ declare namespace LocalJSX {
|
|
304
294
|
}
|
305
295
|
interface LoadingContainer {
|
306
296
|
"loading"?: boolean;
|
297
|
+
"text"?: string;
|
307
298
|
}
|
308
299
|
interface LoadingSpinner {
|
309
300
|
"color"?: string;
|
@@ -333,12 +324,11 @@ declare namespace LocalJSX {
|
|
333
324
|
}
|
334
325
|
interface IntrinsicElements {
|
335
326
|
"app-modal": AppModal;
|
327
|
+
"container-empty": ContainerEmpty;
|
336
328
|
"countdown-timer": CountdownTimer;
|
337
329
|
"countdown-timer-v2": CountdownTimerV2;
|
338
330
|
"crm-bonus": CrmBonus;
|
339
|
-
"crm-bonus-2": CrmBonus2;
|
340
331
|
"crm-bonus-note": CrmBonusNote;
|
341
|
-
"crm-bonus-tray": CrmBonusTray;
|
342
332
|
"crm-button": CrmButton;
|
343
333
|
"crm-giftback-form": CrmGiftbackForm;
|
344
334
|
"crm-tooltip": CrmTooltip;
|
@@ -356,12 +346,11 @@ declare module "@stencil/core" {
|
|
356
346
|
export namespace JSX {
|
357
347
|
interface IntrinsicElements {
|
358
348
|
"app-modal": LocalJSX.AppModal & JSXBase.HTMLAttributes<HTMLAppModalElement>;
|
349
|
+
"container-empty": LocalJSX.ContainerEmpty & JSXBase.HTMLAttributes<HTMLContainerEmptyElement>;
|
359
350
|
"countdown-timer": LocalJSX.CountdownTimer & JSXBase.HTMLAttributes<HTMLCountdownTimerElement>;
|
360
351
|
"countdown-timer-v2": LocalJSX.CountdownTimerV2 & JSXBase.HTMLAttributes<HTMLCountdownTimerV2Element>;
|
361
352
|
"crm-bonus": LocalJSX.CrmBonus & JSXBase.HTMLAttributes<HTMLCrmBonusElement>;
|
362
|
-
"crm-bonus-2": LocalJSX.CrmBonus2 & JSXBase.HTMLAttributes<HTMLCrmBonus2Element>;
|
363
353
|
"crm-bonus-note": LocalJSX.CrmBonusNote & JSXBase.HTMLAttributes<HTMLCrmBonusNoteElement>;
|
364
|
-
"crm-bonus-tray": LocalJSX.CrmBonusTray & JSXBase.HTMLAttributes<HTMLCrmBonusTrayElement>;
|
365
354
|
"crm-button": LocalJSX.CrmButton & JSXBase.HTMLAttributes<HTMLCrmButtonElement>;
|
366
355
|
"crm-giftback-form": LocalJSX.CrmGiftbackForm & JSXBase.HTMLAttributes<HTMLCrmGiftbackFormElement>;
|
367
356
|
"crm-tooltip": LocalJSX.CrmTooltip & JSXBase.HTMLAttributes<HTMLCrmTooltipElement>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function retryRequest<T>(fn: () => Promise<T>, retries?: number, delay?: number): Promise<T>;
|
package/package.json
CHANGED
@@ -1,54 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
var AjustesTipoEnum;
|
4
|
-
(function (AjustesTipoEnum) {
|
5
|
-
AjustesTipoEnum["P"] = "Promocao";
|
6
|
-
AjustesTipoEnum["CC"] = "ContaCorrente";
|
7
|
-
AjustesTipoEnum["PP"] = "PromocaoProduto";
|
8
|
-
AjustesTipoEnum["F"] = "Formula";
|
9
|
-
})(AjustesTipoEnum || (AjustesTipoEnum = {}));
|
10
|
-
|
11
|
-
function buildProductsByWake(productsWake = []) {
|
12
|
-
const products = [];
|
13
|
-
for (const pw of productsWake) {
|
14
|
-
let discounts = getDiscount(pw.Ajustes);
|
15
|
-
// let discounts_formula = getDiscountFormula(pw.Ajustes);
|
16
|
-
var value = (pw.PrecoDe * pw.Quantidade);
|
17
|
-
var originalValue = (pw.PrecoDe * pw.Quantidade);
|
18
|
-
var discounts_value = (discounts * -1);
|
19
|
-
const existsPromotionProduct = pw.Ajustes.filter(adj => [AjustesTipoEnum.PP].includes(adj.Tipo));
|
20
|
-
const promotion_product = (existsPromotionProduct.length > 0);
|
21
|
-
products.push({
|
22
|
-
sku: pw.SKU,
|
23
|
-
value: value,
|
24
|
-
originalValue: originalValue,
|
25
|
-
productVariantId: pw.ProdutoVarianteId.toString(),
|
26
|
-
quantity: pw.Quantidade,
|
27
|
-
discount: value < discounts_value ? value : discounts_value,
|
28
|
-
promotion_product
|
29
|
-
});
|
30
|
-
}
|
31
|
-
return products;
|
32
|
-
}
|
33
|
-
function getDiscount(ajustes = []) {
|
34
|
-
let discounts = 0;
|
35
|
-
for (const discount of ajustes) {
|
36
|
-
if ([AjustesTipoEnum.P, AjustesTipoEnum.CC, AjustesTipoEnum.PP].includes(discount.Tipo)) {
|
37
|
-
discounts += discount.Valor;
|
38
|
-
}
|
39
|
-
}
|
40
|
-
return discounts;
|
41
|
-
}
|
42
|
-
// function getDiscountFormula(ajustes: IAjustes[] = []) {
|
43
|
-
// let discounts = 0;
|
44
|
-
// for(const discount of ajustes) {
|
45
|
-
// if([AjustesTipoEnum.F].includes(discount.Tipo)) {
|
46
|
-
// discounts += (discount.Valor * -1);
|
47
|
-
// }
|
48
|
-
// }
|
49
|
-
// return discounts;
|
50
|
-
// }
|
51
|
-
|
52
|
-
exports.buildProductsByWake = buildProductsByWake;
|
53
|
-
|
54
|
-
//# sourceMappingURL=build.payload.helper-cfd3173e.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"build.payload.helper-cfd3173e.js","mappings":";;AAUA,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,iCAAc,CAAA;IACd,uCAAoB,CAAA;IACpB,yCAAsB,CAAA;IACtB,gCAAa,CAAA;AACjB,CAAC,EALW,eAAe,KAAf,eAAe;;SCRX,mBAAmB,CAAC,eAAoC,EAAE;IAEtE,MAAM,QAAQ,GAAoB,EAAE,CAAC;IAErC,KAAM,MAAM,EAAE,IAAI,YAAY,EAAG;QAC7B,IAAI,SAAS,GAAG,WAAW,CAAC,EAAE,CAAC,OAAO,CAAC,CAAA;;QAGvC,IAAI,KAAK,IAAI,EAAE,CAAC,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC;QACzC,IAAI,aAAa,IAAI,EAAE,CAAC,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC;QAEjD,IAAI,eAAe,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC,CAAA;QAEtC,MAAM,sBAAsB,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAA;QAEhG,MAAM,iBAAiB,IAAI,sBAAsB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QAE7D,QAAQ,CAAC,IAAI,CACT;YACI,GAAG,EAAE,EAAE,CAAC,GAAG;YACX,KAAK,EAAE,KAAK;YACZ,aAAa,EAAE,aAAa;YAC5B,gBAAgB,EAAE,EAAE,CAAC,iBAAiB,CAAC,QAAQ,EAAE;YACjD,QAAQ,EAAE,EAAE,CAAC,UAAU;YACvB,QAAQ,EAAE,KAAK,GAAG,eAAe,GAAG,KAAK,GAAG,eAAe;YAC3D,iBAAiB;SACpB,CACJ,CAAA;KACJ;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED,SAAS,WAAW,CAAC,UAAsB,EAAE;IAEzC,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,KAAI,MAAM,QAAQ,IAAI,OAAO,EAAE;QAC3B,IAAG,CAAC,eAAe,CAAC,CAAC,EAAE,eAAe,CAAC,EAAE,EAAE,eAAe,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YACpF,SAAS,IAAI,QAAQ,CAAC,KAAK,CAAC;SAC/B;KACJ;IAED,OAAO,SAAS,CAAC;AACrB,CAAC;AAED;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;;;;","names":[],"sources":["src/dto/validate.pin.bonus.ts","src/helpers/build.payload.helper.ts"],"sourcesContent":["export interface IProduct {\r\n productVariantId: string;\r\n sku: string;\r\n value: number;\r\n originalValue: number;\r\n quantity: number;\r\n discount: number;\r\n promotion_product: boolean;\r\n}\r\n\r\nexport enum AjustesTipoEnum {\r\n P = \"Promocao\",\r\n CC = \"ContaCorrente\",\r\n PP = \"PromocaoProduto\",\r\n F = \"Formula\"\r\n}\r\n\r\nexport interface IAjustes {\r\n Tipo: AjustesTipoEnum;\r\n Valor: number;\r\n}\r\n\r\nexport interface IUser {\r\n id: number;\r\n}\r\n\r\nexport interface IStore {\r\n name: string;\r\n}\r\n\r\nexport interface IProductWake {\r\n ProdutoVarianteId: number;\r\n SKU: string;\r\n PrecoPor: number;\r\n PrecoDe: number;\r\n Quantidade: number;\r\n Ajustes: IAjustes[];\r\n}\r\n\r\nexport interface ICustomer {\r\n birthDate: string;\r\n document: string;\r\n name: string;\r\n phone: string;\r\n}\r\n\r\nexport interface IProccesPinBonusDto {\r\n storeName: string;\r\n name: string;\r\n checkoutId: string;\r\n checkoutProducts: Array<IProduct>;\r\n storeId: string;\r\n userId: string;\r\n cellphone: number;\r\n pin: string;\r\n\r\n}\r\n\r\nexport interface IBonus {\r\n hasBonus: boolean;\r\n bonusBalance: number;\r\n totalBonus: number;\r\n minimumPurchase: number;\r\n bonusIds: string;\r\n firstValidityDate: string\r\n history: [\r\n {\r\n validityStart: string;\r\n validityEnd: string;\r\n value: number\r\n },\r\n {\r\n validityStart: string;\r\n validityEnd: string\r\n value: number\r\n }\r\n ]\r\n storeId: number;\r\n userId: number;\r\n cartId: string\r\n calculatedValue: number;\r\n totalValue: number\r\n}\r\n\r\n\r\nexport interface IReserveDTO {\r\n storeName: string;\r\n cartId: string;\r\n grossValue: number;\r\n redeemedBonus: number;\r\n ticket: string;\r\n storeId: string;\r\n userId: number;\r\n}","import { AjustesTipoEnum, IAjustes, IProduct, IProductWake } from \"../dto/validate.pin.bonus\";\r\n\r\nexport function buildProductsByWake(productsWake: Array<IProductWake> = []): Array<IProduct> {\r\n\r\n const products: Array<IProduct> = [];\r\n\r\n for ( const pw of productsWake ) {\r\n let discounts = getDiscount(pw.Ajustes)\r\n // let discounts_formula = getDiscountFormula(pw.Ajustes);\r\n\r\n var value = (pw.PrecoDe * pw.Quantidade);\r\n var originalValue = (pw.PrecoDe * pw.Quantidade);\r\n\r\n var discounts_value = (discounts * -1)\r\n\r\n const existsPromotionProduct = pw.Ajustes.filter(adj => [AjustesTipoEnum.PP].includes(adj.Tipo))\r\n\r\n const promotion_product = (existsPromotionProduct.length > 0)\r\n\r\n products.push(\r\n {\r\n sku: pw.SKU,\r\n value: value,\r\n originalValue: originalValue,\r\n productVariantId: pw.ProdutoVarianteId.toString(),\r\n quantity: pw.Quantidade,\r\n discount: value < discounts_value ? value : discounts_value,\r\n promotion_product\r\n }\r\n )\r\n }\r\n\r\n return products;\r\n}\r\n\r\nfunction getDiscount(ajustes: IAjustes[] = []) {\r\n \r\n let discounts = 0;\r\n \r\n for(const discount of ajustes) {\r\n if([AjustesTipoEnum.P, AjustesTipoEnum.CC, AjustesTipoEnum.PP].includes(discount.Tipo)) {\r\n discounts += discount.Valor;\r\n }\r\n }\r\n\r\n return discounts;\r\n}\r\n\r\n// function getDiscountFormula(ajustes: IAjustes[] = []) {\r\n \r\n// let discounts = 0;\r\n \r\n// for(const discount of ajustes) {\r\n// if([AjustesTipoEnum.F].includes(discount.Tipo)) {\r\n// discounts += (discount.Valor * -1);\r\n// }\r\n// }\r\n\r\n// return discounts;\r\n// }"],"version":3}
|
@@ -1,74 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
const index = require('./index-a7537457.js');
|
6
|
-
|
7
|
-
const CountdownTimer = class {
|
8
|
-
constructor(hostRef) {
|
9
|
-
index.registerInstance(this, hostRef);
|
10
|
-
this.downtime = undefined;
|
11
|
-
this.dataCriacao = undefined;
|
12
|
-
this.minutos = 6;
|
13
|
-
this.segundos = 60;
|
14
|
-
this.tempoRestante = undefined;
|
15
|
-
}
|
16
|
-
componentWillLoad() {
|
17
|
-
const tempoTotal = this.minutos * this.segundos * 1000;
|
18
|
-
const data = new Date(this.dataCriacao);
|
19
|
-
const agora = new Date();
|
20
|
-
const tempoPassado = agora.getTime() - data.getTime();
|
21
|
-
if (tempoPassado >= tempoTotal) {
|
22
|
-
this.tempoRestante = 0;
|
23
|
-
this.onTempoEsgotado();
|
24
|
-
}
|
25
|
-
else {
|
26
|
-
this.tempoRestante = tempoTotal - tempoPassado;
|
27
|
-
this.startCountdown();
|
28
|
-
}
|
29
|
-
}
|
30
|
-
disconnectedCallback() {
|
31
|
-
clearInterval(this.intervalId);
|
32
|
-
}
|
33
|
-
startCountdown() {
|
34
|
-
this.intervalId = setInterval(() => {
|
35
|
-
this.tempoRestante -= 1000;
|
36
|
-
if (this.tempoRestante <= 0) {
|
37
|
-
this.tempoRestante = 0;
|
38
|
-
clearInterval(this.intervalId);
|
39
|
-
this.onTempoEsgotado();
|
40
|
-
}
|
41
|
-
}, 1000);
|
42
|
-
}
|
43
|
-
onTempoEsgotado() {
|
44
|
-
console.log('Tempo esgotado! Executando ação...');
|
45
|
-
this.downtime();
|
46
|
-
}
|
47
|
-
render() {
|
48
|
-
const minutos = Math.floor(this.tempoRestante / 60000);
|
49
|
-
const segundos = Math.floor((this.tempoRestante % 60000) / 1000);
|
50
|
-
const tempoFormatado = `${String(minutos).padStart(2, '0')}:${String(segundos).padStart(2, '0')}`;
|
51
|
-
return (index.h("label", { key: 'ed1e0654cba5b152adcadb10cf9dfd6909c07a1f' }, " ", tempoFormatado));
|
52
|
-
}
|
53
|
-
};
|
54
|
-
|
55
|
-
const crmButtonCss = "input,button{margin:0;padding:10px;}.crm-contaner-button{height:auto;width:auto}.crm-button{height:48px;width:100%;border:1px solid #000;padding:14px 20px;background-color:#000;color:#fff;line-height:20px;font-weight:500;cursor:pointer}";
|
56
|
-
const CrmButtonStyle0 = crmButtonCss;
|
57
|
-
|
58
|
-
const Button = class {
|
59
|
-
constructor(hostRef) {
|
60
|
-
index.registerInstance(this, hostRef);
|
61
|
-
this.txtBtn = undefined;
|
62
|
-
this.loading = undefined;
|
63
|
-
this.handleClick = undefined;
|
64
|
-
}
|
65
|
-
render() {
|
66
|
-
return (index.h("div", { key: '785b4975fb6538dbe2cdb7b99d5801abc72c534a', class: "crm-contaner-button" }, index.h("button", { key: '1e41951aa024e9f3b9b1836e8386bd369d022f76', class: "crm-button", onClick: () => this.handleClick() }, !this.loading ? this.txtBtn : index.h("loading-spinner", { size: "15px", color: "#fff" }))));
|
67
|
-
}
|
68
|
-
};
|
69
|
-
Button.style = CrmButtonStyle0;
|
70
|
-
|
71
|
-
exports.countdown_timer = CountdownTimer;
|
72
|
-
exports.crm_button = Button;
|
73
|
-
|
74
|
-
//# sourceMappingURL=countdown-timer_2.cjs.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"countdown-timer.crm-button.entry.cjs.js","mappings":";;;;;;MAKa,cAAc;;;;;uBAIG,CAAC;wBACA,EAAE;;;IAM7B,iBAAiB;QACb,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACvD,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACxC,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;QACzB,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAEtD,IAAI,YAAY,IAAI,UAAU,EAAE;YAC5B,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;YACvB,IAAI,CAAC,eAAe,EAAE,CAAC;SAC1B;aAAM;YACH,IAAI,CAAC,aAAa,GAAG,UAAU,GAAG,YAAY,CAAC;YAC/C,IAAI,CAAC,cAAc,EAAE,CAAC;SACzB;KACJ;IAED,oBAAoB;QAChB,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KAClC;IAED,cAAc;QACV,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC;YAC1B,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC;YAC3B,IAAI,IAAI,CAAC,aAAa,IAAI,CAAC,EAAE;gBACzB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;gBACvB,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC/B,IAAI,CAAC,eAAe,EAAE,CAAC;aAC1B;SACJ,EAAE,IAAI,CAAC,CAAC;KACZ;IAED,eAAe;QACX,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,EAAE,CAAA;KAClB;IAED,MAAM;QACF,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;QACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,aAAa,GAAG,KAAK,IAAI,IAAI,CAAC,CAAC;QACjE,MAAM,cAAc,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;QAElG,QACIA,2EAAS,cAAc,CAAS,EAClC;KACL;;;AC3DL,MAAM,YAAY,GAAG,8OAA8O,CAAC;AACpQ,wBAAe,YAAY;;MCKd,MAAM;;;;;;;IAOf,MAAM;QACF,QACIA,kEAAK,KAAK,EAAC,qBAAqB,IAC5BA,qEAAQ,KAAK,EAAC,YAAY,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,IAEpD,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,GAAGA,6BAAiB,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,MAAM,GAAG,CAEzE,CACP,EACT;KACJ;;;;;;;","names":["h"],"sources":["src/components/countdown-timer/countdown-timer.tsx","src/components/button/crm-button.css?tag=crm-button","src/components/button/index.tsx"],"sourcesContent":["import { Component, Prop, State, h } from '@stencil/core';\r\n\r\n@Component({\r\n tag: 'countdown-timer',\r\n})\r\nexport class CountdownTimer {\r\n\r\n @Prop() downtime: () => void;\r\n @Prop() dataCriacao: string;\r\n @Prop() minutos: number = 6;\r\n @Prop() segundos: number = 60;\r\n\r\n @State() tempoRestante: number; // em milissegundos\r\n\r\n private intervalId: any;\r\n\r\n componentWillLoad() {\r\n const tempoTotal = this.minutos * this.segundos * 1000;\r\n const data = new Date(this.dataCriacao);\r\n const agora = new Date();\r\n const tempoPassado = agora.getTime() - data.getTime();\r\n\r\n if (tempoPassado >= tempoTotal) {\r\n this.tempoRestante = 0;\r\n this.onTempoEsgotado();\r\n } else {\r\n this.tempoRestante = tempoTotal - tempoPassado;\r\n this.startCountdown();\r\n }\r\n }\r\n\r\n disconnectedCallback() {\r\n clearInterval(this.intervalId);\r\n }\r\n\r\n startCountdown() {\r\n this.intervalId = setInterval(() => {\r\n this.tempoRestante -= 1000;\r\n if (this.tempoRestante <= 0) {\r\n this.tempoRestante = 0;\r\n clearInterval(this.intervalId);\r\n this.onTempoEsgotado();\r\n }\r\n }, 1000);\r\n }\r\n\r\n onTempoEsgotado() {\r\n console.log('Tempo esgotado! Executando ação...');\r\n this.downtime()\r\n }\r\n\r\n render() {\r\n const minutos = Math.floor(this.tempoRestante / 60000);\r\n const segundos = Math.floor((this.tempoRestante % 60000) / 1000);\r\n const tempoFormatado = `${String(minutos).padStart(2, '0')}:${String(segundos).padStart(2, '0')}`;\r\n\r\n return (\r\n <label> {tempoFormatado}</label>\r\n );\r\n }\r\n}\r\n","input, button {\r\n margin: 0;\r\n padding: 10px; /* Ajuste o valor conforme necessário */\r\n}\r\n\r\n.crm-contaner-button {\r\n height: auto;\r\n width: auto;\r\n}\r\n\r\n.crm-button {\r\n height: 48px;\r\n width: 100%;\r\n border: 1px solid #000;\r\n padding: 14px 20px;\r\n background-color: #000;\r\n color: #fff;\r\n /* font-size: 14px; */\r\n line-height: 20px;\r\n font-weight: 500;\r\n cursor: pointer;\r\n}","import { Component, Prop, h } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: 'crm-button',\r\n styleUrl: 'crm-button.css'\r\n})\r\nexport class Button {\r\n\r\n @Prop() txtBtn: string;\r\n @Prop() loading: boolean;\r\n\r\n @Prop() handleClick: () => void;\r\n\r\n render() {\r\n return (\r\n <div class=\"crm-contaner-button\">\r\n <button class=\"crm-button\" onClick={() => this.handleClick()}>\r\n {\r\n !this.loading ? this.txtBtn : <loading-spinner size=\"15px\" color=\"#fff\" />\r\n }\r\n </button>\r\n </div>\r\n )\r\n }\r\n}"],"version":3}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
const index = require('./index-a7537457.js');
|
6
|
-
const cart_helper = require('./cart.helper-701ea6b2.js');
|
7
|
-
|
8
|
-
const crmBonusCss = ".container-button{cursor:pointer;padding:5px 5px 5px 14px;}.section-crm{border:1px solid #dbd4d4;text-align:-webkit-center;margin-bottom:20px}.section-cart-crm{margin-top:10px}.section-cart-crm p{padding:0;margin:0px 0px 0px 15px}.button{top:50%;background-color:#6c6c7e;color:#fff;border:none;padding:15px;min-height:30px;min-width:120px;cursor:pointer;margin-left:10px;height:70px}.form-container{width:97%;display:flex;justify-content:space-around}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:0px}.form-container .btnCrm{background:#00162e;border-color:#00162e;width:30%;color:#fff}.message-alert{color:#df4d4d;margin-top:5px}";
|
9
|
-
const CrmBonus2Style0 = crmBonusCss;
|
10
|
-
|
11
|
-
const CrmBonus = class {
|
12
|
-
constructor(hostRef) {
|
13
|
-
index.registerInstance(this, hostRef);
|
14
|
-
this.loading = false;
|
15
|
-
this.cartWake = undefined;
|
16
|
-
}
|
17
|
-
async componentDidLoad() {
|
18
|
-
await this.loadCheckout();
|
19
|
-
}
|
20
|
-
async loadCheckout() {
|
21
|
-
this.cartWake = await cart_helper.getCart();
|
22
|
-
}
|
23
|
-
render() {
|
24
|
-
console.log('this.cartWake', this.cartWake);
|
25
|
-
return (index.h("div", { key: 'cc9dc7fa4262bf6cb5df716164ee9413f9a3bc6f' }, index.h("loading-container", { key: '4d5ff4d93a3769e609b630cc0760043458990e64', loading: this.loading }, index.h("h3", { key: 'f7f60857813f42b2735cc3ee6e73523fb4018f2b' }, "CARREGANDO...")), this.cartWake && (index.h("div", { key: 'bb86c641b03cbf94e50560a3d0d62d022cb80499' }, this.cartWake.id))));
|
26
|
-
}
|
27
|
-
static get assetsDirs() { return ["assets"]; }
|
28
|
-
};
|
29
|
-
CrmBonus.style = CrmBonus2Style0;
|
30
|
-
|
31
|
-
exports.crm_bonus_2 = CrmBonus;
|
32
|
-
|
33
|
-
//# sourceMappingURL=crm-bonus-2.cjs.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"crm-bonus-2.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,WAAW,GAAG,o8BAAo8B,CAAC;AACz9B,wBAAe,WAAW;;MCUb,QAAQ;;;uBAEE,KAAK;;;IAIxB,MAAM,gBAAgB;QAClB,MAAM,IAAI,CAAC,YAAY,EAAE,CAAA;KAC5B;IAED,MAAM,YAAY;QACd,IAAI,CAAC,QAAQ,GAAG,MAAMA,mBAAO,EAAE,CAAC;KACnC;IAED,MAAM;QAEF,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;QAE3C,QACIC,oEACIA,gFAAmB,OAAO,EAAE,IAAI,CAAC,OAAO,IACpCA,mFAAsB,CACN,EAEhB,IAAI,CAAC,QAAQ,KACTA,oEACK,IAAI,CAAC,QAAQ,CAAC,EAAE,CACf,CACT,CAEH,EAET;KACJ;;;;;;;","names":["getCart","h"],"sources":["src/components/crm-bonus/crm-bonus.css?tag=crm-bonus-2&encapsulation=shadow","src/components/crm-bonus/crmbonus.tsx"],"sourcesContent":["\r\n.container-button {\r\n /* max-width: 100%; */\r\n cursor: pointer;\r\n padding: 5px 5px 5px 14px;\r\n /* display: flex; */\r\n}\r\n\r\n/* padding: 0 15px 15px;\r\nborder: 1px solid #ddd;\r\nmargin-bottom: 20px; */\r\n\r\n.section-crm {\r\n border: 1px solid #dbd4d4;\r\n /* min-height: 50px; */\r\n text-align: -webkit-center;\r\n margin-bottom: 20px;\r\n}\r\n\r\n.section-cart-crm {\r\n margin-top: 10px;\r\n}\r\n\r\n.section-cart-crm p {\r\n padding: 0;\r\n margin: 0px 0px 0px 15px;\r\n}\r\n\r\n.button {\r\n top: 50%;\r\n background-color: #6c6c7e;\r\n color: #fff;\r\n border: none;\r\n /* border-radius: 10px; */\r\n padding: 15px;\r\n min-height: 30px;\r\n min-width: 120px;\r\n /* font-size: 20px; */\r\n cursor: pointer;\r\n margin-left: 10px;\r\n height: 70px;\r\n}\r\n\r\n.form-container {\r\n width: 97%;\r\n display: flex;\r\n justify-content: space-around;\r\n}\r\n\r\n\r\n.btn {\r\n display: inline-block;\r\n padding: 6px 12px;\r\n margin-bottom: 0;\r\n /* font-size: 14px; */\r\n font-weight: 400;\r\n line-height: 1.42857143;\r\n text-align: center;\r\n white-space: nowrap;\r\n vertical-align: middle;\r\n -ms-touch-action: manipulation;\r\n touch-action: manipulation;\r\n cursor: pointer;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n background-image: none;\r\n border: 1px solid transparent;\r\n border-radius: 0px;\r\n}\r\n\r\n.form-container .btnCrm {\r\n background: #00162e;\r\n border-color: #00162e;\r\n width: 30%;\r\n color: #fff;\r\n}\r\n\r\n.message-alert {\r\n color: #df4d4d;\r\n margin-top: 5px;\r\n}","import { Component, h, State } from \"@stencil/core\";\r\nimport { CartWake } from \"../../objectvalues/cart.wake\";\r\nimport { getCart } from \"../../helpers/cart.helper\";\r\n\r\n@Component({\r\n tag: 'crm-bonus-2',\r\n styleUrl: 'crm-bonus.css',\r\n assetsDirs: ['assets'],\r\n // scoped: true\r\n shadow: true\r\n})\r\nexport class CrmBonus {\r\n\r\n @State() loading = false;\r\n\r\n @State() cartWake: CartWake;\r\n\r\n async componentDidLoad() {\r\n await this.loadCheckout()\r\n }\r\n\r\n async loadCheckout() {\r\n this.cartWake = await getCart();\r\n }\r\n\r\n render() {\r\n\r\n console.log('this.cartWake', this.cartWake)\r\n\r\n return (\r\n <div>\r\n <loading-container loading={this.loading}>\r\n <h3>CARREGANDO...</h3>\r\n </loading-container>\r\n {\r\n this.cartWake && (\r\n <div>\r\n {this.cartWake.id}\r\n </div>\r\n )\r\n }\r\n </div>\r\n\r\n )\r\n }\r\n}"],"version":3}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
const index = require('./index-a7537457.js');
|
6
|
-
|
7
|
-
const crmBonusTray = class {
|
8
|
-
constructor(hostRef) {
|
9
|
-
index.registerInstance(this, hostRef);
|
10
|
-
}
|
11
|
-
render() {
|
12
|
-
return (index.h("div", { key: 'dd0877cfdd2e8e6d3614323e6e3a5c5304ab8785' }, "COMPONENT BYCODER"));
|
13
|
-
}
|
14
|
-
};
|
15
|
-
|
16
|
-
exports.crm_bonus_tray = crmBonusTray;
|
17
|
-
|
18
|
-
//# sourceMappingURL=crm-bonus-tray.cjs.entry.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"crm-bonus-tray.entry.cjs.js","mappings":";;;;;;MAKa,YAAY;;;;IAErB,MAAM;QACF,QACIA,wFAA4B,EAC/B;KACJ;;;;;","names":["h"],"sources":["src/tray-ecommerce/crm-bonus-tray.tsx"],"sourcesContent":["import { Component, h } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: 'crm-bonus-tray'\r\n})\r\nexport class crmBonusTray {\r\n\r\n render() {\r\n return (\r\n <div>COMPONENT BYCODER</div>\r\n )\r\n }\r\n}"],"version":3}
|
@@ -1,284 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
const index = require('./index-a7537457.js');
|
6
|
-
const cart_helper = require('./cart.helper-701ea6b2.js');
|
7
|
-
const i18n = require('./i18n-1ce6cb94.js');
|
8
|
-
const build_payload_helper = require('./build.payload.helper-cfd3173e.js');
|
9
|
-
|
10
|
-
const crmBonusCss = ".container-button{cursor:pointer;padding:5px 5px 5px 14px;}.section-crm{border:1px solid #dbd4d4;text-align:-webkit-center;margin-bottom:20px}.section-cart-crm{margin-top:10px}.section-cart-crm p{padding:0;margin:0px 0px 0px 15px}.button{top:50%;background-color:#6c6c7e;color:#fff;border:none;padding:15px;min-height:30px;min-width:120px;cursor:pointer;margin-left:10px;height:70px}.form-container{width:97%;display:flex;justify-content:space-around}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:0px}.form-container .btnCrm{background:#00162e;border-color:#00162e;width:30%;color:#fff}.message-alert{color:#df4d4d;margin-top:5px}";
|
11
|
-
const CrmBonusStyle0 = crmBonusCss;
|
12
|
-
|
13
|
-
const CrmBonus = class {
|
14
|
-
constructor(hostRef) {
|
15
|
-
index.registerInstance(this, hostRef);
|
16
|
-
this.crmBonusService = cart_helper.CrmBonusService.getInstance();
|
17
|
-
this.cart = undefined;
|
18
|
-
this.canhidden = false;
|
19
|
-
this.showModal = false;
|
20
|
-
this.cartWake = undefined;
|
21
|
-
this.customer = {
|
22
|
-
birthDate: "",
|
23
|
-
document: "",
|
24
|
-
name: "",
|
25
|
-
phone: ""
|
26
|
-
};
|
27
|
-
this.loading = false;
|
28
|
-
this.message = undefined;
|
29
|
-
this.phone = undefined;
|
30
|
-
this.canCancel = false;
|
31
|
-
this.amountCancel = undefined;
|
32
|
-
this.sent = undefined;
|
33
|
-
this.session = undefined;
|
34
|
-
this.loading_reprocess = false;
|
35
|
-
this.styles = i18n.defaultStyles;
|
36
|
-
this.reservedInfo = undefined;
|
37
|
-
}
|
38
|
-
async resetBonus() {
|
39
|
-
console.log('[START RESET BONUS]!!!!!');
|
40
|
-
try {
|
41
|
-
await this.crmBonusRef.processBonus(this.buildProducts(), true);
|
42
|
-
console.log('[BONUS RESETADO]!!!!!');
|
43
|
-
}
|
44
|
-
catch (err) {
|
45
|
-
this.loading = false;
|
46
|
-
console.log('[error ao reprocessar bonous]');
|
47
|
-
await this.crmBonusRef.setStep(i18n.StepFormEnum.STEP_PHONE);
|
48
|
-
}
|
49
|
-
finally {
|
50
|
-
this.loading = false;
|
51
|
-
}
|
52
|
-
}
|
53
|
-
async setloading() {
|
54
|
-
this.loading_reprocess = !this.loading_reprocess;
|
55
|
-
}
|
56
|
-
async reprocess() {
|
57
|
-
console.log("[CRMBONUS] - reprocess");
|
58
|
-
this.loading_reprocess = true;
|
59
|
-
try {
|
60
|
-
const isUse = localStorage.getItem(cart_helper.USED_KEY);
|
61
|
-
if (!isUse)
|
62
|
-
return;
|
63
|
-
this.cartWake = await cart_helper.getCart();
|
64
|
-
await this.resetBonus();
|
65
|
-
}
|
66
|
-
catch (err) {
|
67
|
-
console.debug('[watchProducts]', err.message);
|
68
|
-
}
|
69
|
-
finally {
|
70
|
-
this.loading_reprocess = false;
|
71
|
-
}
|
72
|
-
}
|
73
|
-
async componentWillLoad() {
|
74
|
-
window.addEventListener('productRemovedFromCart', async () => {
|
75
|
-
console.log('[CRMBONUS] - productRemovedFromCart');
|
76
|
-
await this.reprocess();
|
77
|
-
});
|
78
|
-
window.addEventListener('productAddedToCart', async () => {
|
79
|
-
console.log('[CRMBONUS] - productAddedToCart');
|
80
|
-
await this.reprocess();
|
81
|
-
});
|
82
|
-
document.querySelectorAll('form').forEach((el) => {
|
83
|
-
el.addEventListener("submit", () => {
|
84
|
-
console.log("[CRMBONUS] - Formulário está sendo submetido!");
|
85
|
-
// você pode marcar como "em submissão" aqui
|
86
|
-
setTimeout(async () => {
|
87
|
-
await this.reprocess();
|
88
|
-
});
|
89
|
-
});
|
90
|
-
});
|
91
|
-
await this.observerHandle();
|
92
|
-
i18n.instance.changeLanguage(i18n.instance.language);
|
93
|
-
await this.loadSession();
|
94
|
-
this.handleLoad();
|
95
|
-
await this.loadConfigStore();
|
96
|
-
}
|
97
|
-
async componentDidLoad() {
|
98
|
-
console.log('[did load]');
|
99
|
-
}
|
100
|
-
async observerHandle() {
|
101
|
-
const elements = document.getElementsByTagName('a');
|
102
|
-
//@ts-ignore
|
103
|
-
for (let el of elements) {
|
104
|
-
console.log('[el.href]', el.href);
|
105
|
-
if (el.href.includes('Produto/Delete')) {
|
106
|
-
el.addEventListener('click', async () => {
|
107
|
-
console.log('[CRMBONUS] - Produto removido do carrinho');
|
108
|
-
setTimeout(async () => {
|
109
|
-
await this.reprocess();
|
110
|
-
this.observerHandle();
|
111
|
-
}, 2000);
|
112
|
-
});
|
113
|
-
}
|
114
|
-
if (el.href.includes('Produto/Add')) {
|
115
|
-
el.addEventListener('click', async () => {
|
116
|
-
console.log('[CRMBONUS] - Produto adicionado ao carrinho');
|
117
|
-
setTimeout(async () => {
|
118
|
-
await this.reprocess();
|
119
|
-
this.observerHandle();
|
120
|
-
}, 2000);
|
121
|
-
});
|
122
|
-
}
|
123
|
-
}
|
124
|
-
}
|
125
|
-
async loadConfigStore() {
|
126
|
-
const [customization, infoBonus] = await Promise.all([
|
127
|
-
this.crmBonusService.getCustomization(this.cartWake.store.name),
|
128
|
-
cart_helper.getInfoBonusByCartIdAndStoreName(this.cartWake.id, this.cartWake.store.name)
|
129
|
-
]);
|
130
|
-
console.log('[infoBonus]', infoBonus);
|
131
|
-
this.reservedInfo = infoBonus;
|
132
|
-
if (customization.keepStoreFrontStyle) {
|
133
|
-
console.log('[bc:usar estilo da loja]');
|
134
|
-
this.styles = null;
|
135
|
-
}
|
136
|
-
}
|
137
|
-
async fetchCustomer(userId, storeName) {
|
138
|
-
try {
|
139
|
-
return await this.crmBonusService.getCustomer(userId, storeName);
|
140
|
-
}
|
141
|
-
catch (error) {
|
142
|
-
console.error('[fetchCustomer] Error fetching customer:', error);
|
143
|
-
return null;
|
144
|
-
}
|
145
|
-
}
|
146
|
-
async handleLoad() {
|
147
|
-
try {
|
148
|
-
if (this.cartWake.user.id) {
|
149
|
-
this.fetchCustomer(this.cartWake.user.id, this.cartWake.store.name).then((customer) => {
|
150
|
-
console.log('[bc:loading customer]');
|
151
|
-
if (customer) {
|
152
|
-
this.customer = customer;
|
153
|
-
console.log('customer', this.customer);
|
154
|
-
}
|
155
|
-
});
|
156
|
-
}
|
157
|
-
const amount = localStorage.getItem(this.cartWake.id);
|
158
|
-
if (amount) {
|
159
|
-
this.canCancel = true;
|
160
|
-
this.amountCancel = amount;
|
161
|
-
}
|
162
|
-
await this.buildAndGetProducts(this.cartWake.products);
|
163
|
-
}
|
164
|
-
catch (error) {
|
165
|
-
console.log('info customer');
|
166
|
-
}
|
167
|
-
}
|
168
|
-
async loadSession() {
|
169
|
-
this.cartWake = this.cart ? new cart_helper.CartWake(JSON.parse(this.cart)) : await cart_helper.getCart();
|
170
|
-
console.log('[bc:carregou carrinho]');
|
171
|
-
this.session = await this.crmBonusService.getToken(this.cartWake.store.name);
|
172
|
-
console.log('[bc:carregou session]');
|
173
|
-
setTimeout(() => {
|
174
|
-
this.loadSession();
|
175
|
-
}, 1500000);
|
176
|
-
}
|
177
|
-
async buildAndGetProducts(productsWake) {
|
178
|
-
console.log();
|
179
|
-
const key = `bc-products:${this.cartWake.id}`;
|
180
|
-
const productsString = JSON.stringify(productsWake);
|
181
|
-
localStorage.setItem(key, productsString);
|
182
|
-
const products_in_cache = JSON.parse(localStorage.getItem(key));
|
183
|
-
const products = [];
|
184
|
-
for (const product_cart of productsWake) {
|
185
|
-
const [pro] = products_in_cache.filter(p => p.ProdutoVarianteId == product_cart.ProdutoVarianteId);
|
186
|
-
//const [ajuste = { Valor: 0 }] = pro.Ajustes.filter(aj => aj.Tipo === "Formula")
|
187
|
-
if (pro) {
|
188
|
-
products.push(Object.assign(Object.assign({}, product_cart), { PrecoPor: pro.PrecoPor, PrecoDe: pro.PrecoDe, Quantidade: pro.Quantidade, Ajustes: pro.Ajustes }));
|
189
|
-
}
|
190
|
-
else {
|
191
|
-
products.push(product_cart);
|
192
|
-
}
|
193
|
-
}
|
194
|
-
this.cartWake.products = products; //cache_products ? JSON.parse(cache_products) : JSON.parse(this.productsInString);
|
195
|
-
}
|
196
|
-
async sendPin(phone) {
|
197
|
-
var _a, _b;
|
198
|
-
this.loading = true;
|
199
|
-
this.message = "";
|
200
|
-
try {
|
201
|
-
const _phone = phone.replace(/\D/g, '');
|
202
|
-
this.phone = Number(_phone);
|
203
|
-
this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.cartWake.store.name);
|
204
|
-
await this.crmBonusRef.setStep(i18n.StepFormEnum.STEP_PIN);
|
205
|
-
this.showModal = true;
|
206
|
-
}
|
207
|
-
catch (error) {
|
208
|
-
this.message = (_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message;
|
209
|
-
}
|
210
|
-
finally {
|
211
|
-
this.loading = false;
|
212
|
-
}
|
213
|
-
}
|
214
|
-
async sendPinName(customerName) {
|
215
|
-
var _a, _b;
|
216
|
-
this.loading = true;
|
217
|
-
this.message = "";
|
218
|
-
try {
|
219
|
-
this.customer.name = customerName;
|
220
|
-
this.sent = await this.crmBonusService.sendPin(this.phone, this.customer.name, this.cartWake.store.name);
|
221
|
-
await this.crmBonusRef.setStep(i18n.StepFormEnum.STEP_PIN);
|
222
|
-
this.showModal = true;
|
223
|
-
}
|
224
|
-
catch (error) {
|
225
|
-
this.message = (_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message;
|
226
|
-
}
|
227
|
-
finally {
|
228
|
-
this.loading = false;
|
229
|
-
}
|
230
|
-
}
|
231
|
-
buildProducts() {
|
232
|
-
return build_payload_helper.buildProductsByWake(this.cartWake.products);
|
233
|
-
}
|
234
|
-
handleCloseModal() {
|
235
|
-
this.showModal = false;
|
236
|
-
}
|
237
|
-
save(amount) {
|
238
|
-
localStorage.setItem(this.cartWake.id, amount.toString());
|
239
|
-
this.canCancel = true;
|
240
|
-
this.amountCancel = amount.toString();
|
241
|
-
}
|
242
|
-
async cancel() {
|
243
|
-
this.message = "";
|
244
|
-
this.loading = true;
|
245
|
-
try {
|
246
|
-
await this.crmBonusService.cancel(this.cartWake.id);
|
247
|
-
this.canCancel = false;
|
248
|
-
localStorage.removeItem(this.cartWake.id);
|
249
|
-
}
|
250
|
-
catch (error) {
|
251
|
-
this.message = "Não consegui cancelar o bônus, tente novamente!";
|
252
|
-
}
|
253
|
-
finally {
|
254
|
-
this.loading = false;
|
255
|
-
}
|
256
|
-
}
|
257
|
-
async handleSendPin(phone) {
|
258
|
-
this.message = "";
|
259
|
-
if (!phone) {
|
260
|
-
this.message = "Informe seu telefone";
|
261
|
-
return;
|
262
|
-
}
|
263
|
-
this.customer.phone = phone;
|
264
|
-
const _phone = phone.replace(/\D/g, '');
|
265
|
-
this.phone = Number(_phone);
|
266
|
-
if (this.customer.name) {
|
267
|
-
return this.sendPin(phone);
|
268
|
-
}
|
269
|
-
await this.crmBonusRef.setStep(i18n.StepFormEnum.STEP_NAME);
|
270
|
-
this.showModal = true;
|
271
|
-
}
|
272
|
-
render() {
|
273
|
-
if (this.canhidden) {
|
274
|
-
return null;
|
275
|
-
}
|
276
|
-
return (index.h("loading-container", { loading: this.loading_reprocess }, index.h("crm-giftback-form", { customStyles: this.styles, style: { position: "relative" }, ref: ref => this.crmBonusRef = ref, storeName: this.cartWake.store.name, products: this.buildProducts(), cartId: this.cartWake.id, customer: this.customer, loadProducts: () => this.buildProducts(), loadAll: () => this.handleLoad(), reservedInfo: this.reservedInfo })));
|
277
|
-
}
|
278
|
-
static get assetsDirs() { return ["assets"]; }
|
279
|
-
};
|
280
|
-
CrmBonus.style = CrmBonusStyle0;
|
281
|
-
|
282
|
-
exports.crm_bonus = CrmBonus;
|
283
|
-
|
284
|
-
//# sourceMappingURL=crm-bonus.cjs.entry.js.map
|