@lancom/shared 0.0.278 → 0.0.279

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.
Files changed (38) hide show
  1. package/assets/js/api/admin.js +3 -0
  2. package/components/common/progress_steps/progress-steps.scss +3 -1
  3. package/components/common/progress_steps/progress-steps.vue +9 -1
  4. package/components/editor/editor.vue +18 -1
  5. package/components/editor/editor_wizard/editor-wizard.scss +22 -0
  6. package/components/editor/editor_wizard/editor-wizard.vue +66 -0
  7. package/components/editor/editor_workspace/editor_workspace_side/editor-workspace-side.vue +1 -1
  8. package/components/product/wizard/wizard.scss +222 -0
  9. package/components/product/wizard/wizard.vue +274 -0
  10. package/components/product/wizard/wizard_print/wizard-print.scss +94 -0
  11. package/components/product/wizard/wizard_print/wizard-print.vue +130 -0
  12. package/components/product/wizard/wizard_print_area/wizard-print-area.scss +101 -0
  13. package/components/product/wizard/wizard_print_area/wizard-print-area.vue +86 -0
  14. package/components/product/wizard/wizard_print_layers/wizard-print-layers.scss +60 -0
  15. package/components/product/wizard/wizard_print_layers/wizard-print-layers.vue +67 -0
  16. package/components/product/wizard/wizard_print_layers/wizard_print_layer/wizard-print-layer.scss +47 -0
  17. package/components/product/wizard/wizard_print_layers/wizard_print_layer/wizard-print-layer.vue +210 -0
  18. package/components/product/wizard/wizard_print_review/wizard-print-review.scss +0 -0
  19. package/components/product/wizard/wizard_print_review/wizard-print-review.vue +71 -0
  20. package/components/product/wizard/wizard_print_size/wizard-print-size.scss +68 -0
  21. package/components/product/wizard/wizard_print_size/wizard-print-size.vue +49 -0
  22. package/components/product/wizard/wizard_print_size/wizard_print_area_print_size/wizard-print-area-print-size.scss +65 -0
  23. package/components/product/wizard/wizard_print_size/wizard_print_area_print_size/wizard-print-area-print-size.vue +106 -0
  24. package/components/product/wizard/wizard_print_text_or_logo/wizard-print-text-or-logo.scss +65 -0
  25. package/components/product/wizard/wizard_print_text_or_logo/wizard-print-text-or-logo.vue +116 -0
  26. package/components/product/wizard/wizard_print_text_or_logo/wizard_text_or_logo_form/wizard-text-or-logo-form.scss +138 -0
  27. package/components/product/wizard/wizard_print_text_or_logo/wizard_text_or_logo_form/wizard-text-or-logo-form.vue +157 -0
  28. package/components/product/wizard/wizard_print_type/wizard-print-type.scss +65 -0
  29. package/components/product/wizard/wizard_print_type/wizard-print-type.vue +49 -0
  30. package/components/product/wizard/wizard_print_type/wizard_print_area_print_type/wizard-print-area-print-type.scss +87 -0
  31. package/components/product/wizard/wizard_print_type/wizard_print_area_print_type/wizard-print-area-print-type.vue +114 -0
  32. package/components/product/wizard/wizard_print_underbase/wizard-print-underbase.scss +65 -0
  33. package/components/product/wizard/wizard_print_underbase/wizard-print-underbase.vue +49 -0
  34. package/components/product/wizard/wizard_print_underbase/wizard_print_area_print_underbase/wizard-print-area-print-underbase.scss +87 -0
  35. package/components/product/wizard/wizard_print_underbase/wizard_print_area_print_underbase/wizard-print-area-print-underbase.vue +90 -0
  36. package/package.json +1 -1
  37. package/store/layers.js +6 -1
  38. package/store/product.js +42 -0
@@ -0,0 +1,94 @@
1
+ @import "@/assets/scss/variables";
2
+
3
+ .WizardPrint {
4
+ &__title {
5
+ font-weight: 800;
6
+ font-size: 28px;
7
+ line-height: 38px;
8
+ color: $black;
9
+ margin-bottom: 26px;
10
+ }
11
+ &__items {
12
+ display: flex;
13
+ justify-content: space-around;
14
+ flex-wrap: wrap;
15
+ margin: -10px 0 0 -10px;
16
+ width: calc(100% + 10px);
17
+ }
18
+ &__item {
19
+ width: 190px;
20
+ margin: 10px 0 0 4px;
21
+ border: 1px solid $grey_3;
22
+ display: flex;
23
+ flex-direction: column;
24
+ align-items: center;
25
+ justify-content: center;
26
+ cursor: pointer;
27
+ position: relative;
28
+ @media (max-width: $bp-large-max) {
29
+ width: 175px;
30
+ }
31
+ &::after {
32
+ content: ' ';
33
+ position: absolute;
34
+ top: 10px;
35
+ right: 10px;
36
+ width: 20px;
37
+ height: 20px;
38
+ background: $gray;
39
+ border: 1px solid $grey_2;
40
+ border-radius: 10px;
41
+ }
42
+ &:hover {
43
+ border: 1px solid $green;
44
+ }
45
+ &--selected {
46
+ border: 1px solid $green;
47
+ &::after {
48
+ background-color: $green;
49
+ border: 1px solid $green;
50
+ background-image: url(/static/icons/checked.svg);
51
+ background-repeat: no-repeat;
52
+ background-position: center center;
53
+ }
54
+ }
55
+ &-name {
56
+ font-size: 16px;
57
+ line-height: 22px;
58
+ font-weight: bold;
59
+ text-transform: uppercase;
60
+ padding: 30px 15px 15px 15px;
61
+ display: flex;
62
+ flex-direction: column;
63
+ @media (max-width: $bp-large-max) {
64
+ padding: 30px 12px 15px 12px;
65
+ }
66
+ small {
67
+ font-size: 10px;
68
+ text-align: center;
69
+ }
70
+ }
71
+ &-description {
72
+ padding: 15px;
73
+ border-top: 1px solid $grey_2;
74
+ &--selected {
75
+ border-top: 1px solid $green;
76
+ }
77
+ ul {
78
+ list-style: circle;
79
+ margin-left: 13px;
80
+ li {
81
+ margin-bottom: 8px;
82
+ }
83
+ }
84
+ }
85
+ &-info {
86
+ position: absolute;
87
+ left: 10px;
88
+ top: 10px;
89
+ .Info__content {
90
+ font-size: 17px;
91
+ }
92
+ }
93
+ }
94
+ }
@@ -0,0 +1,130 @@
1
+ <template>
2
+ <div class="WizardPrint__wrapper">
3
+ <div class="WizardPrint__items">
4
+ <div
5
+ v-for="(orderPrintType, index) in avilableOrderPrintTypes"
6
+ :key="index"
7
+ class="WizardPrint__item"
8
+ :class="{
9
+ 'WizardPrint__item--selected': isSelectedPrintTypes(orderPrintType.types)
10
+ }"
11
+ @click="setAvailablePrintTypes(orderPrintType.types)">
12
+ <info
13
+ v-if="orderPrintType.info"
14
+ :has-popover="true"
15
+ icon-color="black"
16
+ class="WizardPrint__item-info">
17
+ <template slot="info">
18
+ {{ orderPrintType.info }}
19
+ </template>
20
+ </info>
21
+ <div
22
+ class="WizardPrint__item-name lc_subtitle1">
23
+ <div
24
+ v-if="orderPrintType.icon"
25
+ :class="`WizardPrint__item-icon Wizard__item-icon--${orderPrintType.icon}`"></div>
26
+ <span>{{ orderPrintType.name }}</span>
27
+ <small>{{ orderPrintType.subName }}</small>
28
+ </div>
29
+ <div
30
+ class="WizardPrint__item-description"
31
+ :class="{
32
+ 'WizardPrint__item-description--selected': isSelectedPrintTypes(orderPrintType.types)
33
+ }">
34
+ <ul class="lc_regular12">
35
+ <li
36
+ v-for="(description, dIndex) in orderPrintType.description"
37
+ :key="`${index}-${dIndex}`">
38
+ {{ description }}
39
+ </li>
40
+ </ul>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ <div class="ProgressSteps__controls">
45
+ <btn
46
+ :btn-block="true"
47
+ :btn-disabled="!availablePrintTypes"
48
+ btn-class="green"
49
+ btn-label="NEXT"
50
+ @onclick="$emit('next')">
51
+ <i
52
+ slot="icon-after"
53
+ class="icon-arrow-right"></i>
54
+ </btn>
55
+ </div>
56
+ </div>
57
+ </template>
58
+
59
+ <script>
60
+ import { mapGetters, mapMutations } from 'vuex';
61
+ import Info from '@lancom/shared/components/common/info-popover';
62
+
63
+ export default {
64
+ name: 'WizardPrint',
65
+ components: {
66
+ Info
67
+ },
68
+ data() {
69
+ return {
70
+ orderPrintTypes: [{
71
+ types: ['black print', 'full colour print'],
72
+ icon: 'printed',
73
+ name: 'DIGITAL',
74
+ subName: 'Minimum 12',
75
+ description: [
76
+ 'Free Setup on all orders',
77
+ 'Standard turn around time of 5 days',
78
+ 'Same or next day rush service available'
79
+ ]
80
+ // info: 'DIGITAL - minimum 12'
81
+ }, {
82
+ types: ['embroidery'],
83
+ name: 'Embroidery',
84
+ subName: 'Minimum 20',
85
+ description: [
86
+ 'Free setup on orders over 50 items',
87
+ 'Best for polo or high vis shirts',
88
+ 'Standard turn around time of 8-10 days'
89
+ ],
90
+ info: 'Embroidery'
91
+ }, {
92
+ types: ['screen print'],
93
+ name: 'Screen Printing',
94
+ subName: 'Minimum 25',
95
+ description: [
96
+ 'Setup cost of $50 per colour',
97
+ 'Most economical for large orders(over 250)',
98
+ 'Free repeat setups for 1 year on same design'
99
+ ]
100
+ }]
101
+ };
102
+ },
103
+ computed: {
104
+ ...mapGetters('product', ['product', 'availablePrintTypes', 'hasUnprintedPrice']),
105
+ avilableOrderPrintTypes() {
106
+ return this.orderPrintTypes.filter(orderPrintType => {
107
+ return (!orderPrintType.types && this.hasUnprintedPrice) || (orderPrintType.types || []).find(type => this.product.printTypes.find(printType => printType.type === type));
108
+ });
109
+ }
110
+ },
111
+ mounted() {
112
+ const [defaultPrintTypes] = this.avilableOrderPrintTypes;
113
+ if (defaultPrintTypes) {
114
+ this.setAvailablePrintTypes(defaultPrintTypes.types);
115
+ }
116
+ },
117
+ methods: {
118
+ ...mapMutations('product', [
119
+ 'setAvailablePrintTypes'
120
+ ]),
121
+ isSelectedPrintTypes(types) {
122
+ return (!types && !this.availablePrintTypes) || (types || []).find(type => (this.availablePrintTypes || []).includes(type));
123
+ }
124
+ }
125
+ };
126
+ </script>
127
+
128
+ <style lang="scss">
129
+ @import 'wizard-print';
130
+ </style>
@@ -0,0 +1,101 @@
1
+ @import "@/assets/scss/variables";
2
+
3
+ .WizardPrintArea {
4
+ &__title {
5
+ font-weight: 800;
6
+ font-size: 28px;
7
+ line-height: 38px;
8
+ color: $black;
9
+ margin-bottom: 26px;
10
+ }
11
+ &__areas {
12
+ display: flex;
13
+ justify-content: space-around;
14
+ flex-wrap: wrap;
15
+ margin: -10px 0 0 -10px;
16
+ width: calc(100% + 10px);
17
+ }
18
+ &__area {
19
+ width: 140px;
20
+ height: 122px;
21
+ margin: 10px 0 0 10px;
22
+ border: 1px solid $grey_3;
23
+ display: flex;
24
+ flex-direction: column;
25
+ align-items: center;
26
+ justify-content: center;
27
+ cursor: pointer;
28
+ position: relative;
29
+ &::after {
30
+ content: ' ';
31
+ position: absolute;
32
+ top: 10px;
33
+ right: 10px;
34
+ width: 20px;
35
+ height: 20px;
36
+ background: $gray;
37
+ border: 1px solid $grey_2;
38
+ border-radius: 10px;
39
+ }
40
+ &:hover {
41
+ border: 1px solid $green;
42
+ }
43
+ &--selected {
44
+ border: 1px solid $green;
45
+ &::after {
46
+ background-color: $green;
47
+ border: 1px solid $green;
48
+ background-image: url(~/static/icons/checked.svg);
49
+ background-repeat: no-repeat;
50
+ background-position: center center;
51
+ }
52
+ }
53
+ &--disabled {
54
+ pointer-events: none !important;
55
+ opacity: 0.4;
56
+ }
57
+
58
+ &-icon {
59
+ width: 60px;
60
+ height: 55px;
61
+ background-repeat: no-repeat;
62
+ background-size: contain;
63
+ background-position: center;
64
+
65
+ @each $type in tee {
66
+ @each $side in front, back, sleeve-left, sleeve-right {
67
+ &.#{$side}.#{$type} {
68
+ background-image: url(~/static/icons/#{$side}_#{$type}.svg);
69
+ }
70
+ }
71
+ }
72
+
73
+ // TEE - FRONT
74
+ @each $position in center, left, right {
75
+ &.front.tee.#{$position} {
76
+ background-image: url(~/static/icons/front_tee_#{$position}.svg);
77
+ }
78
+ }
79
+ // TEE - BACK
80
+ @each $position in center, top, bottom {
81
+ &.back.tee.#{$position} {
82
+ background-image: url(~/static/icons/back_tee_#{$position}.svg);
83
+ }
84
+ }
85
+ // TEE - SLEEVE LEFT
86
+ &.sleeve-left.tee.left {
87
+ background-image: url(~/static/icons/sleeve-left_tee_left.svg);
88
+ }
89
+ &.sleeve-right.tee.right {
90
+ background-image: url(~/static/icons/sleeve-right_tee_right.svg);
91
+ }
92
+ }
93
+ &-name {
94
+ font-size: 16px;
95
+ line-height: 22px;
96
+ margin-top: 10px;
97
+ font-weight: bold;
98
+ text-transform: uppercase;
99
+ }
100
+ }
101
+ }
@@ -0,0 +1,86 @@
1
+ <template>
2
+ <div class="WizardPrintArea__wrapper">
3
+ <div class="WizardPrintArea__areas">
4
+ <div
5
+ v-for="(area, index) in productPrintAreas"
6
+ :key="index"
7
+ class="WizardPrintArea__area"
8
+ :class="{
9
+ 'WizardPrintArea__area--selected': isSelectedPrintArea(area),
10
+ 'WizardPrintArea__area--disabled': isDisabledPrintArea(area)
11
+ }"
12
+ @click="toggleEditablePrintArea(area)">
13
+ <div
14
+ class="WizardPrintArea__area-icon"
15
+ :class="{
16
+ [area.alias]: true,
17
+ [area.side]: true,
18
+ [productType]: true
19
+ }">
20
+ </div>
21
+ <div class="WizardPrintArea__area-name">
22
+ {{ area.name }}
23
+ </div>
24
+ </div>
25
+ </div>
26
+ <div class="ProgressSteps__controls">
27
+ <btn
28
+ btn-class="white"
29
+ btn-label="BACK"
30
+ @onclick="$emit('prev')">
31
+ </btn>
32
+ <btn
33
+ btn-class="green"
34
+ btn-label="NEXT"
35
+ @onclick="$emit('next')">
36
+ <i
37
+ slot="icon-after"
38
+ class="icon-arrow-right"></i>
39
+ </btn>
40
+ </div>
41
+ </div>
42
+ </template>
43
+
44
+ <script>
45
+ import { mapGetters, mapMutations } from 'vuex';
46
+
47
+ export default {
48
+ name: 'WizardPrintArea',
49
+ data() {
50
+ return {
51
+ printAreas: []
52
+ };
53
+ },
54
+ computed: {
55
+ ...mapGetters('layers', ['editableLayer']),
56
+ ...mapGetters('product', ['product', 'editablePrintAreas', 'selectedPrintAreas', 'layers']),
57
+ productType() {
58
+ return 'tee' || this.product.productType.alias;
59
+ },
60
+ productPrintAreas() {
61
+ return this.product.printAreas || [];
62
+ }
63
+ },
64
+ mounted() {
65
+ if (!this.editablePrintAreas.length) {
66
+ const first = this.productPrintAreas.find(pa => !this.isDisabledPrintArea(pa));
67
+ if (first) {
68
+ this.addEditablePrintArea(first);
69
+ }
70
+ }
71
+ },
72
+ methods: {
73
+ ...mapMutations('product', ['addEditablePrintArea', 'toggleEditablePrintArea']),
74
+ isSelectedPrintArea(printArea) {
75
+ return this.editablePrintAreas.some(pa => pa._id === printArea._id);
76
+ },
77
+ isDisabledPrintArea(printArea) {
78
+ return !this.isSelectedPrintArea(printArea) && this.editableLayer?.printArea !== printArea._id && this.layers.find(layer => layer.printArea === printArea._id);
79
+ }
80
+ }
81
+ };
82
+ </script>
83
+
84
+ <style lang="scss">
85
+ @import 'wizard-print-area';
86
+ </style>
@@ -0,0 +1,60 @@
1
+ @import "@/assets/scss/variables";
2
+
3
+ .WizardPrintLayers {
4
+ &__wrapper {
5
+ position: relative;
6
+ }
7
+ &__title {
8
+ font-weight: 800;
9
+ font-size: 28px;
10
+ line-height: 38px;
11
+ color: $black;
12
+ margin-bottom: 26px;
13
+ }
14
+ &__table {
15
+ text-align: center;
16
+ @media (max-width: $bp-extra-small-max) {
17
+ width: 100%;
18
+ }
19
+ thead {
20
+ @media (max-width: $bp-extra-small-max) {
21
+ display: none;
22
+ }
23
+ }
24
+ tr {
25
+ @media (max-width: $bp-extra-small-max) {
26
+ border-top: 1px solid $gray;
27
+ padding-top: 20px;
28
+ display: flex;
29
+ flex-direction: column;
30
+ }
31
+ }
32
+ td,
33
+ th {
34
+ padding: 3px 6px;
35
+ }
36
+ th {
37
+ font-weight: 600;
38
+ font-size: 14px;
39
+ line-height: 22px;
40
+ color: $black;
41
+ }
42
+ td {
43
+ font-weight: bold;
44
+ font-size: 17px;
45
+ line-height: 27px;
46
+ color: $black;
47
+ }
48
+ }
49
+ &__modify {
50
+ position: absolute;
51
+ top: 0;
52
+ right: 0;
53
+ display: flex;
54
+ align-items: center;
55
+ &-delete {
56
+ cursor: pointer;
57
+ margin-left: 10px;
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,67 @@
1
+ <template>
2
+ <div class="WizardPrintLayers__wrapper">
3
+ <table class="WizardPrintLayers__table">
4
+ <thead>
5
+ <tr>
6
+ <th>
7
+ Printable area
8
+ </th>
9
+ <th>
10
+ Print size
11
+ </th>
12
+ <th>
13
+ Print type
14
+ </th>
15
+ <th>
16
+ Print option
17
+ </th>
18
+ <th>
19
+ Price
20
+ </th>
21
+ <th></th>
22
+ </tr>
23
+ </thead>
24
+ <wizard-print-layer
25
+ v-for="(layer, index) in layers"
26
+ :key="index"
27
+ :layer="layer"
28
+ :editable="editable"
29
+ @edit="$emit('edit', layer)"
30
+ @delete="$emit('delete', layer)">
31
+ </wizard-print-layer>
32
+ <slot name="see-pricing"></slot>
33
+ </table>
34
+ </div>
35
+ </template>
36
+
37
+ <script>
38
+ import WizardPrintLayer from './wizard_print_layer/wizard-print-layer';
39
+
40
+ export default {
41
+ name: 'WizardPrintLayers',
42
+ components: {
43
+ WizardPrintLayer
44
+ },
45
+ props: {
46
+ layers: {
47
+ type: Array,
48
+ required: true
49
+ },
50
+ editable: {
51
+ type: Boolean
52
+ }
53
+ },
54
+ computed: {
55
+ hasSingleLayer() {
56
+ return this.layers.length === 1;
57
+ },
58
+ isMultipleLayers() {
59
+ return this.layers.length > 1;
60
+ }
61
+ }
62
+ };
63
+ </script>
64
+
65
+ <style lang="scss">
66
+ @import 'wizard-print-layers';
67
+ </style>
@@ -0,0 +1,47 @@
1
+ @import "@/assets/scss/variables";
2
+
3
+ .WizardPrintLayer {
4
+ &__wrapper {
5
+ a {
6
+ text-decoration: none;
7
+ color: $black;
8
+ }
9
+ }
10
+ &__info {
11
+ width: 300px;
12
+ &-type {
13
+ text-transform: uppercase;
14
+ }
15
+ &-text {
16
+ &-item {
17
+ margin-bottom: 10px;
18
+ text-align: left;
19
+ }
20
+ &-title {
21
+ font-size: 12px;
22
+ color: $grey_1;
23
+ margin-bottom: 5px;
24
+ }
25
+ &-content {
26
+ font-size: 14px;
27
+ color: $black;
28
+ white-space: pre;
29
+ }
30
+ }
31
+ &-art {
32
+ img {
33
+ width: 100%;
34
+ margin: 10px 0;
35
+ }
36
+ a {
37
+ text-decoration: none;
38
+ color: $black;
39
+ }
40
+ }
41
+ }
42
+ &__layer-form {
43
+ margin: 20px 0;
44
+ // padding-bottom: 20px;
45
+ // border-bottom: 1px solid $gray;
46
+ }
47
+ }