@bmlt-enabled/croutonjs 4.1.1 → 4.1.2

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/crouton-gmaps.js CHANGED
@@ -11979,7 +11979,7 @@ function CroutonLocalization(language) {
11979
11979
  "google_directions": "مسیرهای Google به جلسه",
11980
11980
  "apple_directions": "مسیرهای Apple به جلسه",
11981
11981
  "no_meetings_for_this_day": "هیچ جلسه ای در این روز وجود ندارد",
11982
- "css-direction: bmlt-rtl": "",
11982
+ "css-direction": "bmlt-rtl",
11983
11983
  "bootstrap-popover-placement": "left",
11984
11984
  "adjust search": "تنظیم جستجو",
11985
11985
  "this number represents": "این عدد نشان دهنده",
@@ -13282,7 +13282,9 @@ this["hbs_Crouton"]["templates"]["groupDetails"] = Handlebars.template({"1":func
13282
13282
  return undefined
13283
13283
  };
13284
13284
 
13285
- return "<div class=\"card group\">\n <div class=\"card-body\">\n <div class=\"card-title header-elements\" style=\"display: flex; justify-content:space-between; align-items:center;\">\n"
13285
+ return "<div class=\"card group "
13286
+ + container.escapeExpression((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"css-direction",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":1,"column":23},"end":{"line":1,"column":50}}}))
13287
+ + "\">\n <div class=\"card-body\">\n <div class=\"card-title header-elements\" style=\"display: flex; justify-content:space-between; align-items:center;\">\n"
13286
13288
  + ((stack1 = container.invokePartial(lookupProperty(partials,"groupTitle"),depth0,{"name":"groupTitle","data":data,"indent":" ","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "")
13287
13289
  + " </div>\n <div class=\"row\" "
13288
13290
  + ((stack1 = (lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"css-textAlign",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":6,"column":25},"end":{"line":6,"column":54}}})) != null ? stack1 : "")
@@ -15281,7 +15283,7 @@ function Crouton(config) {
15281
15283
  self.currentView = "weekday";
15282
15284
  self.distanceTabAllowed = false;
15283
15285
  self.config = {
15284
- version: '4.1.1', // CroutonJS version for debugging
15286
+ version: '4.1.2', // CroutonJS version for debugging
15285
15287
  on_complete: null, // Javascript function to callback when data querying is completed.
15286
15288
  root_server: null, // The root server to use.
15287
15289
  placeholder_id: "bmlt-tabs", // The DOM id that will be used for rendering
@@ -16055,10 +16057,10 @@ function Crouton(config) {
16055
16057
  commonFormats = commonFormats.filter(value => memberFormats.includes(value));
16056
16058
  });
16057
16059
  group['formats'] = commonFormats.join(',');
16058
- group['formats_expanded'] = group['formats_expanded'].filter((format) => commonFormats.includes(format['key']));
16060
+ if (group['formats_expanded']) group['formats_expanded'] = group['formats_expanded'].filter((format) => commonFormats.includes(format['key']));
16059
16061
  group['membersOfGroup'].forEach(function(member) {
16060
16062
  member['formats'] = member['formats'].split(',').filter((f) => !commonFormats.includes(f)).join(',');
16061
- member['formats_expanded'] = member['formats_expanded'].filter((format) => !commonFormats.includes(format['key']));
16063
+ if (member['formats_expanded']) member['formats_expanded'] = member['formats_expanded'].filter((format) => !commonFormats.includes(format['key']));
16062
16064
  });
16063
16065
  }
16064
16066
  });
@@ -17520,7 +17522,7 @@ function MeetingMap(inConfig) {
17520
17522
  if (getLatLngRadius(lat_lngs) > maxRadius)
17521
17523
  lat_lngs = lat_lngs.slice(1,1);
17522
17524
  }
17523
- gDelegate.fitBounds(lat_lngs);
17525
+ if (lat_lngs.length > 0) gDelegate.fitBounds(lat_lngs);
17524
17526
  }
17525
17527
  searchResponseCallback();
17526
17528
  hideThrobber();
@@ -17531,7 +17533,10 @@ function MeetingMap(inConfig) {
17531
17533
  function (position) {
17532
17534
  coords = {latitude: position.coords.latitude, longitude: position.coords.longitude};
17533
17535
  filterVisible(false);
17534
- gDelegate.setViewToPosition(coords, filterMeetingsAndBounds, filterVisible);
17536
+ if (config.zoom) gDelegate.setZoom(false, config.zoom);
17537
+ gDelegate.setViewToPosition(coords, filterMeetingsAndBounds, () => {
17538
+ filterVisible(config.filter_visible == 1);
17539
+ });
17535
17540
  gSearchPoint = {"lat": position.coords.latitude, "lng": position.coords.longitude};
17536
17541
  crouton.updateDistances();
17537
17542
  },
@@ -17544,7 +17549,7 @@ function MeetingMap(inConfig) {
17544
17549
  if ((!config.centerMe && !config.goto) && !(config.map_search && config.filter_visible)) {
17545
17550
  gDelegate.afterInit(()=>filterVisible(config.filter_visible));
17546
17551
  }
17547
- if (config.goto) gDelegate.callGeocoder(config.goto, resetVisibleThenFilterMeetingsAndBounds);
17552
+ if (config.goto) gDelegate.callGeocoder(config.goto, config.filter_visible == 1 ? resetVisibleThenFilterMeetingsAndBounds : setVisibleThenFilterMeetingsAndBounds);
17548
17553
  }
17549
17554
  }
17550
17555
  function createCityHash(allMeetings) {
@@ -17647,6 +17652,15 @@ function MeetingMap(inConfig) {
17647
17652
  }
17648
17653
  return ret;
17649
17654
  }
17655
+ function setVisibleThenFilterMeetingsAndBounds(bounds, center=null) {
17656
+ filterVisible(false);
17657
+ const ret = filterMeetingsAndBounds(bounds);
17658
+ if (gSearchPoint.lat != center.lat || gSearchPoint.lng != center.lng) {
17659
+ gSearchPoint = center;
17660
+ crouton.updateDistances();
17661
+ }
17662
+ return ret;
17663
+ }
17650
17664
  function lookupLocation(fullscreen) {
17651
17665
  if (document.getElementById('goto-text').value != '') {
17652
17666
  if (fullscreen) {