@repobit/dex-store-elements 2.0.1 → 2.0.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/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.0.2](https://github.com/bitdefender/dex-core/compare/@repobit/dex-store-elements@2.0.1...@repobit/dex-store-elements@2.0.2) (2026-07-24)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **DEX-1000:** add tests for price handling and late option resolution
11
+
12
+
6
13
  ## [2.0.1](https://github.com/bitdefender/dex-core/compare/@repobit/dex-store-elements@2.0.0...@repobit/dex-store-elements@2.0.1) (2026-07-23)
7
14
 
8
15
  **Note:** Version bump only for package @repobit/dex-store-elements
@@ -1,5 +1,6 @@
1
1
  export const isPresent = (value) => value !== null &&
2
2
  value !== undefined &&
3
+ (typeof value !== 'string' || value.trim() !== '') &&
3
4
  (typeof value !== 'number' || Number.isFinite(value));
4
5
  export const resolveAnchor = (el) => el instanceof HTMLAnchorElement
5
6
  ? el
@@ -1 +1 @@
1
- {"version":3,"file":"utilty.js","sourceRoot":"","sources":["../../../../src/renders/attributes/utilty.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,KAAc,EACL,EAAE,CACX,KAAK,KAAK,IAAI;IACd,KAAK,KAAK,SAAS;IACnB,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;AAExD,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,EAAe,EACW,EAAE,CAC5B,EAAE,YAAY,iBAAiB;IAC7B,CAAC,CAAC,EAAE;IACJ,CAAC,CAAC,EAAE,CAAC,aAAa,CAAoB,GAAG,CAAC,CAAC;AAQ/C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,MAAyB,EACzB,MAAoB,EACpB,aAAgB,EAChB,WAAqC,EACrC,gBAAwB,EAClB,EAAE;IACR,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAE1B,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACtD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,MAAM,QAAQ,GAAG,KAAK,KAAK,aAAa,CAAC;QACzC,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB,KAAK,EACL,MAAM,CAAC,KAAK,CAAC,EACb,QAAQ,EACR,QAAQ,CACT,CAAC;QAEF,MAAM,CAAC,YAAY,CAAC,gBAAgB,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACrD,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACrB,CAAC;AACH,CAAC,CAAC","sourcesContent":["export const isPresent = (\n value: unknown\n): boolean =>\n value !== null &&\n value !== undefined &&\n (typeof value !== 'number' || Number.isFinite(value));\n\nexport const resolveAnchor = (\n el: HTMLElement\n): HTMLAnchorElement | null =>\n el instanceof HTMLAnchorElement\n ? el\n : el.querySelector<HTMLAnchorElement>('a');\n\nexport type SelectOptionFormatter<T> = (\n value: T,\n index: number,\n values: readonly T[]\n) => string;\n\nexport const buildSelectOptions = <T>(\n select: HTMLSelectElement,\n values: readonly T[],\n selectedValue: T,\n formatLabel: SelectOptionFormatter<T>,\n setAttributeName: string\n): void => {\n select.options.length = 0;\n\n for (let index = 0; index < values.length; index += 1) {\n const value = values[index];\n const selected = value === selectedValue;\n const label = formatLabel(value, index, values);\n const option = new Option(\n label,\n String(value),\n selected,\n selected\n );\n\n option.setAttribute(setAttributeName, String(value));\n select.add(option);\n }\n};\n"]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CAAC,CAAC;IACrB,CAAC;AACH,CAAC,CAAC","sourcesContent":["export const isPresent = (\n value: unknown\n): boolean =>\n value !== null &&\n value !== undefined &&\n (typeof value !== 'string' || value.trim() !== '') &&\n (typeof value !== 'number' || Number.isFinite(value));\n\nexport const resolveAnchor = (\n el: HTMLElement\n): HTMLAnchorElement | null =>\n el instanceof HTMLAnchorElement\n ? el\n : el.querySelector<HTMLAnchorElement>('a');\n\nexport type SelectOptionFormatter<T> = (\n value: T,\n index: number,\n values: readonly T[]\n) => string;\n\nexport const buildSelectOptions = <T>(\n select: HTMLSelectElement,\n values: readonly T[],\n selectedValue: T,\n formatLabel: SelectOptionFormatter<T>,\n setAttributeName: string\n): void => {\n select.options.length = 0;\n\n for (let index = 0; index < values.length; index += 1) {\n const value = values[index];\n const selected = value === selectedValue;\n const label = formatLabel(value, index, values);\n const option = new Option(\n label,\n String(value),\n selected,\n selected\n );\n\n option.setAttribute(setAttributeName, String(value));\n select.add(option);\n }\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repobit/dex-store-elements",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "HTML elements layer for pricings",
5
5
  "author": "Buga Adrian Alexandru <abuga@bitdefender.com>",
6
6
  "homepage": "https://github.com/bitdefender/dex-core#readme",
@@ -52,7 +52,7 @@
52
52
  "dependencies": {
53
53
  "@lit/context": "^1.1.6",
54
54
  "@lit/task": "^1.0.3",
55
- "@repobit/dex-store": "1.5.5",
55
+ "@repobit/dex-store": "1.5.6",
56
56
  "eta": "^4.5.1"
57
57
  },
58
58
  "contributes": {
@@ -62,5 +62,5 @@
62
62
  ]
63
63
  }
64
64
  },
65
- "gitHead": "c7c8073704b604d773bfec0a9b570ab318910ac3"
65
+ "gitHead": "68817ad232147d936696957b4dfc9dc02d462438"
66
66
  }