namirasoft-account-react 1.3.24 → 1.3.27

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.
@@ -0,0 +1,73 @@
1
+ const getCacheIdentifier = require('react-dev-utils/getCacheIdentifier');
2
+ const webpack = require('webpack');
3
+
4
+ const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
5
+
6
+ module.exports = function config_overrides(config, webpackEnv)
7
+ {
8
+ console.log('overriding webpack config...');
9
+ const isEnvDevelopment = webpackEnv === 'development';
10
+ const isEnvProduction = webpackEnv === 'production';
11
+ const loaders = config.module.rules[1].oneOf;
12
+
13
+ loaders.splice(loaders.length - 1, 0, {
14
+ test: /\.(js|mjs|cjs)$/,
15
+ exclude: /@babel(?:\/|\\{1,2})runtime/,
16
+ loader: require.resolve('babel-loader'),
17
+ options: {
18
+ babelrc: false,
19
+ configFile: false,
20
+ compact: false,
21
+ presets: [
22
+ [
23
+ require.resolve('babel-preset-react-app/dependencies'),
24
+ { helpers: true },
25
+ ],
26
+ ],
27
+ cacheDirectory: true,
28
+ // See #6846 for context on why cacheCompression is disabled
29
+ cacheCompression: false,
30
+ // @remove-on-eject-begin
31
+ cacheIdentifier: getCacheIdentifier(
32
+ isEnvProduction
33
+ ? 'production'
34
+ : isEnvDevelopment && 'development',
35
+ [
36
+ 'babel-plugin-named-asset-import',
37
+ 'babel-preset-react-app',
38
+ 'react-dev-utils',
39
+ 'react-scripts',
40
+ ]
41
+ ),
42
+ // @remove-on-eject-end
43
+ // Babel sourcemaps are needed for debugging into node_modules
44
+ // code. Without the options below, debuggers like VSCode
45
+ // show incorrect code and set breakpoints on the wrong lines.
46
+ sourceMaps: shouldUseSourceMap,
47
+ inputSourceMap: shouldUseSourceMap,
48
+ },
49
+ });
50
+
51
+ config.resolve.fallback = {
52
+ "fs": false,
53
+ "tls": false,
54
+ "net": false,
55
+ "https": false,
56
+ // "http": require.resolve("stream-http"),
57
+ // "zlib": require.resolve("browserify-zlib"),
58
+ "path": require.resolve("path-browserify"),
59
+ // "stream": require.resolve("stream-browserify"),
60
+ // "util": require.resolve("util/"),
61
+ // "crypto": require.resolve("crypto-browserify")
62
+ "child_process": false,
63
+ "os": false,
64
+ "crypto": false
65
+ }
66
+ config.plugins = (config.plugins || []).concat([
67
+ new webpack.NormalModuleReplacementPlugin(/node:/, (resource) =>
68
+ {
69
+ resource.request = resource.request.replace(/^node:/, "");
70
+ })
71
+ ]);
72
+ return config;
73
+ };
package/dist/App.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import './App.css';
2
+ export declare function App(): import("react/jsx-runtime").JSX.Element;
package/dist/App.js ADDED
@@ -0,0 +1,50 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import './App.css';
3
+ import { NSALoginPage, NSALayoutAction } from './main';
4
+ const actions = [
5
+ {
6
+ group: "actions",
7
+ items: [
8
+ {
9
+ id: "1",
10
+ menu_item: "View",
11
+ handler() {
12
+ },
13
+ isActive() {
14
+ return true;
15
+ }
16
+ },
17
+ {
18
+ id: "2",
19
+ menu_item: "View History",
20
+ handler() {
21
+ console.log("View History");
22
+ },
23
+ isActive() {
24
+ return true;
25
+ }
26
+ },
27
+ {
28
+ id: "3",
29
+ menu_item: "Edit",
30
+ handler() { },
31
+ isActive() {
32
+ return true;
33
+ }
34
+ },
35
+ {
36
+ id: "4",
37
+ menu_item: "Delete",
38
+ handler() { },
39
+ isActive() {
40
+ return true;
41
+ }
42
+ }
43
+ ]
44
+ }
45
+ ];
46
+ export function App() {
47
+ return (_jsxs(_Fragment, { children: [_jsx(NSALoginPage, { title: "Namirasoft Payment", logo: "Logo", background: "https://static.namirasoft.com/image/namirasoft/account/background/base.svg" }), _jsx(NSALayoutAction, { scope: 'Namirasoft Account Console', logo: 'https://static.namirasoft.com/image/namirasoft/account/logo/base.png', background: "url('https://static.namirasoft.com/image/namirasoft/account/background/base.svg')", title: 'test', description: 'You\u2019re not a Premium user yet. It takes us 10 to 30 days to make you Premium.', notifications: [], actions: actions, children: _jsx("p", { children: "test" }) })] }));
48
+ }
49
+ ;
50
+ //# sourceMappingURL=App.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":";AAAA,OAAO,WAAW,CAAC;AACnB,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEvD,MAAM,OAAO,GAAG;IACZ;QACI,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE;YACH;gBACI,EAAE,EAAE,GAAG;gBACP,SAAS,EAAE,MAAM;gBACjB,OAAO;gBAEP,CAAC;gBACD,QAAQ;oBAEJ,OAAO,IAAI,CAAC;gBAChB,CAAC;aACJ;YACD;gBACI,EAAE,EAAE,GAAG;gBACP,SAAS,EAAE,cAAc;gBACzB,OAAO;oBAEH,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;gBAChC,CAAC;gBACD,QAAQ;oBAEJ,OAAO,IAAI,CAAC;gBAChB,CAAC;aACJ;YACD;gBACI,EAAE,EAAE,GAAG;gBACP,SAAS,EAAE,MAAM;gBACjB,OAAO,KACL,CAAC;gBACH,QAAQ;oBAEJ,OAAO,IAAI,CAAC;gBAChB,CAAC;aACJ;YACD;gBACI,EAAE,EAAE,GAAG;gBACP,SAAS,EAAE,QAAQ;gBACnB,OAAO,KACL,CAAC;gBACH,QAAQ;oBAEJ,OAAO,IAAI,CAAC;gBAChB,CAAC;aACJ;SACJ;KACJ;CACJ,CAAA;AACD,MAAM,UAAU,GAAG;IAEf,OAAO,CACH,8BACI,KAAC,YAAY,IACT,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAC,MAAM,EACX,UAAU,EAAC,4EAA4E,GAAG,EAC9F,KAAC,eAAe,IACZ,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,sEAAsE,EAC3E,UAAU,EAAC,mFAAmF,EAC9F,KAAK,EAAC,MAAM,EACZ,WAAW,EAAC,oFAA+E,EAC3F,aAAa,EAAE,EAAE,EACjB,OAAO,EAAE,OAAO,YAEhB,+BAAW,GACG,IACnB,CACN,CAAC;AACN,CAAC;AAAA,CAAC"}
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=INSARouterMaker.js.map
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=INSARouterProps.js.map
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=INSARouterState.js.map
package/dist/Info.js CHANGED
@@ -1,25 +1,19 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const device_uuid_1 = __importDefault(require("device-uuid"));
7
- class Info {
1
+ import DeviceUUID from "device-uuid";
2
+ export default class Info {
8
3
  static getDeviceName(query) {
9
4
  var _a;
10
- var du = new device_uuid_1.default.DeviceUUID().parse();
5
+ var du = new DeviceUUID.DeviceUUID().parse();
11
6
  return (_a = query.device) !== null && _a !== void 0 ? _a : (du.platform + " " + du.version);
12
7
  }
13
8
  static getVersion() {
14
- var du = new device_uuid_1.default.DeviceUUID().parse();
9
+ var du = new DeviceUUID.DeviceUUID().parse();
15
10
  return du.version;
16
11
  }
17
12
  static getOS(query) {
18
13
  var _a;
19
- var du = new device_uuid_1.default.DeviceUUID().parse();
14
+ var du = new DeviceUUID.DeviceUUID().parse();
20
15
  return (_a = query.os) !== null && _a !== void 0 ? _a : du.os;
21
16
  }
22
17
  }
23
- exports.default = Info;
24
18
  ;
25
19
  //# sourceMappingURL=Info.js.map
package/dist/Info.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file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C,OAAO,CAAC;IACtB,CAAC;IACD,MAAM,CAAC,KAAK,CAAC,KAAkB;;QAE3B,IAAI,EAAE,GAAG,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC;QAC7C,OAAO,MAAA,KAAK,CAAC,EAAE,mCAAI,EAAE,CAAC,EAAE,CAAC;IAC7B,CAAC;CACJ;AAAA,CAAC"}
@@ -1,16 +1,10 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.NSARouterMaker = void 0;
7
- const jsx_runtime_1 = require("react/jsx-runtime");
8
- const query_string_1 = __importDefault(require("query-string"));
9
- const namirasoft_core_1 = require("namirasoft-core");
10
- const namirasoft_account_1 = require("namirasoft-account");
11
- const namirasoft_site_react_1 = require("namirasoft-site-react");
12
- const axios_1 = __importDefault(require("axios"));
13
- class NSARouterMaker {
1
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
+ import queryString from 'query-string';
3
+ import { IStorageCookie, ObjectService, URLOperation } from "namirasoft-core";
4
+ import { NamirasoftAccountServer, TokenManager } from "namirasoft-account";
5
+ import { NSRouterMaker } from 'namirasoft-site-react';
6
+ import axios from "axios";
7
+ export class NSARouterMaker {
14
8
  constructor(state, setState, location, navigate, component) {
15
9
  this.state = state;
16
10
  this.setState = setState;
@@ -29,13 +23,13 @@ class NSARouterMaker {
29
23
  var _a, _b;
30
24
  let qToken = this.getQuery("token");
31
25
  let Cookies = process.env.REACT_APP_TOKEN;
32
- let storage = new namirasoft_core_1.IStorageCookie({ domain: ".namirasoft.com", path: "/" }, Cookies);
33
- let token_manager = new namirasoft_account_1.TokenManager(storage, () => this.setState({}));
26
+ let storage = new IStorageCookie({ domain: ".namirasoft.com", path: "/" }, Cookies);
27
+ let token_manager = new TokenManager(storage, () => this.setState({}));
34
28
  if (qToken)
35
29
  token_manager.setValue(qToken, true);
36
- let server = new namirasoft_account_1.NamirasoftAccountServer(token_manager, (error) => {
30
+ let server = new NamirasoftAccountServer(token_manager, (error) => {
37
31
  var _a;
38
- if (axios_1.default.isAxiosError(error))
32
+ if (axios.isAxiosError(error))
39
33
  if (error.response)
40
34
  if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 401) {
41
35
  token_manager.del();
@@ -59,17 +53,17 @@ class NSARouterMaker {
59
53
  return { props, inited };
60
54
  }
61
55
  getQueryStrings() {
62
- return query_string_1.default.parse(this.location.search);
56
+ return queryString.parse(this.location.search);
63
57
  }
64
58
  getQuery(name) {
65
59
  let query = this.getQueryStrings();
66
60
  let item = query[name];
67
- return new namirasoft_core_1.ObjectService(item).getString();
61
+ return new ObjectService(item).getString();
68
62
  }
69
63
  getLink(sub, customQuery) {
70
64
  if (!customQuery)
71
65
  customQuery = {};
72
- return namirasoft_core_1.URLOperation.getLink("", sub, customQuery);
66
+ return URLOperation.getLink("", sub, customQuery);
73
67
  }
74
68
  redirect(sub, customQuery) {
75
69
  let ans = this.getLink(sub, customQuery);
@@ -93,12 +87,12 @@ class NSARouterMaker {
93
87
  }
94
88
  }
95
89
  onRender() {
96
- let maker = new namirasoft_site_react_1.NSRouterMaker(this.state, this.setState, {
90
+ let maker = new NSRouterMaker(this.state, this.setState, {
97
91
  onRender: (ns_router_maker_props) => {
98
92
  this.ns_router_maker_props = ns_router_maker_props;
99
93
  let { inited, props } = this.init();
100
94
  if (!inited)
101
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
95
+ return _jsx(_Fragment, {});
102
96
  let banned = false;
103
97
  if (props.account.token_manager.exists()) {
104
98
  banned = props.account.token_manager.getUserData(user => user.banned, false);
@@ -111,6 +105,5 @@ class NSARouterMaker {
111
105
  return maker.onRender();
112
106
  }
113
107
  }
114
- exports.NSARouterMaker = NSARouterMaker;
115
108
  ;
116
109
  //# sourceMappingURL=NSARouterMaker.js.map
@@ -1 +1 @@
1
- {"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AAAA,CAAC"}
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { INSActionMenuProps, INSNotificationProps } from 'namirasoft-site-react';
3
+ export interface NSALayoutActionProps {
4
+ scope: string;
5
+ logo: string;
6
+ background: string;
7
+ title: string;
8
+ description?: string;
9
+ children: JSX.Element | JSX.Element[];
10
+ notifications: INSNotificationProps[];
11
+ actions: INSActionMenuProps[];
12
+ redirectToView?: () => void;
13
+ edit?: () => void;
14
+ delete?: () => void;
15
+ }
16
+ export declare function NSALayoutAction(props: NSALayoutActionProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { NSLayoutAction } from 'namirasoft-site-react';
3
+ export function NSALayoutAction(props) {
4
+ return (_jsx(NSLayoutAction, { scope: props.scope, logo: props.logo, background: props.background, title: props.title, description: props.description, actions: props.actions, notifications: props.notifications, children: _jsx("div", { className: "container-fluid", children: props.children }) }));
5
+ }
6
+ //# sourceMappingURL=NSALayoutAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSALayoutAction.js","sourceRoot":"","sources":["../../src/components/NSALayoutAction.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAmBvD,MAAM,UAAU,eAAe,CAAC,KAA2B;IAEvD,OAAO,CACH,KAAC,cAAc,IACX,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,aAAa,EAAE,KAAK,CAAC,aAAa,YAElC,cAAK,SAAS,EAAC,iBAAiB,YAC3B,KAAK,CAAC,QAAQ,GACb,GACO,CACpB,CAAC;AACN,CAAC"}
File without changes
package/dist/index.d.ts CHANGED
@@ -1,5 +1 @@
1
- export * from "./Info";
2
- export * from "./INSARouterMaker";
3
- export * from "./INSARouterProps";
4
- export * from "./INSARouterState";
5
- export * from "./NSARouterMaker";
1
+ import './index.css';
package/dist/index.js CHANGED
@@ -1,22 +1,7 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Info"), exports);
18
- __exportStar(require("./INSARouterMaker"), exports);
19
- __exportStar(require("./INSARouterProps"), exports);
20
- __exportStar(require("./INSARouterState"), exports);
21
- __exportStar(require("./NSARouterMaker"), exports);
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import ReactDOM from 'react-dom/client';
3
+ import './index.css';
4
+ import { App } from './App';
5
+ const root = ReactDOM.createRoot(document.getElementById('root'));
6
+ root.render(_jsx(App, {}));
22
7
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,oDAAkC;AAClC,oDAAkC;AAClC,oDAAkC;AAClC,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAAA,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,MAAM,IAAI,GAAG,QAAQ,CAAC,UAAU,CAC5B,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAgB,CACjD,CAAC;AACF,IAAI,CAAC,MAAM,CAAC,KAAC,GAAG,KAAG,CAAC,CAAC"}
package/dist/main.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export * from "./Info";
2
+ export * from "./INSARouterMaker";
3
+ export * from "./INSARouterProps";
4
+ export * from "./INSARouterState";
5
+ export * from "./NSARouterMaker";
6
+ export * from "./pages/NSALoginPage";
7
+ export * from "./components/NSALayoutAction";
package/dist/main.js ADDED
@@ -0,0 +1,8 @@
1
+ export * from "./Info";
2
+ export * from "./INSARouterMaker";
3
+ export * from "./INSARouterProps";
4
+ export * from "./INSARouterState";
5
+ export * from "./NSARouterMaker";
6
+ export * from "./pages/NSALoginPage";
7
+ export * from "./components/NSALayoutAction";
8
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,6 @@
1
+ export interface INSALoginPageProps {
2
+ title: string;
3
+ logo: string;
4
+ background: string;
5
+ }
6
+ export declare function NSALoginPage(props: INSALoginPageProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Styles from './NSALoginPage.module.css';
3
+ import { NSSpace, NSSpaceSizeType, NSLinkBlue } from 'namirasoft-site-react';
4
+ export function NSALoginPage(props) {
5
+ return (_jsx("div", { style: {
6
+ backgroundImage: `url(${props.background})`,
7
+ width: '100%',
8
+ backgroundSize: 'cover',
9
+ backgroundAttachment: 'fixed'
10
+ }, children: _jsxs("div", { className: Styles.ns_login_container, style: { minHeight: '100vh' }, children: [_jsx("div", { className: Styles.ns_logo, children: _jsx("img", { width: 256, height: 256, src: props.logo, alt: `${props.title} Logo` }) }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx("div", { children: _jsx("h1", { className: Styles.ns_title, children: props.title }) }), _jsx(NSSpace, { size: NSSpaceSizeType.SMALL }), _jsx("div", { className: Styles.ns_button, children: _jsx(NSLinkBlue, { title: "Login", href: 'https://account.namirasoft.com/login' }) })] }) }));
11
+ }
12
+ //# sourceMappingURL=NSALoginPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSALoginPage.js","sourceRoot":"","sources":["../../src/pages/NSALoginPage.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAS7E,MAAM,UAAU,YAAY,CAAC,KAAyB;IAElD,OAAO,CACH,cACI,KAAK,EAAE;YACH,eAAe,EAAE,OAAO,KAAK,CAAC,UAAU,GAAG;YAC3C,KAAK,EAAE,MAAM;YACb,cAAc,EAAE,OAAO;YACvB,oBAAoB,EAAE,OAAO;SAChC,YAED,eAAK,SAAS,EAAE,MAAM,CAAC,kBAAkB,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,aACpE,cAAK,SAAS,EAAE,MAAM,CAAC,OAAO,YAC1B,cAAK,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,KAAK,OAAO,GAAI,GAC3E,EACN,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACxC,wBACI,aAAI,SAAS,EAAE,MAAM,CAAC,QAAQ,YAAG,KAAK,CAAC,KAAK,GAAM,GAChD,EACN,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACxC,cAAK,SAAS,EAAE,MAAM,CAAC,SAAS,YAC5B,KAAC,UAAU,IAAC,KAAK,EAAC,OAAO,EAAC,IAAI,EAAE,sCAAsC,GAAI,GACxE,IACJ,GACJ,CACT,CAAC;AACN,CAAC"}
@@ -0,0 +1,20 @@
1
+ .ns_login_container {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: center;
5
+ justify-content: center;
6
+ }
7
+
8
+ .ns_logo {
9
+ text-align: center;
10
+ }
11
+
12
+ .ns_title {
13
+ font-size: 32px;
14
+ font-weight: 700;
15
+ text-align: center;
16
+ }
17
+
18
+ .ns_button {
19
+ text-align: center;
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "namirasoft-account-react",
3
- "title": "Namirasoft Account React",
3
+ "title": "Namirasoft Account React NPM Package",
4
4
  "description": "Namira Software Corporation Account React NPM Package",
5
5
  "icon": "logo.png",
6
6
  "logo": "https://static.namirasoft.com/image/namirasoft/account/logo/name.png",
@@ -8,29 +8,59 @@
8
8
  "framework": "npm",
9
9
  "application": "package",
10
10
  "private": false,
11
- "version": "1.3.24",
11
+ "version": "1.3.27",
12
12
  "author": "Amir Abolhasani",
13
13
  "license": "MIT",
14
- "main": "./dist/index.js",
15
- "types": "./dist/index.d.ts",
14
+ "main": "./dist/main.js",
15
+ "types": "./dist/main.d.ts",
16
16
  "scripts": {
17
- "build": ""
17
+ "start": "react-app-rewired start",
18
+ "build": "npm run copy",
19
+ "test": "react-app-rewired test",
20
+ "eject": "react-app-rewired eject",
21
+ "copy": "copyfiles -u 1 src/**/*.html src/**/*.css src/**/*.svg src/**/*.png src/**/*.jpg dist/"
18
22
  },
19
23
  "dependencies": {
20
24
  "@types/device-uuid": "^1.0.3",
21
25
  "@types/react": "^18.3.3",
22
26
  "device-uuid": "^1.0.4",
23
- "namirasoft-account": "^1.3.20",
27
+ "namirasoft-account": "^1.3.22",
28
+ "namirasoft-account-client": "^1.3.0",
29
+ "namirasoft-account-react": "^1.3.25",
24
30
  "namirasoft-core": "^1.3.41",
25
- "namirasoft-site-react": "^1.3.163",
31
+ "namirasoft-site-react": "^1.3.169",
32
+ "os-browserify": "^0.3.0",
33
+ "path-browserify": "^1.0.1",
34
+ "process": "^0.11.10",
26
35
  "query-string": "^9.0.0",
27
36
  "react": "^18.3.1",
37
+ "react-app-rewired": "^2.2.1",
38
+ "react-dom": "^18.3.1",
28
39
  "react-router-dom": "^6.23.1",
40
+ "react-scripts": "5.0.1",
29
41
  "run": "^1.5.0"
30
42
  },
43
+ "eslintConfig": {
44
+ "extends": [
45
+ "react-app",
46
+ "react-app/jest"
47
+ ]
48
+ },
31
49
  "skip": {
32
50
  "content": [
33
51
  "/tsconfig.json"
34
52
  ]
53
+ },
54
+ "browserslist": {
55
+ "production": [
56
+ ">0.2%",
57
+ "not dead",
58
+ "not op_mini all"
59
+ ],
60
+ "development": [
61
+ "last 1 chrome version",
62
+ "last 1 firefox version",
63
+ "last 1 safari version"
64
+ ]
35
65
  }
36
66
  }
@@ -0,0 +1,22 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8" />
6
+ <!-- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> -->
7
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
8
+ <meta name="theme-color" content="#000000" />
9
+ <meta name="description" content="Web site created using create-react-app" />
10
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
11
+ integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous" />
12
+ <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13
+ <!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
14
+ <title>React App</title>
15
+ </head>
16
+
17
+ <body>
18
+ <noscript>You need to enable JavaScript to run this app.</noscript>
19
+ <div id="root"></div>
20
+ </body>
21
+
22
+ </html>
package/src/App.css ADDED
@@ -0,0 +1,10 @@
1
+ @font-face {
2
+ font-family: inter;
3
+ src: url("../src/assets/fonts/Inter-Regular.ttf");
4
+ }
5
+ body {
6
+ margin: 0;
7
+ font-family: inter;
8
+ -webkit-font-smoothing: antialiased;
9
+ -moz-osx-font-smoothing: grayscale;
10
+ }
package/src/App.tsx ADDED
@@ -0,0 +1,75 @@
1
+ import './App.css';
2
+ import { NSALoginPage, NSALayoutAction } from './main';
3
+
4
+ const actions = [
5
+ {
6
+ group: "actions",
7
+ items: [
8
+ {
9
+ id: "1",
10
+ menu_item: "View",
11
+ handler()
12
+ {
13
+ },
14
+ isActive()
15
+ {
16
+ return true;
17
+ }
18
+ },
19
+ {
20
+ id: "2",
21
+ menu_item: "View History",
22
+ handler()
23
+ {
24
+ console.log("View History");
25
+ },
26
+ isActive()
27
+ {
28
+ return true;
29
+ }
30
+ },
31
+ {
32
+ id: "3",
33
+ menu_item: "Edit",
34
+ handler()
35
+ { },
36
+ isActive()
37
+ {
38
+ return true;
39
+ }
40
+ },
41
+ {
42
+ id: "4",
43
+ menu_item: "Delete",
44
+ handler()
45
+ { },
46
+ isActive()
47
+ {
48
+ return true;
49
+ }
50
+ }
51
+ ]
52
+ }
53
+ ]
54
+ export function App()
55
+ {
56
+ return (
57
+ <>
58
+ <NSALoginPage
59
+ title="Namirasoft Payment"
60
+ logo="Logo"
61
+ background="https://static.namirasoft.com/image/namirasoft/account/background/base.svg" />
62
+ <NSALayoutAction
63
+ scope='Namirasoft Account Console'
64
+ logo='https://static.namirasoft.com/image/namirasoft/account/logo/base.png'
65
+ background="url('https://static.namirasoft.com/image/namirasoft/account/background/base.svg')"
66
+ title='test'
67
+ description='You’re not a Premium user yet. It takes us 10 to 30 days to make you Premium.'
68
+ notifications={[]}
69
+ actions={actions}
70
+ >
71
+ <p>test</p>
72
+ </NSALayoutAction>
73
+ </>
74
+ );
75
+ };
File without changes
@@ -0,0 +1,38 @@
1
+ // import Styles from './NSALayoutAction.module.css';
2
+ import { NSLayoutAction } from 'namirasoft-site-react';
3
+ import { INSActionMenuProps, INSNotificationProps } from 'namirasoft-site-react';
4
+
5
+
6
+ export interface NSALayoutActionProps
7
+ {
8
+ scope: string;
9
+ logo: string;
10
+ background:string;
11
+ title: string;
12
+ description?: string;
13
+ children: JSX.Element | JSX.Element[];
14
+ notifications: INSNotificationProps[];
15
+ actions: INSActionMenuProps[];
16
+ redirectToView?: () => void;
17
+ edit?: () => void;
18
+ delete?: () => void;
19
+ }
20
+
21
+ export function NSALayoutAction(props: NSALayoutActionProps)
22
+ {
23
+ return (
24
+ <NSLayoutAction
25
+ scope={props.scope}
26
+ logo={props.logo}
27
+ background={props.background}
28
+ title={props.title}
29
+ description={props.description}
30
+ actions={props.actions}
31
+ notifications={props.notifications}
32
+ >
33
+ <div className="container-fluid">
34
+ {props.children}
35
+ </div>
36
+ </NSLayoutAction>
37
+ );
38
+ }
package/src/index.css ADDED
File without changes
package/src/index.tsx ADDED
@@ -0,0 +1,8 @@
1
+ import ReactDOM from 'react-dom/client';
2
+ import './index.css';
3
+ import { App } from './App';
4
+
5
+ const root = ReactDOM.createRoot(
6
+ document.getElementById('root') as HTMLElement
7
+ );
8
+ root.render(<App />);
@@ -2,4 +2,6 @@ export * from "./Info";
2
2
  export * from "./INSARouterMaker";
3
3
  export * from "./INSARouterProps";
4
4
  export * from "./INSARouterState";
5
- export * from "./NSARouterMaker";
5
+ export * from "./NSARouterMaker";
6
+ export * from "./pages/NSALoginPage";
7
+ export * from "./components/NSALayoutAction";
@@ -0,0 +1,20 @@
1
+ .ns_login_container {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: center;
5
+ justify-content: center;
6
+ }
7
+
8
+ .ns_logo {
9
+ text-align: center;
10
+ }
11
+
12
+ .ns_title {
13
+ font-size: 32px;
14
+ font-weight: 700;
15
+ text-align: center;
16
+ }
17
+
18
+ .ns_button {
19
+ text-align: center;
20
+ }
@@ -0,0 +1,38 @@
1
+ import Styles from './NSALoginPage.module.css';
2
+
3
+ import { NSSpace, NSSpaceSizeType, NSLinkBlue } from 'namirasoft-site-react';
4
+
5
+ export interface INSALoginPageProps
6
+ {
7
+ title: string;
8
+ logo: string;
9
+ background: string;
10
+ }
11
+
12
+ export function NSALoginPage(props: INSALoginPageProps)
13
+ {
14
+ return (
15
+ <div
16
+ style={{
17
+ backgroundImage: `url(${props.background})`,
18
+ width: '100%',
19
+ backgroundSize: 'cover',
20
+ backgroundAttachment: 'fixed'
21
+ }}
22
+ >
23
+ <div className={Styles.ns_login_container} style={{ minHeight: '100vh' }}>
24
+ <div className={Styles.ns_logo}>
25
+ <img width={256} height={256} src={props.logo} alt={`${props.title} Logo`} />
26
+ </div>
27
+ <NSSpace size={NSSpaceSizeType.SMALL} />
28
+ <div>
29
+ <h1 className={Styles.ns_title}>{props.title}</h1>
30
+ </div>
31
+ <NSSpace size={NSSpaceSizeType.SMALL} />
32
+ <div className={Styles.ns_button}>
33
+ <NSLinkBlue title="Login" href={'https://account.namirasoft.com/login'} />
34
+ </div>
35
+ </div>
36
+ </div>
37
+ );
38
+ }
package/tsconfig.json CHANGED
@@ -2,12 +2,13 @@
2
2
  "compilerOptions": {
3
3
  "target": "ES6",
4
4
  "jsx": "react-jsx",
5
- "module": "CommonJS",
5
+ "moduleResolution": "node",
6
6
  "rootDir": "./src",
7
7
  "outDir": "./dist",
8
8
  "lib": [
9
- "es6",
10
- "dom"
9
+ "dom",
10
+ "dom.iterable",
11
+ "esnext"
11
12
  ],
12
13
  "allowJs": false,
13
14
  "checkJs": false,
@@ -27,11 +28,11 @@
27
28
  "forceConsistentCasingInFileNames": true,
28
29
  "noFallthroughCasesInSwitch": true,
29
30
  "isolatedModules": false,
30
- "removeComments": true
31
+ "removeComments": true,
31
32
  },
32
33
  "include": [
33
34
  "src",
34
- "build/types/**/*.ts"
35
+ "build/types/**/*.ts",
35
36
  ],
36
37
  "exclude": [
37
38
  "node_modules",