@designcrowd/fe-shared-lib 1.1.3 → 1.1.4-rte-1
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/package.json +1 -1
- package/{dist → public}/css/tailwind-brandCrowd.css +501 -582
- package/{dist → public}/css/tailwind-brandPage.css +425 -506
- package/{dist → public}/css/tailwind-crazyDomains.css +501 -582
- package/{dist → public}/css/tailwind-designCom.css +501 -582
- package/{dist → public}/css/tailwind-designCrowd.css +501 -582
- package/src/atoms/components/ButtonGroup/ButtonGroup.stories.js +12 -0
- package/src/atoms/components/Dropdown/Dropdown.vue +1 -1
- package/src/atoms/components/Dropdown/DropdownItem.vue +14 -2
- package/src/atoms/components/Icon/Icon.vue +6 -0
- package/src/atoms/components/Icon/icons/maker/spacing.vue +18 -0
- package/src/atoms/components/Icon/icons/maker/text-background-color.vue +12 -0
- package/src/atoms/components/Icon/icons/maker/text-color.vue +14 -0
- package/src/atoms/components/NumberInput/NumberInput.stories.js +26 -0
- package/src/atoms/components/NumberInput/NumberInput.vue +119 -0
- package/src/atoms/components/NumberStepper/NumberStepper.stories.js +6 -2
- package/src/atoms/components/NumberStepper/NumberStepper.vue +39 -3
- package/src/experiences/clients/brand-page-api.client.js +17 -0
- package/src/experiences/components/PaymentConfigList/PaymentConfig.mixin.js +6 -0
- package/src/experiences/components/PaymentConfigList/PaymentConfigDeleteConfigModal.vue +106 -0
- package/src/experiences/components/PaymentConfigList/PaymentConfigList.vue +100 -14
|
@@ -4,44 +4,130 @@
|
|
|
4
4
|
<Loader />
|
|
5
5
|
</div>
|
|
6
6
|
<div v-else>
|
|
7
|
-
<
|
|
7
|
+
<div
|
|
8
8
|
v-for="(paymentConfig, index) in paymentConfigs"
|
|
9
9
|
:key="paymentConfig.id"
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
v-click-outside="onClickOutsideStripeOptions"
|
|
11
|
+
class="tw-relative"
|
|
12
12
|
>
|
|
13
13
|
<div
|
|
14
14
|
class="tw-w-full tw-flex tw-font-sans tw-text-sm tw-items-center tw-p-3 tw-gap-2 tw-rounded tw-bg-white tw-border tw-border-solid tw-border-grayscale-500 tw-text-secondary-500 hover:tw-bg-grayscale-200"
|
|
15
15
|
:class="{ 'tw-mb-2': index !== paymentConfigs.length - 1 }"
|
|
16
16
|
>
|
|
17
17
|
<img class="tw-h-6" :src="paymentConfig.paymentProviderImageUrl" alt="Payment provider's logo" />
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
<div class="tw-flex tw-gap-4 tw-w-full tw-items-center">
|
|
19
|
+
<div class="tw-flex status-alignment tw-justify-between tw-gap-2 tw-w-full">
|
|
20
|
+
<span class="tw-text-sm tw-grow tw-select-none tw-flex tw-flex-col">
|
|
21
|
+
<span>{{ paymentConfig.name }}</span>
|
|
22
|
+
<small class="stripe-acct">({{ paymentConfig.paymentProviderExternalId }})</small>
|
|
23
|
+
</span>
|
|
24
|
+
<p
|
|
25
|
+
class="tw-flex tw-items-center tw-h-fit tw-w-fit tw-text-xs tw-rounded-full tw-py-0.5 tw-my-0 tw-text-white tw-px-4 tw-outline-none tw-uppercase"
|
|
26
|
+
:class="getPaymentConfigStatusDisplayClasses(paymentConfig.status)"
|
|
27
|
+
>
|
|
28
|
+
{{ getPaymentConfigStatusDisplayText(paymentConfig.status) }}
|
|
29
|
+
</p>
|
|
30
|
+
</div>
|
|
31
|
+
<Button
|
|
32
|
+
icon="other"
|
|
33
|
+
variant="no-border"
|
|
34
|
+
icon-size="sm"
|
|
35
|
+
size="sm"
|
|
36
|
+
@on-click.stop="onClickStripeOptions(index)"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
28
39
|
</div>
|
|
29
|
-
|
|
40
|
+
|
|
41
|
+
<!-- Dropdown options -->
|
|
42
|
+
<ul
|
|
43
|
+
v-if="activeStripeOptionIndex === index"
|
|
44
|
+
class="tw-absolute tw-right-0 top-class tw-list-none tw-bg-white tw-rounded tw-border tw-border-solid tw-border-grayscale-500 tw-shadow-md tw-py-3 tw-z-30 tw-text-left"
|
|
45
|
+
>
|
|
46
|
+
<li
|
|
47
|
+
class="tw-py-2 tw-px-3 tw-cursor-pointer tw-text-sm hover:tw-bg-grayscale-200"
|
|
48
|
+
@click="onClickDeleteConfirmation(paymentConfig.id)"
|
|
49
|
+
>
|
|
50
|
+
<span class="tw-whitespace-nowrap tw-flex tw-gap-2"
|
|
51
|
+
><Icon name="delete" size="sm" />Delete payment method</span
|
|
52
|
+
>
|
|
53
|
+
</li>
|
|
54
|
+
</ul>
|
|
55
|
+
</div>
|
|
30
56
|
</div>
|
|
31
57
|
</div>
|
|
58
|
+
<PaymentConfigDeleteConfigModal
|
|
59
|
+
v-if="showDeleteConfirmationModal"
|
|
60
|
+
:payment-config="selectedPaymentConfig"
|
|
61
|
+
:brand-page-token="brandPageToken"
|
|
62
|
+
@close-modal="onCloseModal"
|
|
63
|
+
@on-delete="onLoadPaymentConfigs"
|
|
64
|
+
/>
|
|
32
65
|
</template>
|
|
66
|
+
|
|
33
67
|
<script>
|
|
34
68
|
import Loader from '../../../../src/atoms/components/Loader/Loader.vue';
|
|
69
|
+
import Button from '../../../../src/atoms/components/Button/Button.vue';
|
|
70
|
+
import PaymentConfigDeleteConfigModal from './PaymentConfigDeleteConfigModal.vue';
|
|
71
|
+
import Icon from '../../../../src/atoms/components/Icon/Icon.vue';
|
|
35
72
|
|
|
36
73
|
import PaymentConfigMixin from './PaymentConfig.mixin';
|
|
37
74
|
|
|
38
75
|
export default {
|
|
39
76
|
components: {
|
|
40
77
|
Loader,
|
|
78
|
+
Button,
|
|
79
|
+
Icon,
|
|
80
|
+
PaymentConfigDeleteConfigModal,
|
|
41
81
|
},
|
|
82
|
+
|
|
42
83
|
mixins: [PaymentConfigMixin],
|
|
84
|
+
emits: ['on-load'],
|
|
85
|
+
data() {
|
|
86
|
+
return {
|
|
87
|
+
activeStripeOptionIndex: null,
|
|
88
|
+
showDeleteConfirmationModal: false,
|
|
89
|
+
};
|
|
90
|
+
},
|
|
91
|
+
methods: {
|
|
92
|
+
onClickStripeOptions(index) {
|
|
93
|
+
this.activeStripeOptionIndex = this.activeStripeOptionIndex === index ? null : index;
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
onClickDeleteConfirmation(id) {
|
|
97
|
+
this.selectedPaymentConfig = this.paymentConfigs.find((x) => x.id === id);
|
|
98
|
+
this.showDeleteConfirmationModal = true;
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
onCloseModal() {
|
|
102
|
+
this.showDeleteConfirmationModal = false;
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
onClickOutsideStripeOptions() {
|
|
106
|
+
this.activeStripeOptionIndex = null;
|
|
107
|
+
},
|
|
108
|
+
onLoadPaymentConfigs(paymentConfigId) {
|
|
109
|
+
this.showDeleteConfirmationModal = false;
|
|
110
|
+
this.paymentConfigs = this.paymentConfigs.filter((p) => p.id !== paymentConfigId);
|
|
111
|
+
this.$emit('on-load', this.paymentConfigs);
|
|
112
|
+
},
|
|
113
|
+
},
|
|
43
114
|
async mounted() {
|
|
44
115
|
await this.updatePaymentConfigs();
|
|
45
116
|
},
|
|
46
117
|
};
|
|
47
118
|
</script>
|
|
119
|
+
<style>
|
|
120
|
+
.top-class {
|
|
121
|
+
top: 3rem;
|
|
122
|
+
}
|
|
123
|
+
@media (min-width: 640px) {
|
|
124
|
+
.status-alignment {
|
|
125
|
+
@apply tw-flex-row tw-items-center;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
@media (max-width: 640px) {
|
|
129
|
+
.status-alignment {
|
|
130
|
+
@apply tw-flex-col;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
</style>
|