@tylertech/forge-core 3.1.0 → 3.2.1

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.
@@ -14,6 +14,11 @@ export declare function defineCustomElements(components: any[]): void;
14
14
  * @param ctor The custom element constructor.
15
15
  */
16
16
  export declare function tryDefine(name: string, ctor: CustomElementConstructor, options?: ElementDefinitionOptions | undefined): void;
17
+ /**
18
+ * Checks to see if the custom element is defined in the registry.
19
+ * @param name The name of the custom element to query the registry with.
20
+ */
21
+ export declare function hasDefinedCustomElement(name: string): boolean;
17
22
  /**
18
23
  * Useful when capturing the value of a unupgraded component during the `connectedCallback` upon upgrade.
19
24
  *
@@ -23,11 +23,18 @@ export function defineCustomElements(components) {
23
23
  * @param ctor The custom element constructor.
24
24
  */
25
25
  export function tryDefine(name, ctor, options) {
26
- if (window?.customElements?.get(name)) {
26
+ if (hasDefinedCustomElement(name)) {
27
27
  return;
28
28
  }
29
29
  window.customElements.define(name, ctor, options);
30
30
  }
31
+ /**
32
+ * Checks to see if the custom element is defined in the registry.
33
+ * @param name The name of the custom element to query the registry with.
34
+ */
35
+ export function hasDefinedCustomElement(name) {
36
+ return window?.customElements?.get(name) !== undefined;
37
+ }
31
38
  /**
32
39
  * Useful when capturing the value of a unupgraded component during the `connectedCallback` upon upgrade.
33
40
  *
@@ -3,6 +3,7 @@ export class Subject {
3
3
  return this.source;
4
4
  }
5
5
  constructor(value) {
6
+ // eslint-disable-next-line @tylertech-eslint/require-private-modifier
6
7
  this.subscribers = [];
7
8
  this.source = value;
8
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tylertech/forge-core",
3
- "version": "3.1.0",
3
+ "version": "3.2.1",
4
4
  "description": "A library of core web utilities that support Tyler Forge™ based libraries.",
5
5
  "author": "Tyler Technologies, Inc.",
6
6
  "license": "Apache-2.0",
@@ -24,28 +24,28 @@
24
24
  "release": "auto shipit"
25
25
  },
26
26
  "dependencies": {
27
- "tslib": "^2.6.3"
27
+ "tslib": "^2.8.1"
28
28
  },
29
29
  "devDependencies": {
30
- "@auto-it/conventional-commits": "^11.1.6",
31
- "@auto-it/first-time-contributor": "^11.1.6",
32
- "@auto-it/npm": "^11.1.6",
33
- "@commitlint/cli": "^19.3.0",
34
- "@commitlint/config-conventional": "^19.2.2",
30
+ "@auto-it/conventional-commits": "^11.3.0",
31
+ "@auto-it/first-time-contributor": "^11.3.0",
32
+ "@auto-it/npm": "^11.3.0",
33
+ "@commitlint/cli": "^19.8.1",
34
+ "@commitlint/config-conventional": "^19.8.1",
35
35
  "@esm-bundle/chai": "^4.3.4-fix.0",
36
- "@tylertech-eslint/eslint-plugin": "^1.0.12",
37
- "@types/mocha": "^10.0.6",
38
- "@types/node": "^20.14.2",
39
- "@types/sinon": "^17.0.3",
40
- "@web/dev-server-esbuild": "^1.0.2",
41
- "@web/test-runner": "^0.18.2",
42
- "auto": "^11.1.6",
43
- "commitlint": "^19.3.0",
36
+ "@tylertech-eslint/eslint-plugin": "^2.1.0",
37
+ "@types/mocha": "^10.0.10",
38
+ "@types/node": "^22.15.21",
39
+ "@types/sinon": "^17.0.4",
40
+ "@web/dev-server-esbuild": "^1.0.4",
41
+ "@web/test-runner": "^0.20.2",
42
+ "auto": "^11.3.0",
43
+ "commitlint": "^19.8.1",
44
44
  "http-server": "^14.1.1",
45
- "husky": "^9.0.11",
46
- "rimraf": "^5.0.7",
47
- "sinon": "^18.0.0",
48
- "typescript": "~5.4.5"
45
+ "husky": "^9.1.7",
46
+ "rimraf": "^6.0.1",
47
+ "sinon": "^20.0.0",
48
+ "typescript": "~5.8.3"
49
49
  },
50
50
  "overrides": {
51
51
  "@typescript-eslint/typescript-estree": "^7.12.0"