@lancom/shared 0.0.288 → 0.0.289
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/assets/js/utils/fabric-helper.js +9 -8
- package/assets/js/utils/fonts-helper.js +3 -1
- package/assets/js/utils/shop.js +4 -0
- package/components/checkout/order/order-payment-information/order-payment-information.vue +3 -2
- package/components/editor/editor_layers/editor_layer_forms/editor_layer_form_text/editor-layer-form-text.vue +110 -111
- package/components/editor/editor_workspace/editor-workspace.vue +2 -1
- package/components/editor/editor_workspace/editor_workspace_side/editor-workspace-side.vue +1 -1
- package/components/quotes/quote_view/quote-view.mixin.js +1 -0
- package/components/quotes/quote_view/quote-view.vue +1 -1
- package/package.json +1 -1
- package/store/cart.js +2 -2
|
@@ -340,14 +340,15 @@ export default class FabricHelper {
|
|
|
340
340
|
object.on('changed', () => {
|
|
341
341
|
// this.dispatch('setField', { field: 'copy', value: object.text });
|
|
342
342
|
// this.dispatch('setField', { field: 'boundingRect', value: object.getBoundingRect() });
|
|
343
|
-
if (/\n/g.test(object.text || '')) {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
} else {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}
|
|
343
|
+
// if (/\n/g.test(object.text || '')) {
|
|
344
|
+
// this.discardActiveObjects();
|
|
345
|
+
// object.text = object.text.replace(/\n/g, '');
|
|
346
|
+
// this.dispatch('setField', { field: 'copy', value: object.text });
|
|
347
|
+
// } else {
|
|
348
|
+
// this.dispatch('setDeleteButtonPosition', object.oCoords.tr);
|
|
349
|
+
// // this.checkBoundingIntersection(object);
|
|
350
|
+
// }
|
|
351
|
+
this.dispatch('setDeleteButtonPosition', object.oCoords.tr);
|
|
351
352
|
});
|
|
352
353
|
}
|
|
353
354
|
/*
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
FONTS, FONTS_HEBREW, FONTS_HINDI, FONTS_BENGALI, FONTS_GUJARATI, FONTS_KANNADA, FONTS_MALYALAM,
|
|
4
4
|
FONTS_MARATHI, FONTS_TAMIL, FONTS_TELUGU, FONTS_ORIYA
|
|
5
5
|
} from './../constants/fonts';
|
|
6
|
+
import Vue from 'vue';
|
|
6
7
|
|
|
7
8
|
const fontsLoadList = {};
|
|
8
9
|
|
|
@@ -61,8 +62,9 @@ export const getFormattedFont = alias => {
|
|
|
61
62
|
};
|
|
62
63
|
|
|
63
64
|
export const getFontPath = alias => {
|
|
65
|
+
const { PROD_CDN_URL, DEV_CDN_URL } = Vue.$env;
|
|
64
66
|
const { path } = getFont(alias) || {};
|
|
65
|
-
return path && staticLink(path);
|
|
67
|
+
return path && staticLink(`${PROD_CDN_URL || DEV_CDN_URL || ''}${path}`);
|
|
66
68
|
};
|
|
67
69
|
|
|
68
70
|
export const loadFont = alias => new Promise((resolve, reject) => {
|
package/assets/js/utils/shop.js
CHANGED
|
@@ -12,6 +12,10 @@ export function getShopCountrySettings(shop, country) {
|
|
|
12
12
|
...shop.settings.depositInfo,
|
|
13
13
|
...settingsValues(countrySetting?.settings?.depositInfo)
|
|
14
14
|
},
|
|
15
|
+
order: {
|
|
16
|
+
...shop.settings.order,
|
|
17
|
+
...settingsValues(countrySetting?.settings?.order)
|
|
18
|
+
},
|
|
15
19
|
pricing: {
|
|
16
20
|
...shop.settings.pricing,
|
|
17
21
|
...settingsValues(countrySetting?.settings?.pricing)
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
@click="updatePaymentType(true)">
|
|
24
24
|
<checked-icon :checked="isDepositPayment" />
|
|
25
25
|
<span class="lc_regular12 lc__grey1 OrderPaymentInformation__checkbox-label">
|
|
26
|
-
|
|
26
|
+
Bank Transfer
|
|
27
27
|
</span>
|
|
28
28
|
</label>
|
|
29
29
|
</div>
|
|
@@ -110,6 +110,7 @@ export default {
|
|
|
110
110
|
};
|
|
111
111
|
},
|
|
112
112
|
computed: {
|
|
113
|
+
...mapGetters(['MESSAGES']),
|
|
113
114
|
...mapGetters(['country', 'currency']),
|
|
114
115
|
...mapGetters(['orderSettings']),
|
|
115
116
|
...mapGetters('order', ['card']),
|
|
@@ -189,7 +190,7 @@ export default {
|
|
|
189
190
|
this.$emit('next');
|
|
190
191
|
} else {
|
|
191
192
|
this.$nextTick(async () => {
|
|
192
|
-
const message = `Unfortunately our payment gateway has reported the following error: '${this.errorMessage}'. Please check your card number and try again. Alternatively you can proceed with a 'pay later' order and receive an email confirmation now and pay via credit card or
|
|
193
|
+
const message = `Unfortunately our payment gateway has reported the following error: '${this.errorMessage}'. Please check your card number and try again. Alternatively you can proceed with a 'pay later' order and receive an email confirmation now and pay via credit card or bank transfer`;
|
|
193
194
|
const options = { submitLabel: 'PAY LATER', cancelLabel: 'TRY AGAIN', warning: true };
|
|
194
195
|
const isSwitchToDeposit = await this.showConfirmationModal(message, options);
|
|
195
196
|
if (isSwitchToDeposit) {
|
|
@@ -16,133 +16,132 @@
|
|
|
16
16
|
class="form-label">
|
|
17
17
|
Write your text
|
|
18
18
|
</label>
|
|
19
|
-
<
|
|
19
|
+
<textarea
|
|
20
20
|
id="copy"
|
|
21
21
|
ref="copy"
|
|
22
22
|
v-model="copy"
|
|
23
23
|
type="text"
|
|
24
24
|
name="copy"
|
|
25
|
+
style="height: 100px;"
|
|
25
26
|
class="form-field bordered labelless"
|
|
26
27
|
placeholder="Your text here"
|
|
27
|
-
:class="{ filled: copy }"
|
|
28
|
+
:class="{ filled: copy }"></textarea>
|
|
28
29
|
</validation-provider>
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
<div
|
|
31
|
+
v-if="copy.includes('\n')"
|
|
32
|
+
class="form-row">
|
|
33
|
+
<div class="form-label">
|
|
34
|
+
Align text
|
|
35
|
+
</div>
|
|
36
|
+
<div class="EditorLayerFormText__align-options">
|
|
37
|
+
<div
|
|
38
|
+
class="EditorLayerFormText__align-option ripple"
|
|
39
|
+
:class="{ active: textAlign === 'left' }"
|
|
40
|
+
@click="textAlign = 'left'">
|
|
41
|
+
<i class="icon-align-left"></i>
|
|
35
42
|
</div>
|
|
36
|
-
<div
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<i class="icon-align-left"></i>
|
|
42
|
-
</div>
|
|
43
|
-
<div
|
|
44
|
-
class="EditorLayerFormText__align-option ripple"
|
|
45
|
-
:class="{ active: textAlign === 'center' }"
|
|
46
|
-
@click="textAlign = 'center'">
|
|
47
|
-
<i class="icon-align-center"></i>
|
|
48
|
-
</div>
|
|
49
|
-
<div
|
|
50
|
-
class="EditorLayerFormText__align-option ripple"
|
|
51
|
-
:class="{ active: textAlign === 'right' }"
|
|
52
|
-
@click="textAlign = 'right'">
|
|
53
|
-
<i class="icon-align-right"></i>
|
|
54
|
-
</div>
|
|
43
|
+
<div
|
|
44
|
+
class="EditorLayerFormText__align-option ripple"
|
|
45
|
+
:class="{ active: textAlign === 'center' }"
|
|
46
|
+
@click="textAlign = 'center'">
|
|
47
|
+
<i class="icon-align-center"></i>
|
|
55
48
|
</div>
|
|
49
|
+
<div
|
|
50
|
+
class="EditorLayerFormText__align-option ripple"
|
|
51
|
+
:class="{ active: textAlign === 'right' }"
|
|
52
|
+
@click="textAlign = 'right'">
|
|
53
|
+
<i class="icon-align-right"></i>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="form-row low-dense">
|
|
58
|
+
<font-family-select
|
|
59
|
+
v-model="fontFamily"
|
|
60
|
+
@input="selectFont"
|
|
61
|
+
@select="selectFont" />
|
|
62
|
+
<input
|
|
63
|
+
type="text"
|
|
64
|
+
:value="fontFamily"
|
|
65
|
+
:class="{ 'filled': fontFamily }"
|
|
66
|
+
class="form-hidden-validator form-field" />
|
|
67
|
+
</div>
|
|
68
|
+
<div class="form-row--cols low-dense">
|
|
69
|
+
<div class="form-col col-half">
|
|
70
|
+
<label class="form-label">
|
|
71
|
+
Text color
|
|
72
|
+
</label>
|
|
73
|
+
<color-picker v-model="fill" />
|
|
56
74
|
</div>
|
|
57
|
-
<div class="form-
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
75
|
+
<div class="form-col col-half">
|
|
76
|
+
<label
|
|
77
|
+
for="fontSize"
|
|
78
|
+
class="form-label">
|
|
79
|
+
Text size
|
|
80
|
+
</label>
|
|
81
|
+
<i
|
|
82
|
+
class="icon-minus form-icon-left EditorLayerFormText__field-action"
|
|
83
|
+
@click="decreaseFontSize">
|
|
84
|
+
</i>
|
|
62
85
|
<input
|
|
86
|
+
id="fontSize"
|
|
87
|
+
ref="fontSize"
|
|
88
|
+
v-model.number="fontSize"
|
|
89
|
+
name="fontSize"
|
|
63
90
|
type="text"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
class="form-
|
|
91
|
+
class="form-field icon-inside-lr filled centered labelless" />
|
|
92
|
+
<i
|
|
93
|
+
class="icon-plus form-icon-right EditorLayerFormText__field-action"
|
|
94
|
+
@click="increaseFontSize">
|
|
95
|
+
</i>
|
|
67
96
|
</div>
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
class="form-label">
|
|
79
|
-
Text size
|
|
80
|
-
</label>
|
|
81
|
-
<i
|
|
82
|
-
class="icon-minus form-icon-left EditorLayerFormText__field-action"
|
|
83
|
-
@click="decreaseFontSize">
|
|
84
|
-
</i>
|
|
85
|
-
<input
|
|
86
|
-
id="fontSize"
|
|
87
|
-
ref="fontSize"
|
|
88
|
-
v-model.number="fontSize"
|
|
89
|
-
name="fontSize"
|
|
90
|
-
type="text"
|
|
91
|
-
class="form-field icon-inside-lr filled centered labelless" />
|
|
92
|
-
<i
|
|
93
|
-
class="icon-plus form-icon-right EditorLayerFormText__field-action"
|
|
94
|
-
@click="increaseFontSize">
|
|
95
|
-
</i>
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
<div class="form-row--cols low-dense">
|
|
99
|
-
<div class="form-col col-half">
|
|
100
|
-
<label class="form-label EditorLayerFormText__label-with-checkbox">
|
|
101
|
-
<span>
|
|
102
|
-
Outline color
|
|
103
|
-
</span>
|
|
104
|
-
<Checkbox v-model="enableOutline" />
|
|
105
|
-
</label>
|
|
106
|
-
<color-picker
|
|
107
|
-
v-if="enableOutline"
|
|
108
|
-
v-model="stroke">
|
|
109
|
-
</color-picker>
|
|
110
|
-
</div>
|
|
111
|
-
<div
|
|
97
|
+
</div>
|
|
98
|
+
<div class="form-row--cols low-dense">
|
|
99
|
+
<div class="form-col col-half">
|
|
100
|
+
<label class="form-label EditorLayerFormText__label-with-checkbox">
|
|
101
|
+
<span>
|
|
102
|
+
Outline color
|
|
103
|
+
</span>
|
|
104
|
+
<Checkbox v-model="enableOutline" />
|
|
105
|
+
</label>
|
|
106
|
+
<color-picker
|
|
112
107
|
v-if="enableOutline"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
108
|
+
v-model="stroke">
|
|
109
|
+
</color-picker>
|
|
110
|
+
</div>
|
|
111
|
+
<div
|
|
112
|
+
v-if="enableOutline"
|
|
113
|
+
class="form-col col-half">
|
|
114
|
+
<label
|
|
115
|
+
for="fontSize"
|
|
116
|
+
class="form-label">
|
|
117
|
+
Outline weight
|
|
118
|
+
</label>
|
|
119
|
+
<i
|
|
120
|
+
class="icon-minus form-icon-left EditorLayerFormText__field-action"
|
|
121
|
+
@click="decreaseStrokeWidth">
|
|
122
|
+
</i>
|
|
123
|
+
<input
|
|
124
|
+
id="strokeWidth"
|
|
125
|
+
ref="strokeWidth"
|
|
126
|
+
v-model.number="strokeWidth"
|
|
127
|
+
name="strokeWidth"
|
|
128
|
+
type="text"
|
|
129
|
+
class="form-field icon-inside-lr filled centered labelless" />
|
|
130
|
+
<i
|
|
131
|
+
class="icon-plus form-icon-right EditorLayerFormText__field-action"
|
|
132
|
+
@click="increaseStrokeWidth">
|
|
133
|
+
</i>
|
|
134
|
+
</div>
|
|
135
|
+
<div
|
|
136
|
+
v-else
|
|
137
|
+
class="form-col col-half">
|
|
138
|
+
|
|
140
139
|
</div>
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
</
|
|
140
|
+
</div>
|
|
141
|
+
<editor-layer-common-fields
|
|
142
|
+
:layer="layer"
|
|
143
|
+
@set-layer-field="data => $emit('set-layer-field', data)">
|
|
144
|
+
</editor-layer-common-fields>
|
|
146
145
|
</div>
|
|
147
146
|
</validation-observer>
|
|
148
147
|
</div>
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
}">
|
|
92
92
|
<editor-print-area-options
|
|
93
93
|
v-if="productDetailsLoaded"
|
|
94
|
-
|
|
94
|
+
:key="editableSide.id"
|
|
95
95
|
:product="product"
|
|
96
96
|
:selected="editablePrintArea && editablePrintArea._id"
|
|
97
97
|
:side="editableSide.id"
|
|
@@ -159,6 +159,7 @@ export default {
|
|
|
159
159
|
]),
|
|
160
160
|
selectTab(value) {
|
|
161
161
|
if (this.editableSide.id !== value) {
|
|
162
|
+
this.setEditablePrintArea(null);
|
|
162
163
|
this.setEditableSide({ id: value });
|
|
163
164
|
}
|
|
164
165
|
},
|
|
@@ -237,7 +237,7 @@ export default {
|
|
|
237
237
|
document.removeEventListener('mousedown', this.onDocumentStartClick);
|
|
238
238
|
window.removeEventListener('resize', this.onResize);
|
|
239
239
|
},
|
|
240
|
-
|
|
240
|
+
onDocumentStartClick({ target }) {
|
|
241
241
|
// todo: replace by click outside plugin?
|
|
242
242
|
console.log('target: ', target);
|
|
243
243
|
const isCanvasElement = target.tagName === 'CANVAS';
|
|
@@ -23,6 +23,7 @@ export default {
|
|
|
23
23
|
};
|
|
24
24
|
},
|
|
25
25
|
computed: {
|
|
26
|
+
...mapGetters(['MESSAGES']),
|
|
26
27
|
...mapGetters('quote', ['quote', 'option', 'proceedOption', 'selectedOption', 'depositInfo', 'shopContacts', 'quoteAddress', 'quoteId', 'options', 'gstTax']),
|
|
27
28
|
...mapGetters(['shop', 'country', 'currency'])
|
|
28
29
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
<div>{{ quote.address.additionalInfo }}</div>
|
|
39
39
|
</td>
|
|
40
40
|
<td class="w-50">
|
|
41
|
-
<div><b>DIRECT DEPOSIT DETAILS</b></div>
|
|
41
|
+
<div><b>{{ MESSAGES.DIRECT_DEPOSIT_DETAILS || 'DIRECT DEPOSIT DETAILS'}}</b></div>
|
|
42
42
|
<div>Bank: {{ depositInfo.bank }}</div>
|
|
43
43
|
<div>Account name: {{ depositInfo.accountName }}</div>
|
|
44
44
|
<div>BSB: {{ depositInfo.BSB }}</div>
|
package/package.json
CHANGED
package/store/cart.js
CHANGED
|
@@ -45,7 +45,7 @@ const getInvalidStockQuantities = entities => {
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
const getPrintsQuantities = entities => {
|
|
48
|
-
const printTypes = entities.reduce((types, e) => [...types, ...e.prints.map(({ printType }) => ({ ...printType, guid: `${e.guid}-${printType
|
|
48
|
+
const printTypes = entities.reduce((types, e) => [...types, ...e.prints.map(({ printType }) => ({ ...printType, guid: `${e.guid}-${printType?._id}` }))], []);
|
|
49
49
|
const grouped = groupBy(printTypes, 'guid');
|
|
50
50
|
const quantities = Object.keys(grouped).map(guid => {
|
|
51
51
|
const [{ name, minQuantity }] = grouped[guid];
|
|
@@ -279,7 +279,7 @@ function generateCalculatePriceData(entities, suburb, suppliersWithRates, coupon
|
|
|
279
279
|
return {
|
|
280
280
|
_id: print._id,
|
|
281
281
|
guid: print.guid,
|
|
282
|
-
costType: print.printType
|
|
282
|
+
costType: print.printType?.costType,
|
|
283
283
|
setupCost,
|
|
284
284
|
printCost,
|
|
285
285
|
freeSetupOver,
|