namirasoft-site-react 1.4.537 → 1.4.538
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/NSBarAction.d.ts +3 -1
- package/dist/components/NSBarAction.js +2 -2
- package/dist/components/NSBarAction.js.map +1 -1
- package/dist/components/NSLayout.d.ts +4 -4
- package/dist/components/NSLayout.js +5 -5
- package/dist/components/NSLayout.js.map +1 -1
- package/package.json +1 -1
- package/src/components/NSBarAction.tsx +7 -3
- package/src/components/NSLayout.tsx +8 -8
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { IBaseComponentProps } from '../main';
|
|
3
|
+
import { NSMenuActionProps } from './NSMenuAction';
|
|
3
4
|
export interface NSBarActionProps extends IBaseComponentProps {
|
|
4
5
|
title?: string;
|
|
5
6
|
description?: string;
|
|
6
7
|
menus?: {
|
|
7
8
|
[group: string]: NSMenuActionProps[];
|
|
8
9
|
};
|
|
10
|
+
children?: ReactNode;
|
|
9
11
|
}
|
|
10
12
|
export interface NSBarActionState {
|
|
11
13
|
show: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import Styles from './NSBarAction.module.css';
|
|
4
|
-
import { NSMenuAction } from './NSMenuAction';
|
|
5
4
|
import { NSDialogInfo } from './NSDialogInfo';
|
|
5
|
+
import { NSMenuAction } from './NSMenuAction';
|
|
6
6
|
export function isValidMenu(menus) {
|
|
7
7
|
let ans = false;
|
|
8
8
|
if (menus)
|
|
@@ -27,7 +27,7 @@ export function NSBarAction(props) {
|
|
|
27
27
|
return (_jsx(_Fragment, { children: _jsx("div", { id: props.id, className: `${Styles.ns_bar_action_holder} ${(_b = (_a = props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")) !== null && _b !== void 0 ? _b : ""}`, style: props.style, children: _jsxs("div", { className: `container d-flex justify-content-center justify-content-lg-between align-items-center w-100 ${Styles.ns_bar_action_grant_parent}`, children: [(((_c = props.title) === null || _c === void 0 ? void 0 : _c.trim()) || ((_d = props.description) === null || _d === void 0 ? void 0 : _d.trim())) &&
|
|
28
28
|
_jsxs("div", { className: `d-lg-flex ${Styles.ns_bar_action_parent}`, children: [((_e = props.title) === null || _e === void 0 ? void 0 : _e.trim()) &&
|
|
29
29
|
_jsx("p", { className: Styles.ns_bar_action_title, children: props.title }), ((_f = props.description) === null || _f === void 0 ? void 0 : _f.trim()) &&
|
|
30
|
-
_jsxs("button", { className: Styles.ns_bar_action_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 " })] }), state.show &&
|
|
30
|
+
_jsxs("button", { className: Styles.ns_bar_action_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 " })] }), props.children, state.show &&
|
|
31
31
|
_jsx(NSDialogInfo, { description: props.description, title: props.title, onClose: () => setState({ show: false }), show_as_code: false, children: _jsx(_Fragment, {}) })] }), props.menus && isValidMenu(props.menus) &&
|
|
32
32
|
_jsx("div", { className: Styles.ns_bar_action_actions_holder, children: Object.keys((_g = props.menus) !== null && _g !== void 0 ? _g : {}).map((group, index) => { var _a; return _jsx(NSMenuAction, { name: group, items: ((_a = props.menus) !== null && _a !== void 0 ? _a : {})[group] }, `NSBarAction_NSMenuAction_Key_${index}`); }) })] }) }) }));
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSBarAction.js","sourceRoot":"","sources":["../../src/components/NSBarAction.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"NSBarAction.js","sourceR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E,KAAK,EAAE,CAAC,MAAA,KAAK,CAAC,KAAK,mCAAI,EAAE,CAAC,CAAC,KAAK,CAAC,IAAvF,gCAAgC,KAAK,EAAE,CAAoD,CAAA,EAAA,CAAC,GAEhK,IAEF,GACD,GACJ,CACH,CAAC;AACH,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { IBackgroundProps } from '../props/IBackgroundProps';
|
|
2
3
|
import { IBaseComponentProps } from '../props/IBaseComponentProps';
|
|
3
|
-
import { NSBarNotificationProps } from './NSBarNotification';
|
|
4
4
|
import { IHeaderRightProps } from '../props/IHeaderRightProps';
|
|
5
|
-
import { NSBarActionProps } from './NSBarAction';
|
|
6
|
-
import { NSBarTitleProps } from './NSBarTitle';
|
|
7
5
|
import { NSRouterMakerProps } from '../routing/NSRouterMakerProps';
|
|
6
|
+
import { NSBarActionProps } from './NSBarAction';
|
|
8
7
|
import { NSBarAlertProps } from './NSBarAlert';
|
|
9
|
-
import {
|
|
8
|
+
import { NSBarNotificationProps } from './NSBarNotification';
|
|
9
|
+
import { NSBarTitleProps } from './NSBarTitle';
|
|
10
10
|
export interface NSLayoutProps extends IBaseComponentProps, NSRouterMakerProps {
|
|
11
11
|
scope: string;
|
|
12
12
|
logo: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import Styles from './NSLayout.module.css';
|
|
3
2
|
import { Fragment } from 'react';
|
|
4
|
-
import { NSHeader } from './NSHeader';
|
|
5
|
-
import { NSFooter } from './NSFooter';
|
|
6
|
-
import { NSBarNotification } from './NSBarNotification';
|
|
7
3
|
import { NSBarAction, isValidAction } from './NSBarAction';
|
|
8
|
-
import { NSBarTitle } from './NSBarTitle';
|
|
9
4
|
import { NSBarAlert } from './NSBarAlert';
|
|
5
|
+
import { NSBarNotification } from './NSBarNotification';
|
|
6
|
+
import { NSBarTitle } from './NSBarTitle';
|
|
7
|
+
import { NSFooter } from './NSFooter';
|
|
8
|
+
import { NSHeader } from './NSHeader';
|
|
9
|
+
import Styles from './NSLayout.module.css';
|
|
10
10
|
import { NSSpace, NSSpaceSizeType } from './NSSpace';
|
|
11
11
|
export function NSLayout(props) {
|
|
12
12
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSLayout.js","sourceRoot":"","sources":["../../src/components/NSLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"NSLayout.js","sourceRoot":"","sources":["../../src/components/NSLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AAK5C,OAAO,EAAE,WAAW,EAAoB,aAAa,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAmB,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAA0B,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,UAAU,EAAmB,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAuBrD,MAAM,UAAU,QAAQ,CAAC,KAAoB;;IAEzC,IAAI,MAAM,GAAG,MAAA,KAAK,CAAC,MAAM,mCAAI,EAAE,CAAC;IAChC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;IAE7C,OAAO,CACH,eAAK,EAAE,EAAE,KAAK,CAAC,EAAE,EACb,SAAS,EAAE,GAAG,MAAM,CAAC,YAAY,IAAI,MA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,IACL,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,IAAI,EAAC,QAAQ,EACb,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,UAAU,EAAE,KAAK,CAAC,UAAU,GAC9B,IACC,CACV,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
1
|
+
import { ReactNode, useState } from 'react';
|
|
2
|
+
import { IBaseComponentProps } from '../main';
|
|
2
3
|
import Styles from './NSBarAction.module.css';
|
|
3
|
-
import { NSMenuActionProps, NSMenuAction } from './NSMenuAction';
|
|
4
4
|
import { NSDialogInfo } from './NSDialogInfo';
|
|
5
|
-
import {
|
|
5
|
+
import { NSMenuAction, NSMenuActionProps } from './NSMenuAction';
|
|
6
6
|
|
|
7
7
|
export interface NSBarActionProps extends IBaseComponentProps
|
|
8
8
|
{
|
|
9
9
|
title?: string;
|
|
10
10
|
description?: string;
|
|
11
11
|
menus?: { [group: string]: NSMenuActionProps[] };
|
|
12
|
+
children?: ReactNode;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export interface NSBarActionState
|
|
@@ -64,6 +65,9 @@ export function NSBarAction(props: NSBarActionProps)
|
|
|
64
65
|
<span> Info </span>
|
|
65
66
|
</button>
|
|
66
67
|
}
|
|
68
|
+
{
|
|
69
|
+
props.children
|
|
70
|
+
}
|
|
67
71
|
{
|
|
68
72
|
state.show &&
|
|
69
73
|
<NSDialogInfo
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import Styles from './NSLayout.module.css';
|
|
2
1
|
import { Fragment, ReactNode } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { NSFooter } from './NSFooter';
|
|
2
|
+
import { IBackgroundProps } from '../props/IBackgroundProps';
|
|
5
3
|
import { IBaseComponentProps } from '../props/IBaseComponentProps';
|
|
6
|
-
import { NSBarNotification, NSBarNotificationProps } from './NSBarNotification';
|
|
7
4
|
import { IHeaderRightProps } from '../props/IHeaderRightProps';
|
|
8
|
-
import { NSBarActionProps, NSBarAction, isValidAction } from './NSBarAction';
|
|
9
|
-
import { NSBarTitleProps, NSBarTitle } from './NSBarTitle';
|
|
10
5
|
import { NSRouterMakerProps } from '../routing/NSRouterMakerProps';
|
|
11
|
-
import {
|
|
6
|
+
import { NSBarAction, NSBarActionProps, isValidAction } from './NSBarAction';
|
|
7
|
+
import { NSBarAlert, NSBarAlertProps } from './NSBarAlert';
|
|
8
|
+
import { NSBarNotification, NSBarNotificationProps } from './NSBarNotification';
|
|
9
|
+
import { NSBarTitle, NSBarTitleProps } from './NSBarTitle';
|
|
10
|
+
import { NSFooter } from './NSFooter';
|
|
11
|
+
import { NSHeader } from './NSHeader';
|
|
12
|
+
import Styles from './NSLayout.module.css';
|
|
12
13
|
import { NSSpace, NSSpaceSizeType } from './NSSpace';
|
|
13
|
-
import { IBackgroundProps } from '../props/IBackgroundProps';
|
|
14
14
|
|
|
15
15
|
export interface NSLayoutProps extends IBaseComponentProps, NSRouterMakerProps
|
|
16
16
|
{
|