crmbonus-component-wake 2.1.33-ngrok → 2.1.35-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-b08a12b2.js → cart.helper-abdd9916.js} +5 -3
- package/dist/cjs/cart.helper-abdd9916.js.map +1 -0
- 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 +968 -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 -19
- 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 +67 -32
- 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-0bb6b0e5.js → p-a7d4e578.js} +19 -21
- package/dist/components/p-a7d4e578.js.map +1 -0
- package/dist/components/{p-c90ea2e9.js → p-bea5a5c2.js} +5 -3
- package/dist/{esm/cart.helper-7101c047.js.map → components/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-028f43a1.js → p-d49313cb.js} +8 -8
- package/dist/components/{p-028f43a1.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-9b7bd1e1.entry.js → p-622d5644.entry.js} +2 -2
- package/dist/crmbonus-component-wake/p-7e52727e.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-99e8c3f7.entry.js +2 -0
- package/dist/crmbonus-component-wake/p-99e8c3f7.entry.js.map +1 -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-c74567c6.js → p-bea5a5c2.js} +2 -2
- package/dist/crmbonus-component-wake/{p-c74567c6.js.map → p-bea5a5c2.js.map} +1 -1
- package/dist/env.js +4 -2
- package/dist/env.js.map +1 -1
- package/dist/esm/app-modal.entry.js +1 -1
- package/dist/esm/{cart.helper-7101c047.js → cart.helper-89391005.js} +6 -4
- package/dist/esm/cart.helper-89391005.js.map +1 -0
- 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 +954 -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/cart.helper-b08a12b2.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-0bb6b0e5.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-c90ea2e9.js.map +0 -1
- 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-22dc17d2.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-22dc17d2.entry.js.map +0 -1
- package/dist/crmbonus-component-wake/p-4ed412c2.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-4ed412c2.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-558202ef.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-558202ef.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-7d608b81.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-7d608b81.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-f37f3f3f.entry.js +0 -2
- package/dist/crmbonus-component-wake/p-f37f3f3f.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-9b7bd1e1.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}
|