@lilaquadrat/design-core 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -3
- package/html/index.server.html +1 -8
- package/package.json +54 -54
- package/src/client-entry.ts +8 -8
- package/src/components/partials/error.partial.vue +19 -19
- package/src/components/partials/main-components.partial.vue +75 -70
- package/src/components/partials/qrcode.partial.vue +8 -8
- package/src/functions/AuthProviderFactory.ts +30 -0
- package/src/functions/PaymenyProviderFactory.ts +11 -11
- package/src/functions/auth0.provider.ts +75 -0
- package/src/functions/keycloak.provider.ts +228 -0
- package/src/functions/lila-dom.ts +50 -50
- package/src/functions/shopify.provider.ts +176 -154
- package/src/functions/stripe.provider.ts +120 -108
- package/src/globals.d.ts +1 -2
- package/src/index.ts +9 -7
- package/src/interfaces/AuthCallbackResult.interface.ts +5 -0
- package/src/interfaces/AuthConfig.interface.ts +13 -0
- package/src/interfaces/AuthProvider.interface.ts +15 -0
- package/src/interfaces/FrontendConfig.interface.ts +11 -40
- package/src/interfaces/GenericEvents.interface.ts +1 -1
- package/src/interfaces/IdTokenExtended.interface.ts +13 -4
- package/src/interfaces/PaymentProvider.interface.ts +2 -2
- package/src/interfaces/RenderOptions.interface.ts +12 -0
- package/src/libs/ActionNotice.ts +125 -125
- package/src/libs/Models.class.ts +219 -221
- package/src/main.ts +41 -36
- package/src/mixins/createCookieString.ts +50 -36
- package/src/mixins/createModelDeclaration.ts +22 -19
- package/src/mixins/createRouter.ts +12 -12
- package/src/mixins/date.ts +4 -2
- package/src/mixins/formatSize.ts +5 -5
- package/src/mixins/getAnchor.ts +1 -1
- package/src/mixins/getRoutes.ts +13 -25
- package/src/mixins/hasSlotContent.ts +22 -16
- package/src/mixins/hooks.ts +101 -60
- package/src/mixins/loadComponents.ts +60 -58
- package/src/mixins/logger.ts +17 -13
- package/src/mixins/replaceVariables.ts +10 -8
- package/src/mixins/scroll.ts +61 -45
- package/src/models/Address.model.ts +7 -7
- package/src/models/Contact.model.ts +14 -14
- package/src/plugins/analytics.ts +198 -0
- package/src/plugins/auth.ts +74 -60
- package/src/plugins/currency.ts +10 -10
- package/src/plugins/events.ts +101 -97
- package/src/plugins/filters.ts +21 -18
- package/src/plugins/replacer.ts +7 -6
- package/src/plugins/signupFlow.ts +45 -43
- package/src/plugins/traceable.ts +28 -26
- package/src/plugins/translations.ts +9 -9
- package/src/plugins/youtube.ts +39 -34
- package/src/routes.ts +108 -108
- package/src/server-entry.ts +75 -77
- package/src/stores/calls.store.ts +14 -14
- package/src/stores/cart.store.ts +116 -107
- package/src/stores/content.store.ts +87 -45
- package/src/stores/editor.store.ts +16 -16
- package/src/stores/files.store.ts +72 -72
- package/src/stores/main.store.ts +155 -109
- package/src/stores/user.store.ts +72 -68
- package/src/translations/de.ts +127 -127
- package/src/views/content.view.vue +81 -143
- package/src/views/download.view.vue +25 -23
- package/src/views/editor.view.vue +150 -125
- package/src/views/login.view.vue +35 -36
- package/src/views/signup-account.view.vue +14 -14
- package/tooling/cypress/config.ts +68 -54
- package/tooling/cypress/manifest-utils.mjs +34 -22
- package/tooling/cypress/run-parallel.mjs +41 -35
- package/tooling/cypress/support/commands.ts +458 -300
- package/tooling/eslint.config.js +1 -223
- package/tooling/preview.plugin.js +132 -0
- package/tooling/ssr-test/index.mjs +205 -203
- package/tooling/vite.d.ts +36 -0
- package/tooling/vite.js +234 -0
- package/src/interfaces/EditorConfiguration.interface.ts +0 -15
- package/tooling/preview.plugin.ts +0 -134
- package/tooling/stylelint.config.mjs +0 -24
- package/tooling/vite.ts +0 -260
package/src/server-entry.ts
CHANGED
|
@@ -1,113 +1,111 @@
|
|
|
1
1
|
import { renderToString } from 'vue/server-renderer';
|
|
2
|
-
import { getAppInstance
|
|
2
|
+
import { getAppInstance } from './main';
|
|
3
3
|
|
|
4
4
|
import { basename } from 'path';
|
|
5
|
-
import type
|
|
6
|
-
import type { RouteRecordRaw } from 'vue-router';
|
|
7
|
-
import useContentStore from './stores/content.store';
|
|
5
|
+
import type RenderOptions from './interfaces/RenderOptions.interface';
|
|
8
6
|
import { dynamicRoutes } from './routes';
|
|
9
7
|
import hooks from './mixins/hooks';
|
|
10
8
|
|
|
11
|
-
export async function render
|
|
12
|
-
const { app, router, pinia } = getAppInstance(context, options.routes ?? dynamicRoutes, false, options.components);
|
|
9
|
+
export async function render({ url, context, manifest, cdnUrl, components, routes }: RenderOptions) {
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
const { app, router, pinia } = getAppInstance(context, routes ?? dynamicRoutes, false, components);
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
await router.isReady();
|
|
13
|
+
hooks(router, { initAuth: false });
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
await router.push(url);
|
|
16
|
+
await router.isReady();
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
/**
|
|
22
19
|
* for pdfs all images must be preloaded
|
|
23
20
|
* because there will be no hydration
|
|
24
21
|
*/
|
|
25
|
-
|
|
22
|
+
if(context.renderTarget === 'pdf' && context.editor) {
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
context.editor.preloadImages = true;
|
|
28
25
|
|
|
29
|
-
|
|
26
|
+
}
|
|
30
27
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
// passing SSR context object which will be available via useSSRContext()
|
|
29
|
+
// @vitejs/plugin-vue injects code into a component's setup() that registers
|
|
30
|
+
// itself on ctx.modules. After the render, ctx.modules would contain all the
|
|
31
|
+
// components that have been instantiated during this render call.
|
|
32
|
+
const ctx: { modules?: Set<string> } = {};
|
|
33
|
+
const html = await renderToString(app, ctx);
|
|
34
|
+
const initialState = JSON.stringify(pinia.state.value).replace(/</g, '\\u003c');
|
|
35
|
+
// the SSR manifest generated by Vite contains module -> chunk/asset mapping
|
|
36
|
+
// which we can then use to determine what files need to be preloaded for this
|
|
37
|
+
// request.
|
|
38
|
+
const preloadLinks = renderPreloadLinks(ctx.modules as Set<string>, manifest, cdnUrl);
|
|
34
39
|
|
|
35
|
-
|
|
36
|
-
// @vitejs/plugin-vue injects code into a component's setup() that registers
|
|
37
|
-
// itself on ctx.modules. After the render, ctx.modules would contain all the
|
|
38
|
-
// components that have been instantiated during this render call.
|
|
39
|
-
const ctx: { modules?: Set<string> } = {};
|
|
40
|
-
const html = await renderToString(app, ctx);
|
|
41
|
-
const initialState = JSON.stringify(pinia.state.value).replace(/</g, '\\u003c');
|
|
42
|
-
// the SSR manifest generated by Vite contains module -> chunk/asset mapping
|
|
43
|
-
// which we can then use to determine what files need to be preloaded for this
|
|
44
|
-
// request.
|
|
45
|
-
const preloadLinks = renderPreloadLinks(ctx.modules as Set<string>, manifest, options);
|
|
40
|
+
return { html, preloadLinks, initialState, url };
|
|
46
41
|
|
|
47
|
-
return { html, preloadLinks, initialState, url };
|
|
48
42
|
}
|
|
49
43
|
|
|
50
|
-
function renderPreloadLinks
|
|
51
|
-
let links = '';
|
|
52
|
-
const seen = new Set();
|
|
44
|
+
function renderPreloadLinks(modulesSet: Set<string>, manifest: Record<string, string[]>, cdnUrl: string) {
|
|
53
45
|
|
|
54
|
-
|
|
46
|
+
let links = '';
|
|
47
|
+
const seen = new Set();
|
|
55
48
|
|
|
56
|
-
|
|
49
|
+
modulesSet?.forEach((id) => {
|
|
57
50
|
|
|
58
|
-
|
|
51
|
+
const files = manifest[id];
|
|
59
52
|
|
|
60
|
-
|
|
53
|
+
if (files) {
|
|
61
54
|
|
|
62
|
-
|
|
63
|
-
seen.add(file);
|
|
55
|
+
files.forEach((file: string) => {
|
|
64
56
|
|
|
65
|
-
|
|
57
|
+
if (!seen.has(file)) {
|
|
66
58
|
|
|
67
|
-
|
|
59
|
+
seen.add(file);
|
|
68
60
|
|
|
69
|
-
|
|
70
|
-
links += renderPreloadLink(depFile, options.cdnUrl);
|
|
71
|
-
seen.add(depFile);
|
|
72
|
-
}
|
|
61
|
+
const filename = basename(file);
|
|
73
62
|
|
|
74
|
-
|
|
63
|
+
if (manifest[filename]) {
|
|
75
64
|
|
|
76
|
-
|
|
77
|
-
}
|
|
65
|
+
for (const depFile of manifest[filename]) {
|
|
78
66
|
|
|
79
|
-
|
|
80
|
-
|
|
67
|
+
links += renderPreloadLink(depFile, cdnUrl);
|
|
68
|
+
seen.add(depFile);
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
}
|
|
81
73
|
|
|
82
|
-
|
|
74
|
+
links += renderPreloadLink(file, cdnUrl);
|
|
75
|
+
|
|
76
|
+
}
|
|
83
77
|
|
|
84
|
-
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
return links;
|
|
85
85
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
function renderPreloadLink
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
return `${link}>`;
|
|
113
|
-
}
|
|
88
|
+
function renderPreloadLink(file: string, base: string) {
|
|
89
|
+
|
|
90
|
+
if (!file) return '';
|
|
91
|
+
|
|
92
|
+
const fileExtMap: Record<string, { rel: string, as?: string, type?: string, crossorigin?: boolean }> = {
|
|
93
|
+
'.js': { rel: 'modulepreload', crossorigin: true },
|
|
94
|
+
'.css': { rel: 'stylesheet' },
|
|
95
|
+
'.woff': { rel: 'preload', as: 'font', type: 'font/woff', crossorigin: true },
|
|
96
|
+
'.woff2': { rel: 'preload', as: 'font', type: 'font/woff2', crossorigin: true }
|
|
97
|
+
};
|
|
98
|
+
const ext = Object.keys(fileExtMap).find(ext => file.endsWith(ext));
|
|
99
|
+
|
|
100
|
+
if (!ext) return '';
|
|
101
|
+
|
|
102
|
+
const { rel, as, type, crossorigin } = fileExtMap[ext];
|
|
103
|
+
let link = `<link rel="${rel}" href="${base}${file}"`;
|
|
104
|
+
|
|
105
|
+
if (as) link += ` as="${as}"`;
|
|
106
|
+
if (type) link += ` type="${type}"`;
|
|
107
|
+
if (crossorigin) link += ' crossorigin';
|
|
108
|
+
|
|
109
|
+
return `${link}>`;
|
|
110
|
+
|
|
111
|
+
}
|
|
@@ -4,29 +4,29 @@ import { v4 as uuid } from 'uuid';
|
|
|
4
4
|
|
|
5
5
|
export const useCallStore = defineStore('calls', () => {
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const calls = ref<Record<string, 'pending' | 'resolved' | 'rejected'>>({});
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
function addCall() {
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const id = uuid();
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
calls.value[id] = 'pending';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
return id;
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
}
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
function updateCall(id: string, state: 'pending' | 'resolved' | 'rejected') {
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
calls.value[id] = state;
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
return {
|
|
26
|
+
calls,
|
|
27
|
+
addCall,
|
|
28
|
+
updateCall
|
|
29
|
+
}
|
|
30
30
|
|
|
31
31
|
})
|
|
32
32
|
|
package/src/stores/cart.store.ts
CHANGED
|
@@ -6,180 +6,189 @@ import type { Agreement } from '@lilaquadrat/interfaces';
|
|
|
6
6
|
|
|
7
7
|
export const useCartStore = defineStore('cart', () => {
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
const products = ref<any[]>([]);
|
|
10
|
+
const costSummary = ref<number>(0);
|
|
11
|
+
const itemsQuantity = ref<number>(0);
|
|
12
|
+
const mainStore = useMainStore();
|
|
13
|
+
const paymentProvider = PaymentProviderFactory(mainStore.paymentProvider?.type as 'internal' | 'shopify' | 'stripe', mainStore.paymentProvider?.options);
|
|
14
|
+
const cartCache = ref();
|
|
15
|
+
const prename = ref<string>('');
|
|
16
|
+
const name = ref<string>('');
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
async function getCart(attributes?: Record<string, string>) {
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
if(cartCache.value) return Promise.resolve(cartCache.value);
|
|
21
|
+
if(!attributes) return Promise.reject('ATTRIBUTES_MISSING');
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
const list = attributes.list;
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
if(!list) return Promise.reject('NO_LIST_GIVEN');
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
const cartId = `lila-cart-${list}`;
|
|
28
|
+
const storedCart = localStorage.getItem(cartId);
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
if(storedCart) {
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
try {
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
products.value = await paymentProvider.getCartWithProducts(cartCache.value.id);
|
|
34
|
+
cartCache.value = JSON.parse(storedCart);
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
const cartDocument = await paymentProvider.getCartWithProducts(cartCache.value.id);
|
|
37
|
+
|
|
38
|
+
products.value = cartDocument.items || [];
|
|
39
|
+
prename.value = cartDocument.prename || '';
|
|
40
|
+
name.value = cartDocument.name || '';
|
|
41
|
+
|
|
42
|
+
} catch (error) {
|
|
36
43
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
console.error(error);
|
|
45
|
+
localStorage.removeItem(cartId);
|
|
46
|
+
cartCache.value = undefined;
|
|
47
|
+
await getCart(attributes);
|
|
41
48
|
|
|
42
|
-
|
|
49
|
+
}
|
|
43
50
|
|
|
44
|
-
|
|
51
|
+
updateSummary();
|
|
45
52
|
|
|
46
|
-
|
|
53
|
+
} else {
|
|
47
54
|
|
|
48
|
-
|
|
55
|
+
const newCart = await paymentProvider.getCart(attributes);
|
|
49
56
|
|
|
50
|
-
|
|
57
|
+
localStorage.setItem(cartId, JSON.stringify(newCart));
|
|
51
58
|
|
|
52
|
-
|
|
59
|
+
cartCache.value = newCart;
|
|
53
60
|
|
|
54
|
-
|
|
61
|
+
}
|
|
55
62
|
|
|
56
|
-
|
|
63
|
+
return Promise.resolve(cartCache.value);
|
|
57
64
|
|
|
58
|
-
|
|
65
|
+
}
|
|
59
66
|
|
|
60
|
-
|
|
67
|
+
function getFinishedCart(cartId: string) {
|
|
61
68
|
|
|
62
|
-
|
|
69
|
+
return paymentProvider.getFinishedCart(cartId);
|
|
63
70
|
|
|
64
|
-
|
|
71
|
+
}
|
|
65
72
|
|
|
66
|
-
|
|
73
|
+
function importCart(cart: any[]) {
|
|
67
74
|
|
|
68
|
-
|
|
75
|
+
console.log(cart);
|
|
69
76
|
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
products.value = cart;
|
|
78
|
+
updateSummary();
|
|
72
79
|
|
|
73
|
-
|
|
80
|
+
}
|
|
74
81
|
|
|
75
|
-
|
|
82
|
+
function updateSummary() {
|
|
76
83
|
|
|
77
|
-
|
|
78
|
-
|
|
84
|
+
let costs = 0;
|
|
85
|
+
let quantity = 0;
|
|
79
86
|
|
|
80
|
-
|
|
87
|
+
products.value.forEach((single) => {
|
|
81
88
|
|
|
82
|
-
|
|
83
|
-
|
|
89
|
+
costs += ((single.price.amount || 0) / 100) * single.quantity;
|
|
90
|
+
quantity += single.quantity;
|
|
84
91
|
|
|
85
|
-
|
|
92
|
+
});
|
|
86
93
|
|
|
87
|
-
|
|
88
|
-
|
|
94
|
+
costSummary.value = Math.round(costs * 100) / 100
|
|
95
|
+
itemsQuantity.value = quantity;
|
|
89
96
|
|
|
90
|
-
|
|
97
|
+
}
|
|
91
98
|
|
|
92
|
-
|
|
99
|
+
function updateAgreements(acceptedAgreements: Agreement[], customer?: { prename?: string, name?: string }) {
|
|
93
100
|
|
|
94
|
-
|
|
101
|
+
const attributes: Record<string, string> = {...cartCache.value.attributes};
|
|
95
102
|
|
|
96
|
-
|
|
103
|
+
acceptedAgreements.forEach((single, index) => {
|
|
97
104
|
|
|
98
|
-
|
|
105
|
+
attributes[`agreement_${index}`] = single.contentId;
|
|
99
106
|
|
|
100
|
-
|
|
107
|
+
});
|
|
101
108
|
|
|
102
|
-
|
|
103
|
-
|
|
109
|
+
console.log(acceptedAgreements, cartCache.value, attributes);
|
|
110
|
+
return paymentProvider.updateCartAttributes(cartCache.value.id, attributes, customer);
|
|
104
111
|
|
|
105
|
-
|
|
112
|
+
}
|
|
106
113
|
|
|
107
|
-
|
|
114
|
+
function getProductInCart(productId: string) {
|
|
108
115
|
|
|
109
|
-
|
|
110
|
-
|
|
116
|
+
if(!productId) return null;
|
|
117
|
+
return products.value.find((single) => single.id === productId);
|
|
111
118
|
|
|
112
|
-
|
|
119
|
+
}
|
|
113
120
|
|
|
114
|
-
|
|
121
|
+
async function addProduct(productId: string) {
|
|
115
122
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
123
|
+
const product = await paymentProvider.getProduct(productId);
|
|
124
|
+
const cart = await getCart();
|
|
125
|
+
const existingProduct = getProductInCart(product.id);
|
|
119
126
|
|
|
120
|
-
|
|
127
|
+
if(!existingProduct) {
|
|
121
128
|
|
|
122
|
-
|
|
129
|
+
const updatedProduct = await paymentProvider.addToCart(cart.id, product, 1);
|
|
123
130
|
|
|
124
|
-
|
|
125
|
-
|
|
131
|
+
products.value.push({...updatedProduct, quantity: 1});
|
|
132
|
+
updateSummary();
|
|
126
133
|
|
|
127
|
-
|
|
134
|
+
} else {
|
|
128
135
|
|
|
129
|
-
|
|
130
|
-
|
|
136
|
+
console.log('update instead of add', product.id, existingProduct.quantity);
|
|
137
|
+
updateQuantity(product.id, existingProduct.quantity + 1);
|
|
131
138
|
|
|
132
|
-
|
|
139
|
+
}
|
|
133
140
|
|
|
134
|
-
|
|
141
|
+
}
|
|
135
142
|
|
|
136
|
-
|
|
143
|
+
async function updateQuantity(productId: string, quantity: number) {
|
|
137
144
|
|
|
138
|
-
|
|
139
|
-
|
|
145
|
+
const existingProduct = getProductInCart(productId);
|
|
146
|
+
const cart = await getCart();
|
|
140
147
|
|
|
141
|
-
|
|
148
|
+
paymentProvider.updateQuantity(cart.id, existingProduct, quantity)
|
|
142
149
|
|
|
143
|
-
|
|
144
|
-
|
|
150
|
+
existingProduct.quantity = quantity;
|
|
151
|
+
updateSummary();
|
|
145
152
|
|
|
146
|
-
|
|
153
|
+
}
|
|
147
154
|
|
|
148
|
-
|
|
155
|
+
async function removeProduct(productId: string) {
|
|
149
156
|
|
|
150
|
-
|
|
151
|
-
|
|
157
|
+
const existingProduct = getProductInCart(productId);
|
|
158
|
+
const cart = await getCart();
|
|
152
159
|
|
|
153
|
-
|
|
160
|
+
await paymentProvider.removeFromCart(cart.id, existingProduct);
|
|
154
161
|
|
|
155
|
-
|
|
162
|
+
const index = products.value.findIndex((single) => single.id === productId);
|
|
156
163
|
|
|
157
|
-
|
|
158
|
-
|
|
164
|
+
products.value.splice(index, 1);
|
|
165
|
+
updateSummary();
|
|
159
166
|
|
|
160
|
-
|
|
167
|
+
}
|
|
161
168
|
|
|
162
|
-
|
|
169
|
+
function finalize() {
|
|
163
170
|
|
|
164
|
-
|
|
171
|
+
return paymentProvider.finalize(cartCache.value.id);
|
|
165
172
|
|
|
166
|
-
|
|
173
|
+
}
|
|
167
174
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
175
|
+
return {
|
|
176
|
+
addProduct,
|
|
177
|
+
updateQuantity,
|
|
178
|
+
removeProduct,
|
|
179
|
+
updateAgreements,
|
|
180
|
+
importCart,
|
|
181
|
+
products,
|
|
182
|
+
getProductInCart,
|
|
183
|
+
costSummary,
|
|
184
|
+
itemsQuantity,
|
|
185
|
+
getCart,
|
|
186
|
+
finalize,
|
|
187
|
+
getFinishedCart,
|
|
188
|
+
prename,
|
|
189
|
+
name,
|
|
190
|
+
cart: cartCache
|
|
191
|
+
}
|
|
183
192
|
|
|
184
193
|
})
|
|
185
194
|
|