namirasoft-site-react 1.3.308 → 1.3.310
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/components/NSBoxEntity.module.css +17 -0
- package/package.json +1 -1
- package/src/App.tsx +2 -2
- package/src/components/NSBoxEntity.module.css +17 -0
- package/src/components/NSBoxEntity.tsx +3 -3
- package/src/components/NSTable.tsx +1 -0
- package/tsconfig.json +8 -7
- package/dist/App.d.ts +0 -9
- package/dist/App.js +0 -96
- package/dist/App.js.map +0 -1
- package/dist/CopyToClipboard.d.ts +0 -3
- package/dist/CopyToClipboard.js +0 -7
- package/dist/CopyToClipboard.js.map +0 -1
- package/dist/Validator.d.ts +0 -14
- package/dist/Validator.js +0 -94
- package/dist/Validator.js.map +0 -1
- package/dist/components/NSActionMenu.d.ts +0 -14
- package/dist/components/NSActionMenu.js +0 -33
- package/dist/components/NSActionMenu.js.map +0 -1
- package/dist/components/NSAssistantButton.d.ts +0 -6
- package/dist/components/NSAssistantButton.js +0 -20
- package/dist/components/NSAssistantButton.js.map +0 -1
- package/dist/components/NSBarAction.d.ts +0 -12
- package/dist/components/NSBarAction.js +0 -20
- package/dist/components/NSBarAction.js.map +0 -1
- package/dist/components/NSBarHeroBanner.d.ts +0 -7
- package/dist/components/NSBarHeroBanner.js +0 -8
- package/dist/components/NSBarHeroBanner.js.map +0 -1
- package/dist/components/NSBarNotification.d.ts +0 -21
- package/dist/components/NSBarNotification.js +0 -37
- package/dist/components/NSBarNotification.js.map +0 -1
- package/dist/components/NSBarTitle.d.ts +0 -5
- package/dist/components/NSBarTitle.js +0 -11
- package/dist/components/NSBarTitle.js.map +0 -1
- package/dist/components/NSBoxBoolean.d.ts +0 -23
- package/dist/components/NSBoxBoolean.js +0 -40
- package/dist/components/NSBoxBoolean.js.map +0 -1
- package/dist/components/NSBoxCombo.d.ts +0 -33
- package/dist/components/NSBoxCombo.js +0 -65
- package/dist/components/NSBoxCombo.js.map +0 -1
- package/dist/components/NSBoxDate.d.ts +0 -22
- package/dist/components/NSBoxDate.js +0 -42
- package/dist/components/NSBoxDate.js.map +0 -1
- package/dist/components/NSBoxDateTime.d.ts +0 -22
- package/dist/components/NSBoxDateTime.js +0 -42
- package/dist/components/NSBoxDateTime.js.map +0 -1
- package/dist/components/NSBoxDouble.d.ts +0 -23
- package/dist/components/NSBoxDouble.js +0 -42
- package/dist/components/NSBoxDouble.js.map +0 -1
- package/dist/components/NSBoxDuration.d.ts +0 -24
- package/dist/components/NSBoxDuration.js +0 -43
- package/dist/components/NSBoxDuration.js.map +0 -1
- package/dist/components/NSBoxEmail.d.ts +0 -25
- package/dist/components/NSBoxEmail.js +0 -50
- package/dist/components/NSBoxEmail.js.map +0 -1
- package/dist/components/NSBoxEntity.d.ts +0 -42
- package/dist/components/NSBoxEntity.js +0 -86
- package/dist/components/NSBoxEntity.js.map +0 -1
- package/dist/components/NSBoxEnum.d.ts +0 -19
- package/dist/components/NSBoxEnum.js +0 -46
- package/dist/components/NSBoxEnum.js.map +0 -1
- package/dist/components/NSBoxErrorNotifier.d.ts +0 -6
- package/dist/components/NSBoxErrorNotifier.js +0 -11
- package/dist/components/NSBoxErrorNotifier.js.map +0 -1
- package/dist/components/NSBoxIPV4.d.ts +0 -23
- package/dist/components/NSBoxIPV4.js +0 -45
- package/dist/components/NSBoxIPV4.js.map +0 -1
- package/dist/components/NSBoxIPV6.d.ts +0 -23
- package/dist/components/NSBoxIPV6.js +0 -45
- package/dist/components/NSBoxIPV6.js.map +0 -1
- package/dist/components/NSBoxInteger.d.ts +0 -23
- package/dist/components/NSBoxInteger.js +0 -42
- package/dist/components/NSBoxInteger.js.map +0 -1
- package/dist/components/NSBoxLabel.d.ts +0 -12
- package/dist/components/NSBoxLabel.js +0 -11
- package/dist/components/NSBoxLabel.js.map +0 -1
- package/dist/components/NSBoxOTP.d.ts +0 -9
- package/dist/components/NSBoxOTP.js +0 -34
- package/dist/components/NSBoxOTP.js.map +0 -1
- package/dist/components/NSBoxPassword.d.ts +0 -23
- package/dist/components/NSBoxPassword.js +0 -43
- package/dist/components/NSBoxPassword.js.map +0 -1
- package/dist/components/NSBoxPhone.d.ts +0 -25
- package/dist/components/NSBoxPhone.js +0 -45
- package/dist/components/NSBoxPhone.js.map +0 -1
- package/dist/components/NSBoxPrice.d.ts +0 -23
- package/dist/components/NSBoxPrice.js +0 -42
- package/dist/components/NSBoxPrice.js.map +0 -1
- package/dist/components/NSBoxSearch.d.ts +0 -25
- package/dist/components/NSBoxSearch.js +0 -52
- package/dist/components/NSBoxSearch.js.map +0 -1
- package/dist/components/NSBoxString.d.ts +0 -25
- package/dist/components/NSBoxString.js +0 -48
- package/dist/components/NSBoxString.js.map +0 -1
- package/dist/components/NSBoxTextArea.d.ts +0 -27
- package/dist/components/NSBoxTextArea.js +0 -60
- package/dist/components/NSBoxTextArea.js.map +0 -1
- package/dist/components/NSBoxTime.d.ts +0 -23
- package/dist/components/NSBoxTime.js +0 -44
- package/dist/components/NSBoxTime.js.map +0 -1
- package/dist/components/NSButton.d.ts +0 -9
- package/dist/components/NSButton.js +0 -8
- package/dist/components/NSButton.js.map +0 -1
- package/dist/components/NSButtonBlue.d.ts +0 -2
- package/dist/components/NSButtonBlue.js +0 -11
- package/dist/components/NSButtonBlue.js.map +0 -1
- package/dist/components/NSButtonGreen.d.ts +0 -2
- package/dist/components/NSButtonGreen.js +0 -11
- package/dist/components/NSButtonGreen.js.map +0 -1
- package/dist/components/NSButtonRed.d.ts +0 -2
- package/dist/components/NSButtonRed.js +0 -11
- package/dist/components/NSButtonRed.js.map +0 -1
- package/dist/components/NSCard.d.ts +0 -14
- package/dist/components/NSCard.js +0 -18
- package/dist/components/NSCard.js.map +0 -1
- package/dist/components/NSCopyToClipboard.d.ts +0 -6
- package/dist/components/NSCopyToClipboard.js +0 -12
- package/dist/components/NSCopyToClipboard.js.map +0 -1
- package/dist/components/NSElectronicCard.d.ts +0 -9
- package/dist/components/NSElectronicCard.js +0 -13
- package/dist/components/NSElectronicCard.js.map +0 -1
- package/dist/components/NSEntityBar.d.ts +0 -8
- package/dist/components/NSEntityBar.js +0 -7
- package/dist/components/NSEntityBar.js.map +0 -1
- package/dist/components/NSEntityCardBackground.d.ts +0 -7
- package/dist/components/NSEntityCardBackground.js +0 -9
- package/dist/components/NSEntityCardBackground.js.map +0 -1
- package/dist/components/NSFilterBox.d.ts +0 -61
- package/dist/components/NSFilterBox.js +0 -230
- package/dist/components/NSFilterBox.js.map +0 -1
- package/dist/components/NSFilterBoxDialog.d.ts +0 -12
- package/dist/components/NSFilterBoxDialog.js +0 -17
- package/dist/components/NSFilterBoxDialog.js.map +0 -1
- package/dist/components/NSFilterItem.d.ts +0 -17
- package/dist/components/NSFilterItem.js +0 -30
- package/dist/components/NSFilterItem.js.map +0 -1
- package/dist/components/NSFooter.d.ts +0 -20
- package/dist/components/NSFooter.js +0 -56
- package/dist/components/NSFooter.js.map +0 -1
- package/dist/components/NSGroupedList.d.ts +0 -31
- package/dist/components/NSGroupedList.js +0 -42
- package/dist/components/NSGroupedList.js.map +0 -1
- package/dist/components/NSHeader.d.ts +0 -26
- package/dist/components/NSHeader.js +0 -81
- package/dist/components/NSHeader.js.map +0 -1
- package/dist/components/NSLayout.d.ts +0 -22
- package/dist/components/NSLayout.js +0 -30
- package/dist/components/NSLayout.js.map +0 -1
- package/dist/components/NSLine.d.ts +0 -4
- package/dist/components/NSLine.js +0 -6
- package/dist/components/NSLine.js.map +0 -1
- package/dist/components/NSLink.d.ts +0 -5
- package/dist/components/NSLink.js +0 -7
- package/dist/components/NSLink.js.map +0 -1
- package/dist/components/NSLinkBlue.d.ts +0 -2
- package/dist/components/NSLinkBlue.js +0 -13
- package/dist/components/NSLinkBlue.js.map +0 -1
- package/dist/components/NSLinkGreen.d.ts +0 -2
- package/dist/components/NSLinkGreen.js +0 -6
- package/dist/components/NSLinkGreen.js.map +0 -1
- package/dist/components/NSLinkRed.d.ts +0 -2
- package/dist/components/NSLinkRed.js +0 -6
- package/dist/components/NSLinkRed.js.map +0 -1
- package/dist/components/NSLoading.d.ts +0 -4
- package/dist/components/NSLoading.js +0 -7
- package/dist/components/NSLoading.js.map +0 -1
- package/dist/components/NSModal.d.ts +0 -10
- package/dist/components/NSModal.js +0 -13
- package/dist/components/NSModal.js.map +0 -1
- package/dist/components/NSNoData.d.ts +0 -5
- package/dist/components/NSNoData.js +0 -7
- package/dist/components/NSNoData.js.map +0 -1
- package/dist/components/NSPagination.d.ts +0 -20
- package/dist/components/NSPagination.js +0 -82
- package/dist/components/NSPagination.js.map +0 -1
- package/dist/components/NSPanel.d.ts +0 -7
- package/dist/components/NSPanel.js +0 -7
- package/dist/components/NSPanel.js.map +0 -1
- package/dist/components/NSPrintModal.d.ts +0 -15
- package/dist/components/NSPrintModal.js +0 -35
- package/dist/components/NSPrintModal.js.map +0 -1
- package/dist/components/NSRadioButton.d.ts +0 -5
- package/dist/components/NSRadioButton.js +0 -15
- package/dist/components/NSRadioButton.js.map +0 -1
- package/dist/components/NSSection.d.ts +0 -7
- package/dist/components/NSSection.js +0 -10
- package/dist/components/NSSection.js.map +0 -1
- package/dist/components/NSSectionBars.d.ts +0 -7
- package/dist/components/NSSectionBars.js +0 -10
- package/dist/components/NSSectionBars.js.map +0 -1
- package/dist/components/NSSectionCards.d.ts +0 -13
- package/dist/components/NSSectionCards.js +0 -15
- package/dist/components/NSSectionCards.js.map +0 -1
- package/dist/components/NSSectionTitle.d.ts +0 -7
- package/dist/components/NSSectionTitle.js +0 -8
- package/dist/components/NSSectionTitle.js.map +0 -1
- package/dist/components/NSSpace.d.ts +0 -17
- package/dist/components/NSSpace.js +0 -19
- package/dist/components/NSSpace.js.map +0 -1
- package/dist/components/NSTabPage.d.ts +0 -13
- package/dist/components/NSTabPage.js +0 -9
- package/dist/components/NSTabPage.js.map +0 -1
- package/dist/components/NSTable.d.ts +0 -50
- package/dist/components/NSTable.js +0 -153
- package/dist/components/NSTable.js.map +0 -1
- package/dist/components/NSTag.d.ts +0 -2
- package/dist/components/NSTag.js +0 -22
- package/dist/components/NSTag.js.map +0 -1
- package/dist/components/NSTitle.d.ts +0 -5
- package/dist/components/NSTitle.js +0 -7
- package/dist/components/NSTitle.js.map +0 -1
- package/dist/components/NSVerification.d.ts +0 -9
- package/dist/components/NSVerification.js +0 -19
- package/dist/components/NSVerification.js.map +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -7
- package/dist/index.js.map +0 -1
- package/dist/main.d.ts +0 -81
- package/dist/main.js +0 -82
- package/dist/main.js.map +0 -1
- package/dist/pages/NSLoginPage.d.ts +0 -6
- package/dist/pages/NSLoginPage.js +0 -8
- package/dist/pages/NSLoginPage.js.map +0 -1
- package/dist/pages/NSNotFoundPage.d.ts +0 -1
- package/dist/pages/NSNotFoundPage.js +0 -7
- package/dist/pages/NSNotFoundPage.js.map +0 -1
- package/dist/props/IBaseComponentProps.d.ts +0 -7
- package/dist/props/IBaseComponentProps.js +0 -2
- package/dist/props/IBaseComponentProps.js.map +0 -1
- package/dist/props/IHeaderIconProps.d.ts +0 -8
- package/dist/props/IHeaderIconProps.js +0 -2
- package/dist/props/IHeaderIconProps.js.map +0 -1
- package/dist/props/IHeaderProps.d.ts +0 -5
- package/dist/props/IHeaderProps.js +0 -2
- package/dist/props/IHeaderProps.js.map +0 -1
- package/dist/props/IImageProps.d.ts +0 -4
- package/dist/props/IImageProps.js +0 -2
- package/dist/props/IImageProps.js.map +0 -1
- package/dist/props/ILinkProps.d.ts +0 -5
- package/dist/props/ILinkProps.js +0 -2
- package/dist/props/ILinkProps.js.map +0 -1
- package/dist/props/IValidationNumberProps.d.ts +0 -4
- package/dist/props/IValidationNumberProps.js +0 -2
- package/dist/props/IValidationNumberProps.js.map +0 -1
- package/dist/props/IValidationProps.d.ts +0 -6
- package/dist/props/IValidationProps.js +0 -2
- package/dist/props/IValidationProps.js.map +0 -1
- package/dist/props/IValidationRegexProps.d.ts +0 -4
- package/dist/props/IValidationRegexProps.js +0 -2
- package/dist/props/IValidationRegexProps.js.map +0 -1
- package/dist/props/IValidationStringProps.d.ts +0 -4
- package/dist/props/IValidationStringProps.js +0 -2
- package/dist/props/IValidationStringProps.js.map +0 -1
- package/dist/routing/INSRouterMaker.d.ts +0 -5
- package/dist/routing/INSRouterMaker.js +0 -2
- package/dist/routing/INSRouterMaker.js.map +0 -1
- package/dist/routing/INSRouterProps.d.ts +0 -4
- package/dist/routing/INSRouterProps.js +0 -2
- package/dist/routing/INSRouterProps.js.map +0 -1
- package/dist/routing/INSRouterState.d.ts +0 -4
- package/dist/routing/INSRouterState.js +0 -2
- package/dist/routing/INSRouterState.js.map +0 -1
- package/dist/routing/NSRouterMaker.d.ts +0 -11
- package/dist/routing/NSRouterMaker.js +0 -23
- package/dist/routing/NSRouterMaker.js.map +0 -1
- package/dist/routing/Notifier.d.ts +0 -16
- package/dist/routing/Notifier.js +0 -68
- package/dist/routing/Notifier.js.map +0 -1
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Styles from "./NSBoxEnum.module.css";
|
|
5
|
-
import { Select, Space } from 'antd';
|
|
6
|
-
import IconSelectBox from '../assets/images/icon-select-box.svg';
|
|
7
|
-
import { Validator } from "../Validator";
|
|
8
|
-
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
9
|
-
import { NSLoading } from "./NSLoading";
|
|
10
|
-
export class NSBoxEntity extends React.Component {
|
|
11
|
-
constructor(props) {
|
|
12
|
-
super(props);
|
|
13
|
-
this.state = {
|
|
14
|
-
items: null,
|
|
15
|
-
items_string: null,
|
|
16
|
-
value: null,
|
|
17
|
-
values: [],
|
|
18
|
-
};
|
|
19
|
-
this.getValues = this.getValues.bind(this);
|
|
20
|
-
this.setValues = this.setValues.bind(this);
|
|
21
|
-
this.setValue = this.setValue.bind(this);
|
|
22
|
-
this.getValue = this.getValue.bind(this);
|
|
23
|
-
this.onChanged = this.onChanged.bind(this);
|
|
24
|
-
}
|
|
25
|
-
getError(value) {
|
|
26
|
-
let value_string = value == null ? "" : this.props.getValue(value);
|
|
27
|
-
return (Validator.getError(this.props.title, value_string, this.props));
|
|
28
|
-
}
|
|
29
|
-
getValue() {
|
|
30
|
-
let error = this.getError(this.state.value);
|
|
31
|
-
if (error) {
|
|
32
|
-
this.setState({ error });
|
|
33
|
-
throw new Error(error);
|
|
34
|
-
}
|
|
35
|
-
return this.state.value;
|
|
36
|
-
}
|
|
37
|
-
getValues() {
|
|
38
|
-
this.state.values.forEach(value => {
|
|
39
|
-
let error = this.getError(value);
|
|
40
|
-
if (error) {
|
|
41
|
-
this.setState({ error });
|
|
42
|
-
throw new Error(error);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
return this.state.values;
|
|
46
|
-
}
|
|
47
|
-
setValue(value) {
|
|
48
|
-
this.setState({ value }, () => {
|
|
49
|
-
if (this.props.onChanged)
|
|
50
|
-
this.props.onChanged(this);
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
setValues(values) {
|
|
54
|
-
this.setState({ values }, () => {
|
|
55
|
-
if (this.props.onChanged)
|
|
56
|
-
this.props.onChanged(this);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
onChanged(value) {
|
|
60
|
-
var _a, _b;
|
|
61
|
-
if (this.state.items)
|
|
62
|
-
if (this.props.multiple) {
|
|
63
|
-
let string_values = value;
|
|
64
|
-
let ds = (_a = this.state.items.filter(item => string_values.includes(this.props.getValue(item)))) !== null && _a !== void 0 ? _a : [];
|
|
65
|
-
this.setValues(ds);
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
let d = (_b = this.state.items.find(item => this.props.getValue(item) == value)) !== null && _b !== void 0 ? _b : null;
|
|
69
|
-
this.setValue(d);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
componentDidMount() {
|
|
73
|
-
this.props.getItems([], null, null).then(items => {
|
|
74
|
-
let items_string = items.rows.map(item => { return { value: this.props.getValue(item), desc: this.props.getText(item) }; });
|
|
75
|
-
this.setState({ items: items.rows, items_string });
|
|
76
|
-
}).catch(() => { });
|
|
77
|
-
}
|
|
78
|
-
render() {
|
|
79
|
-
var _a;
|
|
80
|
-
if (this.state.items == null) {
|
|
81
|
-
return _jsx(NSLoading, {});
|
|
82
|
-
}
|
|
83
|
-
return (_jsx(_Fragment, { children: _jsxs("div", { id: this.props.id, className: `${Styles.ns_input_parent}`, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx(Select, { mode: this.props.multiple ? "multiple" : undefined, style: { width: '100%' }, className: Styles.ns_input_select, placeholder: this.props.placeholder, onChange: this.onChanged, onClick: () => this.props.onClicked, optionLabelProp: "label", options: (_a = this.state.items_string) !== null && _a !== void 0 ? _a : [], optionRender: (option) => (_jsx(Space, { className: Styles.ns_input_select_option, children: option.data.desc })), suffixIcon: _jsx("img", { src: IconSelectBox, alt: "SelectBox Icon" }) }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }) }));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
//# sourceMappingURL=NSBoxEntity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxEntity.js","sourceRoot":"","sources":["../../src/components/NSBoxEntity.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,aAAa,MAAM,sCAAsC,CAAC;AAGjE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;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EAAE,MAAM,CAAC,cAAc,kBAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,eAAM,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAW,OAAG,IAAI,CAAC,KAAK,CAAC,KAAK,SAAS,EACrI,KAAC,MAAM,IACN,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAClD,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EACxB,SAAS,EAAE,MAAM,CAAC,eAAe,EACjC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EACnC,eAAe,EAAC,OAAO,EACvB,OAAO,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,YAAY,mCAAI,EAAE,EACtC,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CACzB,KAAC,KAAK,IAAC,SAAS,EAAE,MAAM,CAAC,sBAAsB,YAC7C,MAAM,CAAC,IAAI,CAAC,IAAI,GACV,CACR,EACD,UAAU,EAAE,cAAK,GAAG,EAAE,aAAa,EAAE,GAAG,EAAC,gBAAgB,GAAG,GAC3D,EACF,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAI,IAC1F,GACJ,CACH,CAAC;IACH,CAAC;CACD"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { INSBoxComboProps, NSBoxCombo } from "./NSBoxCombo";
|
|
3
|
-
export interface INSBoxEnumProps extends INSBoxComboProps {
|
|
4
|
-
options: any;
|
|
5
|
-
}
|
|
6
|
-
export declare class NSBoxEnum extends React.Component<INSBoxEnumProps> {
|
|
7
|
-
NSBoxCombo: React.RefObject<NSBoxCombo>;
|
|
8
|
-
constructor(props: INSBoxEnumProps);
|
|
9
|
-
getError(value: string): string | null;
|
|
10
|
-
getValue<T>(enumObj: {
|
|
11
|
-
[s: string]: T;
|
|
12
|
-
}, _default: T): T | null;
|
|
13
|
-
getValues<T>(enumObj: {
|
|
14
|
-
[s: string]: T;
|
|
15
|
-
}, _default: T): T[];
|
|
16
|
-
setValue(value: string | null): void;
|
|
17
|
-
setValues(values: string[]): void;
|
|
18
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import React, { createRef } from "react";
|
|
4
|
-
import { ObjectService } from "namirasoft-core";
|
|
5
|
-
import { NSBoxCombo } from "./NSBoxCombo";
|
|
6
|
-
export class NSBoxEnum extends React.Component {
|
|
7
|
-
constructor(props) {
|
|
8
|
-
super(props);
|
|
9
|
-
this.NSBoxCombo = createRef();
|
|
10
|
-
this.getValues = this.getValues.bind(this);
|
|
11
|
-
this.setValues = this.setValues.bind(this);
|
|
12
|
-
this.setValue = this.setValue.bind(this);
|
|
13
|
-
this.getValue = this.getValue.bind(this);
|
|
14
|
-
}
|
|
15
|
-
getError(value) {
|
|
16
|
-
var _a, _b;
|
|
17
|
-
return (_b = (_a = this.NSBoxCombo.current) === null || _a === void 0 ? void 0 : _a.getError(value)) !== null && _b !== void 0 ? _b : null;
|
|
18
|
-
}
|
|
19
|
-
getValue(enumObj, _default) {
|
|
20
|
-
var _a;
|
|
21
|
-
return new ObjectService((_a = this.NSBoxCombo.current) === null || _a === void 0 ? void 0 : _a.getValue()).getEnum(enumObj, _default);
|
|
22
|
-
}
|
|
23
|
-
getValues(enumObj, _default) {
|
|
24
|
-
var _a, _b;
|
|
25
|
-
let values = (_b = (_a = this.NSBoxCombo.current) === null || _a === void 0 ? void 0 : _a.getValues()) !== null && _b !== void 0 ? _b : [];
|
|
26
|
-
return values.map(value => new ObjectService(value).getEnum(enumObj, _default));
|
|
27
|
-
}
|
|
28
|
-
setValue(value) {
|
|
29
|
-
var _a;
|
|
30
|
-
(_a = this.NSBoxCombo.current) === null || _a === void 0 ? void 0 : _a.setValue(value);
|
|
31
|
-
}
|
|
32
|
-
setValues(values) {
|
|
33
|
-
var _a;
|
|
34
|
-
(_a = this.NSBoxCombo.current) === null || _a === void 0 ? void 0 : _a.setValues(values);
|
|
35
|
-
}
|
|
36
|
-
render() {
|
|
37
|
-
let options = Object.keys(this.props.options).map(key => {
|
|
38
|
-
return {
|
|
39
|
-
desc: key,
|
|
40
|
-
value: key,
|
|
41
|
-
};
|
|
42
|
-
});
|
|
43
|
-
return (_jsx(NSBoxCombo, Object.assign({ ref: this.NSBoxCombo }, this.props, { options: options })));
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=NSBoxEnum.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxEnum.js","sourceRoot":"","sources":["../../src/components/NSBoxEnum.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAuC,UAAU,EAAE,MAAM,cAAc,CAAC;AAO/E,MAAM,OAAO,SAAU,SAAQ,KAAK,CAAC,SAA0B;IAG9D,YAAY,KAAsB;QAEjC,KAAK,CAAC,KAAK,CAAC,CAAC;QAHP,eAAU,GAAG,SAAS,EAAc,CAAC;QAI3C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IA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5E,OAAO;gBACN,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,GAAG;aACV,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,CACN,KAAC,UAAU,kBAAC,GAAG,EAAE,IAAI,CAAC,UAAU,IAAM,IAAI,CAAC,KAAK,IAAE,OAAO,EAAE,OAAO,IAAe,CACjF,CAAC;IACH,CAAC;CACD"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
2
|
-
export interface INSBoxErrorNotifierProps extends IBaseComponentProps {
|
|
3
|
-
error?: string;
|
|
4
|
-
clearError: () => void;
|
|
5
|
-
}
|
|
6
|
-
export declare function NSBoxErrorNotifier(props: INSBoxErrorNotifierProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import Styles from "./NSBoxErrorNotifier.module.css";
|
|
3
|
-
import Danger from '../assets/images/danger.svg';
|
|
4
|
-
export function NSBoxErrorNotifier(props) {
|
|
5
|
-
if (props.error)
|
|
6
|
-
setTimeout(() => {
|
|
7
|
-
props.clearError();
|
|
8
|
-
}, 5000);
|
|
9
|
-
return _jsx(_Fragment, { children: props.error && (_jsxs("div", { id: props.id, className: "d-flex justify-content-start align-items-center gap-2 ms-2", children: [_jsx("img", { className: "", src: Danger, alt: "Error Icon", width: 13, height: 13 }), _jsx("span", { className: Styles.ns_input_error, children: props.error })] })) });
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=NSBoxErrorNotifier.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxErrorNotifier.js","sourceRoot":"","sources":["../../src/components/NSBoxErrorNotifier.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iCAAiC,CAAC;AACrD,OAAO,MAAM,MAAM,6BAA6B,CAAC;AASjD,MAAM,UAAU,kBAAkB,CAAC,KAA+B;IAEjE,IAAI,KAAK,CAAC,KAAK;QACd,UAAU,CAAC,GAAG,EAAE;YAEf,KAAK,CAAC,UAAU,EAAE,CAAC;QACpB,CAAC,EAAE,IAAI,CAAC,CAAC;IACV,OAAO,4BAEL,KAAK,CAAC,KAAK,IAAI,CACd,eAAK,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,SAAS,EAAC,4DAA4D,aACxF,cACC,SAAS,EAAE,EAAE,EACb,GAAG,EAAE,MAAM,EACX,GAAG,EAAC,YAAY,EAChB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACT,EACF,eAAM,SAAS,EAAE,MAAM,CAAC,cAAc,YAAG,KAAK,CAAC,KAAK,GAAQ,IACtD,CACP,GAEA,CAAC;AACL,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
3
|
-
import { IValidationProps } from "../props/IValidationProps";
|
|
4
|
-
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
5
|
-
export interface INSBoxIPV4Props extends IBaseComponentProps, IValidationProps, IValidationStringProps {
|
|
6
|
-
title: string;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
defaultValue?: string;
|
|
9
|
-
onChanged?: (e: NSBoxIPV4) => void;
|
|
10
|
-
onClicked?: (e: NSBoxIPV4) => void;
|
|
11
|
-
}
|
|
12
|
-
export interface INSBoxIPV4State {
|
|
13
|
-
value: string;
|
|
14
|
-
error?: string;
|
|
15
|
-
}
|
|
16
|
-
export declare class NSBoxIPV4 extends React.Component<INSBoxIPV4Props, INSBoxIPV4State> {
|
|
17
|
-
constructor(props: INSBoxIPV4Props);
|
|
18
|
-
getError(): string | null;
|
|
19
|
-
getValue(): string;
|
|
20
|
-
setValue(value: string): void;
|
|
21
|
-
private onChanged;
|
|
22
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconInputIP from '../assets/images/icon-input-ip.svg';
|
|
6
|
-
import { Validator } from "../Validator";
|
|
7
|
-
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
8
|
-
const IPV4_PATTERN = "^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$";
|
|
9
|
-
export class NSBoxIPV4 extends React.Component {
|
|
10
|
-
constructor(props) {
|
|
11
|
-
var _a;
|
|
12
|
-
super(props);
|
|
13
|
-
this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "" };
|
|
14
|
-
this.getValue = this.getValue.bind(this);
|
|
15
|
-
this.setValue = this.setValue.bind(this);
|
|
16
|
-
this.onChanged = this.onChanged.bind(this);
|
|
17
|
-
}
|
|
18
|
-
getError() {
|
|
19
|
-
return (Validator.getError(this.props.title, this.state.value, this.props) ||
|
|
20
|
-
Validator.getErrorString(this.props.title, this.state.value, this.props) ||
|
|
21
|
-
Validator.getErrorIP(this.props.title, this.state.value));
|
|
22
|
-
}
|
|
23
|
-
getValue() {
|
|
24
|
-
let error = this.getError();
|
|
25
|
-
if (error) {
|
|
26
|
-
this.setState({ error });
|
|
27
|
-
throw new Error(error);
|
|
28
|
-
}
|
|
29
|
-
return this.state.value;
|
|
30
|
-
}
|
|
31
|
-
setValue(value) {
|
|
32
|
-
this.setState({ value }, () => {
|
|
33
|
-
if (this.props.onChanged)
|
|
34
|
-
this.props.onChanged(this);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
onChanged(e) {
|
|
38
|
-
this.setValue(e.target.value);
|
|
39
|
-
}
|
|
40
|
-
render() {
|
|
41
|
-
var _a;
|
|
42
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { id: this.props.id, className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("input", { type: "text", name: this.props.name, className: Styles.ns_input, placeholder: this.props.placeholder, value: this.state.value, onChange: this.onChanged, onClick: () => this.props.onClicked, minLength: 7, maxLength: 15, size: 15, pattern: IPV4_PATTERN, style: { background: `url(${IconInputIP}) white no-repeat scroll center right 16px` } })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=NSBoxIPV4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxIPV4.js","sourceRoot":"","sources":["../../src/components/NSBoxIPV4.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAI7D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,YAAY,GAAW,2EAA2E,CAAA;AAgBxG,MAAM,OAAO,SAAU,SAAQ,KAAK,CAAC,SAA2C;IAE/E,YAAY,KAAsB;;QAEjC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,EAAE,EAAE,CAAC;QACjD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI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,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,eAAe,IAAI,MAAA,IAAI,CAAC,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,aACzH,gBAAM,SAAS,EAAE,MAAM,CAAC,cAAc,kBAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,eAAM,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAW,OAAG,IAAI,CAAC,KAAK,CAAC,KAAK,SAAS,EACrI,gBACC,IAAI,EAAC,MAAM,EACX,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACrB,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EACnC,SAAS,EAAE,CAAC,EACZ,SAAS,EAAE,EAAE,EACb,IAAI,EAAE,EAAE,EACR,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,WAAW,4CAA4C,EAAE,GACpF,IACG,EACN,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAI,IAC7F,CACH,CAAC;IACH,CAAC;CACD"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
3
|
-
import { IValidationProps } from "../props/IValidationProps";
|
|
4
|
-
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
5
|
-
export interface INSBoxIPV6Props extends IBaseComponentProps, IValidationProps, IValidationStringProps {
|
|
6
|
-
title: string;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
defaultValue?: string;
|
|
9
|
-
onChanged?: (e: NSBoxIPV6) => void;
|
|
10
|
-
onClicked?: (e: NSBoxIPV6) => void;
|
|
11
|
-
}
|
|
12
|
-
export interface INSBoxIPV6State {
|
|
13
|
-
value: string;
|
|
14
|
-
error?: string;
|
|
15
|
-
}
|
|
16
|
-
export declare class NSBoxIPV6 extends React.Component<INSBoxIPV6Props, INSBoxIPV6State> {
|
|
17
|
-
constructor(props: INSBoxIPV6Props);
|
|
18
|
-
getError(): string | null;
|
|
19
|
-
getValue(): string;
|
|
20
|
-
setValue(value: string): void;
|
|
21
|
-
private onChanged;
|
|
22
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconInputIP from '../assets/images/icon-input-ip.svg';
|
|
6
|
-
import { Validator } from "../Validator";
|
|
7
|
-
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
8
|
-
const IPV6_PATTERN = '^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?$';
|
|
9
|
-
export class NSBoxIPV6 extends React.Component {
|
|
10
|
-
constructor(props) {
|
|
11
|
-
var _a;
|
|
12
|
-
super(props);
|
|
13
|
-
this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "" };
|
|
14
|
-
this.getValue = this.getValue.bind(this);
|
|
15
|
-
this.setValue = this.setValue.bind(this);
|
|
16
|
-
this.onChanged = this.onChanged.bind(this);
|
|
17
|
-
}
|
|
18
|
-
getError() {
|
|
19
|
-
return (Validator.getError(this.props.title, this.state.value, this.props) ||
|
|
20
|
-
Validator.getErrorString(this.props.title, this.state.value, this.props) ||
|
|
21
|
-
Validator.getErrorIP(this.props.title, this.state.value));
|
|
22
|
-
}
|
|
23
|
-
getValue() {
|
|
24
|
-
let error = this.getError();
|
|
25
|
-
if (error) {
|
|
26
|
-
this.setState({ error });
|
|
27
|
-
throw new Error(error);
|
|
28
|
-
}
|
|
29
|
-
return this.state.value;
|
|
30
|
-
}
|
|
31
|
-
setValue(value) {
|
|
32
|
-
this.setState({ value }, () => {
|
|
33
|
-
if (this.props.onChanged)
|
|
34
|
-
this.props.onChanged(this);
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
onChanged(e) {
|
|
38
|
-
this.setValue(e.target.value);
|
|
39
|
-
}
|
|
40
|
-
render() {
|
|
41
|
-
var _a;
|
|
42
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { id: this.props.id, className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("input", { type: "text", name: this.props.name, className: Styles.ns_input, placeholder: this.props.placeholder, value: this.state.value, onChange: this.onChanged, onClick: () => this.props.onClicked, pattern: IPV6_PATTERN, style: { background: `url(${IconInputIP}) white no-repeat scroll center right 16px` } })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=NSBoxIPV6.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxIPV6.js","sourceRoot":"","sources":["../../src/components/NSBoxIPV6.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,WAAW,MAAM,oCAAoC,CAAC;A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AA4C,EAAE,GACpF,IACG,EACN,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAI,IAC7F,CACH,CAAC;IACH,CAAC;CACD"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
3
|
-
import { IValidationNumberProps } from "../props/IValidationNumberProps";
|
|
4
|
-
import { IValidationProps } from "../props/IValidationProps";
|
|
5
|
-
export interface INSBoxIntegerProps extends IBaseComponentProps, IValidationProps, IValidationNumberProps {
|
|
6
|
-
title: string;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
defaultValue?: number;
|
|
9
|
-
onChanged?: (e: NSBoxInteger) => void;
|
|
10
|
-
onClicked?: (e: NSBoxInteger) => void;
|
|
11
|
-
}
|
|
12
|
-
export interface INSBoxIntegerState {
|
|
13
|
-
value?: number;
|
|
14
|
-
error?: string;
|
|
15
|
-
}
|
|
16
|
-
export declare class NSBoxInteger extends React.Component<INSBoxIntegerProps, INSBoxIntegerState> {
|
|
17
|
-
constructor(props: INSBoxIntegerProps);
|
|
18
|
-
getError(): string | null;
|
|
19
|
-
getValue(): number | undefined;
|
|
20
|
-
setValue(value: number | undefined): void;
|
|
21
|
-
private onChanged;
|
|
22
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconInputInteger from '../assets/images/icon-input-integer.svg';
|
|
6
|
-
import { Validator } from "../Validator";
|
|
7
|
-
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
8
|
-
export class NSBoxInteger extends React.Component {
|
|
9
|
-
constructor(props) {
|
|
10
|
-
super(props);
|
|
11
|
-
this.state = { value: props.defaultValue };
|
|
12
|
-
this.getValue = this.getValue.bind(this);
|
|
13
|
-
this.setValue = this.setValue.bind(this);
|
|
14
|
-
this.onChanged = this.onChanged.bind(this);
|
|
15
|
-
}
|
|
16
|
-
getError() {
|
|
17
|
-
return (Validator.getError(this.props.title, this.state.value, this.props) ||
|
|
18
|
-
Validator.getErrorNumber(this.props.title, this.state.value, this.props));
|
|
19
|
-
}
|
|
20
|
-
getValue() {
|
|
21
|
-
let error = this.getError();
|
|
22
|
-
if (error) {
|
|
23
|
-
this.setState({ error });
|
|
24
|
-
throw new Error(error);
|
|
25
|
-
}
|
|
26
|
-
return this.state.value;
|
|
27
|
-
}
|
|
28
|
-
setValue(value) {
|
|
29
|
-
this.setState({ value }, () => {
|
|
30
|
-
if (this.props.onChanged)
|
|
31
|
-
this.props.onChanged(this);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
onChanged(e) {
|
|
35
|
-
this.setValue(parseInt(e.target.value));
|
|
36
|
-
}
|
|
37
|
-
render() {
|
|
38
|
-
var _a;
|
|
39
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { id: this.props.id, className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("input", { type: "number", name: this.props.name, className: Styles.ns_input, placeholder: this.props.placeholder, value: this.state.value, onChange: this.onChanged, onClick: () => this.props.onClicked, style: { background: `url(${IconInputInteger}) white no-repeat scroll center right 16px` } })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
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,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EACnC,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,gBAAgB,4CAA4C,EAAE,GACzF,IACG,EACN,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAI,IAC7F,CACH,CAAC;IACH,CAAC;CACD"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ReactNode } from "react";
|
|
3
|
-
import { IBaseComponentProps } from '../main';
|
|
4
|
-
export interface INSBoxLabelProps extends IBaseComponentProps {
|
|
5
|
-
title: string;
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export interface INSBoxLabelState {
|
|
9
|
-
}
|
|
10
|
-
export declare class NSBoxLabel extends React.Component<INSBoxLabelProps, INSBoxLabelState> {
|
|
11
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import Styles from './NSBoxLabel.module.css';
|
|
4
|
-
import React from "react";
|
|
5
|
-
export class NSBoxLabel extends React.Component {
|
|
6
|
-
render() {
|
|
7
|
-
var _a;
|
|
8
|
-
return (_jsxs("div", { id: this.props.id, className: `${Styles.ns_tab_item} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsx("span", { className: `${Styles.ns_box_label_title} ns_font_16_bold`, children: this.props.title }), _jsx("div", { children: this.props.children })] }));
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=NSBoxLabel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxLabel.js","sourceRoot":"","sources":["../../src/components/NSBoxLabel.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,MAAM,MAAM,yBAAyB,CAAA;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,MAAM,OAAO,UAAW,SAAQ,KAAK,CAAC,SAA6C;IAEtE,MAAM;;QAEX,OAAO,CACH,eAAK,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,WAAW,IAAI,MAAA,IAAI,CAAC,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,aAClH,eAAM,SAAS,EAAE,GAAG,MAAM,CAAC,kBAAkB,kBAAkB,YAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAQ,EAC1F,wBACK,IAAI,CAAC,KAAK,CAAC,QAAQ,GAClB,IACJ,CACT,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IBaseComponentProps } from '../main';
|
|
3
|
-
interface INSBoxOTPProps extends IBaseComponentProps {
|
|
4
|
-
placeholder?: string;
|
|
5
|
-
defaultValue?: string;
|
|
6
|
-
onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
-
}
|
|
8
|
-
declare function NSBoxOTP(props: INSBoxOTPProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default NSBoxOTP;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useRef } from 'react';
|
|
3
|
-
import Styles from './NSBoxOTP.module.css';
|
|
4
|
-
function NSBoxOTP(props) {
|
|
5
|
-
var _a;
|
|
6
|
-
let [state, setState] = useState("");
|
|
7
|
-
const [values, setValues] = useState(Array(6).fill(''));
|
|
8
|
-
const inputsRef = useRef([]);
|
|
9
|
-
const handleChange = (index) => (event) => {
|
|
10
|
-
var _a;
|
|
11
|
-
const newValue = event.target.value;
|
|
12
|
-
setState(state + newValue);
|
|
13
|
-
if (/^\d?$/.test(newValue)) {
|
|
14
|
-
const updatedValues = [...values];
|
|
15
|
-
updatedValues[index] = newValue;
|
|
16
|
-
setValues(updatedValues);
|
|
17
|
-
if (newValue && index < 5) {
|
|
18
|
-
(_a = inputsRef.current[index + 1]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
if (props.onChanged)
|
|
22
|
-
props.onChanged(event);
|
|
23
|
-
};
|
|
24
|
-
const handleKeyDown = (index) => (event) => {
|
|
25
|
-
var _a;
|
|
26
|
-
if (event.key === 'Backspace' && !values[index] && index > 0) {
|
|
27
|
-
(_a = inputsRef.current[index - 1]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
return (_jsx("div", { id: props.id, className: `${Styles.ns_input_parent} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: Object.assign(Object.assign({}, props.style), { display: 'flex', gap: '10px' }), children: values.map((value, index) => (_jsx("input", { ref: el => inputsRef.current[index] = el, type: "text", value: value, onChange: handleChange(index), onKeyDown: handleKeyDown(index), maxLength: 1, style: { width: '30px', textAlign: 'center' }, className: Styles.ns_otp_input }, index + 10))) }));
|
|
31
|
-
}
|
|
32
|
-
;
|
|
33
|
-
export default NSBoxOTP;
|
|
34
|
-
//# sourceMappingURL=NSBoxOTP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxOTP.js","sourceRoot":"","sources":["../../src/components/NSBoxOTP.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAe,MAAM,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,MAAM,MAAM,uBAAuB,CAAA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IAEF,OAAO,CACH,cAAK,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,eAAe,IAAI,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,kCAAO,KAAK,CAAC,KAAK,KAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,eAEtI,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CACzB,gBAEI,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,EACxC,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC,EAC7B,SAAS,EAAE,aAAa,CAAC,KAAK,CAAC,EAC/B,SAAS,EAAE,CAAC,EACZ,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,EAC7C,SAAS,EAAE,MAAM,CAAC,YAAY,IARzB,KAAK,GAAG,EAAE,CASjB,CACL,CAAC,GAEH,CACV,CAAC;AACN,CAAC;AAAA,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
3
|
-
import { IValidationProps } from "../props/IValidationProps";
|
|
4
|
-
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
5
|
-
export interface INSBoxPasswordProps extends IBaseComponentProps, IValidationProps, IValidationStringProps {
|
|
6
|
-
title: string;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
defaultValue?: string;
|
|
9
|
-
onChanged?: (e: NSBoxPassword) => void;
|
|
10
|
-
onClicked?: (e: NSBoxPassword) => void;
|
|
11
|
-
}
|
|
12
|
-
export interface INSBoxPasswordState {
|
|
13
|
-
value: string;
|
|
14
|
-
error?: string;
|
|
15
|
-
}
|
|
16
|
-
export declare class NSBoxPassword extends React.Component<INSBoxPasswordProps, INSBoxPasswordState> {
|
|
17
|
-
constructor(props: INSBoxPasswordProps);
|
|
18
|
-
getError(): string | null;
|
|
19
|
-
getValue(): string;
|
|
20
|
-
setValue(value: string): void;
|
|
21
|
-
private onChanged;
|
|
22
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Styles from "./NSBox.module.css";
|
|
5
|
-
import IconInputString from '../assets/images/icon-input-string.svg';
|
|
6
|
-
import { Validator } from "../Validator";
|
|
7
|
-
import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
|
|
8
|
-
export class NSBoxPassword extends React.Component {
|
|
9
|
-
constructor(props) {
|
|
10
|
-
var _a;
|
|
11
|
-
super(props);
|
|
12
|
-
this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "" };
|
|
13
|
-
this.getValue = this.getValue.bind(this);
|
|
14
|
-
this.setValue = this.setValue.bind(this);
|
|
15
|
-
this.onChanged = this.onChanged.bind(this);
|
|
16
|
-
}
|
|
17
|
-
getError() {
|
|
18
|
-
return (Validator.getError(this.props.title, this.state.value, this.props) ||
|
|
19
|
-
Validator.getErrorString(this.props.title, this.state.value, this.props));
|
|
20
|
-
}
|
|
21
|
-
getValue() {
|
|
22
|
-
let error = this.getError();
|
|
23
|
-
if (error) {
|
|
24
|
-
this.setState({ error });
|
|
25
|
-
throw new Error(error);
|
|
26
|
-
}
|
|
27
|
-
return this.state.value;
|
|
28
|
-
}
|
|
29
|
-
setValue(value) {
|
|
30
|
-
this.setState({ value }, () => {
|
|
31
|
-
if (this.props.onChanged)
|
|
32
|
-
this.props.onChanged(this);
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
onChanged(e) {
|
|
36
|
-
this.setValue(e.target.value);
|
|
37
|
-
}
|
|
38
|
-
render() {
|
|
39
|
-
var _a;
|
|
40
|
-
return (_jsx(_Fragment, { children: _jsxs("div", { id: this.props.id, className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("input", { type: "password", name: this.props.name, className: Styles.ns_input, placeholder: this.props.placeholder, value: this.state.value, onChange: this.onChanged, onClick: () => this.props.onClicked, style: { background: `url(${IconInputString}) white no-repeat scroll center right 16px` } }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }) }));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=NSBoxPassword.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxPassword.js","sourceRoot":"","sources":["../../src/components/NSBoxPassword.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAIrE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAiB1D,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAmD;IAE3F,YAAY,KAA0B;;QAErC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,EAAE,EAAE,CAAC;QACjD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,C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AAC,eAAe,IAAI,MAAA,IAAI,CAAC,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,aACzH,gBAAM,SAAS,EAAE,MAAM,CAAC,cAAc,kBAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,eAAM,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAW,OAAG,IAAI,CAAC,KAAK,CAAC,KAAK,SAAS,EACrI,gBACC,IAAI,EAAC,UAAU,EACf,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACrB,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EACnC,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,eAAe,4CAA4C,EAAE,GACxF,EACF,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAI,IAC1F,GACJ,CACH,CAAC;IACH,CAAC;CACD"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import 'react-phone-input-2/lib/style.css';
|
|
3
|
-
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
4
|
-
import { IValidationProps } from "../props/IValidationProps";
|
|
5
|
-
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
6
|
-
export interface INSBoxPhoneProps extends IBaseComponentProps, IValidationProps, IValidationStringProps {
|
|
7
|
-
title: string;
|
|
8
|
-
placeholder?: string;
|
|
9
|
-
defaultValue?: string;
|
|
10
|
-
onChanged?: (e: NSBoxPhone) => void;
|
|
11
|
-
onClicked?: (e: NSBoxPhone) => void;
|
|
12
|
-
}
|
|
13
|
-
export interface INSBoxPhoneState {
|
|
14
|
-
value: string;
|
|
15
|
-
error?: string;
|
|
16
|
-
isFullScreen: boolean;
|
|
17
|
-
}
|
|
18
|
-
export declare class NSBoxPhone extends React.Component<INSBoxPhoneProps, INSBoxPhoneState> {
|
|
19
|
-
constructor(props: INSBoxPhoneProps);
|
|
20
|
-
getError(): string | null;
|
|
21
|
-
getValue(): string;
|
|
22
|
-
setValue(value: string): void;
|
|
23
|
-
private toggleFullScreen;
|
|
24
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
}
|