namirasoft-site-react 1.4.337 → 1.4.338

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.
Files changed (87) hide show
  1. package/dist/App.js +1 -1
  2. package/dist/App.js.map +1 -1
  3. package/dist/NSBoxBuilder.js +2 -2
  4. package/dist/NSBoxBuilder.js.map +1 -1
  5. package/dist/Validator.d.ts +1 -0
  6. package/dist/Validator.js +20 -6
  7. package/dist/Validator.js.map +1 -1
  8. package/dist/components/NSBoxBaseCombo.d.ts +1 -1
  9. package/dist/components/NSBoxBaseLayout.d.ts +1 -1
  10. package/dist/components/NSBoxBoolean.d.ts +1 -1
  11. package/dist/components/NSBoxColor.d.ts +1 -1
  12. package/dist/components/NSBoxDate.d.ts +1 -1
  13. package/dist/components/NSBoxDateTime.d.ts +1 -1
  14. package/dist/components/NSBoxDouble.d.ts +1 -1
  15. package/dist/components/NSBoxDuration.d.ts +1 -1
  16. package/dist/components/NSBoxDynamic.d.ts +1 -1
  17. package/dist/components/NSBoxEmail.d.ts +1 -1
  18. package/dist/components/NSBoxFile.d.ts +1 -1
  19. package/dist/components/NSBoxFilePath.d.ts +1 -1
  20. package/dist/components/NSBoxFont.d.ts +1 -1
  21. package/dist/components/NSBoxIPV4.d.ts +1 -1
  22. package/dist/components/NSBoxIPV4Range.d.ts +1 -1
  23. package/dist/components/NSBoxIPV6.d.ts +1 -1
  24. package/dist/components/NSBoxIPV6Range.d.ts +1 -1
  25. package/dist/components/NSBoxInteger.d.ts +1 -1
  26. package/dist/components/NSBoxMoney.d.ts +1 -1
  27. package/dist/components/NSBoxPassword.d.ts +1 -1
  28. package/dist/components/NSBoxPhone.d.ts +1 -1
  29. package/dist/components/NSBoxRadio.d.ts +1 -1
  30. package/dist/components/NSBoxSchemaBase.d.ts +1 -1
  31. package/dist/components/NSBoxSchemaBase.js +17 -2
  32. package/dist/components/NSBoxSchemaBase.js.map +1 -1
  33. package/dist/components/NSBoxSchemaVariable.d.ts +1 -1
  34. package/dist/components/NSBoxSchemaVariable.js +5 -1
  35. package/dist/components/NSBoxSchemaVariable.js.map +1 -1
  36. package/dist/components/NSBoxSearch.d.ts +1 -1
  37. package/dist/components/NSBoxString.d.ts +1 -1
  38. package/dist/components/NSBoxTextArea.d.ts +1 -1
  39. package/dist/components/NSBoxTime.d.ts +1 -1
  40. package/dist/components/NSBoxTimeZone.d.ts +1 -1
  41. package/dist/components/NSBoxURL.d.ts +1 -1
  42. package/dist/components/NSBoxVersion.d.ts +1 -1
  43. package/dist/components/NSRepeater.d.ts +5 -1
  44. package/dist/components/NSRepeater.js +13 -5
  45. package/dist/components/NSRepeater.js.map +1 -1
  46. package/dist/components/NSRepeaterNSBoxSchemaVariable.d.ts +4 -1
  47. package/dist/components/NSRepeaterNSBoxSchemaVariable.js.map +1 -1
  48. package/dist/components/NSRepeaterNSTag.d.ts +4 -2
  49. package/dist/components/NSRepeaterNSTag.js.map +1 -1
  50. package/package.json +1 -1
  51. package/src/App.tsx +2 -0
  52. package/src/NSBoxBuilder.tsx +2 -0
  53. package/src/Validator.ts +22 -6
  54. package/src/components/NSBoxBaseCombo.tsx +1 -1
  55. package/src/components/NSBoxBaseLayout.tsx +1 -1
  56. package/src/components/NSBoxBoolean.tsx +1 -1
  57. package/src/components/NSBoxColor.tsx +1 -1
  58. package/src/components/NSBoxDate.tsx +1 -1
  59. package/src/components/NSBoxDateTime.tsx +1 -1
  60. package/src/components/NSBoxDouble.tsx +1 -1
  61. package/src/components/NSBoxDuration.tsx +1 -1
  62. package/src/components/NSBoxDynamic.tsx +1 -1
  63. package/src/components/NSBoxEmail.tsx +1 -1
  64. package/src/components/NSBoxFile.tsx +1 -1
  65. package/src/components/NSBoxFilePath.tsx +1 -1
  66. package/src/components/NSBoxFont.tsx +1 -1
  67. package/src/components/NSBoxIPV4.tsx +1 -1
  68. package/src/components/NSBoxIPV4Range.tsx +1 -1
  69. package/src/components/NSBoxIPV6.tsx +1 -1
  70. package/src/components/NSBoxIPV6Range.tsx +1 -1
  71. package/src/components/NSBoxInteger.tsx +1 -1
  72. package/src/components/NSBoxMoney.tsx +1 -1
  73. package/src/components/NSBoxPassword.tsx +1 -1
  74. package/src/components/NSBoxPhone.tsx +1 -1
  75. package/src/components/NSBoxRadio.tsx +1 -1
  76. package/src/components/NSBoxSchemaBase.tsx +18 -17
  77. package/src/components/NSBoxSchemaVariable.tsx +5 -6
  78. package/src/components/NSBoxSearch.tsx +1 -1
  79. package/src/components/NSBoxString.tsx +1 -1
  80. package/src/components/NSBoxTextArea.tsx +1 -1
  81. package/src/components/NSBoxTime.tsx +1 -1
  82. package/src/components/NSBoxTimeZone.tsx +1 -1
  83. package/src/components/NSBoxURL.tsx +1 -1
  84. package/src/components/NSBoxVersion.tsx +1 -1
  85. package/src/components/NSRepeater.tsx +21 -5
  86. package/src/components/NSRepeaterNSBoxSchemaVariable.tsx +3 -1
  87. package/src/components/NSRepeaterNSTag.tsx +3 -1
@@ -10,7 +10,7 @@ import { safeMenuMenuItem } from "./NSMenuButton";
10
10
  import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
11
11
  import { INSBox } from "./INSBox";
12
12
 
13
- export interface NSBoxFilePathProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxFilePath>
13
+ export interface NSBoxFilePathProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxFilePath, string>
14
14
  {
15
15
  input?: IBaseComponentProps;
16
16
  }
@@ -10,7 +10,7 @@ import { safeMenuMenuItem } from "./NSMenuButton";
10
10
  import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
11
11
  import { INSBox } from "./INSBox";
12
12
 
13
- export interface NSBoxFontProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxFont>
13
+ export interface NSBoxFontProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxFont, string>
14
14
  {
15
15
  input?: IBaseComponentProps;
16
16
  }
@@ -12,7 +12,7 @@ import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
12
12
  import { NamingConvention } from "namirasoft-core";
13
13
  import { INSBox } from "./INSBox";
14
14
 
15
- export interface NSBoxIPV4Props extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxIPV4>
15
+ export interface NSBoxIPV4Props extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxIPV4, string>
16
16
  {
17
17
  input?: IBaseComponentProps;
18
18
  }
@@ -10,7 +10,7 @@ import { safeMenuMenuItem } from "./NSMenuButton";
10
10
  import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
11
11
  import { INSBox } from "./INSBox";
12
12
 
13
- export interface NSBoxIPV4RangeProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxIPV4Range>
13
+ export interface NSBoxIPV4RangeProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxIPV4Range, string>
14
14
  {
15
15
  input?: IBaseComponentProps;
16
16
  }
@@ -12,7 +12,7 @@ import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
12
12
  import { NamingConvention } from "namirasoft-core";
13
13
  import { INSBox } from "./INSBox";
14
14
 
15
- export interface NSBoxIPV6Props extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxIPV6>
15
+ export interface NSBoxIPV6Props extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxIPV6, string>
16
16
  {
17
17
  input?: IBaseComponentProps;
18
18
  }
@@ -10,7 +10,7 @@ import { safeMenuMenuItem } from "./NSMenuButton";
10
10
  import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
11
11
  import { INSBox } from "./INSBox";
12
12
 
13
- export interface NSBoxIPV6RangeProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxIPV6Range>
13
+ export interface NSBoxIPV6RangeProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxIPV6Range, string>
14
14
  {
15
15
  input?: IBaseComponentProps;
16
16
  }
@@ -11,7 +11,7 @@ import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
11
11
  import { NamingConvention } from "namirasoft-core";
12
12
  import { INSBox } from "./INSBox";
13
13
 
14
- export interface NSBoxIntegerProps extends IBaseComponentProps, IValidationProps, IValidationNumberProps, INSBoxBaseLayoutProps<number, NSBoxInteger>
14
+ export interface NSBoxIntegerProps extends IBaseComponentProps, IValidationProps, IValidationNumberProps, INSBoxBaseLayoutProps<NSBoxInteger, number>
15
15
  {
16
16
  input?: IBaseComponentProps;
17
17
  }
@@ -12,7 +12,7 @@ import { NamingConvention } from "namirasoft-core";
12
12
  import { IValidationPrecisionProps } from "../props/IValidationPrecisionProps";
13
13
  import { INSBox } from "./INSBox";
14
14
 
15
- export interface NSBoxMoneyProps extends IBaseComponentProps, IValidationProps, IValidationNumberProps, IValidationPrecisionProps, INSBoxBaseLayoutProps<number, NSBoxMoney>
15
+ export interface NSBoxMoneyProps extends IBaseComponentProps, IValidationProps, IValidationNumberProps, IValidationPrecisionProps, INSBoxBaseLayoutProps<NSBoxMoney, number>
16
16
  {
17
17
  input?: IBaseComponentProps;
18
18
  }
@@ -11,7 +11,7 @@ import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
11
11
  import { NamingConvention, SetTimeouService } from "namirasoft-core";
12
12
  import { INSBox } from "./INSBox";
13
13
 
14
- export interface NSBoxPasswordProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxPassword>
14
+ export interface NSBoxPasswordProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxPassword, string>
15
15
  {
16
16
  input?: IBaseComponentProps;
17
17
  }
@@ -14,7 +14,7 @@ import { safeMenuMenuItem } from "./NSMenuButton";
14
14
  import { NamingConvention } from "namirasoft-core";
15
15
  import { INSBox } from "./INSBox";
16
16
 
17
- export interface NSBoxPhoneProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxPhone>
17
+ export interface NSBoxPhoneProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxPhone, string>
18
18
  { }
19
19
 
20
20
  export interface NSBoxPhoneState
@@ -8,7 +8,7 @@ import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
8
8
  import { Validator } from "../Validator";
9
9
  import { INSBox } from "./INSBox";
10
10
 
11
- export interface NSBoxRadioProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<boolean, NSBoxRadio>
11
+ export interface NSBoxRadioProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxRadio, boolean>
12
12
  {
13
13
  checked?: boolean;
14
14
  input?: IBaseComponentProps;
@@ -19,7 +19,7 @@ import { NSBoxBaseLayoutRecursive } from "./NSBoxBaseLayoutRecursive";
19
19
  import { NSRepeaterNSBoxSchemaVariable } from "./NSRepeaterNSBoxSchemaVariable";
20
20
  import { NSColumn } from "./NSColumn";
21
21
 
22
- export interface NSBoxSchemaBaseProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxSchemaBase>
22
+ export interface NSBoxSchemaBaseProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxSchemaBase, string>
23
23
  {
24
24
  name: string;
25
25
  depth?: number;
@@ -70,22 +70,21 @@ export class NSBoxSchemaBase extends React.Component<NSBoxSchemaBaseProps, NSBox
70
70
  }
71
71
  getError(): string | null
72
72
  {
73
- return null;
74
- // let ans = this.NSBoxEnum_Type.current?.getError() ||
75
- // this.NSBoxString_Name.current?.getError() ||
76
- // this.NSBoxBoolean_Required.current?.getError() ||
77
- // this.NSBoxSchemaBase_ArraySchema.current?.getError() ||
78
- // this.NSRepeaterNSBoxSchemaVariable_ObjectFields.current?.getError() ||
79
- // this.NSBoxInteger_Min.current?.getError() ||
80
- // this.NSBoxInteger_Max.current?.getError() ||
81
- // this.NSBoxInteger_Precision.current?.getError() ||
82
- // this.NSBoxInteger_MinLength.current?.getError() ||
83
- // this.NSBoxInteger_MaxLength.current?.getError() ||
84
- // this.NSBoxString_Regex.current?.getError() ||
85
- // this.NSBoxString_ValidList.current?.getError() ||
86
- // this.NSBoxString_InalidList.current?.getError() ||
87
- // this.NSBoxString_PlaceHolder.current?.getError();
88
- // return ans ?? null;
73
+ let ans = this.NSBoxEnum_Type.current?.getError() ||
74
+ this.NSBoxString_Name.current?.getError() ||
75
+ this.NSBoxBoolean_Required.current?.getError() ||
76
+ this.NSBoxSchemaBase_ArraySchema.current?.getError() ||
77
+ this.NSRepeaterNSBoxSchemaVariable_ObjectFields.current?.getError() ||
78
+ this.NSBoxInteger_Min.current?.getError() ||
79
+ this.NSBoxInteger_Max.current?.getError() ||
80
+ this.NSBoxInteger_Precision.current?.getError() ||
81
+ this.NSBoxInteger_MinLength.current?.getError() ||
82
+ this.NSBoxInteger_MaxLength.current?.getError() ||
83
+ this.NSBoxString_Regex.current?.getError() ||
84
+ this.NSBoxString_ValidList.current?.getError() ||
85
+ this.NSBoxString_InalidList.current?.getError() ||
86
+ this.NSBoxString_PlaceHolder.current?.getError();
87
+ return ans ?? null;
89
88
  }
90
89
  getValue(checkError: boolean = true): BaseTypeSchema | null
91
90
  {
@@ -443,6 +442,8 @@ export class NSBoxSchemaBase extends React.Component<NSBoxSchemaBaseProps, NSBox
443
442
  <NSRepeaterNSBoxSchemaVariable
444
443
  ref={this.NSRepeaterNSBoxSchemaVariable_ObjectFields}
445
444
  name={this.props.name}
445
+ required={this.props.required}
446
+ title={this.props.title}
446
447
  item_title="Field"
447
448
  style={{ width: "100%" }}
448
449
  />
@@ -24,7 +24,7 @@ import { NSBox } from "./NSBox";
24
24
  import { SetTimeouService } from "namirasoft-core";
25
25
  import Styles from "./NSBoxSchemaVariable.module.css";
26
26
 
27
- export interface NSBoxSchemaVariableProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<BaseVariableSchema, NSBoxSchemaVariable>
27
+ export interface NSBoxSchemaVariableProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxSchemaVariable, BaseVariableSchema>
28
28
  {
29
29
  name: string;
30
30
  depth?: number;
@@ -66,11 +66,10 @@ export class NSBoxSchemaVariable extends React.Component<NSBoxSchemaVariableProp
66
66
  }
67
67
  getError(): string | null
68
68
  {
69
- return null;
70
- // let ans = this.NSBoxString_Name.current?.getError() ||
71
- // this.NSBoxSchemaBase_Type.current?.getError() ||
72
- // this.NSBoxString_Default.current?.getError();
73
- // return ans ?? null;
69
+ let ans = this.NSBoxString_Name.current?.getError() ||
70
+ this.NSBoxSchemaBase_Type.current?.getError() ||
71
+ this.NSBoxString_Default.current?.getError();
72
+ return ans ?? null;
74
73
  }
75
74
  getValue(checkError: boolean = true): BaseVariableSchema | null
76
75
  {
@@ -10,7 +10,7 @@ import { NamingConvention } from "namirasoft-core";
10
10
  import { INSBox } from "./INSBox";
11
11
  import { safeMenuMenuItem } from "./NSMenuButton";
12
12
 
13
- export interface NSBoxSearchProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxSearch>
13
+ export interface NSBoxSearchProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxSearch, string>
14
14
  {
15
15
  title: string;
16
16
  placeholder?: string;
@@ -10,7 +10,7 @@ import { NamingConvention } from "namirasoft-core";
10
10
  import { INSBox } from "./INSBox";
11
11
  import { safeMenuMenuItem } from "./NSMenuButton";
12
12
 
13
- export interface NSBoxStringProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxString>
13
+ export interface NSBoxStringProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxString, string>
14
14
  {
15
15
  input?: IBaseComponentProps;
16
16
  }
@@ -11,7 +11,7 @@ import { NamingConvention } from "namirasoft-core";
11
11
  import { INSBox } from "./INSBox";
12
12
  import { safeMenuMenuItem } from "./NSMenuButton";
13
13
 
14
- export interface NSBoxTextAreaProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxTextArea>
14
+ export interface NSBoxTextAreaProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxTextArea, string>
15
15
  {
16
16
  cols?: number;
17
17
  rows?: number;
@@ -12,7 +12,7 @@ import { safeMenuMenuItem } from "./NSMenuButton";
12
12
  import { NamingConvention } from "namirasoft-core";
13
13
  import { INSBox } from "./INSBox";
14
14
 
15
- export interface NSBoxTimeProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxTime>
15
+ export interface NSBoxTimeProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxTime, string>
16
16
  {
17
17
  input?: IBaseComponentProps;
18
18
  }
@@ -10,7 +10,7 @@ import { safeMenuMenuItem } from "./NSMenuButton";
10
10
  import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
11
11
  import { INSBox } from "./INSBox";
12
12
 
13
- export interface NSBoxTimeZoneProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxTimeZone>
13
+ export interface NSBoxTimeZoneProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxTimeZone, string>
14
14
  {
15
15
  input?: IBaseComponentProps;
16
16
  }
@@ -11,7 +11,7 @@ import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
11
11
  import { INSBox } from "./INSBox";
12
12
  import { NamingConvention } from "namirasoft-core";
13
13
 
14
- export interface NSBoxURLProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxURL>
14
+ export interface NSBoxURLProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxURL, string>
15
15
  {
16
16
  input?: IBaseComponentProps;
17
17
  }
@@ -10,7 +10,7 @@ import { safeMenuMenuItem } from "./NSMenuButton";
10
10
  import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
11
11
  import { INSBox } from "./INSBox";
12
12
 
13
- export interface NSBoxVersionProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<string, NSBoxVersion>
13
+ export interface NSBoxVersionProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxVersion, string>
14
14
  {
15
15
  input?: IBaseComponentProps;
16
16
  }
@@ -3,8 +3,11 @@ import { INSBox } from './INSBox';
3
3
  import { IBaseComponentProps } from '../props/IBaseComponentProps';
4
4
  import { NSSpace, NSSpaceSizeType } from './NSSpace';
5
5
  import { NSLine } from './NSLine';
6
+ import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from './NSBoxBaseLayout';
7
+ import { safeMenuMenuItem } from './NSMenuButton';
8
+ import { Validator } from '../Validator';
6
9
 
7
- export interface NSRepeaterProps<ItemType, ValueType> extends IBaseComponentProps
10
+ export interface NSRepeaterProps<ItemType, ValueType> extends IBaseComponentProps, INSBoxBaseLayoutProps<ItemType, ValueType>
8
11
  {
9
12
  createItem: (gIndex: number, lIndex: number, ref: React.RefObject<ItemType>, onChange: () => void, onDelete: undefined | ((lIndex: number) => void)) => ReactNode;
10
13
  getValue: (item: ItemType, checkError: boolean) => ValueType | null;
@@ -12,6 +15,7 @@ export interface NSRepeaterProps<ItemType, ValueType> extends IBaseComponentProp
12
15
  isEmpty: (item: ItemType, value: ValueType | null) => boolean;
13
16
  onItemChanged?: (repeater: NSRepeater<ItemType, ValueType>) => void;
14
17
  onValuesChanged?: (repeater: NSRepeater<ItemType, ValueType>) => void;
18
+ required: boolean;
15
19
  min?: number;
16
20
  max?: number;
17
21
  ignoreItemsHavingError?: boolean;
@@ -24,7 +28,9 @@ export interface NSRepeaterState
24
28
 
25
29
  export class NSRepeater<ItemType, ValueType> extends Component<NSRepeaterProps<ItemType, ValueType>, NSRepeaterState> implements INSBox
26
30
  {
31
+ NSBoxBaseLayout_Main = createRef<NSBoxBaseLayout>();
27
32
  private Item_Refs: React.RefObject<ItemType>[] = [];
33
+ private last_value: ValueType[] = [];
28
34
  constructor(props: NSRepeaterProps<ItemType, ValueType>)
29
35
  {
30
36
  super(props);
@@ -148,11 +154,13 @@ export class NSRepeater<ItemType, ValueType> extends Component<NSRepeaterProps<I
148
154
  }
149
155
  getError(): string | null
150
156
  {
151
- return null;
157
+ return (
158
+ Validator.getErrorArray(this.props.title, this.last_value, this.props.required, this.props.min, this.props.max)
159
+ );
152
160
  }
153
161
  getValue(checkError: boolean = true): ValueType[]
154
162
  {
155
- return this.state.items.map((exists, index) =>
163
+ this.last_value = this.state.items.map((exists, index) =>
156
164
  {
157
165
  if (exists)
158
166
  {
@@ -173,6 +181,7 @@ export class NSRepeater<ItemType, ValueType> extends Component<NSRepeaterProps<I
173
181
  }
174
182
  return null
175
183
  }).filter(x => x !== null) as ValueType[];
184
+ return NSBoxBaseLayout.checkGetValue(this, checkError, () => this.last_value) ?? [];
176
185
  }
177
186
  setValue(value: ValueType[], callback?: () => void): void
178
187
  {
@@ -203,9 +212,16 @@ export class NSRepeater<ItemType, ValueType> extends Component<NSRepeaterProps<I
203
212
  }
204
213
  override render()
205
214
  {
215
+ let menu = safeMenuMenuItem(this.props, () => { });
216
+
206
217
  let LIndex = -1;
218
+
207
219
  return (
208
- <>
220
+ <NSBoxBaseLayout
221
+ ref={this.NSBoxBaseLayout_Main}
222
+ {...this.props}
223
+ menu={menu}
224
+ >
209
225
  {
210
226
  this.Item_Refs.map((ref, GIndex) =>
211
227
  {
@@ -235,7 +251,7 @@ export class NSRepeater<ItemType, ValueType> extends Component<NSRepeaterProps<I
235
251
  </div>
236
252
  })
237
253
  }
238
- </>
254
+ </NSBoxBaseLayout>
239
255
  );
240
256
  }
241
257
  }
@@ -4,12 +4,14 @@ import { NSBoxSchemaVariable } from './NSBoxSchemaVariable';
4
4
  import { BaseVariableSchema } from 'namirasoft-schema';
5
5
  import { NSRepeater } from './NSRepeater';
6
6
  import { IBaseComponentProps } from '../props/IBaseComponentProps';
7
+ import { INSBoxBaseLayoutProps } from './NSBoxBaseLayout';
7
8
 
8
- export interface NSRepeaterNSBoxSchemaVariableProps extends IBaseComponentProps
9
+ export interface NSRepeaterNSBoxSchemaVariableProps extends IBaseComponentProps, INSBoxBaseLayoutProps<NSBoxSchemaVariable, BaseVariableSchema>
9
10
  {
10
11
  name: string;
11
12
  onItemChanged?: (repeater: NSRepeaterNSBoxSchemaVariable) => void;
12
13
  onValuesChanged?: (repeater: NSRepeaterNSBoxSchemaVariable) => void;
14
+ required: boolean;
13
15
  min?: number;
14
16
  max?: number;
15
17
  item_title: string;
@@ -3,12 +3,14 @@ import { INSBox } from './INSBox';
3
3
  import { NSRepeater } from './NSRepeater';
4
4
  import { IBaseComponentProps } from '../props/IBaseComponentProps';
5
5
  import { NSTag, NSTagValue } from './NSTag';
6
+ import { INSBoxBaseLayoutProps } from './NSBoxBaseLayout';
6
7
 
7
- export interface NSRepeaterNSTagProps extends IBaseComponentProps
8
+ export interface NSRepeaterNSTagProps extends IBaseComponentProps, INSBoxBaseLayoutProps<NSTag, NSTagValue>
8
9
  {
9
10
  name: string;
10
11
  onItemChanged?: (repeater: NSRepeaterNSTag) => void;
11
12
  onValuesChanged?: (repeater: NSRepeaterNSTag) => void;
13
+ required: boolean;
12
14
  min?: number;
13
15
  max?: number;
14
16
  }