namirasoft-site-react 1.4.134 → 1.4.136
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/.dockerignore +86 -86
- package/.env.template +10 -10
- package/Dockerfile +18 -18
- package/config-overrides.js +72 -72
- package/dist/App.css +34 -0
- package/dist/App.js +50 -6
- package/dist/App.js.map +1 -1
- package/dist/components/NSBarAction.js +1 -1
- package/dist/components/NSBarAction.js.map +1 -1
- package/dist/components/NSBarAction.module.css +97 -97
- package/dist/components/NSBarAlert.d.ts +2 -1
- package/dist/components/NSBarAlert.js +2 -1
- package/dist/components/NSBarAlert.js.map +1 -1
- package/dist/components/NSBarAlert.module.css +69 -69
- package/dist/components/NSBarNotification.module.css +34 -34
- package/dist/components/NSBarTitle.module.css +9 -9
- package/dist/components/NSBox.module.css +50 -50
- package/dist/components/NSBoxBaseCombo.d.ts +8 -12
- package/dist/components/NSBoxBaseCombo.js +22 -34
- package/dist/components/NSBoxBaseCombo.js.map +1 -1
- package/dist/components/NSBoxBaseCombo.module.css +6 -6
- package/dist/components/NSBoxBaseLayout.d.ts +31 -0
- package/dist/components/NSBoxBaseLayout.js +34 -0
- package/dist/components/NSBoxBaseLayout.js.map +1 -0
- package/dist/components/NSBoxBoolean.d.ts +5 -8
- package/dist/components/NSBoxBoolean.js +15 -26
- package/dist/components/NSBoxBoolean.js.map +1 -1
- package/dist/components/NSBoxBoolean.module.css +67 -67
- package/dist/components/NSBoxBooleans.d.ts +2 -0
- package/dist/components/NSBoxBooleans.js +1 -1
- package/dist/components/NSBoxBooleans.js.map +1 -1
- package/dist/components/NSBoxCombo.d.ts +4 -2
- package/dist/components/NSBoxCombo.js.map +1 -1
- package/dist/components/NSBoxDate.d.ts +3 -7
- package/dist/components/NSBoxDate.js +14 -19
- package/dist/components/NSBoxDate.js.map +1 -1
- package/dist/components/NSBoxDate.module.css +4 -4
- package/dist/components/NSBoxDateTime.d.ts +3 -7
- package/dist/components/NSBoxDateTime.js +14 -19
- package/dist/components/NSBoxDateTime.js.map +1 -1
- package/dist/components/NSBoxDateTime.module.css +4 -4
- package/dist/components/NSBoxDouble.d.ts +6 -10
- package/dist/components/NSBoxDouble.js +15 -19
- package/dist/components/NSBoxDouble.js.map +1 -1
- package/dist/components/NSBoxDuration.d.ts +3 -7
- package/dist/components/NSBoxDuration.js +14 -19
- package/dist/components/NSBoxDuration.js.map +1 -1
- package/dist/components/NSBoxDuration.module.css +4 -4
- package/dist/components/NSBoxEmail.d.ts +4 -8
- package/dist/components/NSBoxEmail.js +19 -25
- package/dist/components/NSBoxEmail.js.map +1 -1
- package/dist/components/NSBoxEntity.d.ts +2 -2
- package/dist/components/NSBoxEntity.js +1 -1
- package/dist/components/NSBoxEntity.js.map +1 -1
- package/dist/components/NSBoxEnum.d.ts +13 -11
- package/dist/components/NSBoxEnum.js +1 -1
- package/dist/components/NSBoxEnum.js.map +1 -1
- package/dist/components/NSBoxFile.d.ts +5 -4
- package/dist/components/NSBoxFile.js +31 -22
- package/dist/components/NSBoxFile.js.map +1 -1
- package/dist/components/NSBoxFile.module.css +10 -10
- package/dist/components/NSBoxIPV4.d.ts +3 -7
- package/dist/components/NSBoxIPV4.js +13 -19
- package/dist/components/NSBoxIPV4.js.map +1 -1
- package/dist/components/NSBoxIPV6.d.ts +3 -7
- package/dist/components/NSBoxIPV6.js +13 -18
- package/dist/components/NSBoxIPV6.js.map +1 -1
- package/dist/components/NSBoxInteger.d.ts +6 -12
- package/dist/components/NSBoxInteger.js +15 -19
- package/dist/components/NSBoxInteger.js.map +1 -1
- package/dist/components/NSBoxMoney.d.ts +3 -7
- package/dist/components/NSBoxMoney.js +13 -18
- package/dist/components/NSBoxMoney.js.map +1 -1
- package/dist/components/NSBoxPassword.d.ts +3 -7
- package/dist/components/NSBoxPassword.js +21 -25
- package/dist/components/NSBoxPassword.js.map +1 -1
- package/dist/components/NSBoxPhone.d.ts +3 -7
- package/dist/components/NSBoxPhone.js +26 -30
- package/dist/components/NSBoxPhone.js.map +1 -1
- package/dist/components/NSBoxPhone.module.css +35 -35
- package/dist/components/NSBoxRadio.d.ts +4 -8
- package/dist/components/NSBoxRadio.js +13 -17
- package/dist/components/NSBoxRadio.js.map +1 -1
- package/dist/components/NSBoxRadio.module.css +33 -69
- package/dist/components/NSBoxSearch.d.ts +4 -2
- package/dist/components/NSBoxSearch.js +10 -18
- package/dist/components/NSBoxSearch.js.map +1 -1
- package/dist/components/NSBoxString.d.ts +3 -8
- package/dist/components/NSBoxString.js +11 -23
- package/dist/components/NSBoxString.js.map +1 -1
- package/dist/components/NSBoxTextArea.d.ts +4 -7
- package/dist/components/NSBoxTextArea.js +14 -20
- package/dist/components/NSBoxTextArea.js.map +1 -1
- package/dist/components/NSBoxTextArea.module.css +12 -45
- package/dist/components/NSBoxTime.d.ts +3 -8
- package/dist/components/NSBoxTime.js +14 -23
- package/dist/components/NSBoxTime.js.map +1 -1
- package/dist/components/NSBoxTime.module.css +4 -4
- package/dist/components/NSButton.module.css +41 -42
- package/dist/components/NSButtonBlue.module.css +4 -4
- package/dist/components/NSButtonGreen.module.css +4 -4
- package/dist/components/NSButtonRed.module.css +4 -4
- package/dist/components/NSCard.module.css +114 -114
- package/dist/components/NSCardScreenshot.module.css +41 -41
- package/dist/components/NSChartColumn.module.css +7 -7
- package/dist/components/NSChartTable.module.css +21 -21
- package/dist/components/NSCopyBox.module.css +43 -43
- package/dist/components/NSDialog.d.ts +1 -0
- package/dist/components/NSDialog.js +1 -1
- package/dist/components/NSDialog.js.map +1 -1
- package/dist/components/NSDialog.module.css +110 -106
- package/dist/components/NSDialogPageSelection.js +1 -1
- package/dist/components/NSDialogPageSelection.js.map +1 -1
- package/dist/components/NSDialogPageSelection.module.css +103 -103
- package/dist/components/NSDownTimer.module.css +55 -55
- package/dist/components/NSDownload.js +2 -2
- package/dist/components/NSDownload.js.map +1 -1
- package/dist/components/NSDownload.module.css +46 -46
- package/dist/components/NSElectronicCard.module.css +60 -60
- package/dist/components/NSEntityCardBackground.module.css +27 -27
- package/dist/components/NSFilterBox.js +3 -3
- package/dist/components/NSFilterBox.js.map +1 -1
- package/dist/components/NSFilterBox.module.css +55 -62
- package/dist/components/NSFilterItem.module.css +23 -23
- package/dist/components/NSFooter.module.css +123 -123
- package/dist/components/NSHeader.module.css +291 -291
- package/dist/components/NSHeaderScreenshot.module.css +35 -35
- package/dist/components/NSLabel.module.css +15 -15
- package/dist/components/NSLabelErrorNotifier.js +1 -1
- package/dist/components/NSLabelErrorNotifier.js.map +1 -1
- package/dist/components/NSLabelErrorNotifier.module.css +2 -2
- package/dist/components/NSLayout.module.css +13 -13
- package/dist/components/NSLine.module.css +12 -12
- package/dist/components/NSLink.module.css +36 -36
- package/dist/components/NSListGrouped.module.css +72 -72
- package/dist/components/NSLoading.module.css +30 -30
- package/dist/components/NSMenuAction.js +3 -3
- package/dist/components/NSMenuAction.js.map +1 -1
- package/dist/components/NSMenuAction.module.css +78 -100
- package/dist/components/NSMenuButton.d.ts +19 -10
- package/dist/components/NSMenuButton.js +29 -16
- package/dist/components/NSMenuButton.js.map +1 -1
- package/dist/components/NSMenuButton.module.css +44 -124
- package/dist/components/NSNoData.module.css +9 -9
- package/dist/components/NSPagination.js +45 -36
- package/dist/components/NSPagination.js.map +1 -1
- package/dist/components/NSPagination.module.css +85 -110
- package/dist/components/NSPanel.module.css +46 -46
- package/dist/components/NSPanelAccordion.module.css +4 -4
- package/dist/components/NSRange.module.css +66 -66
- package/dist/components/NSSection.module.css +10 -10
- package/dist/components/NSSectionCards.module.css +38 -38
- package/dist/components/NSSectionTiles.module.css +10 -10
- package/dist/components/NSTabPage.module.css +59 -59
- package/dist/components/NSTable.module.css +261 -260
- package/dist/components/NSTag.d.ts +1 -1
- package/dist/components/NSTag.module.css +52 -52
- package/dist/components/NSTile.module.css +77 -77
- package/dist/components/NSTimelineMonthly.module.css +71 -71
- package/dist/components/NSTitle.module.css +15 -15
- package/dist/formatter/IDFormatter.d.ts +1 -1
- package/dist/formatter/UnknowFormatter.d.ts +2 -1
- package/dist/formatter/UnknowFormatter.js +4 -1
- package/dist/formatter/UnknowFormatter.js.map +1 -1
- package/dist/index.css +6 -0
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -1
- package/dist/main.js.map +1 -1
- package/dist/pages/NSNotFoundPage.module.css +17 -17
- package/dist/pages/NSUpdating.module.css +35 -35
- package/dist/props/IValidationProps.d.ts +1 -1
- package/package.json +76 -76
- package/public/index.html +38 -38
- package/src/App.css +33 -33
- package/src/App.tsx +225 -191
- package/src/Color.tsx +10 -10
- package/src/CopyToClipboard.ts +6 -6
- package/src/Validator.ts +125 -125
- package/src/components/NSBarAction.module.css +97 -97
- package/src/components/NSBarAction.tsx +91 -89
- package/src/components/NSBarAlert.module.css +69 -69
- package/src/components/NSBarAlert.tsx +31 -30
- package/src/components/NSBarNotification.module.css +34 -34
- package/src/components/NSBarNotification.tsx +89 -89
- package/src/components/NSBarTitle.module.css +9 -9
- package/src/components/NSBarTitle.tsx +29 -29
- package/src/components/NSBox.module.css +50 -50
- package/src/components/NSBoxBaseCombo.module.css +6 -6
- package/src/components/NSBoxBaseCombo.tsx +241 -267
- package/src/components/NSBoxBaseLayout.tsx +83 -0
- package/src/components/NSBoxBoolean.module.css +67 -67
- package/src/components/NSBoxBoolean.tsx +112 -131
- package/src/components/NSBoxBooleans.tsx +163 -159
- package/src/components/NSBoxCombo.tsx +63 -61
- package/src/components/NSBoxDate.module.css +4 -4
- package/src/components/NSBoxDate.tsx +86 -101
- package/src/components/NSBoxDateTime.module.css +4 -4
- package/src/components/NSBoxDateTime.tsx +86 -101
- package/src/components/NSBoxDouble.tsx +89 -104
- package/src/components/NSBoxDuration.module.css +4 -4
- package/src/components/NSBoxDuration.tsx +91 -105
- package/src/components/NSBoxEmail.tsx +96 -112
- package/src/components/NSBoxEntity.tsx +52 -52
- package/src/components/NSBoxEnum.tsx +66 -64
- package/src/components/NSBoxFile.module.css +10 -10
- package/src/components/NSBoxFile.tsx +111 -101
- package/src/components/NSBoxIPV4.tsx +91 -107
- package/src/components/NSBoxIPV6.tsx +88 -103
- package/src/components/NSBoxInteger.tsx +88 -104
- package/src/components/NSBoxMoney.tsx +87 -102
- package/src/components/NSBoxPassword.tsx +97 -111
- package/src/components/NSBoxPhone.module.css +35 -35
- package/src/components/NSBoxPhone.tsx +103 -116
- package/src/components/NSBoxRadio.module.css +33 -69
- package/src/components/NSBoxRadio.tsx +97 -107
- package/src/components/NSBoxSearch.tsx +86 -99
- package/src/components/NSBoxString.tsx +79 -104
- package/src/components/NSBoxTextArea.module.css +12 -45
- package/src/components/NSBoxTextArea.tsx +89 -108
- package/src/components/NSBoxTime.module.css +4 -4
- package/src/components/NSBoxTime.tsx +83 -104
- package/src/components/NSButton.module.css +41 -42
- package/src/components/NSButton.tsx +25 -25
- package/src/components/NSButtonBlue.module.css +4 -4
- package/src/components/NSButtonBlue.tsx +19 -19
- package/src/components/NSButtonGreen.module.css +4 -4
- package/src/components/NSButtonGreen.tsx +19 -19
- package/src/components/NSButtonRed.module.css +4 -4
- package/src/components/NSButtonRed.tsx +19 -19
- package/src/components/NSCard.module.css +114 -114
- package/src/components/NSCard.tsx +63 -63
- package/src/components/NSCardScreenshot.module.css +41 -41
- package/src/components/NSCardScreenshot.tsx +31 -31
- package/src/components/NSChartColumn.module.css +7 -7
- package/src/components/NSChartColumn.tsx +106 -106
- package/src/components/NSChartDoughnut.tsx +108 -108
- package/src/components/NSChartPie.tsx +105 -105
- package/src/components/NSChartRange.tsx +14 -14
- package/src/components/NSChartTable.module.css +21 -21
- package/src/components/NSChartTable.tsx +94 -94
- package/src/components/NSCopy.tsx +67 -67
- package/src/components/NSCopyBox.module.css +43 -43
- package/src/components/NSCopyBox.tsx +41 -41
- package/src/components/NSDialog.module.css +110 -106
- package/src/components/NSDialog.tsx +57 -56
- package/src/components/NSDialogDelete.tsx +26 -26
- package/src/components/NSDialogInfo.tsx +36 -36
- package/src/components/NSDialogPageSelection.module.css +103 -103
- package/src/components/NSDialogPageSelection.tsx +223 -223
- package/src/components/NSDownTimer.module.css +55 -55
- package/src/components/NSDownTimer.tsx +77 -77
- package/src/components/NSDownload.module.css +46 -46
- package/src/components/NSDownload.tsx +63 -63
- package/src/components/NSElectronicCard.module.css +60 -60
- package/src/components/NSElectronicCard.tsx +46 -46
- package/src/components/NSEntityCardBackground.module.css +27 -27
- package/src/components/NSEntityCardBackground.tsx +36 -36
- package/src/components/NSFilterBox.module.css +55 -62
- package/src/components/NSFilterBox.tsx +360 -360
- package/src/components/NSFilterItem.module.css +23 -23
- package/src/components/NSFilterItem.tsx +72 -72
- package/src/components/NSFooter.module.css +123 -123
- package/src/components/NSFooter.tsx +316 -316
- package/src/components/NSHeader.module.css +291 -291
- package/src/components/NSHeader.tsx +250 -250
- package/src/components/NSHeaderScreenshot.module.css +35 -35
- package/src/components/NSHeaderScreenshot.tsx +39 -39
- package/src/components/NSLabel.module.css +15 -15
- package/src/components/NSLabel.tsx +29 -29
- package/src/components/NSLabelErrorNotifier.module.css +2 -2
- package/src/components/NSLabelErrorNotifier.tsx +32 -32
- package/src/components/NSLayout.module.css +13 -13
- package/src/components/NSLayout.tsx +100 -100
- package/src/components/NSLine.module.css +12 -12
- package/src/components/NSLine.tsx +15 -15
- package/src/components/NSLink.module.css +36 -36
- package/src/components/NSLink.tsx +25 -25
- package/src/components/NSLinkBlue.tsx +20 -20
- package/src/components/NSLinkGreen.tsx +5 -5
- package/src/components/NSLinkRed.tsx +5 -5
- package/src/components/NSListGrouped.module.css +72 -72
- package/src/components/NSListGrouped.tsx +112 -112
- package/src/components/NSListProduct.tsx +45 -45
- package/src/components/NSLoading.module.css +30 -30
- package/src/components/NSLoading.tsx +19 -19
- package/src/components/NSMenuAction.module.css +78 -100
- package/src/components/NSMenuAction.tsx +89 -90
- package/src/components/NSMenuButton.module.css +44 -124
- package/src/components/NSMenuButton.tsx +148 -124
- package/src/components/NSNoData.module.css +9 -9
- package/src/components/NSNoData.tsx +24 -24
- package/src/components/NSPagination.module.css +85 -110
- package/src/components/NSPagination.tsx +183 -190
- package/src/components/NSPanel.module.css +46 -46
- package/src/components/NSPanel.tsx +19 -19
- package/src/components/NSPanelAccordion.module.css +4 -4
- package/src/components/NSPanelAccordion.tsx +51 -51
- package/src/components/NSRange.module.css +66 -66
- package/src/components/NSRange.tsx +83 -83
- package/src/components/NSRepeater.tsx +179 -179
- package/src/components/NSSection.module.css +10 -10
- package/src/components/NSSection.tsx +23 -23
- package/src/components/NSSectionCards.module.css +38 -38
- package/src/components/NSSectionCards.tsx +51 -51
- package/src/components/NSSectionTiles.module.css +10 -10
- package/src/components/NSSectionTiles.tsx +25 -25
- package/src/components/NSSectionTitle.tsx +21 -21
- package/src/components/NSSpace.tsx +28 -28
- package/src/components/NSTabPage.module.css +59 -59
- package/src/components/NSTabPage.tsx +78 -78
- package/src/components/NSTable.module.css +261 -260
- package/src/components/NSTable.tsx +477 -477
- package/src/components/NSTag.module.css +52 -52
- package/src/components/NSTag.tsx +78 -78
- package/src/components/NSTile.module.css +77 -77
- package/src/components/NSTile.tsx +27 -27
- package/src/components/NSTimelineMonthly.module.css +71 -71
- package/src/components/NSTimelineMonthly.tsx +44 -44
- package/src/components/NSTitle.module.css +15 -15
- package/src/components/NSTitle.tsx +19 -19
- package/src/formatter/BackColorFormatter.tsx +23 -23
- package/src/formatter/BaseColumnFormatter.ts +16 -16
- package/src/formatter/BooleanFormatter.ts +22 -22
- package/src/formatter/DateFormatter.ts +20 -20
- package/src/formatter/DateTimeFormatter.ts +20 -20
- package/src/formatter/DurationFormatter.ts +13 -13
- package/src/formatter/EmailFormatter.ts +13 -13
- package/src/formatter/EnumFormatter.ts +13 -13
- package/src/formatter/FloatFormatter.ts +16 -16
- package/src/formatter/ForeColorFormatter.tsx +24 -24
- package/src/formatter/IDFormatter.tsx +30 -30
- package/src/formatter/IPFormatter.ts +13 -13
- package/src/formatter/IntegerFormatter.ts +16 -16
- package/src/formatter/JsonFormatter.ts +14 -14
- package/src/formatter/MoneyFormatter.ts +16 -16
- package/src/formatter/PhoneFormatter.ts +13 -13
- package/src/formatter/StringFormatter.ts +22 -22
- package/src/formatter/TimeFormatter.ts +21 -21
- package/src/formatter/UnknowFormatter.ts +18 -14
- package/src/index.tsx +7 -7
- package/src/main.ts +184 -185
- package/src/pages/NSNotFoundPage.module.css +17 -17
- package/src/pages/NSNotFoundPage.tsx +11 -11
- package/src/pages/NSUpdating.module.css +35 -35
- package/src/pages/NSUpdating.tsx +32 -32
- package/src/props/IBaseComponentProps.ts +8 -8
- package/src/props/IHeaderIconProps.ts +10 -10
- package/src/props/IHeaderProps.ts +7 -7
- package/src/props/IImageProps.ts +4 -4
- package/src/props/ILinkProps.ts +5 -5
- package/src/props/IValidationNumberProps.ts +4 -4
- package/src/props/IValidationProps.ts +7 -7
- package/src/props/IValidationRegexProps.ts +4 -4
- package/src/props/IValidationStringProps.ts +4 -4
- package/src/routing/INSRouterMaker.ts +6 -6
- package/src/routing/INSRouterProps.ts +5 -5
- package/src/routing/INSRouterState.ts +5 -5
- package/src/routing/NSRouterMaker.tsx +33 -33
- package/src/routing/Notifier.ts +79 -79
- package/tsconfig.json +43 -43
- 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/NSFilterBoxDialog.module.css +0 -37
- package/src/components/NSFilterBoxDialog.module.css +0 -37
- package/src/components/NSFilterBoxDialog.tsx +0 -73
|
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
12
|
import React, { createRef } from "react";
|
|
13
13
|
import { ObjectService } from "namirasoft-core";
|
|
14
|
-
import { NSBoxBaseCombo } from "../
|
|
14
|
+
import { NSBoxBaseCombo } from "../components/NSBoxBaseCombo";
|
|
15
15
|
export class NSBoxEnum extends React.Component {
|
|
16
16
|
constructor(props) {
|
|
17
17
|
super(props);
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAGhD,OAAO,EAAE,cAAc,EAAwB,MAAM,8BAA8B,CAAC;AAOpF,MAAM,OAAO,SAAgB,SAAQ,KAAK,CAAC,SAA+B;IAGzE,YAAY,KAA2B;QAEtC,KAAK,CAAC,KAAK,CAAC,CAAC;QAHP,mBAAc,GAAG,SAAS,EAA0B,CAAC;QAI3D,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IACD,QAAQ,CAAC,UAAiC,EAAE,QAAc,EAAE,aAAsB,IAAI;;QAErF,OAAO,IAAI,aAAa,CAAC,MAAA,IAAI,CAAC,cAAc,CAAC,OAAO,0CAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,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AI,CAAC,GAAG,CAAC,CAAC;gBAC5B,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC;YACrC,CAAC,CAAA,EACD,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAChB,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,IACf,CAAA;IACH,CAAC;CACD"}
|
|
@@ -2,20 +2,21 @@ import React from "react";
|
|
|
2
2
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
3
3
|
import { IValidationProps } from "../props/IValidationProps";
|
|
4
4
|
import { RcFile, UploadChangeParam, UploadFile } from "antd/es/upload";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
|
|
6
|
+
export interface NSBoxFileProps extends IBaseComponentProps, IValidationProps, INSBoxBaseLayoutProps<string, NSBoxFile> {
|
|
7
7
|
showUploadList?: boolean;
|
|
8
8
|
maxFilesCount?: number;
|
|
9
9
|
multiple?: boolean;
|
|
10
|
-
|
|
10
|
+
hideHeader?: boolean;
|
|
11
|
+
onSelected?: (info: UploadChangeParam<UploadFile>) => void;
|
|
11
12
|
onDroped?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
12
13
|
onUpload?: (file: RcFile, fileList: RcFile[], getContent: (file: RcFile, onSuccess: (content: string | ArrayBuffer) => void) => void) => Promise<void>;
|
|
13
14
|
}
|
|
14
15
|
export interface NSBoxFileState {
|
|
15
16
|
file: File | null;
|
|
16
|
-
error?: string;
|
|
17
17
|
}
|
|
18
18
|
export declare class NSBoxFile extends React.Component<NSBoxFileProps, NSBoxFileState> {
|
|
19
|
+
NSBoxBaseLayout_Main: React.RefObject<NSBoxBaseLayout>;
|
|
19
20
|
constructor(props: NSBoxFileProps);
|
|
20
21
|
getError(): string | null;
|
|
21
22
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,15 +7,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
11
|
-
import React from "react";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import React, { createRef } from "react";
|
|
12
12
|
import Styles from "./NSBoxFile.module.css";
|
|
13
|
-
import StylesNSBox from "./NSBox.module.css";
|
|
14
13
|
import { InboxOutlined } from '@ant-design/icons';
|
|
15
14
|
import { Upload } from "antd";
|
|
15
|
+
import { safeMenuMenuItem } from "./NSMenuButton";
|
|
16
|
+
import { NSBoxBaseLayout } from "./NSBoxBaseLayout";
|
|
16
17
|
export class NSBoxFile extends React.Component {
|
|
17
18
|
constructor(props) {
|
|
18
19
|
super(props);
|
|
20
|
+
this.NSBoxBaseLayout_Main = createRef();
|
|
19
21
|
this.state = {
|
|
20
22
|
file: null,
|
|
21
23
|
};
|
|
@@ -25,26 +27,33 @@ export class NSBoxFile extends React.Component {
|
|
|
25
27
|
return null;
|
|
26
28
|
}
|
|
27
29
|
render() {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
let menu = safeMenuMenuItem(this.props, () => { });
|
|
31
|
+
menu.builtin.copy = false;
|
|
32
|
+
menu.builtin.fullscreen = false;
|
|
33
|
+
return (_jsx(NSBoxBaseLayout, Object.assign({ ref: this.NSBoxBaseLayout_Main }, this.props, { getValue: () => "", setValue: () => { }, menu: menu, children: _jsx("div", { className: `${Styles.ns_box_file_dagger_parent}`, children: _jsxs(Upload.Dragger, { id: this.props.id, name: this.props.name, style: { border: "none" }, maxCount: this.props.maxFilesCount, multiple: this.props.multiple, onChange: (info) => {
|
|
34
|
+
if (this.props.onChanged)
|
|
35
|
+
this.props.onChanged(this);
|
|
36
|
+
if (this.props.onSelected)
|
|
37
|
+
this.props.onSelected(info);
|
|
38
|
+
}, onDrop: this.props.onDroped, beforeUpload: (f, l) => __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
if (this.props.onUpload)
|
|
40
|
+
yield this.props.onUpload(f, l, (file, onSuccess) => __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
const reader = new FileReader();
|
|
42
|
+
reader.onload = (e) => {
|
|
43
|
+
if (e === null || e === void 0 ? void 0 : e.target) {
|
|
44
|
+
const content = e.target.result;
|
|
45
|
+
if (content)
|
|
46
|
+
try {
|
|
47
|
+
onSuccess(content);
|
|
42
48
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
catch (error) {
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
reader.readAsText(file);
|
|
54
|
+
}));
|
|
55
|
+
return false;
|
|
56
|
+
}), showUploadList: this.props.showUploadList, children: [_jsx("p", { className: "ant-upload-drag-icon", children: _jsx(InboxOutlined, { style: { color: "#141B5C" } }) }), _jsx("p", { className: "ant-upload-text", style: { color: "#141B5C" }, children: "Click or drag file to this area to upload" }), _jsx("p", { className: "ant-upload-hint", style: { color: "#141B5C" }, children: "Support for a single or bulk upload. Strictly prohibited from uploading company data or other banned files." })] }) }) })));
|
|
48
57
|
}
|
|
49
58
|
}
|
|
50
59
|
//# sourceMappingURL=NSBoxFile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxFile.js","sourceRoot":"","sources":["../../src/components/NSBoxFile.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NSBoxFile.js","sourceRoot":"","sources":["../../src/components/NSBoxFile.tsx"],"names":[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oBACd,CAAC,CAAA,EACD,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,aAEzC,YAAG,SAAS,EAAC,sBAAsB,YAClC,KAAC,aAAa,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,GAAI,GAC3C,EACJ,YAAG,SAAS,EAAC,iBAAiB,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,0DAA+C,EACzG,YAAG,SAAS,EAAC,iBAAiB,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,4HAGtD,IACY,GACZ,IACW,CAClB,CAAA;IACF,CAAC;CACD"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.
|
|
2
|
-
border: 1px solid rgba(0, 0, 0, 1) !important;
|
|
3
|
-
border-radius: 8px;
|
|
4
|
-
padding: 8px 12px 8px 12px;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
@media screen and (min-width: 540px) {
|
|
8
|
-
.
|
|
9
|
-
max-width: 700px;
|
|
10
|
-
}
|
|
1
|
+
.ns_box_file_dagger_parent {
|
|
2
|
+
border: 1px solid rgba(0, 0, 0, 1) !important;
|
|
3
|
+
border-radius: 8px;
|
|
4
|
+
padding: 8px 12px 8px 12px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@media screen and (min-width: 540px) {
|
|
8
|
+
.ns_box_file_dagger_parent {
|
|
9
|
+
max-width: 700px;
|
|
10
|
+
}
|
|
11
11
|
}
|
|
@@ -2,18 +2,14 @@ import React from "react";
|
|
|
2
2
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
3
3
|
import { IValidationProps } from "../props/IValidationProps";
|
|
4
4
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
defaultValue?: string;
|
|
9
|
-
onChanged?: (e: NSBoxIPV4, callback?: () => void) => void;
|
|
10
|
-
onClicked?: (e: NSBoxIPV4) => void;
|
|
5
|
+
import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
|
|
6
|
+
export interface NSBoxIPV4Props extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxIPV4> {
|
|
11
7
|
}
|
|
12
8
|
export interface NSBoxIPV4State {
|
|
13
9
|
value: string;
|
|
14
|
-
error?: string;
|
|
15
10
|
}
|
|
16
11
|
export declare class NSBoxIPV4 extends React.Component<NSBoxIPV4Props, NSBoxIPV4State> {
|
|
12
|
+
NSBoxBaseLayout_Main: React.RefObject<NSBoxBaseLayout>;
|
|
17
13
|
constructor(props: NSBoxIPV4Props);
|
|
18
14
|
getError(): string | null;
|
|
19
15
|
getValue(checkError?: boolean): string;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx
|
|
3
|
-
import React from "react";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import React, { createRef } from "react";
|
|
4
4
|
import StylesNSBox from "./NSBox.module.css";
|
|
5
5
|
import { Validator } from "../Validator";
|
|
6
|
-
import { NSLabelErrorNotifier } from "./NSLabelErrorNotifier";
|
|
7
6
|
import { IPV4Schema } from "namirasoft-schema";
|
|
8
|
-
import {
|
|
7
|
+
import { safeMenuMenuItem } from "./NSMenuButton";
|
|
8
|
+
import { NSBoxBaseLayout } from "./NSBoxBaseLayout";
|
|
9
9
|
export class NSBoxIPV4 extends React.Component {
|
|
10
10
|
constructor(props) {
|
|
11
11
|
var _a;
|
|
12
12
|
super(props);
|
|
13
|
+
this.NSBoxBaseLayout_Main = createRef();
|
|
13
14
|
this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "" };
|
|
14
15
|
this.getValue = this.getValue.bind(this);
|
|
15
16
|
this.setValue = this.setValue.bind(this);
|
|
@@ -21,15 +22,7 @@ export class NSBoxIPV4 extends React.Component {
|
|
|
21
22
|
Validator.getErrorIPV4(this.props.title, this.state.value));
|
|
22
23
|
}
|
|
23
24
|
getValue(checkError = true) {
|
|
24
|
-
|
|
25
|
-
let error = this.getError();
|
|
26
|
-
console.log(error);
|
|
27
|
-
if (error) {
|
|
28
|
-
this.setState({ error });
|
|
29
|
-
throw new Error(error);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return this.state.value;
|
|
25
|
+
return NSBoxBaseLayout.checkGetValue(this, checkError, () => this.state.value);
|
|
33
26
|
}
|
|
34
27
|
setValue(value, callback) {
|
|
35
28
|
this.setState({ value }, () => {
|
|
@@ -43,12 +36,13 @@ export class NSBoxIPV4 extends React.Component {
|
|
|
43
36
|
this.setValue(e.target.value);
|
|
44
37
|
}
|
|
45
38
|
render() {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
let menu = safeMenuMenuItem(this.props, () => { });
|
|
40
|
+
menu.builtin.fullscreen = false;
|
|
41
|
+
return (_jsx(NSBoxBaseLayout, Object.assign({ ref: this.NSBoxBaseLayout_Main }, this.props, { getValue: () => this.state.value, setValue: this.setValue, menu: menu, children: _jsx("input", { id: this.props.id, name: this.props.name, type: "text", className: StylesNSBox.ns_box_input, placeholder: this.props.placeholder, value: this.state.value, onChange: this.onChanged, onClick: () => { if (this.props.onClicked)
|
|
42
|
+
this.props.onClicked(this); }, minLength: 7, maxLength: 15, size: 15, pattern: IPV4Schema.REGEX + "", style: {
|
|
43
|
+
background: `url("https://static.namirasoft.com/image/concept/type/ipv4%266.png") white no-repeat scroll center right 4px`,
|
|
44
|
+
backgroundSize: "24px"
|
|
45
|
+
} }) })));
|
|
52
46
|
}
|
|
53
47
|
}
|
|
54
48
|
//# sourceMappingURL=NSBoxIPV4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxIPV4.js","sourceRoot":"","sources":["../../src/components/NSBoxIPV4.tsx"],"names":[],"mappings":"AAAA,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,IAAI,EAAC,MAAM,EACX,SAAS,EAAE,WAAW,CAAC,YAAY,EACnC,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,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS;oBAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EACxE,SAAS,EAAE,CAAC,EACZ,SAAS,EAAE,EAAE,EACb,IAAI,EAAE,EAAE,EACR,OAAO,EAAE,UAAU,CAAC,KAAK,GAAG,EAAE,EAC9B,KAAK,EAAE;oBACN,UAAU,EAAE,8GAA8G;oBAC1H,cAAc,EAAE,MAAM;iBACtB,GACA,IACe,CAClB,CAAC;IACH,CAAC;CACD"}
|
|
@@ -2,18 +2,14 @@ import React from "react";
|
|
|
2
2
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
3
3
|
import { IValidationProps } from "../props/IValidationProps";
|
|
4
4
|
import { IValidationStringProps } from "../props/IValidationStringProps";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
defaultValue?: string;
|
|
9
|
-
onChanged?: (e: NSBoxIPV6, callback?: () => void) => void;
|
|
10
|
-
onClicked?: (e: NSBoxIPV6) => void;
|
|
5
|
+
import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
|
|
6
|
+
export interface NSBoxIPV6Props extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxIPV6> {
|
|
11
7
|
}
|
|
12
8
|
export interface NSBoxIPV6State {
|
|
13
9
|
value: string;
|
|
14
|
-
error?: string;
|
|
15
10
|
}
|
|
16
11
|
export declare class NSBoxIPV6 extends React.Component<NSBoxIPV6Props, NSBoxIPV6State> {
|
|
12
|
+
NSBoxBaseLayout_Main: React.RefObject<NSBoxBaseLayout>;
|
|
17
13
|
constructor(props: NSBoxIPV6Props);
|
|
18
14
|
getError(): string | null;
|
|
19
15
|
getValue(checkError?: boolean): string;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx
|
|
3
|
-
import React from "react";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import React, { createRef } from "react";
|
|
4
4
|
import StylesNSBox from "./NSBox.module.css";
|
|
5
5
|
import { Validator } from "../Validator";
|
|
6
|
-
import { NSLabelErrorNotifier } from "./NSLabelErrorNotifier";
|
|
7
6
|
import { IPV6Schema } from "namirasoft-schema";
|
|
8
|
-
import {
|
|
7
|
+
import { safeMenuMenuItem } from "./NSMenuButton";
|
|
8
|
+
import { NSBoxBaseLayout } from "./NSBoxBaseLayout";
|
|
9
9
|
export class NSBoxIPV6 extends React.Component {
|
|
10
10
|
constructor(props) {
|
|
11
11
|
var _a;
|
|
12
12
|
super(props);
|
|
13
|
+
this.NSBoxBaseLayout_Main = createRef();
|
|
13
14
|
this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "" };
|
|
14
15
|
this.getValue = this.getValue.bind(this);
|
|
15
16
|
this.setValue = this.setValue.bind(this);
|
|
@@ -21,14 +22,7 @@ export class NSBoxIPV6 extends React.Component {
|
|
|
21
22
|
Validator.getErrorIPV6(this.props.title, this.state.value));
|
|
22
23
|
}
|
|
23
24
|
getValue(checkError = true) {
|
|
24
|
-
|
|
25
|
-
let error = this.getError();
|
|
26
|
-
if (error) {
|
|
27
|
-
this.setState({ error });
|
|
28
|
-
throw new Error(error);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return this.state.value;
|
|
25
|
+
return NSBoxBaseLayout.checkGetValue(this, checkError, () => this.state.value);
|
|
32
26
|
}
|
|
33
27
|
setValue(value, callback) {
|
|
34
28
|
this.setState({ value }, () => {
|
|
@@ -42,12 +36,13 @@ export class NSBoxIPV6 extends React.Component {
|
|
|
42
36
|
this.setValue(e.target.value);
|
|
43
37
|
}
|
|
44
38
|
render() {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
let menu = safeMenuMenuItem(this.props, () => { });
|
|
40
|
+
menu.builtin.fullscreen = false;
|
|
41
|
+
return (_jsx(NSBoxBaseLayout, Object.assign({ ref: this.NSBoxBaseLayout_Main }, this.props, { getValue: () => this.state.value, setValue: this.setValue, menu: menu, children: _jsx("input", { id: this.props.id, name: this.props.name, type: "text", className: StylesNSBox.ns_box_input, placeholder: this.props.placeholder, value: this.state.value, onChange: this.onChanged, onClick: () => { if (this.props.onClicked)
|
|
42
|
+
this.props.onClicked(this); }, pattern: IPV6Schema.REGEX + "", style: {
|
|
43
|
+
background: `url("https://static.namirasoft.com/image/concept/type/ipv4%266.png") white no-repeat scroll center right 4px`,
|
|
44
|
+
backgroundSize: "24px"
|
|
45
|
+
} }) })));
|
|
51
46
|
}
|
|
52
47
|
}
|
|
53
48
|
//# sourceMappingURL=NSBoxIPV6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxIPV6.js","sourceRoot":"","sources":["../../src/components/NSBoxIPV6.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NSBoxIPV6.js","sourceRoot":"","sources":["../../src/components/NSBoxIPV6.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,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAA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E;oBACN,UAAU,EAAE,8GAA8G;oBAC1H,cAAc,EAAE,MAAM;iBACtB,GACA,IACe,CAClB,CAAC;IACH,CAAC;CACD"}
|
|
@@ -2,24 +2,18 @@ import React from "react";
|
|
|
2
2
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
3
3
|
import { IValidationNumberProps } from "../props/IValidationNumberProps";
|
|
4
4
|
import { IValidationProps } from "../props/IValidationProps";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
defaultValue?: number;
|
|
9
|
-
onChanged?: (e: NSBoxInteger, callback?: () => void) => void;
|
|
10
|
-
onClicked?: (e: NSBoxInteger) => void;
|
|
11
|
-
min?: number;
|
|
12
|
-
max?: number;
|
|
5
|
+
import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
|
|
6
|
+
export interface NSBoxIntegerProps extends IBaseComponentProps, IValidationProps, IValidationNumberProps, INSBoxBaseLayoutProps<number, NSBoxInteger> {
|
|
13
7
|
}
|
|
14
8
|
export interface NSBoxIntegerState {
|
|
15
|
-
value
|
|
16
|
-
error?: string;
|
|
9
|
+
value: number;
|
|
17
10
|
}
|
|
18
11
|
export declare class NSBoxInteger extends React.Component<NSBoxIntegerProps, NSBoxIntegerState> {
|
|
12
|
+
NSBoxBaseLayout_Main: React.RefObject<NSBoxBaseLayout>;
|
|
19
13
|
constructor(props: NSBoxIntegerProps);
|
|
20
14
|
getError(): string | null;
|
|
21
|
-
getValue(checkError?: boolean): number
|
|
22
|
-
setValue(value: number
|
|
15
|
+
getValue(checkError?: boolean): number;
|
|
16
|
+
setValue(value: number, callback?: () => void): void;
|
|
23
17
|
private onChanged;
|
|
24
18
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
25
19
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx
|
|
3
|
-
import React from "react";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import React, { createRef } from "react";
|
|
4
4
|
import StylesNSBox from "./NSBox.module.css";
|
|
5
5
|
import { Validator } from "../Validator";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { safeMenuMenuItem } from "./NSMenuButton";
|
|
7
|
+
import { NSBoxBaseLayout } from "./NSBoxBaseLayout";
|
|
8
8
|
export class NSBoxInteger extends React.Component {
|
|
9
9
|
constructor(props) {
|
|
10
|
+
var _a;
|
|
10
11
|
super(props);
|
|
11
|
-
this.
|
|
12
|
+
this.NSBoxBaseLayout_Main = createRef();
|
|
13
|
+
this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : 0 };
|
|
12
14
|
this.getValue = this.getValue.bind(this);
|
|
13
15
|
this.setValue = this.setValue.bind(this);
|
|
14
16
|
this.onChanged = this.onChanged.bind(this);
|
|
@@ -18,14 +20,7 @@ export class NSBoxInteger extends React.Component {
|
|
|
18
20
|
Validator.getErrorNumber(this.props.title, this.state.value, this.props));
|
|
19
21
|
}
|
|
20
22
|
getValue(checkError = true) {
|
|
21
|
-
|
|
22
|
-
let error = this.getError();
|
|
23
|
-
if (error) {
|
|
24
|
-
this.setState({ error });
|
|
25
|
-
throw new Error(error);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return this.state.value;
|
|
23
|
+
return NSBoxBaseLayout.checkGetValue(this, checkError, () => this.state.value);
|
|
29
24
|
}
|
|
30
25
|
setValue(value, callback) {
|
|
31
26
|
this.setState({ value }, () => {
|
|
@@ -39,12 +34,13 @@ export class NSBoxInteger extends React.Component {
|
|
|
39
34
|
this.setValue(parseInt(e.target.value));
|
|
40
35
|
}
|
|
41
36
|
render() {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
let menu = safeMenuMenuItem(this.props, () => { });
|
|
38
|
+
menu.builtin.fullscreen = false;
|
|
39
|
+
return (_jsx(NSBoxBaseLayout, Object.assign({ ref: this.NSBoxBaseLayout_Main }, this.props, { getValue: () => { var _a, _b; return (_b = (_a = this.state.value) === null || _a === void 0 ? void 0 : _a.toLocaleString()) !== null && _b !== void 0 ? _b : ""; }, setValue: () => { }, menu: menu, children: _jsx("input", { id: this.props.id, name: this.props.name, type: "number", className: StylesNSBox.ns_box_input, placeholder: this.props.placeholder, value: this.state.value, onChange: this.onChanged, onClick: () => { if (this.props.onClicked)
|
|
40
|
+
this.props.onClicked(this); }, min: this.props.min, max: this.props.max, style: {
|
|
41
|
+
background: `url("https://static.namirasoft.com/image/concept/type/integer.png") white no-repeat scroll center right 4px`,
|
|
42
|
+
backgroundSize: "24px"
|
|
43
|
+
} }) })));
|
|
48
44
|
}
|
|
49
45
|
}
|
|
50
46
|
//# sourceMappingURL=NSBoxInteger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxInteger.js","sourceRoot":"","sources":["../../src/components/NSBoxInteger.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NSBoxInteger.js","sourceRoot":"","sources":["../../src/components/NSBoxInteger.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,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAyB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAW3E,MAAM,OAAO,YAAa,SAAQ,KAAK,CAAC,SAA+C;IAGtF,YAAY,KAAwB;;QAEnC,KAAK,CAAC,KAAK,CAAC,CAAC;QAHd,yBAAoB,GAAG,SAAS,EAAmB,CAAC;QAInD,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,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AAM;QAEd,IAAI,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;QACnD,IAAI,CAAC,OAAO,CAAC,UAAU,GAAG,KAAK,CAAC;QAEhC,OAAO,CACN,KAAC,eAAe,kBACf,GAAG,EAAE,IAAI,CAAC,oBAAoB,IAC1B,IAAI,CAAC,KAAK,IACd,QAAQ,EAAE,GAAG,EAAE,eAAC,OAAA,MAAA,MAAA,IAAI,CAAC,KAAK,CAAC,KAAK,0CAAE,cAAc,EAAE,mCAAI,EAAE,CAAA,EAAA,EACxD,QAAQ,EAAE,GAAG,EAAE,GAAG,CAAC,EACnB,IAAI,EAAE,IAAI,YAEV,gBACC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,EACjB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACrB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,WAAW,CAAC,YAAY,EACnC,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,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS;oBAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EACxE,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,EACnB,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,EACnB,KAAK,EAAE;oBACN,UAAU,EAAE,6GAA6G;oBACzH,cAAc,EAAE,MAAM;iBACtB,GACA,IACe,CAClB,CAAC;IACH,CAAC;CACD"}
|
|
@@ -2,18 +2,14 @@ import React from "react";
|
|
|
2
2
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
3
3
|
import { IValidationProps } from "../props/IValidationProps";
|
|
4
4
|
import { IValidationNumberProps } from "../props/IValidationNumberProps";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
defaultValue?: number;
|
|
9
|
-
onChanged?: (e: NSBoxMoney, callback?: () => void) => void;
|
|
10
|
-
onClicked?: (e: NSBoxMoney) => void;
|
|
5
|
+
import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
|
|
6
|
+
export interface NSBoxMoneyProps extends IBaseComponentProps, IValidationProps, IValidationNumberProps, INSBoxBaseLayoutProps<number, NSBoxMoney> {
|
|
11
7
|
}
|
|
12
8
|
export interface NSBoxMoneyState {
|
|
13
9
|
value?: number;
|
|
14
|
-
error?: string;
|
|
15
10
|
}
|
|
16
11
|
export declare class NSBoxMoney extends React.Component<NSBoxMoneyProps, NSBoxMoneyState> {
|
|
12
|
+
NSBoxBaseLayout_Main: React.RefObject<NSBoxBaseLayout>;
|
|
17
13
|
constructor(props: NSBoxMoneyProps);
|
|
18
14
|
getError(): string | null;
|
|
19
15
|
getValue(checkError?: boolean): number | undefined;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx
|
|
3
|
-
import React from "react";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import React, { createRef } from "react";
|
|
4
4
|
import StylesNSBox from "./NSBox.module.css";
|
|
5
5
|
import { Validator } from "../Validator";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { safeMenuMenuItem } from "./NSMenuButton";
|
|
7
|
+
import { NSBoxBaseLayout } from "./NSBoxBaseLayout";
|
|
8
8
|
export class NSBoxMoney extends React.Component {
|
|
9
9
|
constructor(props) {
|
|
10
10
|
super(props);
|
|
11
|
+
this.NSBoxBaseLayout_Main = createRef();
|
|
11
12
|
this.state = { value: props.defaultValue };
|
|
12
13
|
this.setValue = this.setValue.bind(this);
|
|
13
14
|
this.getValue = this.getValue.bind(this);
|
|
@@ -18,14 +19,7 @@ export class NSBoxMoney extends React.Component {
|
|
|
18
19
|
Validator.getErrorNumber(this.props.title, this.state.value, this.props));
|
|
19
20
|
}
|
|
20
21
|
getValue(checkError = true) {
|
|
21
|
-
|
|
22
|
-
let error = this.getError();
|
|
23
|
-
if (error) {
|
|
24
|
-
this.setState({ error });
|
|
25
|
-
throw new Error(error);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return this.state.value;
|
|
22
|
+
return NSBoxBaseLayout.checkGetValue(this, checkError, () => this.state.value);
|
|
29
23
|
}
|
|
30
24
|
setValue(value, callback) {
|
|
31
25
|
this.setState({ value }, () => {
|
|
@@ -39,12 +33,13 @@ export class NSBoxMoney extends React.Component {
|
|
|
39
33
|
this.setValue(parseFloat(e.target.value));
|
|
40
34
|
}
|
|
41
35
|
render() {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
let menu = safeMenuMenuItem(this.props, () => { });
|
|
37
|
+
menu.builtin.fullscreen = false;
|
|
38
|
+
return (_jsx(NSBoxBaseLayout, Object.assign({ ref: this.NSBoxBaseLayout_Main }, this.props, { getValue: () => { var _a, _b; return (_b = (_a = this.state.value) === null || _a === void 0 ? void 0 : _a.toLocaleString()) !== null && _b !== void 0 ? _b : ""; }, setValue: () => { }, menu: menu, children: _jsx("input", { id: this.props.id, name: this.props.name, type: "number", className: StylesNSBox.ns_box_input, placeholder: this.props.placeholder, value: this.state.value, onChange: this.onChanged, onClick: () => { if (this.props.onClicked)
|
|
39
|
+
this.props.onClicked(this); }, step: "0.01", min: "0", style: {
|
|
40
|
+
background: `url("https://static.namirasoft.com/image/concept/type/price.png") white no-repeat scroll center right 4px`,
|
|
41
|
+
backgroundSize: "24px"
|
|
42
|
+
} }) })));
|
|
48
43
|
}
|
|
49
44
|
}
|
|
50
45
|
//# sourceMappingURL=NSBoxMoney.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSBoxMoney.js","sourceRoot":"","sources":["../../src/components/NSBoxMoney.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NSBoxMoney.js","sourceRoot":"","sources":["../../src/components/NSBoxMoney.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,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAyB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAU3E,MAAM,OAAO,UAAW,SAAQ,KAAK,CAAC,SAA2C;IAGhF,YAAY,KAAsB;QAEjC,KAAK,CAAC,KAAK,CAAC,CAAC;QAHd,yBAAoB,GAAG,SAAS,EAAmB,CAAC;QAInD,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IACD,QAAQ;QAEP,OAAO,CACN,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC;YAClE,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAA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