@servicetitan/ko-bridge
Advanced tools
Comparing version 23.3.0 to 23.4.0
@@ -15,4 +15,4 @@ import { Component } from 'react'; | ||
componentWillUnmount(): void; | ||
render(): JSX.Element; | ||
render(): import("react/jsx-runtime").JSX.Element; | ||
} | ||
//# sourceMappingURL=html-comment.d.ts.map |
@@ -19,3 +19,3 @@ import { Component, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react'; | ||
componentWillUnmount(): void; | ||
render(): JSX.Element; | ||
render(): import("react/jsx-runtime").JSX.Element; | ||
private isModelValid; | ||
@@ -25,2 +25,3 @@ private initNode; | ||
private updateNodeVisibility; | ||
private restoreOrigVisibility; | ||
private cleanNode; | ||
@@ -27,0 +28,0 @@ private applyBinding; |
@@ -66,2 +66,3 @@ import { jsx as _jsx } from "react/jsx-runtime"; | ||
this.cleanNode(); | ||
this.restoreOrigVisibility(); | ||
} | ||
@@ -90,2 +91,6 @@ render() { | ||
} | ||
restoreOrigVisibility() { | ||
this.node.style.visibility = this.origVisibility; | ||
this.origVisibility = undefined; | ||
} | ||
cleanNode() { | ||
@@ -96,7 +101,6 @@ if (!this.isBindingApplied) { | ||
ko.cleanNode(this.node); | ||
this.isBindingApplied = false; | ||
} | ||
applyBinding() { | ||
const koModel = Object.prototype.hasOwnProperty.call(this.props, 'koModel') | ||
? this.props.koModel | ||
: null; | ||
const koModel = Object.hasOwn(this.props, 'koModel') ? this.props.koModel : null; | ||
if (this.isModelValid(koModel)) { | ||
@@ -103,0 +107,0 @@ ko.applyBindings(koModel, this.node); |
{ | ||
"name": "@servicetitan/ko-bridge", | ||
"version": "23.3.0", | ||
"version": "23.4.0", | ||
"description": "", | ||
@@ -20,3 +20,3 @@ "homepage": "https://docs.st.dev/docs/frontend/ko-bridge", | ||
"@testing-library/jest-dom": "^6.4.2", | ||
"@testing-library/react": "^14.2.1", | ||
"@testing-library/react": "^14.2.2", | ||
"@types/knockout": "~3.4.71", | ||
@@ -26,3 +26,3 @@ "@types/react": "~18.2.55", | ||
"knockout": "~3.0.0", | ||
"mobx": "~6.10.0", | ||
"mobx": "~6.10.2", | ||
"react": "~18.2.0", | ||
@@ -33,3 +33,3 @@ "react-dom": "~18.2.0" | ||
"knockout": "~3.0.0", | ||
"mobx": "~6.10.0", | ||
"mobx": ">=6.10.0", | ||
"react": ">=17.0.2", | ||
@@ -44,3 +44,3 @@ "react-dom": ">=17.0.2" | ||
}, | ||
"gitHead": "4a3420cf55cf34ff10b5ba6164d940b39f0925e6" | ||
"gitHead": "94612136ff4d645bc38ae6b13fffad2ab0358666" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
46901
973