namirasoft-site-react 1.4.456 → 1.4.457

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.
@@ -2,11 +2,20 @@ import React, { HTMLInputAutoCompleteAttribute } from "react";
2
2
  import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
3
  import { IValidationProps } from "../props/IValidationProps";
4
4
  import { IValidationStringProps } from "../props/IValidationStringProps";
5
+ import { NSMenuButtonMenuProps } from "./NSMenuButton";
5
6
  import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
6
7
  import { INSBox } from "./INSBox";
7
8
  export interface NSBoxPasswordProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxPassword, string> {
8
9
  input?: IBaseComponentProps;
9
10
  auto_complete?: HTMLInputAutoCompleteAttribute | undefined;
11
+ menu?: NSMenuButtonMenuProps & {
12
+ builtin: {
13
+ show_hide_password?: {
14
+ enabled: boolean;
15
+ onDelete: () => void;
16
+ };
17
+ };
18
+ };
10
19
  }
11
20
  export interface NSBoxPasswordState {
12
21
  value: string | null;
@@ -40,18 +40,20 @@ export class NSBoxPassword extends React.Component {
40
40
  render() {
41
41
  var _a, _b, _c, _d, _e, _f, _g, _h;
42
42
  let menu = safeMenuMenuItem(this.props, (items) => {
43
- items.push({
44
- title: this.state.show ? "Hide Password" : "Show Password",
45
- icon: this.state.show ? "https://static.namirasoft.com/image/concept/password/hide.png" : "https://static.namirasoft.com/image/concept/password/show.png",
46
- onClick: () => {
47
- let show = !this.state.show;
48
- this.setState({ show });
49
- if (show)
50
- this.service.setTimeoutIfNotCalledAgain(() => {
51
- this.setState({ show: false });
52
- }, 10000);
53
- }
54
- });
43
+ var _a, _b, _c;
44
+ if ((_c = (_b = (_a = this.props.menu) === null || _a === void 0 ? void 0 : _a.builtin.show_hide_password) === null || _b === void 0 ? void 0 : _b.enabled) !== null && _c !== void 0 ? _c : true)
45
+ items.push({
46
+ title: this.state.show ? "Hide Password" : "Show Password",
47
+ icon: this.state.show ? "https://static.namirasoft.com/image/concept/password/hide.png" : "https://static.namirasoft.com/image/concept/password/show.png",
48
+ onClick: () => {
49
+ let show = !this.state.show;
50
+ this.setState({ show });
51
+ if (show)
52
+ this.service.setTimeoutIfNotCalledAgain(() => {
53
+ this.setState({ show: false });
54
+ }, 10000);
55
+ }
56
+ });
55
57
  });
56
58
  return (_jsx(NSBoxBaseLayout, Object.assign({ ref: this.NSBoxBaseLayout_Main }, this.props, { menu: menu, getValue: () => {
57
59
  let value = this.getValue();
@@ -1 +1 @@
1
- {"version":3,"file":"NSBoxPassword.js","sourceRoot":"","sources":["../../src/components/NSBoxPassword.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,EAAE,EAAE,SAAS,EAAkC,MAAM,OAAO,CAAC;AACzE,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAI7C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAyB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAerE,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAiD;IAIzF,YAAY,KAAyB;;QAEpC,KAAK,CAAC,KAAK,CAAC,CAAC;QAJN,YAAO,GAAqB,IAAI,gBAAgB,EAAE,CAAC;QAC3D,yBAAoB,GAAG,SAAS,EAAmB,CAAC;QAInD,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAChE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,QAAQ,GA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,mDAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAChD,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,EACtC,KAAK,kBACJ,UAAU,EAAE,8GAA8G,EAC1H,cAAc,EAAE,MAAM,IACnB,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,KAAK,IAE1B,IACe,CAClB,CAAC;IACH,CAAC;CACD"}
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "framework": "npm",
9
9
  "application": "package",
10
10
  "private": false,
11
- "version": "1.4.456",
11
+ "version": "1.4.457",
12
12
  "author": "Amir Abolhasani",
13
13
  "license": "MIT",
14
14
  "main": "./dist/main.js",
@@ -28,7 +28,7 @@
28
28
  "@types/react-bootstrap": "^1.1.0",
29
29
  "@types/react-dom": "^18.3.1",
30
30
  "@types/react-gtm-module": "^2.0.4",
31
- "antd": "^5.27.3",
31
+ "antd": "^5.27.4",
32
32
  "async-mutex": "^0.5.0",
33
33
  "bootstrap": "^5.3.8",
34
34
  "chart.js": "^4.5.0",
@@ -6,7 +6,7 @@ import { IBaseComponentProps } from "../props/IBaseComponentProps";
6
6
  import { IValidationProps } from "../props/IValidationProps";
7
7
  import { IValidationStringProps } from "../props/IValidationStringProps";
8
8
  import { Validator } from "../Validator";
9
- import { safeMenuMenuItem } from "./NSMenuButton";
9
+ import { NSMenuButtonMenuProps, safeMenuMenuItem } from "./NSMenuButton";
10
10
  import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
11
11
  import { NamingConvention, SetTimeouService } from "namirasoft-core";
12
12
  import { INSBox } from "./INSBox";
@@ -15,6 +15,14 @@ export interface NSBoxPasswordProps extends IBaseComponentProps, IValidationProp
15
15
  {
16
16
  input?: IBaseComponentProps;
17
17
  auto_complete?: HTMLInputAutoCompleteAttribute | undefined;
18
+ menu?: NSMenuButtonMenuProps & {
19
+ builtin: {
20
+ show_hide_password?: {
21
+ enabled: boolean;
22
+ onDelete: () => void
23
+ };
24
+ };
25
+ };
18
26
  }
19
27
 
20
28
  export interface NSBoxPasswordState
@@ -65,20 +73,21 @@ export class NSBoxPassword extends React.Component<NSBoxPasswordProps, NSBoxPass
65
73
  {
66
74
  let menu = safeMenuMenuItem(this.props, (items) =>
67
75
  {
68
- items.push({
69
- title: this.state.show ? "Hide Password" : "Show Password",
70
- icon: this.state.show ? "https://static.namirasoft.com/image/concept/password/hide.png" : "https://static.namirasoft.com/image/concept/password/show.png",
71
- onClick: () =>
72
- {
73
- let show = !this.state.show;
74
- this.setState({ show });
75
- if (show)
76
- this.service.setTimeoutIfNotCalledAgain(() =>
77
- {
78
- this.setState({ show: false });
79
- }, 10000);
80
- }
81
- });
76
+ if (this.props.menu?.builtin.show_hide_password?.enabled ?? true)
77
+ items.push({
78
+ title: this.state.show ? "Hide Password" : "Show Password",
79
+ icon: this.state.show ? "https://static.namirasoft.com/image/concept/password/hide.png" : "https://static.namirasoft.com/image/concept/password/show.png",
80
+ onClick: () =>
81
+ {
82
+ let show = !this.state.show;
83
+ this.setState({ show });
84
+ if (show)
85
+ this.service.setTimeoutIfNotCalledAgain(() =>
86
+ {
87
+ this.setState({ show: false });
88
+ }, 10000);
89
+ }
90
+ });
82
91
  });
83
92
 
84
93
  return (