abmp-npm 1.8.0 → 1.8.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/pages/Profile.js +5 -6
- package/public/utils.js +1 -2
package/package.json
CHANGED
package/pages/Profile.js
CHANGED
|
@@ -9,7 +9,7 @@ const BREAKPOINTS = {
|
|
|
9
9
|
TABLET: 750,
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
function profileOnReady({
|
|
13
13
|
$w: _$w,
|
|
14
14
|
profileData,
|
|
15
15
|
openLightbox,
|
|
@@ -164,7 +164,7 @@ async function profileOnReady({
|
|
|
164
164
|
function bindPhoneNumber() {
|
|
165
165
|
if (profileData.phone) {
|
|
166
166
|
const formattedPhoneNumber = profileData.phone.replace(/[^\d+]/g, '');
|
|
167
|
-
const getPhoneHTML =
|
|
167
|
+
const getPhoneHTML = $phoneSelector =>
|
|
168
168
|
$phoneSelector.html.replace(
|
|
169
169
|
$phoneSelector.text,
|
|
170
170
|
`<a href="${`tel:${formattedPhoneNumber}`}">${profileData.phone}</a>`
|
|
@@ -278,19 +278,19 @@ async function profileOnReady({
|
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
function setTextForElements(elementIds, text) {
|
|
281
|
-
elementIds.forEach(
|
|
281
|
+
elementIds.forEach(id => {
|
|
282
282
|
_$w(id).text = text;
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
function collapseElements(elementIds) {
|
|
287
|
-
elementIds.forEach(
|
|
287
|
+
elementIds.forEach(id => {
|
|
288
288
|
_$w(id).collapse();
|
|
289
289
|
});
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
function populateRepeater(data, repeaterId, textElementId) {
|
|
293
|
-
const repeaterData = data.map(
|
|
293
|
+
const repeaterData = data.map(item => ({
|
|
294
294
|
_id: generateId(),
|
|
295
295
|
text: item.trim(),
|
|
296
296
|
}));
|
|
@@ -348,4 +348,3 @@ async function profileOnReady({
|
|
|
348
348
|
module.exports = {
|
|
349
349
|
profileOnReady,
|
|
350
350
|
};
|
|
351
|
-
|
package/public/utils.js
CHANGED
|
@@ -19,7 +19,7 @@ function prepareText(areaOfPractices = []) {
|
|
|
19
19
|
|
|
20
20
|
// Filter out null/undefined/empty
|
|
21
21
|
const validAreas = areaOfPractices.filter(
|
|
22
|
-
|
|
22
|
+
area => area !== null && area !== undefined && area !== ''
|
|
23
23
|
);
|
|
24
24
|
|
|
25
25
|
if (validAreas.length === 0) {
|
|
@@ -55,4 +55,3 @@ module.exports = {
|
|
|
55
55
|
generateId,
|
|
56
56
|
prepareText,
|
|
57
57
|
};
|
|
58
|
-
|