@descope-ui/descope-address-field 0.0.2 → 0.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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.0.4](https://github.com/descope/web-components-ui/compare/@descope-ui/descope-address-field-0.0.3...@descope-ui/descope-address-field-0.0.4) (2025-03-03)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `@descope-ui/common` updated to version `0.0.7`
|
|
10
|
+
* `@descope-ui/theme-input-wrapper` updated to version `0.0.7`
|
|
11
|
+
* `@descope-ui/descope-autocomplete-field` updated to version `0.0.5`
|
|
12
|
+
## [0.0.3](https://github.com/descope/web-components-ui/compare/@descope-ui/descope-address-field-0.0.2...@descope-ui/descope-address-field-0.0.3) (2025-03-03)
|
|
13
|
+
|
|
14
|
+
### Dependency Updates
|
|
15
|
+
|
|
16
|
+
* `@descope-ui/common` updated to version `0.0.6`
|
|
17
|
+
* `@descope-ui/theme-input-wrapper` updated to version `0.0.6`
|
|
18
|
+
* `@descope-ui/descope-autocomplete-field` updated to version `0.0.4`
|
|
5
19
|
## [0.0.2](https://github.com/descope/web-components-ui/compare/@descope-ui/descope-address-field-0.0.1...@descope-ui/descope-address-field-0.0.2) (2025-02-26)
|
|
6
20
|
|
|
7
21
|
### Dependency Updates
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope-ui/descope-address-field",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
6
|
"import": "./src/component/index.js"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@vaadin/custom-field": "24.3.4",
|
|
22
|
-
"@descope-ui/common": "0.0.
|
|
23
|
-
"@descope-ui/theme-input-wrapper": "0.0.
|
|
24
|
-
"@descope-ui/descope-autocomplete-field": "0.0.
|
|
22
|
+
"@descope-ui/common": "0.0.7",
|
|
23
|
+
"@descope-ui/theme-input-wrapper": "0.0.7",
|
|
24
|
+
"@descope-ui/descope-autocomplete-field": "0.0.5"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"link-workspace-packages": false
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
syncAttrs,
|
|
12
12
|
} from '@descope-ui/common/components-helpers';
|
|
13
13
|
import { compose } from '@descope-ui/common/utils';
|
|
14
|
-
import { AutocompleteFieldClass } from '@descope-ui/descope-autocomplete-field/class';
|
|
15
14
|
import { componentName as descopeInternalComponentName } from './descope-address-field-internal/AddressFieldInternal';
|
|
16
15
|
|
|
17
16
|
export const componentName = getComponentName('address-field');
|
|
@@ -128,6 +127,17 @@ export const AddressFieldClass = compose(
|
|
|
128
127
|
line-height: unset;
|
|
129
128
|
width: 100%;
|
|
130
129
|
}
|
|
130
|
+
|
|
131
|
+
${descopeInternalComponentName} {
|
|
132
|
+
display: inline-block;
|
|
133
|
+
box-sizing: border-box;
|
|
134
|
+
user-select: none;
|
|
135
|
+
max-width: 100%;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
${descopeInternalComponentName} ::slotted {
|
|
139
|
+
padding: 0;
|
|
140
|
+
}
|
|
131
141
|
`,
|
|
132
142
|
excludeAttrsSync: ['tabindex', 'error-message', 'label'],
|
|
133
143
|
componentName,
|
|
@@ -41,18 +41,6 @@ class RawAddressFieldInternal extends BaseInputClass {
|
|
|
41
41
|
super();
|
|
42
42
|
|
|
43
43
|
this.innerHTML = `
|
|
44
|
-
<style>
|
|
45
|
-
:host {
|
|
46
|
-
display: inline-block;
|
|
47
|
-
box-sizing: border-box;
|
|
48
|
-
user-select: none;
|
|
49
|
-
max-width: 100%;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
:host ::slotted {
|
|
53
|
-
padding: 0;
|
|
54
|
-
}
|
|
55
|
-
</style>
|
|
56
44
|
<div>
|
|
57
45
|
<descope-autocomplete-field></descope-autocomplete-field>
|
|
58
46
|
</div>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { componentName } from '../src/component';
|
|
2
2
|
import { withForm } from '@descope-ui/common/sb-helpers';
|
|
3
|
-
import { createBaseConnectorClass } from '@descope-ui/common/base-classes';
|
|
4
3
|
import {
|
|
5
4
|
labelControl,
|
|
6
5
|
placeholderControl,
|
|
@@ -41,22 +40,8 @@ const Template = ({
|
|
|
41
40
|
'address-limit': addressLimit,
|
|
42
41
|
errorMsgIcon,
|
|
43
42
|
}) => {
|
|
44
|
-
const addMockConnectorScript = `
|
|
45
|
-
<script>
|
|
46
|
-
const createBaseConnectorClass = ${createBaseConnectorClass};
|
|
47
|
-
setTimeout(() => {
|
|
48
|
-
const addressField = document.querySelector("descope-address-field");
|
|
49
|
-
if (addressField) {
|
|
50
|
-
addressField.connectorClasses = {
|
|
51
|
-
...addressField.connectorClasses,
|
|
52
|
-
"${MOCK_CONNECTOR_TEMPLATE}": ${MockConnector}
|
|
53
|
-
};
|
|
54
|
-
addressField.setAttribute("connector-template", "${MOCK_CONNECTOR_TEMPLATE}");
|
|
55
|
-
}
|
|
56
|
-
}, 0);
|
|
57
|
-
</script>`;
|
|
58
43
|
|
|
59
|
-
return
|
|
44
|
+
return `
|
|
60
45
|
<descope-address-field
|
|
61
46
|
size="${size}"
|
|
62
47
|
bordered="${bordered}"
|
|
@@ -72,9 +57,8 @@ const Template = ({
|
|
|
72
57
|
data-errormessage-value-missing="${customErrorMessage || ''}"
|
|
73
58
|
allow-custom-value="${allowCustomValue || false}"
|
|
74
59
|
min-search-length="${minSearchLength || ''}"
|
|
75
|
-
connector-template="${
|
|
76
|
-
|
|
77
|
-
}"
|
|
60
|
+
connector-template="${connectorTemplate !== MOCK_CONNECTOR_TEMPLATE ? connectorTemplate : ''
|
|
61
|
+
}"
|
|
78
62
|
public-api-key="${apiKey || ''}"
|
|
79
63
|
address-types="${addressTypes || ''}"
|
|
80
64
|
address-language="${addressLanguage || ''}"
|
|
@@ -82,13 +66,30 @@ const Template = ({
|
|
|
82
66
|
address-limit="${addressLimit || ''}"
|
|
83
67
|
${errorMsgIcon ? errorMessageIconAttrs : ''}
|
|
84
68
|
></descope-address-field>
|
|
85
|
-
|
|
86
|
-
`);
|
|
69
|
+
`;
|
|
87
70
|
};
|
|
88
71
|
|
|
89
72
|
export default {
|
|
90
73
|
component: componentName,
|
|
91
74
|
title: 'descope-address-field',
|
|
75
|
+
decorators: [(story, { args }) => {
|
|
76
|
+
if (args['connector-template'] === MOCK_CONNECTOR_TEMPLATE) {
|
|
77
|
+
setTimeout(() => {
|
|
78
|
+
const addressField = document.querySelector("descope-address-field");
|
|
79
|
+
if (addressField) {
|
|
80
|
+
addressField.connectorClasses = {
|
|
81
|
+
...addressField.connectorClasses,
|
|
82
|
+
[MOCK_CONNECTOR_TEMPLATE]: MockConnector
|
|
83
|
+
};
|
|
84
|
+
addressField.setAttribute("connector-template", MOCK_CONNECTOR_TEMPLATE);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return story();
|
|
90
|
+
},
|
|
91
|
+
withForm
|
|
92
|
+
],
|
|
92
93
|
argTypes: {
|
|
93
94
|
...labelControl,
|
|
94
95
|
...placeholderControl,
|