@daracl/dialog 0.0.1
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/LICENSE +21 -0
- package/README.md +78 -0
- package/dist/dara.dialog.css +1 -0
- package/dist/dara.dialog.css.map +1 -0
- package/dist/dara.dialog.js +5787 -0
- package/dist/dara.dialog.js.map +1 -0
- package/dist/dara.dialog.min.css +1 -0
- package/dist/dara.dialog.min.css.map +1 -0
- package/dist/dara.dialog.min.js +7 -0
- package/dist/dara.dialog.min.js.LICENSE.txt +5 -0
- package/dist/dara.dialog.min.js.map +1 -0
- package/dist/index.cjs +438 -0
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +138 -0
- package/dist/index.html +101 -0
- package/dist/index.js +418 -0
- package/dist/index.js.map +7 -0
- package/package.json +125 -0
- package/src/index.html +101 -0
- package/src/index.js +540 -0
- package/style/_icon.scss +24 -0
- package/style/dara.dialog copy.scss1 +307 -0
- package/style/dara.dialog.scss +337 -0
- package/style/svg/cancel.svg +1 -0
- package/style/svg/danger.svg +1 -0
- package/style/svg/help.svg +1 -0
- package/style/svg/info.svg +1 -0
- package/style/svg/success.svg +1 -0
- package/style/svg/warning.svg +1 -0
package/package.json
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@daracl/dialog",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"description": "Dara dialog Message",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "darainfo",
|
|
8
|
+
"email": "darainfosys@gmail.com",
|
|
9
|
+
"url": "https://www.moaview.com"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"daracl-dialog",
|
|
14
|
+
"@daracl/dialog",
|
|
15
|
+
"dialog",
|
|
16
|
+
"darainfo",
|
|
17
|
+
"message",
|
|
18
|
+
"confirm",
|
|
19
|
+
"javascript"
|
|
20
|
+
],
|
|
21
|
+
"main": "src/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"homepage": "https://github.com/darainfo/dialog",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/darainfo/dialog/issues",
|
|
26
|
+
"email": "darainfosys@gmail.com"
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/darainfo/dialog.git"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"src",
|
|
35
|
+
"style"
|
|
36
|
+
],
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
39
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
|
|
40
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
|
41
|
+
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
|
42
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
43
|
+
"esbuild": "^0.18.11",
|
|
44
|
+
"typescript": "^5.1.6"
|
|
45
|
+
},
|
|
46
|
+
"prettier": {
|
|
47
|
+
"printWidth": 256,
|
|
48
|
+
"useTabs": false,
|
|
49
|
+
"tabWidth": 2,
|
|
50
|
+
"bracketSpacing": true,
|
|
51
|
+
"semi": true,
|
|
52
|
+
"singleQuote": false
|
|
53
|
+
},
|
|
54
|
+
"editor.formatOnSave": true,
|
|
55
|
+
"[javascript]": {
|
|
56
|
+
"editor.formatOnSave": false
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@babel/cli": "^7.22.5",
|
|
60
|
+
"@babel/core": "^7.25.7",
|
|
61
|
+
"@babel/node": "^7.20.7",
|
|
62
|
+
"@babel/parser": "^7.21.4",
|
|
63
|
+
"@babel/plugin-transform-arrow-functions": "^7.25.7",
|
|
64
|
+
"@babel/plugin-transform-block-scoping": "^7.25.7",
|
|
65
|
+
"@babel/plugin-transform-strict-mode": "^7.25.7",
|
|
66
|
+
"@babel/preset-env": "^7.25.7",
|
|
67
|
+
"@types/jest": "^29.5.1",
|
|
68
|
+
"@types/node": "^20.1.0",
|
|
69
|
+
"@typescript-eslint/eslint-plugin": "^5.59.5",
|
|
70
|
+
"@typescript-eslint/parser": "^5.59.5",
|
|
71
|
+
"babel-loader": "^8.4.1",
|
|
72
|
+
"babel-plugin-dynamic-import-webpack": "^1.1.0",
|
|
73
|
+
"babel-plugin-lodash": "^3.3.4",
|
|
74
|
+
"copy-webpack-plugin": "^11.0.0",
|
|
75
|
+
"core-js": "^3.38.1",
|
|
76
|
+
"css-loader": "^6.8.1",
|
|
77
|
+
"css-minimizer-webpack-plugin": "^5.0.1",
|
|
78
|
+
"eslint": "^8.40.0",
|
|
79
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
80
|
+
"eslint-config-prettier": "^8.8.0",
|
|
81
|
+
"eslint-plugin-import": "^2.27.5",
|
|
82
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
83
|
+
"eslint-plugin-react": "^7.32.2",
|
|
84
|
+
"html-webpack-plugin": "^5.5.3",
|
|
85
|
+
"jest": "^29.0.0",
|
|
86
|
+
"mini-css-extract-plugin": "^2.7.6",
|
|
87
|
+
"node-sass": "^9.0.0",
|
|
88
|
+
"prettier": "^2.8.8",
|
|
89
|
+
"regenerator-runtime": "^0.14.1",
|
|
90
|
+
"sass-loader": "^13.3.2",
|
|
91
|
+
"style-loader": "^3.3.3",
|
|
92
|
+
"ts-node": "^10.9.1",
|
|
93
|
+
"webpack": "^5.73.0",
|
|
94
|
+
"webpack-bundle-analyzer": "^4.9.0",
|
|
95
|
+
"webpack-cli": "^4.10.0",
|
|
96
|
+
"webpack-dev-server": "^4.9.2",
|
|
97
|
+
"webpack-node-externals": "^3.0.0"
|
|
98
|
+
},
|
|
99
|
+
"scripts": {
|
|
100
|
+
"prepack": "yarn build",
|
|
101
|
+
"build": "yarn build:prod && yarn scss-compile && yarn build:tsc && yarn build:js",
|
|
102
|
+
"build:tsc": "npx tsc --emitDeclarationOnly",
|
|
103
|
+
"build:js": "node build.js",
|
|
104
|
+
"build:dev": "webpack --config webpack.dev.js",
|
|
105
|
+
"build:prod": "webpack --config webpack.prod.js && webpack --env=mode=deploy --config webpack.dev.js",
|
|
106
|
+
"dts:gen": "npx -p typescript tsc src/index.js --declaration --allowJs --emitDeclarationOnly --outDir dist",
|
|
107
|
+
"test": "jest",
|
|
108
|
+
"start": "webpack-dev-server --open --config ./webpack.dev.server.js",
|
|
109
|
+
"scss-compile": "node-sass -r \"style\" -o \"dist\" --output-style compressed"
|
|
110
|
+
},
|
|
111
|
+
"browserslist": {
|
|
112
|
+
"production": [
|
|
113
|
+
"ie 11",
|
|
114
|
+
">0.2%",
|
|
115
|
+
"not dead",
|
|
116
|
+
"not op_mini all"
|
|
117
|
+
],
|
|
118
|
+
"development": [
|
|
119
|
+
"ie 11",
|
|
120
|
+
"last 1 chrome version",
|
|
121
|
+
"last 1 firefox version",
|
|
122
|
+
"last 1 safari version"
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
}
|
package/src/index.html
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<meta http-equiv="X-UA-compatible" content="IE=edge">
|
|
7
|
+
<title>Dialog Notification - Darainfo</title>
|
|
8
|
+
<link rel="stylesheet" href="../dist/dara.dialog.min.css">
|
|
9
|
+
|
|
10
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
11
|
+
|
|
12
|
+
</head>
|
|
13
|
+
|
|
14
|
+
<body onload="dialogView()">
|
|
15
|
+
|
|
16
|
+
<div style="padding-top:80px;">
|
|
17
|
+
<div class="dialog-button">
|
|
18
|
+
<button type="button" onclick="dialogEvent('show')">Show</button>
|
|
19
|
+
<button type="button" onclick="dialogEvent('max')">Max</button>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div id="content"></div>
|
|
24
|
+
</body>
|
|
25
|
+
|
|
26
|
+
</html>
|
|
27
|
+
|
|
28
|
+
<style>
|
|
29
|
+
.dialog-button button {
|
|
30
|
+
border: none;
|
|
31
|
+
outline: none;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
margin: 0 5px;
|
|
34
|
+
font-size: 1.2rem;
|
|
35
|
+
padding: 10px 20px;
|
|
36
|
+
border-radius: 4px;
|
|
37
|
+
}
|
|
38
|
+
</style>
|
|
39
|
+
|
|
40
|
+
<script>
|
|
41
|
+
var htmlStr = [];
|
|
42
|
+
for (var i = 0; i < 1000; i++) {
|
|
43
|
+
htmlStr.push(' <h2>dialog message</h2>');
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//document.getElementById("content").innerHTML = htmlStr.join('');
|
|
47
|
+
var dialogObj;
|
|
48
|
+
function dialogView() {
|
|
49
|
+
dialogObj = new Dialog({
|
|
50
|
+
title: 'dialog', width: 500, height: 'auto', icon: "info", isModal: true, resizable: true, autoOpen: false, template: '<a href="https://varsql.com" target="_blank">링크 이동</a>', buttons: [
|
|
51
|
+
{
|
|
52
|
+
label: 'ok', styleClass: "info", callback: function (e) {
|
|
53
|
+
alert('ok')
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
, {
|
|
57
|
+
label: 'Cancel', callback: function (e) {
|
|
58
|
+
dialogObj.hide();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
], afterOpen: function () {
|
|
62
|
+
console.log('after open')
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return;
|
|
67
|
+
|
|
68
|
+
new Dialog({
|
|
69
|
+
title: 'dialog2222', width: 200, height: '150px', isModal1: true, template: 'https://www.naver.com', buttons: [
|
|
70
|
+
{
|
|
71
|
+
label: 'close', styleClass: "info", callback: function (e) {
|
|
72
|
+
alert('11')
|
|
73
|
+
console.log(e)
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
, {
|
|
77
|
+
label: 'Cancel', callback: function (e) {
|
|
78
|
+
alert('22')
|
|
79
|
+
console.log(e)
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function dialogEvent(mode) {
|
|
87
|
+
switch (mode) {
|
|
88
|
+
case 'show':
|
|
89
|
+
dialogObj.show()
|
|
90
|
+
break;
|
|
91
|
+
case 'max':
|
|
92
|
+
dialogObj.maximise()
|
|
93
|
+
break;
|
|
94
|
+
|
|
95
|
+
default:
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
</script>
|