locizify 9.0.1 → 9.0.3

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
@@ -1,3 +1,11 @@
1
+ ### 9.0.3
2
+
3
+ - update locize dep
4
+
5
+ ### 9.0.2
6
+
7
+ - update i18next-locize-backend
8
+
1
9
  ### 9.0.1
2
10
 
3
11
  - update i18nextify
package/README.md CHANGED
@@ -12,7 +12,7 @@ Just drop the following line to your header to deliver your content in any langu
12
12
  id="locizify"
13
13
  projectid="[PROJECT_ID]"
14
14
  apikey="[API_KEY]"
15
- src="https://unpkg.com/locizify@^9.0.1"
15
+ src="https://unpkg.com/locizify@^9.0.3"
16
16
  autopilot="true"
17
17
  cdnType="standard"
18
18
  ></script>
@@ -22,7 +22,7 @@ Just drop the following line to your header to deliver your content in any langu
22
22
  id="locizify"
23
23
  projectid="[PROJECT_ID]"
24
24
  apikey="[API_KEY]"
25
- src="https://cdn.jsdelivr.net/npm/locizify@^9.0.1"
25
+ src="https://cdn.jsdelivr.net/npm/locizify@^9.0.3"
26
26
  autopilot="true"
27
27
  cdnType="standard"
28
28
  ></script>
@@ -71,7 +71,7 @@ Add the script to your page:
71
71
  id="locizify"
72
72
  projectid="[PROJECT_ID]"
73
73
  apikey="[API_KEY]"
74
- src="https://unpkg.com/locizify@^9.0.1"
74
+ src="https://unpkg.com/locizify@^9.0.3"
75
75
  autopilot
76
76
  cdnType="standard"
77
77
  ></script>
@@ -105,7 +105,7 @@ Add the script to your page:
105
105
  apikey="[API_KEY]"
106
106
  referencelng="[LNG]"
107
107
  fallbacklng="[LNG]"
108
- src="https://unpkg.com/locizify@^9.0.1"
108
+ src="https://unpkg.com/locizify@^9.0.3"
109
109
 
110
110
  // all custom attributes can also be prefixed with data-
111
111
  // data-projectid="[PROJECT_ID]"
@@ -136,7 +136,7 @@ Add the script to your page:
136
136
  <!DOCTYPE html>
137
137
  <html>
138
138
  <head>
139
- <script src="https://unpkg.com/locizify@^9.0.1"></script>
139
+ <script src="https://unpkg.com/locizify@^9.0.3"></script>
140
140
  <script>
141
141
  locizify.init({
142
142
  // required
@@ -7777,7 +7777,7 @@
7777
7777
  this.isProjectNotExisting = true;
7778
7778
  }
7779
7779
  if (this.isProjectNotExisting) {
7780
- callback(new Error(this.isProjectNotExistingErrorMessage));
7780
+ callback(new Error(this.isProjectNotExistingErrorMessage || "locize project ".concat(this.options.projectId, " does not exist!")));
7781
7781
  return deferred;
7782
7782
  }
7783
7783
  this.getLanguagesCalls = this.getLanguagesCalls || [];
@@ -7786,7 +7786,6 @@
7786
7786
  this.loadUrl({}, url, function (err, ret, info) {
7787
7787
  if (!_this3.somethingLoaded && info && info.resourceNotExisting) {
7788
7788
  _this3.isProjectNotExisting = true;
7789
- _this3.storage.setProjectNotExisting(_this3.options.projectId);
7790
7789
  var errMsg = "locize project ".concat(_this3.options.projectId, " does not exist!");
7791
7790
  _this3.isProjectNotExistingErrorMessage = errMsg;
7792
7791
  var cdnTypeAlt = _this3.options.cdnType === 'standard' ? 'pro' : 'standard';
@@ -7798,6 +7797,9 @@
7798
7797
  if (!errAlt && retAlt && (!infoAlt || !infoAlt.resourceNotExisting)) {
7799
7798
  errMsg += " It seems you're using the wrong cdnType. Your locize project is configured to use \"".concat(cdnTypeAlt, "\" but here you've configured \"").concat(_this3.options.cdnType, "\".");
7800
7799
  _this3.isProjectNotExistingErrorMessage = errMsg;
7800
+ } else if (!_this3.somethingLoaded && infoAlt && infoAlt.resourceNotExisting) {
7801
+ _this3.isProjectNotExisting = true;
7802
+ _this3.storage.setProjectNotExisting(_this3.options.projectId);
7801
7803
  }
7802
7804
  var e = new Error(errMsg);
7803
7805
  var clbs = _this3.getLanguagesCalls;
@@ -7946,7 +7948,7 @@
7946
7948
  this.isProjectNotExisting = true;
7947
7949
  }
7948
7950
  if (this.isProjectNotExisting) {
7949
- var err = new Error(this.isProjectNotExistingErrorMessage);
7951
+ var err = new Error(this.isProjectNotExistingErrorMessage || "locize project ".concat(this.options.projectId, " does not exist!"));
7950
7952
  if (logger) logger.error(err.message);
7951
7953
  if (callback) callback(err);
7952
7954
  return;
@@ -8665,7 +8667,7 @@
8665
8667
  }
8666
8668
  function getElementNamespace(el) {
8667
8669
  var found;
8668
- var find = function find(ele) {
8670
+ var _find = function find(ele) {
8669
8671
  var opts = getAttribute$1(ele, 'i18next-options');
8670
8672
  if (!opts) opts = getAttribute$1(ele, 'data-i18next-options');
8671
8673
  if (!opts) opts = getAttribute$1(ele, 'i18n-options');
@@ -8681,9 +8683,9 @@
8681
8683
  if (!found) found = getAttribute$1(ele, 'data-i18next-ns');
8682
8684
  if (!found) found = getAttribute$1(ele, 'i18n-ns');
8683
8685
  if (!found) found = getAttribute$1(ele, 'data-i18n-ns');
8684
- if (!found && ele.parentElement) find(ele.parentElement);
8686
+ if (!found && ele.parentElement) _find(ele.parentElement);
8685
8687
  };
8686
- find(el);
8688
+ _find(el);
8687
8689
  return found;
8688
8690
  }
8689
8691
  function getQsParameterByName(name, url) {
@@ -9138,7 +9140,7 @@
9138
9140
  var popup = document.createElement('div');
9139
9141
  popup.setAttribute('id', popupId);
9140
9142
  popup.classList.add('i18next-editor-popup');
9141
- popup.style = "\n background-color: transparent;\n border: 1px solid rgba(200, 200, 200, 0.9);\n box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);\n border-radius: 3px;\n --i18next-editor-popup-height: 200px;\n height: var(--i18next-editor-popup-height);\n min-height: 150px;\n min-width: 300px;\n --i18next-editor-popup-width: 400px;\n width: var(--i18next-editor-popup-width);\n max-height: 800px;\n max-width: 1000px;\n\n position: fixed;\n --i18next-editor-popup-position-top: calc(100vh - var(--i18next-editor-popup-height) - 10px);\n top: calc(100vh - var(--i18next-editor-popup-height) - 10px);\n --i18next-editor-popup-position-left: calc(100vw - var(--i18next-editor-popup-width) - 10px);\n left: calc(100vw - var(--i18next-editor-popup-width) - 10px);\n\n overflow: visible;\n z-index: 99999;\n ";
9143
+ popup.style = "\n background-color: transparent;\n border: 1px solid rgba(200, 200, 200, 0.9);\n box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);\n border-radius: 3px;\n --i18next-editor-popup-height: 200px;\n height: var(--i18next-editor-popup-height);\n min-height: 150px;\n min-width: 300px;\n --i18next-editor-popup-width: 400px;\n width: var(--i18next-editor-popup-width);\n max-height: 800px;\n max-width: 1000px;\n\n position: fixed;\n --i18next-editor-popup-position-top: calc(100vh - var(--i18next-editor-popup-height) - 10px);\n top: calc(100vh - var(--i18next-editor-popup-height) - 10px);\n --i18next-editor-popup-position-left: calc(100vw - var(--i18next-editor-popup-width) - 10px);\n left: calc(100vw - var(--i18next-editor-popup-width) - 10px);\n\n overflow: visible;\n z-index: 100000;\n ";
9142
9144
  popup.setAttribute('data-i18next-editor-element', 'true');
9143
9145
  var header = document.createElement('div');
9144
9146
  header.classList.add('i18next-editor-popup-header');
@@ -9357,7 +9359,7 @@
9357
9359
  var rect = ele.getBoundingClientRect();
9358
9360
  var box = document.createElement('div');
9359
9361
  box.classList.add('i18next-editor-highlight');
9360
- box.style = "position: absolute; z-index: 99999; pointer-events: none; top: ".concat(rect.top - 2 + window.scrollY, "px; left: ").concat(rect.left - 2 + window.scrollX, "px; height: ").concat(rect.height + 4, "px; width: ").concat(rect.width + 4, "px; border: 1px solid ").concat(borderColor, "; border-radius: 2px; ").concat(shadowColor ? "box-shadow: 0 0 20px 0 ".concat(shadowColor, ";") : '');
9362
+ box.style = "position: absolute; z-index: 99999; pointer-events: none; top: ".concat(rect.top - 2 + window.scrollY, "px; left: ").concat(rect.left - 2 + window.scrollX, "px; height: ").concat(rect.height + 4, "px; width: ").concat(rect.width + 4, "px; border: ").concat(borderColor === 'none' ? 'none' : "1px solid ".concat(borderColor), "; border-radius: 15px; ").concat(shadowColor ? "box-shadow: inset 1px 1px 5px rgba(255, 255, 255, 0.1), inset -1px -1px 5px rgba(61, 67, 69, 0.3), 0 0 20px 0 ".concat(shadowColor, ";") : '');
9361
9363
  box.setAttribute('data-i18next-editor-element', 'true');
9362
9364
  return box;
9363
9365
  }
@@ -10763,7 +10765,7 @@
10763
10765
  function highlight(item, node, keys) {
10764
10766
  var rectEle = getOptimizedBoundingRectEle(node);
10765
10767
  if (!item.highlightBox) {
10766
- var box = HighlightBox(rectEle, colors.highlight);
10768
+ var box = HighlightBox(rectEle, 'none', 'rgba(0,0,0,0.1)');
10767
10769
  document.body.appendChild(box);
10768
10770
  item.highlightBox = box;
10769
10771
  }
@@ -10830,7 +10832,7 @@
10830
10832
  var id = item.id;
10831
10833
  var rectEle = getOptimizedBoundingRectEle(node);
10832
10834
  if (!item.highlightBox) {
10833
- var box = HighlightBox(rectEle, colors.highlight, colors.gray);
10835
+ var box = HighlightBox(rectEle, 'none', colors.gray);
10834
10836
  document.body.appendChild(box);
10835
10837
  item.highlightBox = box;
10836
10838
  }
@@ -11259,7 +11261,7 @@
11259
11261
  var popups = document.getElementsByClassName('i18next-editor-popup');
11260
11262
  var elmnt = null;
11261
11263
  var overlay = null;
11262
- var currentZIndex = 100;
11264
+ var currentZIndex = 100000;
11263
11265
  for (var i = 0; i < popups.length; i++) {
11264
11266
  var popup = popups[i];
11265
11267
  var header = getHeader(popup);