@dxtmisha/functional-basic 1.3.6 → 1.3.7

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/library.js CHANGED
@@ -773,7 +773,7 @@ var Ce = () => O.get("__ui:cookie-items__", () => ({})), we = class e {
773
773
  }
774
774
  }, Te = "ui-geo-code", Ee = "__ui:geo-code__", De = class {
775
775
  constructor() {
776
- T(this, "storage", new k(Ee)), T(this, "location", void 0), T(this, "item", void 0), T(this, "language", void 0), T(this, "timezone", (/* @__PURE__ */ new Date()).getTimezoneOffset()), this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
776
+ T(this, "storage", new k(Ee)), T(this, "location", void 0), T(this, "valueDefault", void 0), T(this, "item", void 0), T(this, "language", void 0), T(this, "timezone", (/* @__PURE__ */ new Date()).getTimezoneOffset()), this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
777
777
  }
778
778
  get() {
779
779
  return this.item;
@@ -842,11 +842,14 @@ var Ce = () => O.get("__ui:cookie-items__", () => ({})), we = class e {
842
842
  setTimezone(e) {
843
843
  this.timezone = e;
844
844
  }
845
+ setValueDefault(e) {
846
+ this.valueDefault = e, this.location = this.findLocation(), this.item = this.getByCode(this.location), this.language = this.findLanguage(this.location);
847
+ }
845
848
  getCookie() {
846
849
  return we.getInstance(Te);
847
850
  }
848
851
  findLocation() {
849
- return this.findLocationDom() || this.getCookie().get() || "en-GB";
852
+ return this.findLocationDom() || this.getCookie().get() || this.valueDefault || "en-GB";
850
853
  }
851
854
  findLocationDom() {
852
855
  var e;
@@ -926,6 +929,9 @@ var Ce = () => O.get("__ui:cookie-items__", () => ({})), we = class e {
926
929
  static setTimezone(e) {
927
930
  this.getObject().setTimezone(e);
928
931
  }
932
+ static setValueDefault(e) {
933
+ this.getObject().setValueDefault(e);
934
+ }
929
935
  };
930
936
  //#endregion
931
937
  //#region src/functions/isWindow.ts
@@ -148,4 +148,11 @@ export declare class Geo {
148
148
  * @param timezone timezone offset in minutes / смещение часового пояса в минутах
149
149
  */
150
150
  static setTimezone(timezone: number): void;
151
+ /**
152
+ * Sets the default value for the country code.
153
+ *
154
+ * Устанавливает значение по умолчанию для кода страны.
155
+ * @param code default code value / значение кода по умолчанию
156
+ */
157
+ static setValueDefault(code?: string): void;
151
158
  }
@@ -22,6 +22,11 @@ export declare class GeoInstance {
22
22
  * Текущий код локации (например, 'en-GB')
23
23
  */
24
24
  private location;
25
+ /**
26
+ * Value by default for the country code/
27
+ * Значение по умолчанию для кода страны
28
+ */
29
+ private valueDefault?;
25
30
  /**
26
31
  * Detailed data about the current country/
27
32
  * Детальные данные о текущей стране
@@ -178,6 +183,13 @@ export declare class GeoInstance {
178
183
  * @param timezone new time zone offset / новое смещение часового пояса
179
184
  */
180
185
  setTimezone(timezone: number): void;
186
+ /**
187
+ * Sets the default value for the country code.
188
+ *
189
+ * Устанавливает значение по умолчанию для кода страны.
190
+ * @param code default code value / значение кода по умолчанию
191
+ */
192
+ setValueDefault(code?: string): void;
181
193
  /**
182
194
  * Internal method to get the geo cookie instance.
183
195
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dxtmisha/functional-basic",
3
3
  "private": false,
4
- "version": "1.3.6",
4
+ "version": "1.3.7",
5
5
  "type": "module",
6
6
  "description": "Foundational utility library for modern web development — HTTP client, geolocation, i18n, SEO meta tags, caching, storage, DOM utilities, and more. Framework-agnostic, zero dependencies, TypeScript-first.",
7
7
  "keywords": [