namirasoft-site-react 1.4.250 → 1.4.252
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.
|
@@ -39,17 +39,19 @@ export class NSBoxURL extends React.Component {
|
|
|
39
39
|
render() {
|
|
40
40
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
41
41
|
let menu = safeMenuMenuItem(this.props, (items) => {
|
|
42
|
-
var _a;
|
|
43
42
|
if (this.state.value)
|
|
44
43
|
items.push({
|
|
45
44
|
title: "Open in new tab",
|
|
46
45
|
icon: "https://static.namirasoft.com/image/concept/type/url.png",
|
|
47
|
-
|
|
46
|
+
onClick: () => {
|
|
47
|
+
var _a;
|
|
48
|
+
window.open((_a = this.state.value) !== null && _a !== void 0 ? _a : "", "_blank");
|
|
49
|
+
},
|
|
48
50
|
});
|
|
49
51
|
});
|
|
50
52
|
menu.builtin.copy = { enabled: true, getValue: () => { var _a; return (_a = this.state.value) !== null && _a !== void 0 ? _a : ""; } };
|
|
51
53
|
menu.builtin.fullscreen = { enabled: true, getValue: () => { var _a; return (_a = this.state.value) !== null && _a !== void 0 ? _a : ""; }, setValue: this.setValue };
|
|
52
|
-
return (_jsx(NSBoxBaseLayout, Object.assign({ ref: this.NSBoxBaseLayout_Main }, this.props, { menu: menu, children: _jsx("input", { id: (_a = this.props.input) === null || _a === void 0 ? void 0 : _a.id, name: (_b = this.props.input) === null || _b === void 0 ? void 0 : _b.name, type: "text", className: `${StylesNSBox.ns_box_input} ${(_e = (_d = (_c = this.props.input) === null || _c === void 0 ? void 0 : _c.classList) === null || _d === void 0 ? void 0 : _d.join(" ")) !== null && _e !== void 0 ? _e : ""}`, placeholder: (_f = this.props.placeholder) !== null && _f !== void 0 ? _f : `Please enter ${NamingConvention.auto.convert(this.props.title, NamingConvention.lower_case_space)}`, value: (_g = this.state.value) !== null && _g !== void 0 ? _g : "", onChange: e => this.setValue(e.target.value), onClick: () => { var _a, _b; (_b = (_a = this.props).onClicked) === null || _b === void 0 ? void 0 : _b.call(_a, this); }, minLength: this.props.min_length, maxLength: this.props.max_length, style: Object.assign(Object.assign({ background: `url("https://static.namirasoft.com/image/concept/type/url.png") white no-repeat scroll center right 4px`, backgroundSize: "24px" }, (_h = this.props.input) === null || _h === void 0 ? void 0 : _h.style), {
|
|
54
|
+
return (_jsx(NSBoxBaseLayout, Object.assign({ ref: this.NSBoxBaseLayout_Main }, this.props, { menu: menu, children: _jsx("input", { id: (_a = this.props.input) === null || _a === void 0 ? void 0 : _a.id, name: (_b = this.props.input) === null || _b === void 0 ? void 0 : _b.name, type: "text", className: `${StylesNSBox.ns_box_input} ${(_e = (_d = (_c = this.props.input) === null || _c === void 0 ? void 0 : _c.classList) === null || _d === void 0 ? void 0 : _d.join(" ")) !== null && _e !== void 0 ? _e : ""}`, placeholder: (_f = this.props.placeholder) !== null && _f !== void 0 ? _f : `Please enter ${NamingConvention.auto.convert(this.props.title, NamingConvention.lower_case_space)}`, value: (_g = this.state.value) !== null && _g !== void 0 ? _g : "", onChange: e => this.setValue(e.target.value), onClick: () => { var _a, _b; (_b = (_a = this.props).onClicked) === null || _b === void 0 ? void 0 : _b.call(_a, this); }, minLength: this.props.min_length, maxLength: this.props.max_length, style: Object.assign(Object.assign({ background: `url("https://static.namirasoft.com/image/concept/type/url.png") white no-repeat scroll center right 4px`, backgroundSize: "24px" }, (_h = this.props.input) === null || _h === void 0 ? void 0 : _h.style), { color: "blue" }) }) })));
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
//# sourceMappingURL=NSBoxURL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxURL.js","sourceRoot":"","sources":["../../src/components/NSBoxURL.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAI7C,OAAO,EAAE,SAAS,EAAE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E,IAAI,CAAC,GAAG,CAAC,mCAAI,EAAE,EAAE,EACxF,WAAW,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,WAAW,mCAAI,gBAAgB,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,EAAE,EAC3I,KAAK,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,mCAAI,EAAE,EAC7B,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC5C,OAAO,EAAE,GAAG,EAAE,eAAG,MAAA,MAAA,IAAI,CAAC,KAAK,EAAC,SAAS,mDAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAChD,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,EAChC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,EAChC,KAAK,gCACJ,UAAU,EAAE,yGAAyG,EACrH,cAAc,EAAE,MAAM,IACnB,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,KAAK,KAC1B,KAAK,EAAE,MAAM,MAEb,IACe,CAClB,CAAC;IACH,CAAC;CACD"}
|
package/package.json
CHANGED
|
@@ -66,7 +66,10 @@ export class NSBoxURL extends React.Component<NSBoxURLProps, NSBoxURLState> impl
|
|
|
66
66
|
items.push({
|
|
67
67
|
title: "Open in new tab",
|
|
68
68
|
icon: "https://static.namirasoft.com/image/concept/type/url.png",
|
|
69
|
-
|
|
69
|
+
onClick: () =>
|
|
70
|
+
{
|
|
71
|
+
window.open(this.state.value ?? "", "_blank");
|
|
72
|
+
},
|
|
70
73
|
})
|
|
71
74
|
});
|
|
72
75
|
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
@@ -93,11 +96,7 @@ export class NSBoxURL extends React.Component<NSBoxURLProps, NSBoxURLState> impl
|
|
|
93
96
|
background: `url("https://static.namirasoft.com/image/concept/type/url.png") white no-repeat scroll center right 4px`,
|
|
94
97
|
backgroundSize: "24px",
|
|
95
98
|
...this.props.input?.style,
|
|
96
|
-
|
|
97
|
-
display: "flex",
|
|
98
|
-
padding: "0px",
|
|
99
|
-
alignItems: "center",
|
|
100
|
-
justifyContent: "center",
|
|
99
|
+
color: "blue"
|
|
101
100
|
}}
|
|
102
101
|
/>
|
|
103
102
|
</NSBoxBaseLayout>
|