locizify 9.0.2 → 9.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
@@ -1,3 +1,11 @@
1
+ ### 9.0.4
2
+
3
+ - update i18next and locize deps
4
+
5
+ ### 9.0.3
6
+
7
+ - update locize dep
8
+
1
9
  ### 9.0.2
2
10
 
3
11
  - update i18next-locize-backend
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
@@ -1908,6 +1908,9 @@
1908
1908
  if (typeof this.options.overloadTranslationOptionHandler !== 'function') {
1909
1909
  this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;
1910
1910
  }
1911
+ if (this.options.debug === true) {
1912
+ if (typeof console !== 'undefined') console.warn('i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com');
1913
+ }
1911
1914
  var createClassOnDemand = ClassOrObject => {
1912
1915
  if (!ClassOrObject) return null;
1913
1916
  if (typeof ClassOrObject === 'function') return new ClassOrObject();
@@ -8667,7 +8670,7 @@
8667
8670
  }
8668
8671
  function getElementNamespace(el) {
8669
8672
  var found;
8670
- var find = function find(ele) {
8673
+ var _find = function find(ele) {
8671
8674
  var opts = getAttribute$1(ele, 'i18next-options');
8672
8675
  if (!opts) opts = getAttribute$1(ele, 'data-i18next-options');
8673
8676
  if (!opts) opts = getAttribute$1(ele, 'i18n-options');
@@ -8683,9 +8686,9 @@
8683
8686
  if (!found) found = getAttribute$1(ele, 'data-i18next-ns');
8684
8687
  if (!found) found = getAttribute$1(ele, 'i18n-ns');
8685
8688
  if (!found) found = getAttribute$1(ele, 'data-i18n-ns');
8686
- if (!found && ele.parentElement) find(ele.parentElement);
8689
+ if (!found && ele.parentElement) _find(ele.parentElement);
8687
8690
  };
8688
- find(el);
8691
+ _find(el);
8689
8692
  return found;
8690
8693
  }
8691
8694
  function getQsParameterByName(name, url) {
@@ -9140,7 +9143,7 @@
9140
9143
  var popup = document.createElement('div');
9141
9144
  popup.setAttribute('id', popupId);
9142
9145
  popup.classList.add('i18next-editor-popup');
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: 99999;\n ";
9146
+ 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 ";
9144
9147
  popup.setAttribute('data-i18next-editor-element', 'true');
9145
9148
  var header = document.createElement('div');
9146
9149
  header.classList.add('i18next-editor-popup-header');
@@ -9342,7 +9345,11 @@
9342
9345
  btnbox.style = 'display: flex; flex-direction: column; align-items: flex-start; margin-left: 2px; margin-top: 1px';
9343
9346
  Object.keys(keys).forEach(function (k) {
9344
9347
  var data = keys[k];
9345
- var btn = RibbonButton(k.replace('attr:', ''), "".concat(data.ns, ":").concat(data.key), function () {
9348
+ var btn = RibbonButton(k.replace('attr:', ''), "".concat(data.ns, ":").concat(data.key), function (e) {
9349
+ if (e) {
9350
+ e.stopPropagation();
9351
+ e.preventDefault();
9352
+ }
9346
9353
  api.selectKey(data);
9347
9354
  });
9348
9355
  btn.style.marginBottom = '2px';
@@ -9359,7 +9366,7 @@
9359
9366
  var rect = ele.getBoundingClientRect();
9360
9367
  var box = document.createElement('div');
9361
9368
  box.classList.add('i18next-editor-highlight');
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: 1px solid ").concat(borderColor, "; border-radius: 2px; ").concat(shadowColor ? "box-shadow: 0 0 20px 0 ".concat(shadowColor, ";") : '');
9369
+ 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, ";") : '');
9363
9370
  box.setAttribute('data-i18next-editor-element', 'true');
9364
9371
  return box;
9365
9372
  }
@@ -10765,7 +10772,7 @@
10765
10772
  function highlight(item, node, keys) {
10766
10773
  var rectEle = getOptimizedBoundingRectEle(node);
10767
10774
  if (!item.highlightBox) {
10768
- var box = HighlightBox(rectEle, colors.highlight);
10775
+ var box = HighlightBox(rectEle, 'none', 'rgba(0,0,0,0.1)');
10769
10776
  document.body.appendChild(box);
10770
10777
  item.highlightBox = box;
10771
10778
  }
@@ -10832,7 +10839,7 @@
10832
10839
  var id = item.id;
10833
10840
  var rectEle = getOptimizedBoundingRectEle(node);
10834
10841
  if (!item.highlightBox) {
10835
- var box = HighlightBox(rectEle, colors.highlight, colors.gray);
10842
+ var box = HighlightBox(rectEle, 'none', colors.gray);
10836
10843
  document.body.appendChild(box);
10837
10844
  item.highlightBox = box;
10838
10845
  }
@@ -11261,7 +11268,7 @@
11261
11268
  var popups = document.getElementsByClassName('i18next-editor-popup');
11262
11269
  var elmnt = null;
11263
11270
  var overlay = null;
11264
- var currentZIndex = 100;
11271
+ var currentZIndex = 100000;
11265
11272
  for (var i = 0; i < popups.length; i++) {
11266
11273
  var popup = popups[i];
11267
11274
  var header = getHeader(popup);