@dso-toolkit/core 27.4.0 → 29.0.0
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/dist/cjs/dso-alert.cjs.entry.js +2 -2
- package/dist/cjs/dso-attachments-counter.cjs.entry.js +2 -2
- package/dist/cjs/dso-autosuggest.cjs.entry.js +3 -3
- package/dist/cjs/dso-badge.cjs.entry.js +2 -3
- package/dist/cjs/dso-banner.cjs.entry.js +2 -2
- package/dist/cjs/dso-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/dso-dropdown-menu.cjs.entry.js +47 -7
- package/dist/cjs/dso-highlight-box.cjs.entry.js +2 -2
- package/dist/cjs/dso-icon.cjs.entry.js +9 -3
- package/dist/cjs/dso-info_3.cjs.entry.js +4 -4
- package/dist/cjs/dso-label.cjs.entry.js +6 -7
- package/dist/cjs/dso-map-base-layers.cjs.entry.js +2 -2
- package/dist/cjs/dso-map-controls.cjs.entry.js +2 -2
- package/dist/cjs/dso-map-overlays.cjs.entry.js +2 -2
- package/dist/cjs/dso-ozon-content.cjs.entry.js +443 -0
- package/dist/cjs/dso-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/dso-progress-indicator.cjs.entry.js +2 -2
- package/dist/cjs/dso-toolkit.cjs.js +3 -3
- package/dist/cjs/dso-tooltip.cjs.entry.js +55 -23
- package/dist/cjs/{index-5c4e19ff.js → index-fcdfdd38.js} +97 -34
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{v4-14140ff3.js → v4-8e8d6fbc.js} +0 -0
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/badge/badge.js +0 -1
- package/dist/collection/components/icon/icon.css +1 -0
- package/dist/collection/components/icon/icon.js +2 -0
- package/dist/collection/components/label/label.css +8 -0
- package/dist/collection/components/label/label.js +5 -6
- package/dist/collection/components/ozon-content/ozon-content.css +100 -0
- package/dist/collection/components/ozon-content/ozon-content.interfaces.js +2 -0
- package/dist/collection/components/ozon-content/ozon-content.js +80 -0
- package/dist/collection/components/ozon-content/ozon-content.template.js +9 -0
- package/dist/collection/components/ozon-content/ozon-content.transformer.js +91 -0
- package/dist/collection/icon/dso-icon-sass-function.js +2 -2
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +567 -52
- package/dist/dso-toolkit/dso-toolkit.css +1 -1
- package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
- package/dist/dso-toolkit/p-08427682.entry.js +1 -0
- package/dist/dso-toolkit/p-0a7cb861.entry.js +1 -0
- package/dist/dso-toolkit/p-12f7e7d7.entry.js +5 -0
- package/dist/dso-toolkit/{p-ad90fe4d.js → p-19b890a3.js} +0 -0
- package/dist/dso-toolkit/p-262858dd.entry.js +1 -0
- package/dist/dso-toolkit/p-2c6e9460.entry.js +1 -0
- package/dist/dso-toolkit/p-2e7d535c.entry.js +1 -0
- package/dist/dso-toolkit/p-94500196.entry.js +1 -0
- package/dist/dso-toolkit/p-968d9e1d.entry.js +1 -0
- package/dist/dso-toolkit/p-a2357726.entry.js +1 -0
- package/dist/dso-toolkit/p-a40eeb32.js +1 -0
- package/dist/dso-toolkit/p-ae6209c6.entry.js +1 -0
- package/dist/dso-toolkit/p-b5b946de.entry.js +1 -0
- package/dist/dso-toolkit/p-c5acf7e2.entry.js +1 -0
- package/dist/dso-toolkit/p-c9c1bc8f.entry.js +1 -0
- package/dist/dso-toolkit/p-d748df48.entry.js +1 -0
- package/dist/dso-toolkit/p-dff52fb0.entry.js +1 -0
- package/dist/dso-toolkit/p-e4269e02.entry.js +1 -0
- package/dist/dso-toolkit/p-e7700d9e.entry.js +1 -0
- package/dist/dso-toolkit/p-eadba8c3.entry.js +1 -0
- package/dist/esm/dso-alert.entry.js +2 -2
- package/dist/esm/dso-attachments-counter.entry.js +2 -2
- package/dist/esm/dso-autosuggest.entry.js +3 -3
- package/dist/esm/dso-badge.entry.js +2 -3
- package/dist/esm/dso-banner.entry.js +2 -2
- package/dist/esm/dso-date-picker.entry.js +2 -2
- package/dist/esm/dso-dropdown-menu.entry.js +47 -7
- package/dist/esm/dso-highlight-box.entry.js +2 -2
- package/dist/esm/dso-icon.entry.js +9 -3
- package/dist/esm/dso-info_3.entry.js +4 -4
- package/dist/esm/dso-label.entry.js +6 -7
- package/dist/esm/dso-map-base-layers.entry.js +2 -2
- package/dist/esm/dso-map-controls.entry.js +2 -2
- package/dist/esm/dso-map-overlays.entry.js +2 -2
- package/dist/esm/dso-ozon-content.entry.js +439 -0
- package/dist/esm/dso-progress-bar.entry.js +2 -2
- package/dist/esm/dso-progress-indicator.entry.js +2 -2
- package/dist/esm/dso-toolkit.js +3 -3
- package/dist/esm/dso-tooltip.entry.js +55 -23
- package/dist/esm/{index-fbcbba93.js → index-61410be2.js} +97 -34
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{v4-929670b7.js → v4-fa4bb814.js} +0 -0
- package/dist/types/components/alert/alert.template.d.ts +2 -2
- package/dist/types/components/attachments-counter/attachments-counter.template.d.ts +1 -1
- package/dist/types/components/autosuggest/autosuggest.d.ts +2 -3
- package/dist/types/components/autosuggest/autosuggest.template.d.ts +1 -1
- package/dist/types/components/badge/badge.template.d.ts +1 -1
- package/dist/types/components/banner/banner.template.d.ts +1 -1
- package/dist/types/components/date-picker/date-picker.template.d.ts +3 -3
- package/dist/types/components/dropdown-menu/dropdown-menu.template.d.ts +1 -1
- package/dist/types/components/highlight-box/highlight-box.template.d.ts +1 -1
- package/dist/types/components/icon/icon.template.d.ts +1 -1
- package/dist/types/components/info/info.template.d.ts +1 -1
- package/dist/types/components/info-button/info-button.template.d.ts +1 -1
- package/dist/types/components/label/label.d.ts +1 -1
- package/dist/types/components/label/label.template.d.ts +1 -1
- package/dist/types/components/map-controls/map-controls.template.d.ts +1 -1
- package/dist/types/components/ozon-content/ozon-content.d.ts +13 -0
- package/dist/types/components/ozon-content/ozon-content.interfaces.d.ts +5 -0
- package/dist/types/components/ozon-content/ozon-content.template.d.ts +2 -0
- package/dist/types/components/ozon-content/ozon-content.transformer.d.ts +15 -0
- package/dist/types/components/progress-bar/progress-bar.template.d.ts +1 -1
- package/dist/types/components/progress-indicator/progress-indicator.template.d.ts +1 -1
- package/dist/types/components/selectable/selectable.template.d.ts +1 -1
- package/dist/types/components/tooltip/tooltip.template.d.ts +1 -1
- package/dist/types/components.d.ts +19 -2
- package/dist/types/globals.d.ts +12 -0
- package/dist/types/stencil-public-runtime.d.ts +190 -182
- package/loader/index.d.ts +0 -1
- package/package.json +34 -32
- package/dist/dso-toolkit/p-0acdd660.entry.js +0 -1
- package/dist/dso-toolkit/p-17e062d6.entry.js +0 -1
- package/dist/dso-toolkit/p-1b4843e8.entry.js +0 -1
- package/dist/dso-toolkit/p-28aaf3b6.entry.js +0 -1
- package/dist/dso-toolkit/p-372742ef.entry.js +0 -1
- package/dist/dso-toolkit/p-5d6816e3.entry.js +0 -1
- package/dist/dso-toolkit/p-6f031e8a.entry.js +0 -1
- package/dist/dso-toolkit/p-6f5a1e4e.entry.js +0 -1
- package/dist/dso-toolkit/p-70a658a0.entry.js +0 -1
- package/dist/dso-toolkit/p-8662814d.entry.js +0 -1
- package/dist/dso-toolkit/p-9174121a.entry.js +0 -1
- package/dist/dso-toolkit/p-a58e3c64.entry.js +0 -1
- package/dist/dso-toolkit/p-acae4c27.entry.js +0 -1
- package/dist/dso-toolkit/p-ae985488.js +0 -1
- package/dist/dso-toolkit/p-c06e43cd.entry.js +0 -1
- package/dist/dso-toolkit/p-e29b0619.entry.js +0 -1
- package/dist/dso-toolkit/p-e4ba88f4.entry.js +0 -5
- package/dist/dso-toolkit/p-f952c084.entry.js +0 -1
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-61410be2.js';
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
function assertString(input) {
|
|
6
|
+
var isString = typeof input === 'string' || input instanceof String;
|
|
7
|
+
|
|
8
|
+
if (!isString) {
|
|
9
|
+
var invalidType = _typeof(input);
|
|
10
|
+
|
|
11
|
+
if (input === null) invalidType = 'null';else if (invalidType === 'object') invalidType = input.constructor.name;
|
|
12
|
+
throw new TypeError("Expected a string but received a ".concat(invalidType));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function merge() {
|
|
17
|
+
var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
18
|
+
var defaults = arguments.length > 1 ? arguments[1] : undefined;
|
|
19
|
+
|
|
20
|
+
for (var key in defaults) {
|
|
21
|
+
if (typeof obj[key] === 'undefined') {
|
|
22
|
+
obj[key] = defaults[key];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return obj;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var default_fqdn_options = {
|
|
30
|
+
require_tld: true,
|
|
31
|
+
allow_underscores: false,
|
|
32
|
+
allow_trailing_dot: false,
|
|
33
|
+
allow_numeric_tld: false
|
|
34
|
+
};
|
|
35
|
+
function isFQDN(str, options) {
|
|
36
|
+
assertString(str);
|
|
37
|
+
options = merge(options, default_fqdn_options);
|
|
38
|
+
/* Remove the optional trailing dot before checking validity */
|
|
39
|
+
|
|
40
|
+
if (options.allow_trailing_dot && str[str.length - 1] === '.') {
|
|
41
|
+
str = str.substring(0, str.length - 1);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
var parts = str.split('.');
|
|
45
|
+
var tld = parts[parts.length - 1];
|
|
46
|
+
|
|
47
|
+
if (options.require_tld) {
|
|
48
|
+
// disallow fqdns without tld
|
|
49
|
+
if (parts.length < 2) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
|
|
54
|
+
return false;
|
|
55
|
+
} // disallow spaces && special characers
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
if (/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20\u00A9\uFFFD]/.test(tld)) {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
} // reject numeric TLDs
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
if (!options.allow_numeric_tld && /^\d+$/.test(tld)) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return parts.every(function (part) {
|
|
69
|
+
if (part.length > 63) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) {
|
|
74
|
+
return false;
|
|
75
|
+
} // disallow full-width chars
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
if (/[\uff01-\uff5e]/.test(part)) {
|
|
79
|
+
return false;
|
|
80
|
+
} // disallow parts starting or ending with hyphen
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
if (/^-|-$/.test(part)) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (!options.allow_underscores && /_/.test(part)) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return true;
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
11.3. Examples
|
|
97
|
+
|
|
98
|
+
The following addresses
|
|
99
|
+
|
|
100
|
+
fe80::1234 (on the 1st link of the node)
|
|
101
|
+
ff02::5678 (on the 5th link of the node)
|
|
102
|
+
ff08::9abc (on the 10th organization of the node)
|
|
103
|
+
|
|
104
|
+
would be represented as follows:
|
|
105
|
+
|
|
106
|
+
fe80::1234%1
|
|
107
|
+
ff02::5678%5
|
|
108
|
+
ff08::9abc%10
|
|
109
|
+
|
|
110
|
+
(Here we assume a natural translation from a zone index to the
|
|
111
|
+
<zone_id> part, where the Nth zone of any scope is translated into
|
|
112
|
+
"N".)
|
|
113
|
+
|
|
114
|
+
If we use interface names as <zone_id>, those addresses could also be
|
|
115
|
+
represented as follows:
|
|
116
|
+
|
|
117
|
+
fe80::1234%ne0
|
|
118
|
+
ff02::5678%pvc1.3
|
|
119
|
+
ff08::9abc%interface10
|
|
120
|
+
|
|
121
|
+
where the interface "ne0" belongs to the 1st link, "pvc1.3" belongs
|
|
122
|
+
to the 5th link, and "interface10" belongs to the 10th organization.
|
|
123
|
+
* * */
|
|
124
|
+
|
|
125
|
+
var IPv4SegmentFormat = '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';
|
|
126
|
+
var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat);
|
|
127
|
+
var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$"));
|
|
128
|
+
var IPv6SegmentFormat = '(?:[0-9a-fA-F]{1,4})';
|
|
129
|
+
var IPv6AddressRegExp = new RegExp('^(' + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ')(%[0-9a-zA-Z-.:]{1,})?$');
|
|
130
|
+
function isIP(str) {
|
|
131
|
+
var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
132
|
+
assertString(str);
|
|
133
|
+
version = String(version);
|
|
134
|
+
|
|
135
|
+
if (!version) {
|
|
136
|
+
return isIP(str, 4) || isIP(str, 6);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (version === '4') {
|
|
140
|
+
if (!IPv4AddressRegExp.test(str)) {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
var parts = str.split('.').sort(function (a, b) {
|
|
145
|
+
return a - b;
|
|
146
|
+
});
|
|
147
|
+
return parts[3] <= 255;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (version === '6') {
|
|
151
|
+
return !!IPv6AddressRegExp.test(str);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return false;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/*
|
|
158
|
+
options for isURL method
|
|
159
|
+
|
|
160
|
+
require_protocol - if set as true isURL will return false if protocol is not present in the URL
|
|
161
|
+
require_valid_protocol - isURL will check if the URL's protocol is present in the protocols option
|
|
162
|
+
protocols - valid protocols can be modified with this option
|
|
163
|
+
require_host - if set as false isURL will not check if host is present in the URL
|
|
164
|
+
require_port - if set as true isURL will check if port is present in the URL
|
|
165
|
+
allow_protocol_relative_urls - if set as true protocol relative URLs will be allowed
|
|
166
|
+
validate_length - if set as false isURL will skip string length validation (IE maximum is 2083)
|
|
167
|
+
|
|
168
|
+
*/
|
|
169
|
+
|
|
170
|
+
var default_url_options = {
|
|
171
|
+
protocols: ['http', 'https', 'ftp'],
|
|
172
|
+
require_tld: true,
|
|
173
|
+
require_protocol: false,
|
|
174
|
+
require_host: true,
|
|
175
|
+
require_port: false,
|
|
176
|
+
require_valid_protocol: true,
|
|
177
|
+
allow_underscores: false,
|
|
178
|
+
allow_trailing_dot: false,
|
|
179
|
+
allow_protocol_relative_urls: false,
|
|
180
|
+
validate_length: true
|
|
181
|
+
};
|
|
182
|
+
var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/;
|
|
183
|
+
|
|
184
|
+
function isRegExp(obj) {
|
|
185
|
+
return Object.prototype.toString.call(obj) === '[object RegExp]';
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function checkHost(host, matches) {
|
|
189
|
+
for (var i = 0; i < matches.length; i++) {
|
|
190
|
+
var match = matches[i];
|
|
191
|
+
|
|
192
|
+
if (host === match || isRegExp(match) && match.test(host)) {
|
|
193
|
+
return true;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function isURL(url, options) {
|
|
201
|
+
assertString(url);
|
|
202
|
+
|
|
203
|
+
if (!url || /[\s<>]/.test(url)) {
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (url.indexOf('mailto:') === 0) {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
options = merge(options, default_url_options);
|
|
212
|
+
|
|
213
|
+
if (options.validate_length && url.length >= 2083) {
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
var protocol, auth, host, hostname, port, port_str, split, ipv6;
|
|
218
|
+
split = url.split('#');
|
|
219
|
+
url = split.shift();
|
|
220
|
+
split = url.split('?');
|
|
221
|
+
url = split.shift();
|
|
222
|
+
split = url.split('://');
|
|
223
|
+
|
|
224
|
+
if (split.length > 1) {
|
|
225
|
+
protocol = split.shift().toLowerCase();
|
|
226
|
+
|
|
227
|
+
if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) {
|
|
228
|
+
return false;
|
|
229
|
+
}
|
|
230
|
+
} else if (options.require_protocol) {
|
|
231
|
+
return false;
|
|
232
|
+
} else if (url.substr(0, 2) === '//') {
|
|
233
|
+
if (!options.allow_protocol_relative_urls) {
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
split[0] = url.substr(2);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
url = split.join('://');
|
|
241
|
+
|
|
242
|
+
if (url === '') {
|
|
243
|
+
return false;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
split = url.split('/');
|
|
247
|
+
url = split.shift();
|
|
248
|
+
|
|
249
|
+
if (url === '' && !options.require_host) {
|
|
250
|
+
return true;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
split = url.split('@');
|
|
254
|
+
|
|
255
|
+
if (split.length > 1) {
|
|
256
|
+
if (options.disallow_auth) {
|
|
257
|
+
return false;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if (split[0] === '' || split[0].substr(0, 1) === ':') {
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
auth = split.shift();
|
|
265
|
+
|
|
266
|
+
if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) {
|
|
267
|
+
return false;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
hostname = split.join('@');
|
|
272
|
+
port_str = null;
|
|
273
|
+
ipv6 = null;
|
|
274
|
+
var ipv6_match = hostname.match(wrapped_ipv6);
|
|
275
|
+
|
|
276
|
+
if (ipv6_match) {
|
|
277
|
+
host = '';
|
|
278
|
+
ipv6 = ipv6_match[1];
|
|
279
|
+
port_str = ipv6_match[2] || null;
|
|
280
|
+
} else {
|
|
281
|
+
split = hostname.split(':');
|
|
282
|
+
host = split.shift();
|
|
283
|
+
|
|
284
|
+
if (split.length) {
|
|
285
|
+
port_str = split.join(':');
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
if (port_str !== null) {
|
|
290
|
+
port = parseInt(port_str, 10);
|
|
291
|
+
|
|
292
|
+
if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {
|
|
293
|
+
return false;
|
|
294
|
+
}
|
|
295
|
+
} else if (options.require_port) {
|
|
296
|
+
return false;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if (!isIP(host) && !isFQDN(host, options) && (!ipv6 || !isIP(ipv6, 6))) {
|
|
300
|
+
return false;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
host = host || ipv6;
|
|
304
|
+
|
|
305
|
+
if (options.host_whitelist && !checkHost(host, options.host_whitelist)) {
|
|
306
|
+
return false;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if (options.host_blacklist && checkHost(host, options.host_blacklist)) {
|
|
310
|
+
return false;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
return true;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
function transformDescriptionNote(body) {
|
|
317
|
+
body.querySelectorAll('a.noot > div.noot_popup').forEach((e, index) => {
|
|
318
|
+
const contentElement = e.querySelector('.od-Al');
|
|
319
|
+
const ozonPopupElement = contentElement === null || contentElement === void 0 ? void 0 : contentElement.parentElement;
|
|
320
|
+
const anchorElement = ozonPopupElement === null || ozonPopupElement === void 0 ? void 0 : ozonPopupElement.parentElement;
|
|
321
|
+
const supElement = document.createElement('sup');
|
|
322
|
+
supElement.replaceChildren(...Array.from(anchorElement.childNodes));
|
|
323
|
+
anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.replaceChildren(supElement);
|
|
324
|
+
anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.after(contentElement);
|
|
325
|
+
ozonPopupElement === null || ozonPopupElement === void 0 ? void 0 : ozonPopupElement.remove();
|
|
326
|
+
const id = (index + 1).toString(10);
|
|
327
|
+
const [termId, contentId] = [`dso-ozon-term-${id}`, `dso-ozon-content-${id}`];
|
|
328
|
+
anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.setAttribute('id', termId);
|
|
329
|
+
anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.setAttribute('aria-controls', contentId);
|
|
330
|
+
anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.setAttribute('aria-expanded', 'false');
|
|
331
|
+
contentElement === null || contentElement === void 0 ? void 0 : contentElement.setAttribute('id', contentId);
|
|
332
|
+
});
|
|
333
|
+
return body;
|
|
334
|
+
}
|
|
335
|
+
function transformDocumentComponent(body) {
|
|
336
|
+
body.querySelectorAll('span[data-verwijst-naar-documentcomponent]').forEach(e => {
|
|
337
|
+
const a = document.createElement('a');
|
|
338
|
+
a.href = `#${e.getAttribute('data-verwijst-naar-documentcomponent')}`;
|
|
339
|
+
a.replaceChildren(...Array.from(e.childNodes));
|
|
340
|
+
e.replaceWith(a);
|
|
341
|
+
});
|
|
342
|
+
return body;
|
|
343
|
+
}
|
|
344
|
+
const transformers = [transformDescriptionNote, transformDocumentComponent];
|
|
345
|
+
class OzonContentTransformer {
|
|
346
|
+
constructor(anchorClick) {
|
|
347
|
+
this.anchorClick = anchorClick;
|
|
348
|
+
this.domParser = new DOMParser();
|
|
349
|
+
this.eventHandlers = [this.handleValidUrls, this.handleDescriptionNoteClick, this.handleContentAnchor];
|
|
350
|
+
}
|
|
351
|
+
setContent(content) {
|
|
352
|
+
this.content = transformers.reduce((c, t) => t(c), this.domParser.parseFromString(content, 'text/html').body).children;
|
|
353
|
+
}
|
|
354
|
+
handleClickEvent(event) {
|
|
355
|
+
this.eventHandlers.some(h => h.bind(this)(event.composedPath(), event));
|
|
356
|
+
}
|
|
357
|
+
handleDescriptionNoteClick(composedPath, event) {
|
|
358
|
+
var _a;
|
|
359
|
+
const containerIndex = composedPath.findIndex(this.isHostElement);
|
|
360
|
+
if (containerIndex === -1) {
|
|
361
|
+
return false;
|
|
362
|
+
}
|
|
363
|
+
const anchorElement = (_a = composedPath
|
|
364
|
+
.slice(0, containerIndex)) === null || _a === void 0 ? void 0 : _a.find((e) => e instanceof HTMLAnchorElement && e.classList.contains('noot'));
|
|
365
|
+
if (!anchorElement) {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
event.preventDefault();
|
|
369
|
+
const open = anchorElement.classList.contains('dso-open');
|
|
370
|
+
if (open) {
|
|
371
|
+
anchorElement.classList.remove('dso-open');
|
|
372
|
+
anchorElement.setAttribute('aria-expanded', 'false');
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
anchorElement.classList.add('dso-open');
|
|
376
|
+
anchorElement.setAttribute('aria-expanded', 'true');
|
|
377
|
+
}
|
|
378
|
+
return true;
|
|
379
|
+
}
|
|
380
|
+
handleContentAnchor(composedPath, event) {
|
|
381
|
+
if (composedPath.some(e => e instanceof HTMLAnchorElement)) {
|
|
382
|
+
event.preventDefault();
|
|
383
|
+
const anchor = composedPath.find((e) => e instanceof HTMLAnchorElement);
|
|
384
|
+
const href = anchor.href;
|
|
385
|
+
this.anchorClick.emit({
|
|
386
|
+
href,
|
|
387
|
+
documentComponent: href.substr(href.indexOf('#') + 1),
|
|
388
|
+
originalEvent: event
|
|
389
|
+
});
|
|
390
|
+
return true;
|
|
391
|
+
}
|
|
392
|
+
return false;
|
|
393
|
+
}
|
|
394
|
+
handleValidUrls(composedPath) {
|
|
395
|
+
var _a;
|
|
396
|
+
const containerIndex = composedPath.findIndex(this.isHostElement);
|
|
397
|
+
if (containerIndex === -1) {
|
|
398
|
+
return false;
|
|
399
|
+
}
|
|
400
|
+
return (_a = composedPath.slice(0, containerIndex)) === null || _a === void 0 ? void 0 : _a.some(e => e instanceof HTMLAnchorElement && isURL(e.href));
|
|
401
|
+
}
|
|
402
|
+
isHostElement(value) {
|
|
403
|
+
return value instanceof HTMLElement && value.tagName === 'DSO-OZON-CONTENT';
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
const ozonContentCss = "dso-ozon-content{display:block}.noot{text-decoration:none}.noot:not(.dso-open)+.od-Al{display:none}.noot.dso-open+.od-Al{display:block}.noot+.od-Al{margin:4px 0;padding:8px 32px 8px 8px;position:relative}.noot+.od-Al>a{display:block;height:24px;position:absolute;right:0;text-align:center;top:0;width:24px}.noot+.od-Al>a::before{background:var(--dso-icon, var(--di-times-zwart)) no-repeat;background-position:center;background-size:cover;height:1.5em;vertical-align:top;width:1.5em;content:\"\";display:block}.noot+.od-Al{background-color:#ebf3e6}.od-Term{font-weight:700}.od-Definitie,.od-Tussenkop{font-style:italic}.od-Inhoud,.od-Inhoud>.od-Lijst,.od-IntIoRef,.od-Lidnr,.od-LiNr,.od-Opschrift,.od-Tussenkop{display:inline}.od-Al,.od-Lijstaanhef{margin-bottom:0.75em}.od-IntIoRef{border-bottom:1px dotted}.od-LiNummer{float:left;min-width:0.7em;padding-right:0.3em;text-align:right}.od-Figuur img{margin-left:25px;max-width:100%;height:auto}.od-Figuur .od-Bijschrift{font-size:0.75rem;margin-left:25px;padding-bottom:2.5rem}.od-Tabel thead{font-weight:600}.od-Kadertekst{border:1px solid #e5e5e5;margin-bottom:1rem;padding:1rem}";
|
|
408
|
+
|
|
409
|
+
let OzonContent = class {
|
|
410
|
+
constructor(hostRef) {
|
|
411
|
+
registerInstance(this, hostRef);
|
|
412
|
+
this.anchorClick = createEvent(this, "anchorClick", 7);
|
|
413
|
+
}
|
|
414
|
+
handleClick(event) {
|
|
415
|
+
this.transformer.handleClickEvent(event);
|
|
416
|
+
}
|
|
417
|
+
componentWillLoad() {
|
|
418
|
+
this.transformer = new OzonContentTransformer(this.anchorClick);
|
|
419
|
+
}
|
|
420
|
+
componentWillRender() {
|
|
421
|
+
this.transformer.setContent(this.content);
|
|
422
|
+
}
|
|
423
|
+
render() {
|
|
424
|
+
return h("div", { class: "dso-rich-content", ref: el => this.container = el });
|
|
425
|
+
}
|
|
426
|
+
componentDidRender() {
|
|
427
|
+
var _a;
|
|
428
|
+
const content = this.transformer.content;
|
|
429
|
+
if (this.container && content) {
|
|
430
|
+
this.container.replaceChildren(...Array.from(content));
|
|
431
|
+
}
|
|
432
|
+
else {
|
|
433
|
+
(_a = this.container) === null || _a === void 0 ? void 0 : _a.replaceChildren();
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
};
|
|
437
|
+
OzonContent.style = ozonContentCss;
|
|
438
|
+
|
|
439
|
+
export { OzonContent as dso_ozon_content };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-61410be2.js';
|
|
2
2
|
|
|
3
3
|
const progressBarCss = ":host{display:block}*,*::after,*::before{box-sizing:border-box}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.progress{background-color:#fff;border:1px solid #39870c;height:16px;margin-bottom:calc(16px + 1em);position:relative}.progress .progress-bar{background-color:#39870c;color:#fff;float:left;font-size:14px;height:100%;line-height:16px;text-align:center;width:0%}.progress .progress-bar>span:not(.sr-only){color:#191919;left:0;position:absolute;top:calc(100% + 8px)}";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
let ProgressBar = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
this.min = 0;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-61410be2.js';
|
|
2
2
|
|
|
3
3
|
const progressIndicatorCss = "*,*::after,*::before{box-sizing:border-box}.dso-progress-indicator-spinner{display:inline-block;margin:0;position:relative;vertical-align:middle}span.dso-progress-indicator-label{margin-left:16px;vertical-align:middle}:host{display:block}:host([block]){align-items:center;display:flex;justify-content:center}:host([size=small]) .dso-progress-indicator-spinner,:host(:not([size=medium]):not([size=large])) .dso-progress-indicator-spinner{height:24px;width:24px}:host([size=small]):host([block]),:host(:not([size=medium]):not([size=large])):host([block]){padding:12px 16px}:host([size=medium]) .dso-progress-indicator-spinner{height:32px;width:32px}:host([size=medium]):host([block]){padding:16px}:host([size=large]) .dso-progress-indicator-spinner{height:48px;width:48px}:host([size=large]):host([block]){padding:24px 16px}";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
let Progressindicator = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
}
|
package/dist/esm/dso-toolkit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-61410be2.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
|
-
Stencil Client Patch Browser v2.
|
|
4
|
+
Stencil Client Patch Browser v2.9.0 | MIT Licensed | https://stenciljs.com
|
|
5
5
|
*/
|
|
6
6
|
const patchBrowser = () => {
|
|
7
7
|
const importMeta = import.meta.url;
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["dso-map-base-layers",[[1,"dso-map-base-layers",{"baseLayers":[16],"selectedBaseLayer":[1040]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"overlays":[16],"checkedOverlays":[1040]}]]],["dso-date-picker",[[1,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"value":[513],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"fetchSuggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"suggestions":[32],"showSuggestions":[32]},[[4,"click","onDocumentClick"]]]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[1]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]]],["dso-tooltip",[[1,"dso-tooltip",{"position":[1],"for":[1],"noArrow":[4,"no-arrow"],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["dso-info_3",[[1,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32]}],[1,"dso-info",{"fixed":[516],"active":[516]}],[1,"dso-info-button",{"active":[1540],"label":[1]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["dso-map-base-layers",[[1,"dso-map-base-layers",{"baseLayers":[16],"selectedBaseLayer":[1040]}]]],["dso-map-overlays",[[1,"dso-map-overlays",{"overlays":[16],"checkedOverlays":[1040]}]]],["dso-date-picker",[[1,"dso-date-picker",{"name":[1],"identifier":[1],"disabled":[516],"role":[1],"direction":[1],"required":[4],"value":[513],"min":[1],"max":[1],"activeFocus":[32],"focusedDay":[32],"open":[32],"setFocus":[64],"show":[64],"hide":[64]},[[6,"click","handleDocumentClick"]]]]],["dso-label",[[1,"dso-label",{"compact":[4],"removable":[4],"status":[1],"hover":[32]}]]],["dso-map-controls",[[1,"dso-map-controls",{"open":[1540],"disableZoom":[1,"disable-zoom"],"hideContent":[32]}]]],["dso-alert",[[1,"dso-alert",{"status":[1],"roleAlert":[4,"role-alert"]}]]],["dso-attachments-counter",[[1,"dso-attachments-counter",{"count":[2]}]]],["dso-autosuggest",[[6,"dso-autosuggest",{"fetchSuggestions":[16],"suggestOnFocus":[4,"suggest-on-focus"],"suggestions":[32],"showSuggestions":[32]},[[4,"click","onDocumentClick"]]]]],["dso-badge",[[1,"dso-badge",{"status":[1]}]]],["dso-banner",[[1,"dso-banner",{"status":[1]}]]],["dso-dropdown-menu",[[1,"dso-dropdown-menu",{"open":[1540],"dropdownAlign":[1,"dropdown-align"],"checkable":[4]}]]],["dso-highlight-box",[[1,"dso-highlight-box",{"yellow":[4],"border":[4],"white":[4],"dropShadow":[4,"drop-shadow"],"step":[2]}]]],["dso-ozon-content",[[0,"dso-ozon-content",{"content":[1]},[[0,"click","handleClick"]]]]],["dso-progress-bar",[[1,"dso-progress-bar",{"progress":[2],"min":[2],"max":[2]}]]],["dso-progress-indicator",[[1,"dso-progress-indicator",{"label":[1],"size":[1],"block":[4]}]]],["dso-tooltip",[[1,"dso-tooltip",{"position":[1],"for":[1],"noArrow":[4,"no-arrow"],"small":[4],"active":[1540],"hidden":[32],"activate":[64],"deactivate":[64]},[[0,"click","listenClick"]]]]],["dso-icon",[[1,"dso-icon",{"icon":[1]}]]],["dso-info_3",[[1,"dso-selectable",{"type":[1],"identifier":[1],"name":[1],"value":[1],"invalid":[4],"describedById":[1,"described-by-id"],"disabled":[4],"required":[4],"checked":[4],"indeterminate":[4],"infoFixed":[4,"info-fixed"],"infoActive":[32]}],[1,"dso-info",{"fixed":[516],"active":[516]}],[1,"dso-info-button",{"active":[1540],"label":[1]}]]]], options);
|
|
17
17
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-61410be2.js';
|
|
2
2
|
import { c as clsx } from './clsx.m-071989db.js';
|
|
3
3
|
|
|
4
4
|
var top = 'top';
|
|
@@ -157,17 +157,39 @@ function getBasePlacement(placement) {
|
|
|
157
157
|
return placement.split('-')[0];
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
// import { isHTMLElement } from './instanceOf';
|
|
161
|
+
function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars
|
|
162
|
+
includeScale) {
|
|
163
|
+
|
|
161
164
|
var rect = element.getBoundingClientRect();
|
|
165
|
+
var scaleX = 1;
|
|
166
|
+
var scaleY = 1; // FIXME:
|
|
167
|
+
// `offsetWidth` returns an integer while `getBoundingClientRect`
|
|
168
|
+
// returns a float. This results in `scaleX` or `scaleY` being
|
|
169
|
+
// non-1 when it should be for elements that aren't a full pixel in
|
|
170
|
+
// width or height.
|
|
171
|
+
// if (isHTMLElement(element) && includeScale) {
|
|
172
|
+
// const offsetHeight = element.offsetHeight;
|
|
173
|
+
// const offsetWidth = element.offsetWidth;
|
|
174
|
+
// // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
|
|
175
|
+
// // Fallback to 1 in case both values are `0`
|
|
176
|
+
// if (offsetWidth > 0) {
|
|
177
|
+
// scaleX = rect.width / offsetWidth || 1;
|
|
178
|
+
// }
|
|
179
|
+
// if (offsetHeight > 0) {
|
|
180
|
+
// scaleY = rect.height / offsetHeight || 1;
|
|
181
|
+
// }
|
|
182
|
+
// }
|
|
183
|
+
|
|
162
184
|
return {
|
|
163
|
-
width: rect.width,
|
|
164
|
-
height: rect.height,
|
|
165
|
-
top: rect.top,
|
|
166
|
-
right: rect.right,
|
|
167
|
-
bottom: rect.bottom,
|
|
168
|
-
left: rect.left,
|
|
169
|
-
x: rect.left,
|
|
170
|
-
y: rect.top
|
|
185
|
+
width: rect.width / scaleX,
|
|
186
|
+
height: rect.height / scaleY,
|
|
187
|
+
top: rect.top / scaleY,
|
|
188
|
+
right: rect.right / scaleX,
|
|
189
|
+
bottom: rect.bottom / scaleY,
|
|
190
|
+
left: rect.left / scaleX,
|
|
191
|
+
x: rect.left / scaleX,
|
|
192
|
+
y: rect.top / scaleY
|
|
171
193
|
};
|
|
172
194
|
}
|
|
173
195
|
|
|
@@ -422,6 +444,10 @@ const arrow$1 = {
|
|
|
422
444
|
requiresIfExists: ['preventOverflow']
|
|
423
445
|
};
|
|
424
446
|
|
|
447
|
+
function getVariation(placement) {
|
|
448
|
+
return placement.split('-')[1];
|
|
449
|
+
}
|
|
450
|
+
|
|
425
451
|
var unsetSides = {
|
|
426
452
|
top: 'auto',
|
|
427
453
|
right: 'auto',
|
|
@@ -448,6 +474,7 @@ function mapToStyles(_ref2) {
|
|
|
448
474
|
var popper = _ref2.popper,
|
|
449
475
|
popperRect = _ref2.popperRect,
|
|
450
476
|
placement = _ref2.placement,
|
|
477
|
+
variation = _ref2.variation,
|
|
451
478
|
offsets = _ref2.offsets,
|
|
452
479
|
position = _ref2.position,
|
|
453
480
|
gpuAcceleration = _ref2.gpuAcceleration,
|
|
@@ -474,7 +501,7 @@ function mapToStyles(_ref2) {
|
|
|
474
501
|
if (offsetParent === getWindow(popper)) {
|
|
475
502
|
offsetParent = getDocumentElement(popper);
|
|
476
503
|
|
|
477
|
-
if (getComputedStyle(offsetParent).position !== 'static') {
|
|
504
|
+
if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {
|
|
478
505
|
heightProp = 'scrollHeight';
|
|
479
506
|
widthProp = 'scrollWidth';
|
|
480
507
|
}
|
|
@@ -483,14 +510,14 @@ function mapToStyles(_ref2) {
|
|
|
483
510
|
|
|
484
511
|
offsetParent = offsetParent;
|
|
485
512
|
|
|
486
|
-
if (placement === top) {
|
|
513
|
+
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
487
514
|
sideY = bottom; // $FlowFixMe[prop-missing]
|
|
488
515
|
|
|
489
516
|
y -= offsetParent[heightProp] - popperRect.height;
|
|
490
517
|
y *= gpuAcceleration ? 1 : -1;
|
|
491
518
|
}
|
|
492
519
|
|
|
493
|
-
if (placement === left) {
|
|
520
|
+
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
494
521
|
sideX = right; // $FlowFixMe[prop-missing]
|
|
495
522
|
|
|
496
523
|
x -= offsetParent[widthProp] - popperRect.width;
|
|
@@ -505,7 +532,7 @@ function mapToStyles(_ref2) {
|
|
|
505
532
|
if (gpuAcceleration) {
|
|
506
533
|
var _Object$assign;
|
|
507
534
|
|
|
508
|
-
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1)
|
|
535
|
+
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
|
|
509
536
|
}
|
|
510
537
|
|
|
511
538
|
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
|
|
@@ -523,6 +550,7 @@ function computeStyles(_ref4) {
|
|
|
523
550
|
|
|
524
551
|
var commonStyles = {
|
|
525
552
|
placement: getBasePlacement(state.placement),
|
|
553
|
+
variation: getVariation(state.placement),
|
|
526
554
|
popper: state.elements.popper,
|
|
527
555
|
popperRect: state.rects.popper,
|
|
528
556
|
gpuAcceleration: gpuAcceleration
|
|
@@ -825,10 +853,6 @@ function getClippingRect(element, boundary, rootBoundary) {
|
|
|
825
853
|
return clippingRect;
|
|
826
854
|
}
|
|
827
855
|
|
|
828
|
-
function getVariation(placement) {
|
|
829
|
-
return placement.split('-')[1];
|
|
830
|
-
}
|
|
831
|
-
|
|
832
856
|
function computeOffsets(_ref) {
|
|
833
857
|
var reference = _ref.reference,
|
|
834
858
|
element = _ref.element,
|
|
@@ -914,11 +938,10 @@ function detectOverflow(state, options) {
|
|
|
914
938
|
padding = _options$padding === void 0 ? 0 : _options$padding;
|
|
915
939
|
var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
|
|
916
940
|
var altContext = elementContext === popper ? reference : popper;
|
|
917
|
-
var referenceElement = state.elements.reference;
|
|
918
941
|
var popperRect = state.rects.popper;
|
|
919
942
|
var element = state.elements[altBoundary ? altContext : elementContext];
|
|
920
943
|
var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
|
|
921
|
-
var referenceClientRect = getBoundingClientRect(
|
|
944
|
+
var referenceClientRect = getBoundingClientRect(state.elements.reference);
|
|
922
945
|
var popperOffsets = computeOffsets({
|
|
923
946
|
reference: referenceClientRect,
|
|
924
947
|
element: popperRect,
|
|
@@ -1395,16 +1418,24 @@ function getNodeScroll(node) {
|
|
|
1395
1418
|
}
|
|
1396
1419
|
}
|
|
1397
1420
|
|
|
1421
|
+
function isElementScaled(element) {
|
|
1422
|
+
var rect = element.getBoundingClientRect();
|
|
1423
|
+
var scaleX = rect.width / element.offsetWidth || 1;
|
|
1424
|
+
var scaleY = rect.height / element.offsetHeight || 1;
|
|
1425
|
+
return scaleX !== 1 || scaleY !== 1;
|
|
1426
|
+
} // Returns the composite rect of an element relative to its offsetParent.
|
|
1398
1427
|
// Composite means it takes into account transforms as well as layout.
|
|
1399
1428
|
|
|
1429
|
+
|
|
1400
1430
|
function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
1401
1431
|
if (isFixed === void 0) {
|
|
1402
1432
|
isFixed = false;
|
|
1403
1433
|
}
|
|
1404
1434
|
|
|
1435
|
+
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1436
|
+
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
1405
1437
|
var documentElement = getDocumentElement(offsetParent);
|
|
1406
1438
|
var rect = getBoundingClientRect(elementOrVirtualElement);
|
|
1407
|
-
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
1408
1439
|
var scroll = {
|
|
1409
1440
|
scrollLeft: 0,
|
|
1410
1441
|
scrollTop: 0
|
|
@@ -1558,7 +1589,8 @@ function popperGenerator(generatorOptions) {
|
|
|
1558
1589
|
var isDestroyed = false;
|
|
1559
1590
|
var instance = {
|
|
1560
1591
|
state: state,
|
|
1561
|
-
setOptions: function setOptions(
|
|
1592
|
+
setOptions: function setOptions(setOptionsAction) {
|
|
1593
|
+
var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
|
|
1562
1594
|
cleanupModifierEffects();
|
|
1563
1595
|
state.options = Object.assign({}, defaultOptions, state.options, options);
|
|
1564
1596
|
state.scrollParents = {
|
|
@@ -1711,7 +1743,7 @@ const tooltipCss = ":host(:not([hidden])){display:block}*,*::after,*::before{box
|
|
|
1711
1743
|
|
|
1712
1744
|
// Keep const in sync with $tooltip-transition-duration in @dso-toolkit/sources/tooltip.scss tooltip_root() mixin
|
|
1713
1745
|
const transitionDuration = 150;
|
|
1714
|
-
|
|
1746
|
+
let Tooltip = class {
|
|
1715
1747
|
constructor(hostRef) {
|
|
1716
1748
|
registerInstance(this, hostRef);
|
|
1717
1749
|
/**
|