namirasoft-site-react 1.2.0
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/.gitlab-ci.yml +14 -0
- package/config-overrides.js +66 -0
- package/package.json +45 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/src/App.css +2 -0
- package/src/App.tsx +71 -0
- package/src/assets/images/arrow.svg +3 -0
- package/src/assets/images/background.svg +9 -0
- package/src/assets/images/danger.svg +3 -0
- package/src/assets/images/exit.svg +3 -0
- package/src/assets/images/icon-input-date.svg +9 -0
- package/src/assets/images/icon-input-duration.svg +9 -0
- package/src/assets/images/icon-input-email.svg +9 -0
- package/src/assets/images/icon-input-float.svg +9 -0
- package/src/assets/images/icon-input-id.svg +9 -0
- package/src/assets/images/icon-input-integer.svg +9 -0
- package/src/assets/images/icon-input-phone.svg +9 -0
- package/src/assets/images/icon-input-price.svg +9 -0
- package/src/assets/images/icon-input-search.svg +4 -0
- package/src/assets/images/icon-input-string.svg +9 -0
- package/src/assets/images/icon-input-text.svg +9 -0
- package/src/assets/images/icon-input-time.svg +9 -0
- package/src/assets/images/logo.svg +9 -0
- package/src/assets/images/menu.svg +3 -0
- package/src/assets/images/namira.svg +9 -0
- package/src/assets/images/rectangle.svg +3 -0
- package/src/components/NSButtonGreen.module.css +12 -0
- package/src/components/NSButtonGreen.tsx +18 -0
- package/src/components/NSButtonRed.module.css +12 -0
- package/src/components/NSButtonRed.tsx +18 -0
- package/src/components/NSFooter.module.css +32 -0
- package/src/components/NSFooter.tsx +126 -0
- package/src/components/NSHeader.module.css +127 -0
- package/src/components/NSHeader.tsx +134 -0
- package/src/components/NSInputDate.module.css +32 -0
- package/src/components/NSInputDate.tsx +54 -0
- package/src/components/NSInputDuration.module.css +26 -0
- package/src/components/NSInputDuration.tsx +63 -0
- package/src/components/NSInputEmail.module.css +38 -0
- package/src/components/NSInputEmail.tsx +90 -0
- package/src/components/NSInputFloat.module.css +23 -0
- package/src/components/NSInputFloat.tsx +63 -0
- package/src/components/NSInputIP.module.css +23 -0
- package/src/components/NSInputIP.tsx +63 -0
- package/src/components/NSInputInteger.module.css +26 -0
- package/src/components/NSInputInteger.tsx +63 -0
- package/src/components/NSInputPhone.module.css +30 -0
- package/src/components/NSInputPhone.tsx +63 -0
- package/src/components/NSInputPrice.module.css +24 -0
- package/src/components/NSInputPrice.tsx +62 -0
- package/src/components/NSInputSearch.module.css +24 -0
- package/src/components/NSInputSearch.tsx +76 -0
- package/src/components/NSInputString.module.css +24 -0
- package/src/components/NSInputString.tsx +62 -0
- package/src/components/NSInputText.module.css +25 -0
- package/src/components/NSInputText.tsx +63 -0
- package/src/components/NSInputTime.module.css +24 -0
- package/src/components/NSInputTime.tsx +63 -0
- package/src/components/NSSelectBox.module.css +25 -0
- package/src/components/NSSelectBox.tsx +60 -0
- package/src/index.css +7 -0
- package/src/index.tsx +8 -0
- package/src/react-app-env.d.ts +1 -0
- package/tsconfig.json +38 -0
package/.gitlab-ci.yml
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
const getCacheIdentifier = require('react-dev-utils/getCacheIdentifier');
|
|
2
|
+
|
|
3
|
+
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
|
|
4
|
+
|
|
5
|
+
module.exports = function override(config, webpackEnv)
|
|
6
|
+
{
|
|
7
|
+
console.log('overriding webpack config...');
|
|
8
|
+
|
|
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
|
+
|
|
52
|
+
let resolve = config.resolve;
|
|
53
|
+
resolve.fallback = {
|
|
54
|
+
"fs": false,
|
|
55
|
+
"tls": false,
|
|
56
|
+
"net": false,
|
|
57
|
+
"https": false,
|
|
58
|
+
// "http": require.resolve("stream-http"),
|
|
59
|
+
// "zlib": require.resolve("browserify-zlib"),
|
|
60
|
+
"path": require.resolve("path-browserify"),
|
|
61
|
+
// "stream": require.resolve("stream-browserify"),
|
|
62
|
+
// "util": require.resolve("util/"),
|
|
63
|
+
// "crypto": require.resolve("crypto-browserify")
|
|
64
|
+
}
|
|
65
|
+
return config;
|
|
66
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "namirasoft-site-react",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"dependencies": {
|
|
5
|
+
"@types/node": "^20.10.3",
|
|
6
|
+
"@types/react": "^18.2.42",
|
|
7
|
+
"@types/react-dom": "^18.2.17",
|
|
8
|
+
"antd": "^5.12.1",
|
|
9
|
+
"bootstrap": "^5.3.2",
|
|
10
|
+
"namirasoft-api-link": "^1.2.2",
|
|
11
|
+
"namirasoft-core": "^1.2.4",
|
|
12
|
+
"path-browserify": "^1.0.1",
|
|
13
|
+
"react": "^18.2.0",
|
|
14
|
+
"react-app-rewired": "^2.2.1",
|
|
15
|
+
"react-bootstrap": "^2.9.1",
|
|
16
|
+
"react-dom": "^18.2.0",
|
|
17
|
+
"react-phone-input-2": "^2.15.1",
|
|
18
|
+
"react-phone-number-input": "^3.3.7",
|
|
19
|
+
"react-scripts": "5.0.1"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"start": "react-app-rewired start",
|
|
23
|
+
"build": "react-app-rewired build",
|
|
24
|
+
"test": "react-app-rewired test",
|
|
25
|
+
"eject": "react-app-rewired eject"
|
|
26
|
+
},
|
|
27
|
+
"eslintConfig": {
|
|
28
|
+
"extends": [
|
|
29
|
+
"react-app",
|
|
30
|
+
"react-app/jest"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"browserslist": {
|
|
34
|
+
"production": [
|
|
35
|
+
">0.2%",
|
|
36
|
+
"not dead",
|
|
37
|
+
"not op_mini all"
|
|
38
|
+
],
|
|
39
|
+
"development": [
|
|
40
|
+
"last 1 chrome version",
|
|
41
|
+
"last 1 firefox version",
|
|
42
|
+
"last 1 safari version"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,43 @@
|
|
|
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 rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
11
|
+
<!--
|
|
12
|
+
manifest.json provides metadata used when your web app is installed on a
|
|
13
|
+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
14
|
+
-->
|
|
15
|
+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
16
|
+
<!--
|
|
17
|
+
Notice the use of %PUBLIC_URL% in the tags above.
|
|
18
|
+
It will be replaced with the URL of the `public` folder during the build.
|
|
19
|
+
Only files inside the `public` folder can be referenced from the HTML.
|
|
20
|
+
|
|
21
|
+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
22
|
+
work correctly both with client-side routing and a non-root public URL.
|
|
23
|
+
Learn how to configure a non-root public URL by running `npm run build`.
|
|
24
|
+
-->
|
|
25
|
+
<title>React App</title>
|
|
26
|
+
</head>
|
|
27
|
+
|
|
28
|
+
<body>
|
|
29
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
30
|
+
<div id="root"></div>
|
|
31
|
+
|
|
32
|
+
<!-- <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
|
|
33
|
+
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
|
|
34
|
+
crossorigin="anonymous"></script>
|
|
35
|
+
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js"
|
|
36
|
+
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
|
|
37
|
+
crossorigin="anonymous"></script>
|
|
38
|
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js"
|
|
39
|
+
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
|
|
40
|
+
crossorigin="anonymous"></script> -->
|
|
41
|
+
</body>
|
|
42
|
+
|
|
43
|
+
</html>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"short_name": "React App",
|
|
3
|
+
"name": "Create React App Sample",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "favicon.ico",
|
|
7
|
+
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
+
"type": "image/x-icon"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "logo192.png",
|
|
12
|
+
"type": "image/png",
|
|
13
|
+
"sizes": "192x192"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"src": "logo512.png",
|
|
17
|
+
"type": "image/png",
|
|
18
|
+
"sizes": "512x512"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"start_url": ".",
|
|
22
|
+
"display": "standalone",
|
|
23
|
+
"theme_color": "#000000",
|
|
24
|
+
"background_color": "#ffffff"
|
|
25
|
+
}
|
package/src/App.css
ADDED
package/src/App.tsx
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import './App.css';
|
|
2
|
+
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
3
|
+
import NSHeader from './components/NSHeader';
|
|
4
|
+
import NSFooter from './components/NSFooter';
|
|
5
|
+
import NSInputText from './components/NSInputText';
|
|
6
|
+
import NSInputInteger from './components/NSInputInteger';
|
|
7
|
+
import NSInputFloat from './components/NSInputFloat';
|
|
8
|
+
import NSInputPrice from './components/NSInputPrice';
|
|
9
|
+
import NSInputDate from './components/NSInputDate';
|
|
10
|
+
import NSInputTime from './components/NSInputTime';
|
|
11
|
+
import NSInputDuration from './components/NSInputDuration';
|
|
12
|
+
import NSInputString from './components/NSInputString';
|
|
13
|
+
import NSInputIP from './components/NSInputIP';
|
|
14
|
+
import NSInputEmail from './components/NSInputEmail';
|
|
15
|
+
import NSInputSearch from './components/NSInputSearch';
|
|
16
|
+
import NSInputPhone from './components/NSInputPhone';
|
|
17
|
+
import NSButtonGreen from './components/NSButtonGreen';
|
|
18
|
+
import NSButtonRed from './components/NSButtonRed';
|
|
19
|
+
import NSSelectBox from './components/NSSelectBox';
|
|
20
|
+
import type { SelectProps } from 'antd';
|
|
21
|
+
|
|
22
|
+
function App()
|
|
23
|
+
{
|
|
24
|
+
const options: SelectProps['options'] = [
|
|
25
|
+
{
|
|
26
|
+
label: 'Test1',
|
|
27
|
+
value: 'test1',
|
|
28
|
+
desc: 'Test1',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: 'Test2',
|
|
32
|
+
value: 'test2',
|
|
33
|
+
desc: 'Test2',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: 'Test3',
|
|
37
|
+
value: 'test3',
|
|
38
|
+
desc: 'Test3',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
label: 'Test4',
|
|
42
|
+
value: 'test4',
|
|
43
|
+
desc: 'Test4',
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
return (
|
|
47
|
+
<div className="App">
|
|
48
|
+
<NSHeader scope='test' name='test' />
|
|
49
|
+
<div className='my-4'>
|
|
50
|
+
<NSInputText title='Text' />
|
|
51
|
+
<NSInputInteger title='Integer' />
|
|
52
|
+
<NSInputFloat title='Floating Point' />
|
|
53
|
+
<NSInputPrice title='Price' />
|
|
54
|
+
<NSInputDate title='Date' />
|
|
55
|
+
<NSInputTime title='Time' />
|
|
56
|
+
<NSInputDuration title='Duration' />
|
|
57
|
+
<NSInputString title='String' />
|
|
58
|
+
<NSInputIP title='IP' />
|
|
59
|
+
<NSInputEmail title='Email' />
|
|
60
|
+
<NSInputSearch title='Search' />
|
|
61
|
+
<NSInputPhone title='Phone' />
|
|
62
|
+
<NSSelectBox title="t" options={options} />
|
|
63
|
+
<NSButtonGreen title='Save' onClick={() => { }} />
|
|
64
|
+
<NSButtonRed title='Delete' onClick={() => { }} />
|
|
65
|
+
</div>
|
|
66
|
+
<NSFooter scope='test' name='test' />
|
|
67
|
+
</div>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export default App;
|