namirasoft-site-react 1.4.404 → 1.4.405
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/dist/App.js +17 -2
- package/dist/App.js.map +1 -1
- package/dist/components/NSBoxBaseCombo.js +2 -1
- package/dist/components/NSBoxBaseCombo.js.map +1 -1
- package/dist/components/NSBoxColor.js +2 -1
- package/dist/components/NSBoxColor.js.map +1 -1
- package/dist/components/NSBoxDate.js +2 -1
- package/dist/components/NSBoxDate.js.map +1 -1
- package/dist/components/NSBoxDateTime.js +2 -1
- package/dist/components/NSBoxDateTime.js.map +1 -1
- package/dist/components/NSBoxDouble.js +2 -1
- package/dist/components/NSBoxDouble.js.map +1 -1
- package/dist/components/NSBoxDuration.js +2 -1
- package/dist/components/NSBoxDuration.js.map +1 -1
- package/dist/components/NSBoxEmail.d.ts +6 -0
- package/dist/components/NSBoxEmail.js +12 -8
- package/dist/components/NSBoxEmail.js.map +1 -1
- package/dist/components/NSBoxFilePath.js +2 -1
- package/dist/components/NSBoxFilePath.js.map +1 -1
- package/dist/components/NSBoxFont.js +2 -1
- package/dist/components/NSBoxFont.js.map +1 -1
- package/dist/components/NSBoxIPV4.js +2 -1
- package/dist/components/NSBoxIPV4.js.map +1 -1
- package/dist/components/NSBoxIPV4Range.js +2 -1
- package/dist/components/NSBoxIPV4Range.js.map +1 -1
- package/dist/components/NSBoxIPV6.js +2 -1
- package/dist/components/NSBoxIPV6.js.map +1 -1
- package/dist/components/NSBoxIPV6Range.js +2 -1
- package/dist/components/NSBoxIPV6Range.js.map +1 -1
- package/dist/components/NSBoxInteger.js +2 -1
- package/dist/components/NSBoxInteger.js.map +1 -1
- package/dist/components/NSBoxMoney.js +2 -1
- package/dist/components/NSBoxMoney.js.map +1 -1
- package/dist/components/NSBoxPhone.js +2 -1
- package/dist/components/NSBoxPhone.js.map +1 -1
- package/dist/components/NSBoxSearch.js +4 -2
- package/dist/components/NSBoxSearch.js.map +1 -1
- package/dist/components/NSBoxString.js +4 -2
- package/dist/components/NSBoxString.js.map +1 -1
- package/dist/components/NSBoxTextArea.js +8 -3
- package/dist/components/NSBoxTextArea.js.map +1 -1
- package/dist/components/NSBoxTime.js +2 -1
- package/dist/components/NSBoxTime.js.map +1 -1
- package/dist/components/NSBoxTimeZone.js +2 -1
- package/dist/components/NSBoxTimeZone.js.map +1 -1
- package/dist/components/NSBoxURL.js +4 -2
- package/dist/components/NSBoxURL.js.map +1 -1
- package/dist/components/NSBoxVersion.js +2 -1
- package/dist/components/NSBoxVersion.js.map +1 -1
- package/dist/components/NSDialog.d.ts +1 -0
- package/dist/components/NSDialog.js +6 -6
- package/dist/components/NSDialog.js.map +1 -1
- package/dist/components/NSDialog.module.css +19 -23
- package/dist/components/NSHeader.js +2 -2
- package/dist/components/NSHeader.js.map +1 -1
- package/dist/components/NSMenuButton.js +4 -4
- package/dist/components/NSMenuButton.js.map +1 -1
- package/package.json +1 -1
- package/src/App.tsx +50 -2
- package/src/components/NSBoxBaseCombo.tsx +2 -1
- package/src/components/NSBoxColor.tsx +2 -1
- package/src/components/NSBoxDate.tsx +2 -1
- package/src/components/NSBoxDateTime.tsx +2 -1
- package/src/components/NSBoxDouble.tsx +2 -1
- package/src/components/NSBoxDuration.tsx +2 -1
- package/src/components/NSBoxEmail.tsx +17 -9
- package/src/components/NSBoxFilePath.tsx +2 -1
- package/src/components/NSBoxFont.tsx +2 -1
- package/src/components/NSBoxIPV4.tsx +2 -1
- package/src/components/NSBoxIPV4Range.tsx +2 -1
- package/src/components/NSBoxIPV6.tsx +2 -1
- package/src/components/NSBoxIPV6Range.tsx +2 -1
- package/src/components/NSBoxInteger.tsx +2 -1
- package/src/components/NSBoxMoney.tsx +2 -1
- package/src/components/NSBoxPhone.tsx +2 -1
- package/src/components/NSBoxSearch.tsx +4 -2
- package/src/components/NSBoxString.tsx +4 -2
- package/src/components/NSBoxTextArea.tsx +9 -2
- package/src/components/NSBoxTime.tsx +2 -1
- package/src/components/NSBoxTimeZone.tsx +2 -1
- package/src/components/NSBoxURL.tsx +4 -2
- package/src/components/NSBoxVersion.tsx +2 -1
- package/src/components/NSDialog.module.css +19 -23
- package/src/components/NSDialog.tsx +20 -9
- package/src/components/NSHeader.tsx +2 -1
- package/src/components/NSMenuButton.tsx +4 -4
package/src/App.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import 'bootstrap/dist/css/bootstrap.min.css';
|
|
|
3
3
|
import { NSPanel } from './components/NSPanel';
|
|
4
4
|
import { NSSection } from './components/NSSection';
|
|
5
5
|
import { NSLayout } from './components/NSLayout';
|
|
6
|
-
import { MoneyFormatter, NSBoxDynamic, NSBoxEntity, NSBoxString, NSButtonBlue, NSColumn, NSFilterBox, NSTable } from './main';
|
|
6
|
+
import { MoneyFormatter, NSBoxDynamic, NSBoxEntity, NSBoxString, NSButtonBlue, NSColumn, NSDialog, NSFilterBox, NSTable } from './main';
|
|
7
7
|
import { FilterItemColumnType } from 'namirasoft-core';
|
|
8
8
|
import { NSRepeaterNSTag } from './components/NSRepeaterNSTag';
|
|
9
9
|
import { BaseVariableSchema, StringSchema } from 'namirasoft-schema';
|
|
@@ -133,6 +133,54 @@ export function App()
|
|
|
133
133
|
required
|
|
134
134
|
title='Test'
|
|
135
135
|
></NSBoxEntity>
|
|
136
|
+
{
|
|
137
|
+
10 < 2 &&
|
|
138
|
+
<NSDialog
|
|
139
|
+
onClose={() => { }}
|
|
140
|
+
center_dialog
|
|
141
|
+
closeButton={{
|
|
142
|
+
out: true
|
|
143
|
+
}}
|
|
144
|
+
>
|
|
145
|
+
<NSButtonBlue
|
|
146
|
+
onClick={{
|
|
147
|
+
action: () => { }
|
|
148
|
+
}}
|
|
149
|
+
title='Ok'
|
|
150
|
+
></NSButtonBlue>
|
|
151
|
+
<NSButtonBlue
|
|
152
|
+
onClick={{
|
|
153
|
+
action: () => { }
|
|
154
|
+
}}
|
|
155
|
+
title='Ok'
|
|
156
|
+
></NSButtonBlue>
|
|
157
|
+
<NSButtonBlue
|
|
158
|
+
onClick={{
|
|
159
|
+
action: () => { }
|
|
160
|
+
}}
|
|
161
|
+
title='Ok'
|
|
162
|
+
></NSButtonBlue>
|
|
163
|
+
<NSButtonBlue
|
|
164
|
+
onClick={{
|
|
165
|
+
action: () => { }
|
|
166
|
+
}}
|
|
167
|
+
title='Ok'
|
|
168
|
+
></NSButtonBlue>
|
|
169
|
+
<NSButtonBlue
|
|
170
|
+
onClick={{
|
|
171
|
+
action: () => { }
|
|
172
|
+
}}
|
|
173
|
+
title='Ok'
|
|
174
|
+
></NSButtonBlue>
|
|
175
|
+
<NSButtonBlue
|
|
176
|
+
onClick={{
|
|
177
|
+
action: () => { }
|
|
178
|
+
}}
|
|
179
|
+
title='Ok'
|
|
180
|
+
></NSButtonBlue>
|
|
181
|
+
</NSDialog>
|
|
182
|
+
}
|
|
183
|
+
|
|
136
184
|
<NSButtonBlue
|
|
137
185
|
onClick={{
|
|
138
186
|
action: () => { }
|
|
@@ -211,7 +259,7 @@ export function App()
|
|
|
211
259
|
/>
|
|
212
260
|
</NSColumn>
|
|
213
261
|
</NSSection>
|
|
214
|
-
</NSLayout
|
|
262
|
+
</NSLayout>
|
|
215
263
|
</>
|
|
216
264
|
);
|
|
217
265
|
}
|
|
@@ -355,7 +355,8 @@ export class NSBoxBaseCombo<Data> extends React.Component<NSBoxBaseComboProps<Da
|
|
|
355
355
|
}
|
|
356
356
|
});
|
|
357
357
|
});
|
|
358
|
-
menu.builtin.copy
|
|
358
|
+
if (!menu.builtin.copy)
|
|
359
|
+
menu.builtin.copy = { enabled: true, getValue: () => JSON.stringify(this.getValue(false)) };
|
|
359
360
|
|
|
360
361
|
let items_list = this.state.items_list ?? [];
|
|
361
362
|
return (
|
|
@@ -60,7 +60,8 @@ export class NSBoxColor extends React.Component<NSBoxColorProps, NSBoxColorState
|
|
|
60
60
|
override render()
|
|
61
61
|
{
|
|
62
62
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
63
|
-
menu.builtin.copy
|
|
63
|
+
if (!menu.builtin.copy)
|
|
64
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
64
65
|
|
|
65
66
|
return (
|
|
66
67
|
<NSBoxBaseLayout
|
|
@@ -61,7 +61,8 @@ export class NSBoxDate extends React.Component<NSBoxDateProps, NSBoxDateState> i
|
|
|
61
61
|
override render()
|
|
62
62
|
{
|
|
63
63
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
64
|
-
menu.builtin.copy
|
|
64
|
+
if (!menu.builtin.copy)
|
|
65
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
65
66
|
|
|
66
67
|
return (
|
|
67
68
|
<NSBoxBaseLayout
|
|
@@ -62,7 +62,8 @@ export class NSBoxDateTime extends React.Component<NSBoxDateTimeProps, NSBoxDate
|
|
|
62
62
|
override render()
|
|
63
63
|
{
|
|
64
64
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
65
|
-
menu.builtin.copy
|
|
65
|
+
if (!menu.builtin.copy)
|
|
66
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value?.toLocaleString() ?? "" };
|
|
66
67
|
|
|
67
68
|
function getFormattedValue(datetime: Date | null)
|
|
68
69
|
{
|
|
@@ -62,7 +62,8 @@ export class NSBoxDouble extends React.Component<NSBoxDoubleProps, NSBoxDoubleSt
|
|
|
62
62
|
override render()
|
|
63
63
|
{
|
|
64
64
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
65
|
-
menu.builtin.copy
|
|
65
|
+
if (!menu.builtin.copy)
|
|
66
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value?.toLocaleString() ?? "" };
|
|
66
67
|
|
|
67
68
|
return (
|
|
68
69
|
<NSBoxBaseLayout
|
|
@@ -63,7 +63,8 @@ export class NSBoxDuration extends React.Component<NSBoxDurationProps, NSBoxDura
|
|
|
63
63
|
override render()
|
|
64
64
|
{
|
|
65
65
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
66
|
-
menu.builtin.copy
|
|
66
|
+
if (!menu.builtin.copy)
|
|
67
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
67
68
|
|
|
68
69
|
// todo implement a mask for duration like ddd hh-mm-ss
|
|
69
70
|
|
|
@@ -3,7 +3,7 @@ import React, { createRef } from "react";
|
|
|
3
3
|
import StylesNSBox from "./NSBox.module.css";
|
|
4
4
|
import { Validator } from "../Validator";
|
|
5
5
|
import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
|
|
6
|
-
import { safeMenuMenuItem } from "./NSMenuButton";
|
|
6
|
+
import { NSMenuButtonMenuProps, safeMenuMenuItem } from "./NSMenuButton";
|
|
7
7
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
8
8
|
import { IValidationProps } from "../props/IValidationProps";
|
|
9
9
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
@@ -13,6 +13,11 @@ import { INSBox } from "./INSBox";
|
|
|
13
13
|
export interface NSBoxEmailProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxEmail, string>
|
|
14
14
|
{
|
|
15
15
|
input?: IBaseComponentProps;
|
|
16
|
+
menu?: NSMenuButtonMenuProps & {
|
|
17
|
+
builtin: {
|
|
18
|
+
email?: boolean
|
|
19
|
+
}
|
|
20
|
+
}
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
export interface NSBoxEmailState
|
|
@@ -62,15 +67,18 @@ export class NSBoxEmail extends React.Component<NSBoxEmailProps, NSBoxEmailState
|
|
|
62
67
|
{
|
|
63
68
|
let menu = safeMenuMenuItem(this.props, (items) =>
|
|
64
69
|
{
|
|
65
|
-
if (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
if (this.props.menu?.builtin?.email ?? true)
|
|
71
|
+
if (!this.getError())
|
|
72
|
+
items.push({
|
|
73
|
+
title: "Send Email",
|
|
74
|
+
icon: "https://static.namirasoft.com/image/concept/type/email.png",
|
|
75
|
+
href: `mailto:${this.state.value}`
|
|
76
|
+
});
|
|
71
77
|
});
|
|
72
|
-
menu.builtin.copy
|
|
73
|
-
|
|
78
|
+
if (!menu.builtin.copy)
|
|
79
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
80
|
+
if (!menu.builtin.fullscreen)
|
|
81
|
+
menu.builtin.fullscreen = { enabled: true, getValue: () => this.state.value ?? "", setValue: this.setValue };
|
|
74
82
|
|
|
75
83
|
return (
|
|
76
84
|
<NSBoxBaseLayout
|
|
@@ -60,7 +60,8 @@ export class NSBoxFilePath extends React.Component<NSBoxFilePathProps, NSBoxFile
|
|
|
60
60
|
override render()
|
|
61
61
|
{
|
|
62
62
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
63
|
-
menu.builtin.copy
|
|
63
|
+
if (!menu.builtin.copy)
|
|
64
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
64
65
|
|
|
65
66
|
return (
|
|
66
67
|
<NSBoxBaseLayout
|
|
@@ -60,7 +60,8 @@ export class NSBoxFont extends React.Component<NSBoxFontProps, NSBoxFontState> i
|
|
|
60
60
|
override render()
|
|
61
61
|
{
|
|
62
62
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
63
|
-
menu.builtin.copy
|
|
63
|
+
if (!menu.builtin.copy)
|
|
64
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
64
65
|
|
|
65
66
|
return (
|
|
66
67
|
<NSBoxBaseLayout
|
|
@@ -63,7 +63,8 @@ export class NSBoxIPV4 extends React.Component<NSBoxIPV4Props, NSBoxIPV4State> i
|
|
|
63
63
|
override render()
|
|
64
64
|
{
|
|
65
65
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
66
|
-
menu.builtin.copy
|
|
66
|
+
if (!menu.builtin.copy)
|
|
67
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
67
68
|
|
|
68
69
|
return (
|
|
69
70
|
<NSBoxBaseLayout
|
|
@@ -60,7 +60,8 @@ export class NSBoxIPV4Range extends React.Component<NSBoxIPV4RangeProps, NSBoxIP
|
|
|
60
60
|
override render()
|
|
61
61
|
{
|
|
62
62
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
63
|
-
menu.builtin.copy
|
|
63
|
+
if (!menu.builtin.copy)
|
|
64
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
64
65
|
|
|
65
66
|
return (
|
|
66
67
|
<NSBoxBaseLayout
|
|
@@ -63,7 +63,8 @@ export class NSBoxIPV6 extends React.Component<NSBoxIPV6Props, NSBoxIPV6State> i
|
|
|
63
63
|
override render()
|
|
64
64
|
{
|
|
65
65
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
66
|
-
menu.builtin.copy
|
|
66
|
+
if (!menu.builtin.copy)
|
|
67
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
67
68
|
|
|
68
69
|
return (
|
|
69
70
|
<NSBoxBaseLayout
|
|
@@ -60,7 +60,8 @@ export class NSBoxIPV6Range extends React.Component<NSBoxIPV6RangeProps, NSBoxIP
|
|
|
60
60
|
override render()
|
|
61
61
|
{
|
|
62
62
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
63
|
-
menu.builtin.copy
|
|
63
|
+
if (!menu.builtin.copy)
|
|
64
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
64
65
|
|
|
65
66
|
return (
|
|
66
67
|
<NSBoxBaseLayout
|
|
@@ -61,7 +61,8 @@ export class NSBoxInteger extends React.Component<NSBoxIntegerProps, NSBoxIntege
|
|
|
61
61
|
override render()
|
|
62
62
|
{
|
|
63
63
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
64
|
-
menu.builtin.copy
|
|
64
|
+
if (!menu.builtin.copy)
|
|
65
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value?.toLocaleString() ?? "" };
|
|
65
66
|
|
|
66
67
|
return (
|
|
67
68
|
<NSBoxBaseLayout
|
|
@@ -62,7 +62,8 @@ export class NSBoxMoney extends React.Component<NSBoxMoneyProps, NSBoxMoneyState
|
|
|
62
62
|
override render()
|
|
63
63
|
{
|
|
64
64
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
65
|
-
menu.builtin.copy
|
|
65
|
+
if (!menu.builtin.copy)
|
|
66
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value?.toLocaleString() ?? "" };
|
|
66
67
|
|
|
67
68
|
return (
|
|
68
69
|
<NSBoxBaseLayout
|
|
@@ -76,7 +76,8 @@ export class NSBoxPhone extends React.Component<NSBoxPhoneProps, NSBoxPhoneState
|
|
|
76
76
|
href: `tel:${this.state.value}`
|
|
77
77
|
});
|
|
78
78
|
});
|
|
79
|
-
menu.builtin.copy
|
|
79
|
+
if (!menu.builtin.copy)
|
|
80
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
80
81
|
|
|
81
82
|
return (
|
|
82
83
|
<NSBoxBaseLayout
|
|
@@ -67,8 +67,10 @@ export class NSBoxSearch extends React.Component<NSBoxSearchProps, NSBoxSearchSt
|
|
|
67
67
|
override render()
|
|
68
68
|
{
|
|
69
69
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
70
|
-
menu.builtin.copy
|
|
71
|
-
|
|
70
|
+
if (!menu.builtin.copy)
|
|
71
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
72
|
+
if (!menu.builtin.fullscreen)
|
|
73
|
+
menu.builtin.fullscreen = { enabled: true, getValue: () => this.state.value ?? "", setValue: this.setValue };
|
|
72
74
|
|
|
73
75
|
return (
|
|
74
76
|
<NSBoxBaseLayout
|
|
@@ -61,8 +61,10 @@ export class NSBoxString extends React.Component<NSBoxStringProps, NSBoxStringSt
|
|
|
61
61
|
override render()
|
|
62
62
|
{
|
|
63
63
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
64
|
-
menu.builtin.copy
|
|
65
|
-
|
|
64
|
+
if (!menu.builtin.copy)
|
|
65
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
66
|
+
if (!menu.builtin.fullscreen)
|
|
67
|
+
menu.builtin.fullscreen = { enabled: true, getValue: () => this.state.value ?? "", setValue: this.setValue };
|
|
66
68
|
|
|
67
69
|
return (
|
|
68
70
|
<NSBoxBaseLayout
|
|
@@ -65,8 +65,10 @@ export class NSBoxTextArea extends React.Component<NSBoxTextAreaProps, NSBoxText
|
|
|
65
65
|
override render()
|
|
66
66
|
{
|
|
67
67
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
68
|
-
menu.builtin.copy
|
|
69
|
-
|
|
68
|
+
if (!menu.builtin.copy)
|
|
69
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
70
|
+
if (!menu.builtin.fullscreen)
|
|
71
|
+
menu.builtin.fullscreen = { enabled: true, getValue: () => this.state.value ?? "", setValue: this.setValue };
|
|
70
72
|
|
|
71
73
|
return (
|
|
72
74
|
<NSBoxBaseLayout
|
|
@@ -85,6 +87,11 @@ export class NSBoxTextArea extends React.Component<NSBoxTextAreaProps, NSBoxText
|
|
|
85
87
|
placeholder={this.props.placeholder ?? `Please enter ${NamingConvention.auto.convert(this.props.title, NamingConvention.lower_case_space)}`}
|
|
86
88
|
onChange={e => this.setValue(e.target.value)}
|
|
87
89
|
onClick={() => { this.props.onClicked?.(this); }}
|
|
90
|
+
onKeyUp={(e) =>
|
|
91
|
+
{
|
|
92
|
+
if (e.key === "Enter")
|
|
93
|
+
e.stopPropagation();
|
|
94
|
+
}}
|
|
88
95
|
style={{
|
|
89
96
|
height: "100%",
|
|
90
97
|
background: `url("https://static.namirasoft.com/image/concept/type/string.png") white no-repeat scroll top right 4px `,
|
|
@@ -63,7 +63,8 @@ export class NSBoxTime extends React.Component<NSBoxTimeProps, NSBoxTimeState> i
|
|
|
63
63
|
override render()
|
|
64
64
|
{
|
|
65
65
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
66
|
-
menu.builtin.copy
|
|
66
|
+
if (!menu.builtin.copy)
|
|
67
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" }
|
|
67
68
|
|
|
68
69
|
return (
|
|
69
70
|
<NSBoxBaseLayout
|
|
@@ -60,7 +60,8 @@ export class NSBoxTimeZone extends React.Component<NSBoxTimeZoneProps, NSBoxTime
|
|
|
60
60
|
override render()
|
|
61
61
|
{
|
|
62
62
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
63
|
-
menu.builtin.copy
|
|
63
|
+
if (!menu.builtin.copy)
|
|
64
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
64
65
|
|
|
65
66
|
return (
|
|
66
67
|
<NSBoxBaseLayout
|
|
@@ -72,8 +72,10 @@ export class NSBoxURL extends React.Component<NSBoxURLProps, NSBoxURLState> impl
|
|
|
72
72
|
},
|
|
73
73
|
})
|
|
74
74
|
});
|
|
75
|
-
menu.builtin.copy
|
|
76
|
-
|
|
75
|
+
if (!menu.builtin.copy)
|
|
76
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
77
|
+
if (!menu.builtin.fullscreen)
|
|
78
|
+
menu.builtin.fullscreen = { enabled: true, getValue: () => this.state.value ?? "", setValue: this.setValue };
|
|
77
79
|
|
|
78
80
|
return (
|
|
79
81
|
<NSBoxBaseLayout
|
|
@@ -60,7 +60,8 @@ export class NSBoxVersion extends React.Component<NSBoxVersionProps, NSBoxVersio
|
|
|
60
60
|
override render()
|
|
61
61
|
{
|
|
62
62
|
let menu = safeMenuMenuItem(this.props, () => { });
|
|
63
|
-
menu.builtin.copy
|
|
63
|
+
if (!menu.builtin.copy)
|
|
64
|
+
menu.builtin.copy = { enabled: true, getValue: () => this.state.value ?? "" };
|
|
64
65
|
|
|
65
66
|
return (
|
|
66
67
|
<NSBoxBaseLayout
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
align-items: center;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.
|
|
16
|
+
.ns_dialog_container_center {
|
|
17
17
|
background-color: #00000080;
|
|
18
18
|
width: 100%;
|
|
19
19
|
height: 100%;
|
|
@@ -41,6 +41,18 @@
|
|
|
41
41
|
display: flex;
|
|
42
42
|
justify-content: center;
|
|
43
43
|
align-items: center;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ns_dialog_parent {
|
|
48
|
+
z-index: 900;
|
|
49
|
+
position: absolute;
|
|
50
|
+
color: black;
|
|
51
|
+
cursor: default;
|
|
52
|
+
min-width: 350px;
|
|
53
|
+
min-height: 50px;
|
|
54
|
+
max-width: 90vw;
|
|
55
|
+
max-height: 90vh;
|
|
44
56
|
}
|
|
45
57
|
|
|
46
58
|
.ns_dialog_content {
|
|
@@ -49,12 +61,12 @@
|
|
|
49
61
|
background-color: white;
|
|
50
62
|
z-index: 900;
|
|
51
63
|
min-width: 350px;
|
|
52
|
-
min-height:
|
|
53
|
-
max-width:
|
|
64
|
+
min-height: 50px;
|
|
65
|
+
max-width: 90vw;
|
|
54
66
|
max-height: 90vh;
|
|
67
|
+
width: 100%;
|
|
68
|
+
height: 100%;
|
|
55
69
|
overflow-y: auto;
|
|
56
|
-
padding: 8px 0;
|
|
57
|
-
position: absolute;
|
|
58
70
|
color: black;
|
|
59
71
|
cursor: default;
|
|
60
72
|
}
|
|
@@ -86,28 +98,12 @@
|
|
|
86
98
|
z-index: 899;
|
|
87
99
|
}
|
|
88
100
|
|
|
89
|
-
.
|
|
90
|
-
background-color: #00000080;
|
|
91
|
-
width: 100%;
|
|
92
|
-
height: 100%;
|
|
93
|
-
position: fixed;
|
|
94
|
-
top: 0;
|
|
95
|
-
right: 0;
|
|
96
|
-
left: 0;
|
|
97
|
-
bottom: 0;
|
|
98
|
-
z-index: 899;
|
|
99
|
-
display: flex;
|
|
100
|
-
justify-content: center;
|
|
101
|
-
align-items: center;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.ns_dialog_center_container>.ns_dialog_content {
|
|
101
|
+
.ns_dialog_container_center>.ns_dialog_parent {
|
|
105
102
|
left: 0;
|
|
106
|
-
/* width: 100%; */
|
|
107
103
|
position: relative;
|
|
108
104
|
}
|
|
109
105
|
|
|
110
|
-
.
|
|
106
|
+
.ns_dialog_parent {
|
|
111
107
|
right: 0;
|
|
112
108
|
}
|
|
113
109
|
}
|
|
@@ -10,7 +10,8 @@ export interface NSDialogProps extends IBaseComponentProps
|
|
|
10
10
|
closeButton?: {
|
|
11
11
|
show?: boolean;
|
|
12
12
|
out?: boolean;
|
|
13
|
-
}
|
|
13
|
+
},
|
|
14
|
+
zIndex?: number;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export function NSDialog(props: NSDialogProps)
|
|
@@ -18,13 +19,18 @@ export function NSDialog(props: NSDialogProps)
|
|
|
18
19
|
return (
|
|
19
20
|
<section
|
|
20
21
|
id={props.id}
|
|
21
|
-
className={props.center_dialog ? Styles.
|
|
22
|
+
className={props.center_dialog ? Styles.ns_dialog_container_center : Styles.ns_dialog_container}
|
|
23
|
+
style={{ zIndex: props.zIndex }}
|
|
22
24
|
>
|
|
23
|
-
<div
|
|
25
|
+
<div
|
|
26
|
+
className={Styles.ns_dialog_background}
|
|
27
|
+
style={{ zIndex: props.zIndex }}
|
|
28
|
+
onClick={() => props.onClose()}
|
|
29
|
+
>
|
|
24
30
|
</div>
|
|
25
31
|
<div
|
|
26
|
-
className={`${Styles.
|
|
27
|
-
style={{ ...props.style }}
|
|
32
|
+
className={`${Styles.ns_dialog_parent} ${props.classList?.join(" ") ?? ""}`}
|
|
33
|
+
style={{ ...props.style, zIndex: props.zIndex }}
|
|
28
34
|
>
|
|
29
35
|
{
|
|
30
36
|
props.closeButton?.show !== false && <div
|
|
@@ -32,8 +38,8 @@ export function NSDialog(props: NSDialogProps)
|
|
|
32
38
|
style=
|
|
33
39
|
{{
|
|
34
40
|
position: "absolute",
|
|
35
|
-
top: (props.closeButton?.out) ? "-
|
|
36
|
-
right:
|
|
41
|
+
top: (props.closeButton?.out) ? "-40px" : "0px",
|
|
42
|
+
right: (props.closeButton?.out) ? "-40px" : "0px",
|
|
37
43
|
transform: "translate(-40%,40%)",
|
|
38
44
|
cursor: "pointer",
|
|
39
45
|
width: "24px",
|
|
@@ -53,8 +59,13 @@ export function NSDialog(props: NSDialogProps)
|
|
|
53
59
|
onClick={() => props.onClose()} />
|
|
54
60
|
</div>
|
|
55
61
|
}
|
|
56
|
-
<div
|
|
57
|
-
{
|
|
62
|
+
<div
|
|
63
|
+
className={`${Styles.ns_dialog_content}`}
|
|
64
|
+
style={{ zIndex: props.zIndex }}
|
|
65
|
+
>
|
|
66
|
+
<div className={Styles.ns_dialog_children}>
|
|
67
|
+
{props.children}
|
|
68
|
+
</div>
|
|
58
69
|
</div>
|
|
59
70
|
</div>
|
|
60
71
|
</section >
|
|
@@ -165,7 +165,7 @@ export class NSHeader extends React.Component<NSHeaderProps, NSHeaderState>
|
|
|
165
165
|
flex: 0.8
|
|
166
166
|
}}
|
|
167
167
|
input={{
|
|
168
|
-
style: { zIndex:
|
|
168
|
+
style: { zIndex: 800 }
|
|
169
169
|
}}
|
|
170
170
|
onChanged={(e) =>
|
|
171
171
|
{
|
|
@@ -191,6 +191,7 @@ export class NSHeader extends React.Component<NSHeaderProps, NSHeaderState>
|
|
|
191
191
|
}}
|
|
192
192
|
center_dialog={true}
|
|
193
193
|
style={{ maxHeight: "80vh" }}
|
|
194
|
+
zIndex={799}
|
|
194
195
|
>
|
|
195
196
|
<NSProductSearch
|
|
196
197
|
ref={this.NSProductSearch_Ref}
|
|
@@ -61,17 +61,17 @@ export function NSMenuButton(props: NSMenuButtonProps)
|
|
|
61
61
|
|
|
62
62
|
const onCloseInfo = () =>
|
|
63
63
|
{
|
|
64
|
-
setState(
|
|
64
|
+
setState(prev => { return { ...prev, info: false }; });
|
|
65
65
|
};
|
|
66
66
|
const onCloseFullScreen = () =>
|
|
67
67
|
{
|
|
68
|
-
setState(
|
|
68
|
+
setState(prev => { return { ...prev, fullscreen: false }; });
|
|
69
69
|
props.menu?.builtin.fullscreen?.setValue(state.value);
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
const onChanged = (e: NSBoxTextArea) =>
|
|
73
73
|
{
|
|
74
|
-
setState(
|
|
74
|
+
setState(prev => { return { ...prev, value: e.getValue() }; });
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
let buttons: { title: string, icon: string, href?: string, onClick?: () => void }[] = [];
|
|
@@ -112,7 +112,7 @@ export function NSMenuButton(props: NSMenuButtonProps)
|
|
|
112
112
|
buttons.push({
|
|
113
113
|
title: "Full Screen", icon: "https://static.namirasoft.com/image/concept/full-screen/blue.svg", onClick: () =>
|
|
114
114
|
{
|
|
115
|
-
setState(
|
|
115
|
+
setState(prev => { return { ...prev, fullscreen: true, value: props.menu?.builtin?.fullscreen?.getValue() ?? "" }; });
|
|
116
116
|
let focus = () =>
|
|
117
117
|
{
|
|
118
118
|
if (textarea.current?.textarea.current)
|