namirasoft-site-react 1.3.286 → 1.3.288

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.
@@ -25,7 +25,7 @@ export function NSActionMenu(props) {
25
25
  if (props.items.length === 0)
26
26
  return _jsx(_Fragment, {});
27
27
  if (props.items.length === 1)
28
- return _jsx(NSButtonBlue, { title: props.items[0].menu_item, onClick: () => onClick(props.items[0]) });
28
+ return _jsx(NSButtonBlue, { title: props.items[0].menu_item, onClick: () => onClick(props.items[0]), style: { width: "180px" } });
29
29
  return (_jsxs("div", { className: Styles.ns_action_bar, ref: menuRef, children: [_jsxs("button", { onClick: () => setState((prevState) => (Object.assign(Object.assign({}, prevState), { isShow: !state.isShow }))), children: [props.name, _jsx("img", { className: Styles.ns_action_menu_icon, src: "https://static.namirasoft.com/image/concept/ellipsis/vertical-blue.svg", alt: "Icon", width: 24, height: 24 })] }), _jsx("ul", { className: `${Styles.ns_action_item_holder} ${state.isShow ? Styles.ns_show : Styles.ns_hide}`, children: props.items.map((item) => _jsx("li", { onClick: () => onClick(item), className: `${Styles.ns_action_item}
30
30
  ${item.isActive() ? Styles.ns_active_item : Styles.ns_deActive_item}
31
31
  `, children: item.menu_item }, item.id)) })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"NSActionMenu.js","sourceRoot":"","sources":["../../src/components/NSActionMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAuB,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAe/C,MAAM,UAAU,YAAY,CAAC,KAAoD;IAEhF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAqB;QACtD,MAAM,EAAE,KAAK;KACb,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,CAAiB,IAAI,CAAC,CA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,EAAE,GAAG,MAAM,CAAC,qBAAqB,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,YAEhG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACxB,aAEC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAC5B,SAAS,EAAE,GAAG,MAAM,CAAC,cAAc;kCACR,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB;iCAClE,YAEzB,IAAI,CAAC,SAAS,IANV,IAAI,CAAC,EAAE,CAOR,CACL,GAEE,IACA,CACN,CAAC;AACH,CAAC"}
@@ -1,7 +1,7 @@
1
1
  .ns_action_bar {
2
2
  display: flex;
3
3
  flex-direction: column;
4
- width: 272px;
4
+ width: 180px;
5
5
  color: #000;
6
6
  position: relative;
7
7
  max-width: 100%;
@@ -12,7 +12,7 @@ export function NSBarAction(props) {
12
12
  });
13
13
  const groups = Object.keys(props.menus);
14
14
  return (_jsxs(_Fragment, { children: [_jsx("div", { className: Styles.ns_action_bar_holder, children: _jsxs("div", { className: 'container d-flex justify-content-center justify-content-md-between align-items-center w-100', children: [_jsxs("div", { className: `d-none d-lg-flex ${Styles.ns_desktop_action_bar_title}`, children: [_jsx("h1", { className: Styles.title, children: props.title }), props.description !== "" &&
15
- _jsxs("button", { className: Styles.ns_info_container, onClick: () => setState({ show: true }), children: [_jsx("img", { src: 'https://static.namirasoft.com/image/concept/info/white-blue.svg', alt: 'info-icon', width: 24, height: 24 }), _jsx("span", { children: " Info " })] }), _jsx(NSModal, { show: state.show, description: props.description, title: props.title, onClose: () => setState({ show: false }) })] }), _jsx("div", { style: { padding: groups.length !== 0 ? "16px 0" : "0" }, className: Styles.ns_actions_hodler, children: groups.map((group) => _jsx(NSActionMenu, { name: group, items: props.menus[group] })) })] }) }), _jsxs("div", { className: `container d-block d-lg-none ${Styles.ns_mobile_action_bar_title}`, children: [_jsx("h1", { className: Styles.title, children: props.title }), props.description && lines &&
15
+ _jsxs("button", { className: Styles.ns_info_container, onClick: () => setState({ show: true }), children: [_jsx("img", { src: 'https://static.namirasoft.com/image/concept/info/white-blue.svg', alt: 'info-icon', width: 24, height: 24 }), _jsx("span", { children: " Info " })] }), _jsx(NSModal, { show: state.show, description: props.description, title: props.title, onClose: () => setState({ show: false }) })] }), _jsx("div", { style: { padding: groups.length !== 0 ? "16px 0" : "0" }, className: Styles.ns_actions_holder, children: groups.map((group) => _jsx(NSActionMenu, { name: group, items: props.menus[group] })) })] }) }), _jsxs("div", { className: `container d-block d-lg-none ${Styles.ns_mobile_action_bar_title}`, children: [_jsx("h1", { className: Styles.title, children: props.title }), props.description && lines &&
16
16
  _jsxs(_Fragment, { children: [_jsx("p", { className: Styles.description, children: lines.map((line, index) => {
17
17
  return (_jsxs(React.Fragment, { children: [line.trim(), index !== lines.length - 1 && _jsx("br", {})] }, index));
18
18
  }) }), _jsx(NSSpace, { size: NSSpaceSizeType.MINI })] })] })] }));
@@ -28,7 +28,7 @@
28
28
  -moz-box-shadow: 0 4px 4px 0px rgba(0, 0, 0, 0.25);
29
29
  }
30
30
 
31
- .ns_actions_hodler {
31
+ .ns_actions_holder {
32
32
  display: flex;
33
33
  align-items: center;
34
34
  justify-content: center;
@@ -2,31 +2,41 @@ import React from "react";
2
2
  import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
3
  import { IValidationProps } from "../props/IValidationProps";
4
4
  import { BaseOptionType } from "antd/es/select";
5
- export interface INSBoxEntitOption extends BaseOptionType {
5
+ import { FilterItem } from "namirasoft-core";
6
+ interface INSBoxEntitOption extends BaseOptionType {
6
7
  desc: string;
7
8
  value: string;
8
9
  }
9
- export interface INSBoxEntityProps extends IBaseComponentProps, IValidationProps {
10
+ export interface INSBoxEntityProps<Data> extends IBaseComponentProps, IValidationProps {
10
11
  title: string;
11
12
  placeholder?: string;
12
13
  defaultValue?: string;
13
- onChanged?: (e: NSBoxEntity) => void;
14
- onClicked?: (e: NSBoxEntity) => void;
14
+ onChanged?: (e: NSBoxEntity<Data>) => void;
15
+ onClicked?: (e: NSBoxEntity<Data>) => void;
15
16
  multiple: boolean;
16
- options: INSBoxEntitOption[];
17
+ getItems: (filters: FilterItem[] | null, page: number | null, size: number | null) => Promise<{
18
+ count: number;
19
+ rows: Data[];
20
+ }>;
21
+ getValue: (item: Data) => string;
22
+ getText: (item: Data) => string;
17
23
  }
18
- export interface INSBoxEntityState {
19
- value: string | null;
20
- values: string[];
24
+ export interface INSBoxEntityState<Data> {
25
+ items: Data[] | null;
26
+ items_string: INSBoxEntitOption[] | null;
27
+ value: Data | null;
28
+ values: Data[];
21
29
  error?: string;
22
30
  }
23
- export declare class NSBoxEntity extends React.Component<INSBoxEntityProps, INSBoxEntityState> {
24
- constructor(props: INSBoxEntityProps);
25
- getError(value: string): string | null;
26
- getValue(): string | null;
27
- getValues(): string[];
28
- setValue(value: string | null): void;
29
- setValues(values: string[]): void;
30
- onChanged(value: string | null | string[]): void;
31
+ export declare class NSBoxEntity<Data> extends React.Component<INSBoxEntityProps<Data>, INSBoxEntityState<Data>> {
32
+ constructor(props: INSBoxEntityProps<Data>);
33
+ getError(value: Data | null): string | null;
34
+ getValue(): Data | null;
35
+ getValues(): Data[];
36
+ setValue(value: Data | null): void;
37
+ setValues(values: Data[]): void;
38
+ private onChanged;
39
+ componentDidMount(): void;
31
40
  render(): import("react/jsx-runtime").JSX.Element;
32
41
  }
42
+ export {};
@@ -6,10 +6,13 @@ import { Select, Space } from 'antd';
6
6
  import IconSelectBox from '../assets/images/icon-select-box.svg';
7
7
  import { Validator } from "../Validator";
8
8
  import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
9
+ import { NSLoading } from "./NSLoading";
9
10
  export class NSBoxEntity extends React.Component {
10
11
  constructor(props) {
11
12
  super(props);
12
13
  this.state = {
14
+ items: null,
15
+ items_string: null,
13
16
  value: null,
14
17
  values: [],
15
18
  };
@@ -20,10 +23,11 @@ export class NSBoxEntity extends React.Component {
20
23
  this.onChanged = this.onChanged.bind(this);
21
24
  }
22
25
  getError(value) {
23
- return (Validator.getError(this.props.title, value, this.props));
26
+ let value_string = value == null ? "" : this.props.getValue(value);
27
+ return (Validator.getError(this.props.title, value_string, this.props));
24
28
  }
25
29
  getValue() {
26
- let error = this.getError(this.state.value || "");
30
+ let error = this.getError(this.state.value);
27
31
  if (error) {
28
32
  this.setState({ error });
29
33
  throw new Error(error);
@@ -32,7 +36,7 @@ export class NSBoxEntity extends React.Component {
32
36
  }
33
37
  getValues() {
34
38
  this.state.values.forEach(value => {
35
- let error = this.getError(value || "");
39
+ let error = this.getError(value);
36
40
  if (error) {
37
41
  this.setState({ error });
38
42
  throw new Error(error);
@@ -53,13 +57,30 @@ export class NSBoxEntity extends React.Component {
53
57
  });
54
58
  }
55
59
  onChanged(value) {
56
- if (this.props.multiple)
57
- this.setValues(value);
58
- else
59
- this.setValue(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(() => { });
60
77
  }
61
78
  render() {
62
- return (_jsxs(_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: this.props.options, 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: "" }) })] }));
79
+ var _a;
80
+ if (this.state.items == null) {
81
+ return _jsx(NSLoading, {});
82
+ }
83
+ return (_jsxs(_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: "" }) })] }));
63
84
  }
64
85
  }
65
86
  //# sourceMappingURL=NSBoxEntity.js.map
@@ -1 +1 @@
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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
4
4
  export function NSCard(props) {
5
5
  var _a, _b;
6
- return (_jsxs("a", { href: props.link.href, id: props.id, className: `${Styles.ns_card} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, children: [_jsxs("div", { className: Styles.ns_card_detail_container, children: [_jsxs("div", { className: Styles.ns_card_title_img, style: {
6
+ return (_jsxs("a", { href: props.link.href, id: props.id, className: `${Styles.ns_card} ${(_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: props.style, target: '_blanck', children: [_jsxs("div", { className: Styles.ns_card_detail_container, children: [_jsxs("div", { className: Styles.ns_card_title_img, style: {
7
7
  alignItems: props.description ? "flex-start" : "center",
8
8
  }, children: [_jsx("img", Object.assign({ className: Styles.ns_card_img, alt: 'Card' }, props.image)), props.headline &&
9
9
  _jsxs("span", { className: Styles.ns_card_headline, style: { color: (_b = props.headline) === null || _b === void 0 ? void 0 : _b.color }, children: [" ", props.headline.text, " "] }), _jsx("h3", { className: Styles.ns_card_title, children: props.title })] }), props.description &&
@@ -1 +1 @@
1
- {"version":3,"file":"NSCard.js","sourceRoot":"","sources":["../../src/components/NSCard.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,qBAAqB,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAiB1C,MAAM,UAAU,MAAM,CAAC,KAAmB;;IAEzC,OAAO,CACN,aAAG,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EACrC,SAAS,EAAE,GAAG,MAAM,CAAC,OAAO,IAAI,MAAA,KAAK,CAAC,SAAS,0CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAC5D,KAAK,EAAE,KAAK,CAAC,KAAK,aAElB,eAAK,SAAS,EAAE,MAAM,CAAC,wBAAwB,aAC9C,eAAK,SAAS,EAAE,MAAM,CAAC,iBAAiB,EACvC,KAAK,EAAE;4BACN,UAAU,EAAE,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AI,CAAC,KAAK,EACvB,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EACrB,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,EACzB,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,GAC3B,GACG;oBACN,CAAC;wBACD,cAAK,SAAS,EAAE,MAAM,CAAC,sBAAsB,YAC5C,KAAC,UAAU,IACV,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EACrB,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,GACxB,GACG;gBACP,CAAC;oBACD,eAAW,IAET,CACL,CAAC;AACH,CAAC"}
@@ -26,17 +26,15 @@
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  justify-content: flex-start;
29
- gap: 16px;
30
- margin-bottom: 16px;
29
+ gap: 8px;
31
30
  width: 100%;
32
31
  }
33
32
 
34
33
  .ns_card_img {
35
34
  border-radius: 16px;
36
35
  object-fit: cover;
37
- width: 100%;
36
+ width: 100px;
38
37
  height: 100%;
39
- max-height: 310px;
40
38
  }
41
39
 
42
40
  .ns_card_title {
@@ -106,6 +104,6 @@
106
104
 
107
105
  @media only screen and (min-width: 1024px) {
108
106
  .ns_card {
109
- width: 31%;
107
+ width: 25%;
110
108
  }
111
109
  }
@@ -1,19 +1,19 @@
1
- .ns_not_found_page {
1
+ .ns_not_found_page {
2
2
  display: flex;
3
3
  justify-content: center;
4
4
  align-items: center;
5
5
  background-image: url('../assets/images/404\ image_mobile.svg');
6
6
  background-repeat: no-repeat;
7
- background-size: cover;
7
+ background-size: contain;
8
8
  background-position: center;
9
9
  background-color: #fff;
10
10
  width: 100%;
11
11
  height: 80vh;
12
- margin-bottom: 48px;
12
+ margin-bottom: 48px;
13
13
  }
14
14
 
15
- @media only screen and (min-width: 1024px) {
16
- .ns_not_found_page {
15
+ @media only screen and (min-width: 1024px) {
16
+ .ns_not_found_page {
17
17
  background-image: url('../assets/images/404\ image.svg');
18
18
  }
19
19
  }
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "framework": "npm",
9
9
  "application": "package",
10
10
  "private": false,
11
- "version": "1.3.286",
11
+ "version": "1.3.288",
12
12
  "author": "Amir Abolhasani, Alireza Esmaeeli, Sepideh Mazloumi, Hooman Shashaeh",
13
13
  "license": "MIT",
14
14
  "main": "./dist/main.js",
@@ -1,7 +1,7 @@
1
1
  .ns_action_bar {
2
2
  display: flex;
3
3
  flex-direction: column;
4
- width: 272px;
4
+ width: 180px;
5
5
  color: #000;
6
6
  position: relative;
7
7
  max-width: 100%;
@@ -52,12 +52,14 @@ export function NSActionMenu(props: { name: string, items: INSActionMenuProps[]
52
52
  return <NSButtonBlue
53
53
  title={props.items[0].menu_item}
54
54
  onClick={() => onClick(props.items[0])}
55
+ style={{ width: "180px" }}
55
56
  />;
56
57
  return (
57
58
  <div className={Styles.ns_action_bar} ref={menuRef}>
58
- <button onClick={() => setState((prevState) => ({
59
- ...prevState, isShow: !state.isShow
60
- }))}>
59
+ <button
60
+ onClick={() => setState((prevState) => ({
61
+ ...prevState, isShow: !state.isShow
62
+ }))}>
61
63
  {props.name}
62
64
  <img
63
65
  className={Styles.ns_action_menu_icon}
@@ -28,7 +28,7 @@
28
28
  -moz-box-shadow: 0 4px 4px 0px rgba(0, 0, 0, 0.25);
29
29
  }
30
30
 
31
- .ns_actions_hodler {
31
+ .ns_actions_holder {
32
32
  display: flex;
33
33
  align-items: center;
34
34
  justify-content: center;
@@ -49,7 +49,7 @@ export function NSBarAction(props: INSBarActionProps)
49
49
  </div>
50
50
  <div
51
51
  style={{ padding: groups.length !== 0 ? "16px 0" : "0" }}
52
- className={Styles.ns_actions_hodler}
52
+ className={Styles.ns_actions_holder}
53
53
  >
54
54
  {
55
55
  groups.map((group) =>
@@ -8,37 +8,45 @@ import { IValidationProps } from "../props/IValidationProps";
8
8
  import { Validator } from "../Validator";
9
9
  import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
10
10
  import { BaseOptionType } from "antd/es/select";
11
+ import { FilterItem } from "namirasoft-core";
12
+ import { NSLoading } from "./NSLoading";
11
13
 
12
- export interface INSBoxEntitOption extends BaseOptionType
14
+ interface INSBoxEntitOption extends BaseOptionType
13
15
  {
14
16
  desc: string;
15
17
  value: string;
16
18
  }
17
19
 
18
- export interface INSBoxEntityProps extends IBaseComponentProps, IValidationProps
20
+ export interface INSBoxEntityProps<Data> extends IBaseComponentProps, IValidationProps
19
21
  {
20
22
  title: string;
21
23
  placeholder?: string;
22
24
  defaultValue?: string;
23
- onChanged?: (e: NSBoxEntity) => void;
24
- onClicked?: (e: NSBoxEntity) => void;
25
+ onChanged?: (e: NSBoxEntity<Data>) => void;
26
+ onClicked?: (e: NSBoxEntity<Data>) => void;
25
27
  multiple: boolean;
26
- options: INSBoxEntitOption[];
28
+ getItems: (filters: FilterItem[] | null, page: number | null, size: number | null) => Promise<{ count: number, rows: Data[] }>;
29
+ getValue: (item: Data) => string;
30
+ getText: (item: Data) => string;
27
31
  }
28
32
 
29
- export interface INSBoxEntityState
33
+ export interface INSBoxEntityState<Data>
30
34
  {
31
- value: string | null;
32
- values: string[];
35
+ items: Data[] | null;
36
+ items_string: INSBoxEntitOption[] | null;
37
+ value: Data | null;
38
+ values: Data[];
33
39
  error?: string;
34
40
  }
35
41
 
36
- export class NSBoxEntity extends React.Component<INSBoxEntityProps, INSBoxEntityState>
42
+ export class NSBoxEntity<Data> extends React.Component<INSBoxEntityProps<Data>, INSBoxEntityState<Data>>
37
43
  {
38
- constructor(props: INSBoxEntityProps)
44
+ constructor(props: INSBoxEntityProps<Data>)
39
45
  {
40
46
  super(props);
41
47
  this.state = {
48
+ items: null,
49
+ items_string: null,
42
50
  value: null,
43
51
  values: [],
44
52
  };
@@ -48,15 +56,16 @@ export class NSBoxEntity extends React.Component<INSBoxEntityProps, INSBoxEntity
48
56
  this.getValue = this.getValue.bind(this);
49
57
  this.onChanged = this.onChanged.bind(this);
50
58
  }
51
- getError(value: string): string | null
59
+ getError(value: Data | null): string | null
52
60
  {
61
+ let value_string = value == null ? "" : this.props.getValue(value);
53
62
  return (
54
- Validator.getError(this.props.title, value, this.props)
63
+ Validator.getError(this.props.title, value_string, this.props)
55
64
  );
56
65
  }
57
- getValue(): string | null
66
+ getValue(): Data | null
58
67
  {
59
- let error = this.getError(this.state.value || "");
68
+ let error = this.getError(this.state.value);
60
69
  if (error)
61
70
  {
62
71
  this.setState({ error });
@@ -64,11 +73,11 @@ export class NSBoxEntity extends React.Component<INSBoxEntityProps, INSBoxEntity
64
73
  }
65
74
  return this.state.value;
66
75
  }
67
- getValues(): string[]
76
+ getValues(): Data[]
68
77
  {
69
78
  this.state.values.forEach(value =>
70
79
  {
71
- let error = this.getError(value || "");
80
+ let error = this.getError(value);
72
81
  if (error)
73
82
  {
74
83
  this.setState({ error });
@@ -77,7 +86,7 @@ export class NSBoxEntity extends React.Component<INSBoxEntityProps, INSBoxEntity
77
86
  });
78
87
  return this.state.values;
79
88
  }
80
- setValue(value: string | null): void
89
+ setValue(value: Data | null): void
81
90
  {
82
91
  this.setState({ value }, () =>
83
92
  {
@@ -85,7 +94,7 @@ export class NSBoxEntity extends React.Component<INSBoxEntityProps, INSBoxEntity
85
94
  this.props.onChanged(this);
86
95
  });
87
96
  }
88
- setValues(values: string[]): void
97
+ setValues(values: Data[]): void
89
98
  {
90
99
  this.setState({ values }, () =>
91
100
  {
@@ -93,15 +102,36 @@ export class NSBoxEntity extends React.Component<INSBoxEntityProps, INSBoxEntity
93
102
  this.props.onChanged(this);
94
103
  });
95
104
  }
96
- onChanged(value: string | null | string[]): void
105
+ private onChanged(value: string | null | string[]): void
97
106
  {
98
- if (this.props.multiple)
99
- this.setValues(value as string[]);
100
- else
101
- this.setValue(value as string | null);
107
+ if (this.state.items)
108
+ if (this.props.multiple)
109
+ {
110
+ let string_values = value as string[];
111
+ let ds = this.state.items.filter(item => string_values.includes(this.props.getValue(item))) ?? [];
112
+ this.setValues(ds);
113
+ }
114
+ else
115
+ {
116
+ let d = this.state.items.find(item => this.props.getValue(item) == value) ?? null;
117
+ this.setValue(d);
118
+ }
119
+ }
120
+ override componentDidMount()
121
+ {
122
+ this.props.getItems([], null, null).then(items =>
123
+ {
124
+ let items_string = items.rows.map(item => { return { value: this.props.getValue(item), desc: this.props.getText(item) } });
125
+ this.setState({ items: items.rows, items_string });
126
+ }).catch(() => { });
102
127
  }
103
128
  override render()
104
129
  {
130
+ if (this.state.items == null)
131
+ {
132
+ // todo
133
+ return <NSLoading></NSLoading>
134
+ }
105
135
  return (
106
136
  <>
107
137
  <div id={this.props.id} className={`${Styles.ns_input_parent}`}>
@@ -114,7 +144,7 @@ export class NSBoxEntity extends React.Component<INSBoxEntityProps, INSBoxEntity
114
144
  onChange={this.onChanged}
115
145
  onClick={() => this.props.onClicked}
116
146
  optionLabelProp="label"
117
- options={this.props.options}
147
+ options={this.state.items_string ?? []}
118
148
  optionRender={(option) => (
119
149
  <Space className={Styles.ns_input_select_option}>
120
150
  {option.data.desc}
@@ -26,17 +26,15 @@
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  justify-content: flex-start;
29
- gap: 16px;
30
- margin-bottom: 16px;
29
+ gap: 8px;
31
30
  width: 100%;
32
31
  }
33
32
 
34
33
  .ns_card_img {
35
34
  border-radius: 16px;
36
35
  object-fit: cover;
37
- width: 100%;
36
+ width: 100px;
38
37
  height: 100%;
39
- max-height: 310px;
40
38
  }
41
39
 
42
40
  .ns_card_title {
@@ -106,6 +104,6 @@
106
104
 
107
105
  @media only screen and (min-width: 1024px) {
108
106
  .ns_card {
109
- width: 31%;
107
+ width: 25%;
110
108
  }
111
109
  }
@@ -22,6 +22,7 @@ export function NSCard(props: INSCardProps)
22
22
  <a href={props.link.href} id={props.id}
23
23
  className={`${Styles.ns_card} ${props.classList?.join(" ")}`}
24
24
  style={props.style}
25
+ target='_blanck'
25
26
  >
26
27
  <div className={Styles.ns_card_detail_container}>
27
28
  <div className={Styles.ns_card_title_img}
@@ -1,19 +1,19 @@
1
- .ns_not_found_page {
1
+ .ns_not_found_page {
2
2
  display: flex;
3
3
  justify-content: center;
4
4
  align-items: center;
5
5
  background-image: url('../assets/images/404\ image_mobile.svg');
6
6
  background-repeat: no-repeat;
7
- background-size: cover;
7
+ background-size: contain;
8
8
  background-position: center;
9
9
  background-color: #fff;
10
10
  width: 100%;
11
11
  height: 80vh;
12
- margin-bottom: 48px;
12
+ margin-bottom: 48px;
13
13
  }
14
14
 
15
- @media only screen and (min-width: 1024px) {
16
- .ns_not_found_page {
15
+ @media only screen and (min-width: 1024px) {
16
+ .ns_not_found_page {
17
17
  background-image: url('../assets/images/404\ image.svg');
18
18
  }
19
19
  }