@bcrs-shared-components/base-address 3.0.2 → 3.0.4
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/BaseAddress.stories.ts +52 -53
- package/BaseAddress.vue +381 -381
- package/LICENSE +201 -201
- package/factories/address-factory.ts +216 -216
- package/factories/countries-provinces-factory.ts +78 -78
- package/factories/index.ts +3 -3
- package/factories/validation-factory.ts +42 -42
- package/index.ts +1 -1
- package/package.json +5 -12
- package/resources/default-schema.ts +42 -42
- package/resources/index.ts +1 -1
- package/factories/vuelidate-validation-factory.ts +0 -118
package/BaseAddress.stories.ts
CHANGED
|
@@ -1,53 +1,52 @@
|
|
|
1
|
-
import { Meta } from '@storybook/vue3'
|
|
2
|
-
import BaseAddress from './BaseAddress.vue'
|
|
3
|
-
import { AddressIF } from '@bcrs-shared-components/interfaces'
|
|
4
|
-
import { DefaultSchema } from './resources/default-schema'
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Component/BaseAddress',
|
|
8
|
-
component: BaseAddress
|
|
9
|
-
} as Meta
|
|
10
|
-
|
|
11
|
-
const Template = (args: AddressIF) => ({
|
|
12
|
-
components: { BaseAddress },
|
|
13
|
-
setup () {
|
|
14
|
-
return { args }
|
|
15
|
-
},
|
|
16
|
-
template: '<BaseAddress v-bind="args" />'
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
export const Default = Template.bind({})
|
|
20
|
-
Default['args'] = {
|
|
21
|
-
value: {
|
|
22
|
-
streetAddress: '',
|
|
23
|
-
streetAddressAdditional: '',
|
|
24
|
-
addressCity: '',
|
|
25
|
-
addressRegion: '',
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
1
|
+
import { Meta } from '@storybook/vue3'
|
|
2
|
+
import BaseAddress from './BaseAddress.vue'
|
|
3
|
+
import { AddressIF } from '@bcrs-shared-components/interfaces'
|
|
4
|
+
import { DefaultSchema } from './resources/default-schema'
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Component/BaseAddress',
|
|
8
|
+
component: BaseAddress
|
|
9
|
+
} as Meta
|
|
10
|
+
|
|
11
|
+
const Template = (args: AddressIF) => ({
|
|
12
|
+
components: { BaseAddress },
|
|
13
|
+
setup () {
|
|
14
|
+
return { args }
|
|
15
|
+
},
|
|
16
|
+
template: '<BaseAddress v-bind="args" />'
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
export const Default = Template.bind({})
|
|
20
|
+
Default['args'] = {
|
|
21
|
+
value: {
|
|
22
|
+
streetAddress: '',
|
|
23
|
+
streetAddressAdditional: '',
|
|
24
|
+
addressCity: '',
|
|
25
|
+
addressRegion: '',
|
|
26
|
+
postalCode: '',
|
|
27
|
+
deliveryInstructions: ''
|
|
28
|
+
},
|
|
29
|
+
schema: DefaultSchema,
|
|
30
|
+
editing: true
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const WithData = Template.bind({})
|
|
34
|
+
WithData['args'] = {
|
|
35
|
+
value: {
|
|
36
|
+
streetAddress: '1234 Sesame Street',
|
|
37
|
+
streetAddressAdditional: '4th Floor',
|
|
38
|
+
addressCity: 'Victoria',
|
|
39
|
+
addressRegion: 'British Columbia',
|
|
40
|
+
addressCountry: 'Canada',
|
|
41
|
+
postalCode: 'V8N 1A1',
|
|
42
|
+
deliveryInstructions: 'Leave at front door'
|
|
43
|
+
},
|
|
44
|
+
schema: DefaultSchema,
|
|
45
|
+
editing: true
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const WithValidation = Template.bind({})
|
|
49
|
+
WithValidation['args'] = {
|
|
50
|
+
...WithData['args']
|
|
51
|
+
// Additional logic for showcasing validation can be added here
|
|
52
|
+
}
|