@appius-fr/apx 2.4.0 → 2.5.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/APX.mjs +2 -0
- package/README.md +35 -0
- package/dist/APX.dev.mjs +538 -3
- package/dist/APX.mjs +1 -1
- package/dist/APX.prod.mjs +1 -1
- package/dist/APX.standalone.js +2543 -0
- package/dist/APX.standalone.js.map +1 -0
- package/modules/toast/README.md +127 -0
- package/modules/toast/css/toast.css +60 -0
- package/modules/toast/toast.mjs +374 -0
- package/package.json +3 -2
|
@@ -0,0 +1,2543 @@
|
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ var __webpack_modules__ = ({
|
|
3
|
+
|
|
4
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./modules/dialog/css/dialog.css":
|
|
5
|
+
/*!*****************************************************************************!*\
|
|
6
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./modules/dialog/css/dialog.css ***!
|
|
7
|
+
\*****************************************************************************/
|
|
8
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
9
|
+
|
|
10
|
+
"use strict";
|
|
11
|
+
__webpack_require__.r(__webpack_exports__);
|
|
12
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
13
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
14
|
+
/* harmony export */ });
|
|
15
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
|
|
16
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
17
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
18
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
19
|
+
// Imports
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
23
|
+
// Module
|
|
24
|
+
___CSS_LOADER_EXPORT___.push([module.id, `/* Dialog styling */
|
|
25
|
+
.APX-dialog {
|
|
26
|
+
display: none;
|
|
27
|
+
position: fixed;
|
|
28
|
+
z-index: 1002;
|
|
29
|
+
left: 0;
|
|
30
|
+
top: 0;
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
overflow: auto;
|
|
34
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
35
|
+
/* Dimmed background for focus on dialog */
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.APX-dialog-content {
|
|
39
|
+
background-color: #fefefe;
|
|
40
|
+
padding: 40px;
|
|
41
|
+
border: none;
|
|
42
|
+
width: auto;
|
|
43
|
+
min-width: 300px;
|
|
44
|
+
max-width: 80%;
|
|
45
|
+
margin: auto;
|
|
46
|
+
border-radius: 8px;
|
|
47
|
+
box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.1);
|
|
48
|
+
font-family: 'Helvetica Neue', Arial, sans-serif;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
h2.APX-dialog-title{
|
|
52
|
+
margin-top:0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.APX-close-dialog {
|
|
56
|
+
color: #aaa;
|
|
57
|
+
float: right;
|
|
58
|
+
font-size: 24px;
|
|
59
|
+
margin-top: -10px;
|
|
60
|
+
/* Adjust positioning */
|
|
61
|
+
margin-right: -10px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.APX-close-dialog:hover,
|
|
65
|
+
.APX-close-dialog:focus {
|
|
66
|
+
color: #333;
|
|
67
|
+
/* Darker color on hover/focus */
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Input fields styling */
|
|
72
|
+
.APX-dialog-content input[type="text"],
|
|
73
|
+
.APX-dialog-content input[type="number"],
|
|
74
|
+
.APX-dialog-content input[type="date"],
|
|
75
|
+
.APX-dialog-content input[type="datetime-local"] {
|
|
76
|
+
width: 100%;
|
|
77
|
+
padding: 10px;
|
|
78
|
+
margin-bottom: 20px;
|
|
79
|
+
border: 1px solid #ccc;
|
|
80
|
+
border-radius: 4px;
|
|
81
|
+
font-family: 'Helvetica Neue', Arial, sans-serif;
|
|
82
|
+
font-size: 16px;
|
|
83
|
+
box-sizing: border-box;
|
|
84
|
+
transition: border-color 0.3s;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.APX-dialog-content input[type="text"]:focus,
|
|
88
|
+
.APX-dialog-content input[type="number"]:focus,
|
|
89
|
+
.APX-dialog-content input[type="date"]:focus,
|
|
90
|
+
.APX-dialog-content input[type="datetime-local"]:focus {
|
|
91
|
+
border-color: #2C3E50;
|
|
92
|
+
/* Deep Blue Color */
|
|
93
|
+
outline: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Button in the dialog */
|
|
97
|
+
.APX-dialog-button-container button {
|
|
98
|
+
position: relative;
|
|
99
|
+
background-color: #2C3E50;
|
|
100
|
+
color: #ECF0F1;
|
|
101
|
+
border: none;
|
|
102
|
+
padding: 10px 20px;
|
|
103
|
+
border-radius: 5px;
|
|
104
|
+
font-size: 16px;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
transition: all 0.3s ease;
|
|
107
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.APX-dialog-button-container button:hover {
|
|
111
|
+
background-color: #34495E;
|
|
112
|
+
transform: translateY(-1px);
|
|
113
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.APX-dialog-button-container {
|
|
117
|
+
display: flex;
|
|
118
|
+
gap: 10px;
|
|
119
|
+
margin-top:1em;
|
|
120
|
+
/* spacing between buttons */
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* Loading indicator */
|
|
124
|
+
.APX-dialog-loading-indicator {
|
|
125
|
+
display: flex;
|
|
126
|
+
justify-content: center;
|
|
127
|
+
align-items: center;
|
|
128
|
+
height: 100px;
|
|
129
|
+
width: 100%;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.APX-dialog-loading-indicator::before {
|
|
133
|
+
content: '';
|
|
134
|
+
width: 40px;
|
|
135
|
+
height: 40px;
|
|
136
|
+
border: 4px solid #f3f3f3;
|
|
137
|
+
border-top: 4px solid #2C3E50;
|
|
138
|
+
border-radius: 50%;
|
|
139
|
+
animation: APX-dialog-spin 1s linear infinite;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@keyframes APX-dialog-spin {
|
|
143
|
+
0% { transform: rotate(0deg); }
|
|
144
|
+
100% { transform: rotate(360deg); }
|
|
145
|
+
}
|
|
146
|
+
.APX-dialog-button-disabled {
|
|
147
|
+
opacity: 0.5;
|
|
148
|
+
cursor: not-allowed !important;
|
|
149
|
+
background-color: #95a5a6 !important; /* Grayed out color */
|
|
150
|
+
box-shadow: none !important;
|
|
151
|
+
transition: all 0.2s ease;
|
|
152
|
+
transform: none !important;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.APX-dialog-button-disabled:hover {
|
|
156
|
+
background-color: #95a5a6 !important; /* Keep gray on hover */
|
|
157
|
+
transform: none !important;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Add a subtle strikethrough effect */
|
|
161
|
+
.APX-dialog-button-disabled::after {
|
|
162
|
+
content: '';
|
|
163
|
+
position: absolute;
|
|
164
|
+
top: 50%;
|
|
165
|
+
left: 0;
|
|
166
|
+
width: 100%;
|
|
167
|
+
height: 1px;
|
|
168
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
169
|
+
transform: rotate(-5deg);
|
|
170
|
+
}`, "",{"version":3,"sources":["webpack://./modules/dialog/css/dialog.css"],"names":[],"mappings":"AAAA,mBAAmB;AACnB;IACI,aAAa;IACb,eAAe;IACf,aAAa;IACb,OAAO;IACP,MAAM;IACN,WAAW;IACX,YAAY;IACZ,cAAc;IACd,oCAAoC;IACpC,0CAA0C;AAC9C;;AAEA;IACI,yBAAyB;IACzB,aAAa;IACb,YAAY;IACZ,WAAW;IACX,gBAAgB;IAChB,cAAc;IACd,YAAY;IACZ,kBAAkB;IAClB,2CAA2C;IAC3C,gDAAgD;AACpD;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,WAAW;IACX,YAAY;IACZ,eAAe;IACf,iBAAiB;IACjB,uBAAuB;IACvB,mBAAmB;AACvB;;AAEA;;IAEI,WAAW;IACX,gCAAgC;IAChC,eAAe;AACnB;;AAEA,yBAAyB;AACzB;;;;IAII,WAAW;IACX,aAAa;IACb,mBAAmB;IACnB,sBAAsB;IACtB,kBAAkB;IAClB,gDAAgD;IAChD,eAAe;IACf,sBAAsB;IACtB,6BAA6B;AACjC;;AAEA;;;;IAII,qBAAqB;IACrB,oBAAoB;IACpB,aAAa;AACjB;;AAEA,yBAAyB;AACzB;IACI,kBAAkB;IAClB,yBAAyB;IACzB,cAAc;IACd,YAAY;IACZ,kBAAkB;IAClB,kBAAkB;IAClB,eAAe;IACf,eAAe;IACf,yBAAyB;IACzB,wCAAwC;AAC5C;;AAEA;IACI,yBAAyB;IACzB,2BAA2B;IAC3B,yCAAyC;AAC7C;;AAEA;IACI,aAAa;IACb,SAAS;IACT,cAAc;IACd,4BAA4B;AAChC;;AAEA,sBAAsB;AACtB;IACI,aAAa;IACb,uBAAuB;IACvB,mBAAmB;IACnB,aAAa;IACb,WAAW;AACf;;AAEA;IACI,WAAW;IACX,WAAW;IACX,YAAY;IACZ,yBAAyB;IACzB,6BAA6B;IAC7B,kBAAkB;IAClB,6CAA6C;AACjD;;AAEA;IACI,KAAK,uBAAuB,EAAE;IAC9B,OAAO,yBAAyB,EAAE;AACtC;AACA;IACI,YAAY;IACZ,8BAA8B;IAC9B,oCAAoC,EAAE,qBAAqB;IAC3D,2BAA2B;IAC3B,yBAAyB;IACzB,0BAA0B;AAC9B;;AAEA;IACI,oCAAoC,EAAE,uBAAuB;IAC7D,0BAA0B;AAC9B;;AAEA,sCAAsC;AACtC;IACI,WAAW;IACX,kBAAkB;IAClB,QAAQ;IACR,OAAO;IACP,WAAW;IACX,WAAW;IACX,oCAAoC;IACpC,wBAAwB;AAC5B","sourcesContent":["/* Dialog styling */\r\n.APX-dialog {\r\n display: none;\r\n position: fixed;\r\n z-index: 1002;\r\n left: 0;\r\n top: 0;\r\n width: 100%;\r\n height: 100%;\r\n overflow: auto;\r\n background-color: rgba(0, 0, 0, 0.4);\r\n /* Dimmed background for focus on dialog */\r\n}\r\n\r\n.APX-dialog-content {\r\n background-color: #fefefe;\r\n padding: 40px;\r\n border: none;\r\n width: auto;\r\n min-width: 300px;\r\n max-width: 80%;\r\n margin: auto;\r\n border-radius: 8px;\r\n box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.1);\r\n font-family: 'Helvetica Neue', Arial, sans-serif;\r\n}\r\n\r\nh2.APX-dialog-title{\r\n margin-top:0;\r\n}\r\n\r\n.APX-close-dialog {\r\n color: #aaa;\r\n float: right;\r\n font-size: 24px;\r\n margin-top: -10px;\r\n /* Adjust positioning */\r\n margin-right: -10px;\r\n}\r\n\r\n.APX-close-dialog:hover,\r\n.APX-close-dialog:focus {\r\n color: #333;\r\n /* Darker color on hover/focus */\r\n cursor: pointer;\r\n}\r\n\r\n/* Input fields styling */\r\n.APX-dialog-content input[type=\"text\"],\r\n.APX-dialog-content input[type=\"number\"],\r\n.APX-dialog-content input[type=\"date\"],\r\n.APX-dialog-content input[type=\"datetime-local\"] {\r\n width: 100%;\r\n padding: 10px;\r\n margin-bottom: 20px;\r\n border: 1px solid #ccc;\r\n border-radius: 4px;\r\n font-family: 'Helvetica Neue', Arial, sans-serif;\r\n font-size: 16px;\r\n box-sizing: border-box;\r\n transition: border-color 0.3s;\r\n}\r\n\r\n.APX-dialog-content input[type=\"text\"]:focus,\r\n.APX-dialog-content input[type=\"number\"]:focus,\r\n.APX-dialog-content input[type=\"date\"]:focus,\r\n.APX-dialog-content input[type=\"datetime-local\"]:focus {\r\n border-color: #2C3E50;\r\n /* Deep Blue Color */\r\n outline: none;\r\n}\r\n\r\n/* Button in the dialog */\r\n.APX-dialog-button-container button {\r\n position: relative;\r\n background-color: #2C3E50;\r\n color: #ECF0F1;\r\n border: none;\r\n padding: 10px 20px;\r\n border-radius: 5px;\r\n font-size: 16px;\r\n cursor: pointer;\r\n transition: all 0.3s ease;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.APX-dialog-button-container button:hover {\r\n background-color: #34495E;\r\n transform: translateY(-1px);\r\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);\r\n}\r\n\r\n.APX-dialog-button-container {\r\n display: flex;\r\n gap: 10px;\r\n margin-top:1em;\r\n /* spacing between buttons */\r\n}\r\n\r\n/* Loading indicator */\r\n.APX-dialog-loading-indicator {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n height: 100px;\r\n width: 100%;\r\n}\r\n\r\n.APX-dialog-loading-indicator::before {\r\n content: '';\r\n width: 40px;\r\n height: 40px;\r\n border: 4px solid #f3f3f3;\r\n border-top: 4px solid #2C3E50;\r\n border-radius: 50%;\r\n animation: APX-dialog-spin 1s linear infinite;\r\n}\r\n\r\n@keyframes APX-dialog-spin {\r\n 0% { transform: rotate(0deg); }\r\n 100% { transform: rotate(360deg); }\r\n}\r\n.APX-dialog-button-disabled {\r\n opacity: 0.5;\r\n cursor: not-allowed !important;\r\n background-color: #95a5a6 !important; /* Grayed out color */\r\n box-shadow: none !important;\r\n transition: all 0.2s ease;\r\n transform: none !important;\r\n}\r\n\r\n.APX-dialog-button-disabled:hover {\r\n background-color: #95a5a6 !important; /* Keep gray on hover */\r\n transform: none !important;\r\n}\r\n\r\n/* Add a subtle strikethrough effect */\r\n.APX-dialog-button-disabled::after {\r\n content: '';\r\n position: absolute;\r\n top: 50%;\r\n left: 0;\r\n width: 100%;\r\n height: 1px;\r\n background-color: rgba(0, 0, 0, 0.2);\r\n transform: rotate(-5deg);\r\n}"],"sourceRoot":""}]);
|
|
171
|
+
// Exports
|
|
172
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
/***/ }),
|
|
176
|
+
|
|
177
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./modules/toast/css/toast.css":
|
|
178
|
+
/*!***************************************************************************!*\
|
|
179
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./modules/toast/css/toast.css ***!
|
|
180
|
+
\***************************************************************************/
|
|
181
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
182
|
+
|
|
183
|
+
"use strict";
|
|
184
|
+
__webpack_require__.r(__webpack_exports__);
|
|
185
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
186
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
187
|
+
/* harmony export */ });
|
|
188
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
|
|
189
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
190
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
191
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
192
|
+
// Imports
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
196
|
+
// Module
|
|
197
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.APX-toast-container {
|
|
198
|
+
position: fixed;
|
|
199
|
+
display: flex;
|
|
200
|
+
flex-direction: column;
|
|
201
|
+
gap: var(--apx-toast-gap, 8px);
|
|
202
|
+
z-index: var(--apx-toast-z-index, 11000);
|
|
203
|
+
pointer-events: none;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.APX-toast-container--bottom-right { right: 12px; bottom: 12px; align-items: flex-end; }
|
|
207
|
+
.APX-toast-container--bottom-left { left: 12px; bottom: 12px; align-items: flex-start; }
|
|
208
|
+
.APX-toast-container--top-right { right: 12px; top: 12px; align-items: flex-end; }
|
|
209
|
+
.APX-toast-container--top-left { left: 12px; top: 12px; align-items: flex-start; }
|
|
210
|
+
|
|
211
|
+
.APX-toast {
|
|
212
|
+
min-width: var(--apx-toast-min-width, 260px);
|
|
213
|
+
max-width: var(--apx-toast-max-width, 420px);
|
|
214
|
+
font-size: var(--apx-toast-font-size, 14px);
|
|
215
|
+
border-radius: var(--apx-toast-radius, 6px);
|
|
216
|
+
box-shadow: var(--apx-toast-shadow, 0 6px 24px rgba(0,0,0,0.2));
|
|
217
|
+
padding: var(--apx-toast-padding, 10px 42px 10px 14px);
|
|
218
|
+
color: #111;
|
|
219
|
+
background: #eee;
|
|
220
|
+
pointer-events: auto;
|
|
221
|
+
position: relative;
|
|
222
|
+
transition: opacity 180ms ease, transform 180ms ease;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.APX-toast--info { background: var(--apx-toast-info-bg, #0dcaf0); color: var(--apx-toast-info-fg, #052c65); }
|
|
226
|
+
.APX-toast--success { background: var(--apx-toast-success-bg, #198754); color: var(--apx-toast-success-fg, #ffffff); }
|
|
227
|
+
.APX-toast--warning { background: var(--apx-toast-warning-bg, #ffc107); color: var(--apx-toast-warning-fg, #664d03); }
|
|
228
|
+
.APX-toast--danger { background: var(--apx-toast-danger-bg, #dc3545); color: var(--apx-toast-danger-fg, #ffffff); }
|
|
229
|
+
|
|
230
|
+
.APX-toast__content { line-height: 1.35; }
|
|
231
|
+
|
|
232
|
+
.APX-toast__close {
|
|
233
|
+
position: absolute;
|
|
234
|
+
top: 50%; right: 10px;
|
|
235
|
+
width: 24px; height: 24px;
|
|
236
|
+
transform: translateY(-50%);
|
|
237
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
238
|
+
background: transparent; color: currentColor;
|
|
239
|
+
border: 0; border-radius: 4px; padding: 0; margin: 0;
|
|
240
|
+
cursor: pointer; appearance: none; -webkit-appearance: none;
|
|
241
|
+
opacity: .75; transition: opacity 120ms ease;
|
|
242
|
+
}
|
|
243
|
+
.APX-toast__close:hover { opacity: 1; }
|
|
244
|
+
.APX-toast__close:focus { outline: 2px solid rgba(0,0,0,.2); outline-offset: 2px; }
|
|
245
|
+
.APX-toast__close::before {
|
|
246
|
+
content: '×';
|
|
247
|
+
font-size: 16px; line-height: 1; text-align: center;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/* Animations */
|
|
251
|
+
.APX-toast--enter { opacity: 0; transform: translateY(8px); }
|
|
252
|
+
.APX-toast--enter.APX-toast--enter-active { opacity: 1; transform: translateY(0); }
|
|
253
|
+
.APX-toast--exit { opacity: 1; transform: translateY(0); }
|
|
254
|
+
.APX-toast--exit.APX-toast--exit-active { opacity: 0; transform: translateY(8px); }
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
`, "",{"version":3,"sources":["webpack://./modules/toast/css/toast.css"],"names":[],"mappings":"AAAA;IACI,eAAe;IACf,aAAa;IACb,sBAAsB;IACtB,8BAA8B;IAC9B,wCAAwC;IACxC,oBAAoB;AACxB;;AAEA,qCAAqC,WAAW,EAAE,YAAY,EAAE,qBAAqB,EAAE;AACvF,oCAAoC,UAAU,EAAE,YAAY,EAAE,uBAAuB,EAAE;AACvF,kCAAkC,WAAW,EAAE,SAAS,EAAE,qBAAqB,EAAE;AACjF,iCAAiC,UAAU,EAAE,SAAS,EAAE,uBAAuB,EAAE;;AAEjF;IACI,4CAA4C;IAC5C,4CAA4C;IAC5C,2CAA2C;IAC3C,2CAA2C;IAC3C,+DAA+D;IAC/D,sDAAsD;IACtD,WAAW;IACX,gBAAgB;IAChB,oBAAoB;IACpB,kBAAkB;IAClB,oDAAoD;AACxD;;AAEA,mBAAmB,6CAA6C,EAAE,wCAAwC,EAAE;AAC5G,sBAAsB,gDAAgD,EAAE,2CAA2C,EAAE;AACrH,sBAAsB,gDAAgD,EAAE,2CAA2C,EAAE;AACrH,qBAAqB,+CAA+C,EAAE,0CAA0C,EAAE;;AAElH,sBAAsB,iBAAiB,EAAE;;AAEzC;IACI,kBAAkB;IAClB,QAAQ,EAAE,WAAW;IACrB,WAAW,EAAE,YAAY;IACzB,2BAA2B;IAC3B,oBAAoB,EAAE,mBAAmB,EAAE,uBAAuB;IAClE,uBAAuB,EAAE,mBAAmB;IAC5C,SAAS,EAAE,kBAAkB,EAAE,UAAU,EAAE,SAAS;IACpD,eAAe,EAAE,gBAAgB,EAAE,wBAAwB;IAC3D,YAAY,EAAE,8BAA8B;AAChD;AACA,0BAA0B,UAAU,EAAE;AACtC,0BAA0B,iCAAiC,EAAE,mBAAmB,EAAE;AAClF;IACI,YAAY;IACZ,eAAe,EAAE,cAAc,EAAE,kBAAkB;AACvD;;AAEA,eAAe;AACf,oBAAoB,UAAU,EAAE,0BAA0B,EAAE;AAC5D,4CAA4C,UAAU,EAAE,wBAAwB,EAAE;AAClF,mBAAmB,UAAU,EAAE,wBAAwB,EAAE;AACzD,0CAA0C,UAAU,EAAE,0BAA0B,EAAE","sourcesContent":[".APX-toast-container {\r\n position: fixed;\r\n display: flex;\r\n flex-direction: column;\r\n gap: var(--apx-toast-gap, 8px);\r\n z-index: var(--apx-toast-z-index, 11000);\r\n pointer-events: none;\r\n}\r\n\r\n.APX-toast-container--bottom-right { right: 12px; bottom: 12px; align-items: flex-end; }\r\n.APX-toast-container--bottom-left { left: 12px; bottom: 12px; align-items: flex-start; }\r\n.APX-toast-container--top-right { right: 12px; top: 12px; align-items: flex-end; }\r\n.APX-toast-container--top-left { left: 12px; top: 12px; align-items: flex-start; }\r\n\r\n.APX-toast {\r\n min-width: var(--apx-toast-min-width, 260px);\r\n max-width: var(--apx-toast-max-width, 420px);\r\n font-size: var(--apx-toast-font-size, 14px);\r\n border-radius: var(--apx-toast-radius, 6px);\r\n box-shadow: var(--apx-toast-shadow, 0 6px 24px rgba(0,0,0,0.2));\r\n padding: var(--apx-toast-padding, 10px 42px 10px 14px);\r\n color: #111;\r\n background: #eee;\r\n pointer-events: auto;\r\n position: relative;\r\n transition: opacity 180ms ease, transform 180ms ease;\r\n}\r\n\r\n.APX-toast--info { background: var(--apx-toast-info-bg, #0dcaf0); color: var(--apx-toast-info-fg, #052c65); }\r\n.APX-toast--success { background: var(--apx-toast-success-bg, #198754); color: var(--apx-toast-success-fg, #ffffff); }\r\n.APX-toast--warning { background: var(--apx-toast-warning-bg, #ffc107); color: var(--apx-toast-warning-fg, #664d03); }\r\n.APX-toast--danger { background: var(--apx-toast-danger-bg, #dc3545); color: var(--apx-toast-danger-fg, #ffffff); }\r\n\r\n.APX-toast__content { line-height: 1.35; }\r\n\r\n.APX-toast__close {\r\n position: absolute;\r\n top: 50%; right: 10px;\r\n width: 24px; height: 24px;\r\n transform: translateY(-50%);\r\n display: inline-flex; align-items: center; justify-content: center;\r\n background: transparent; color: currentColor;\r\n border: 0; border-radius: 4px; padding: 0; margin: 0;\r\n cursor: pointer; appearance: none; -webkit-appearance: none;\r\n opacity: .75; transition: opacity 120ms ease;\r\n}\r\n.APX-toast__close:hover { opacity: 1; }\r\n.APX-toast__close:focus { outline: 2px solid rgba(0,0,0,.2); outline-offset: 2px; }\r\n.APX-toast__close::before {\r\n content: '×';\r\n font-size: 16px; line-height: 1; text-align: center;\r\n}\r\n\r\n/* Animations */\r\n.APX-toast--enter { opacity: 0; transform: translateY(8px); }\r\n.APX-toast--enter.APX-toast--enter-active { opacity: 1; transform: translateY(0); }\r\n.APX-toast--exit { opacity: 1; transform: translateY(0); }\r\n.APX-toast--exit.APX-toast--exit-active { opacity: 0; transform: translateY(8px); }\r\n\r\n\r\n"],"sourceRoot":""}]);
|
|
258
|
+
// Exports
|
|
259
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
/***/ }),
|
|
263
|
+
|
|
264
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./modules/tristate/css/tristate.css":
|
|
265
|
+
/*!*********************************************************************************!*\
|
|
266
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./modules/tristate/css/tristate.css ***!
|
|
267
|
+
\*********************************************************************************/
|
|
268
|
+
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
269
|
+
|
|
270
|
+
"use strict";
|
|
271
|
+
__webpack_require__.r(__webpack_exports__);
|
|
272
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
273
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
274
|
+
/* harmony export */ });
|
|
275
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
|
|
276
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
277
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
|
278
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
279
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/getUrl.js */ "./node_modules/css-loader/dist/runtime/getUrl.js");
|
|
280
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
281
|
+
// Imports
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(/*! data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20%20fill%3D%22%23cccccc%22%20d%3D%22M25.107%2032.030h-18.214c-3.456%200-6.268-2.81-6.268-6.264v-19.529c0-3.456%202.812-6.268%206.268-6.268h18.214c3.456%200%206.268%202.812%206.268%206.268v19.529c0%203.452-2.812%206.264-6.268%206.264zM6.893%201.85c-2.419%200-4.386%201.967-4.386%204.386v19.529c0%202.417%201.967%204.382%204.386%204.382h18.214c2.419%200%204.386-1.965%204.386-4.382v-19.529c0-2.419-1.967-4.386-4.386-4.386h-18.214z%22%3E%3C/path%3E%3C/svg%3E */ "data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20%20fill%3D%22%23cccccc%22%20d%3D%22M25.107%2032.030h-18.214c-3.456%200-6.268-2.81-6.268-6.264v-19.529c0-3.456%202.812-6.268%206.268-6.268h18.214c3.456%200%206.268%202.812%206.268%206.268v19.529c0%203.452-2.812%206.264-6.268%206.264zM6.893%201.85c-2.419%200-4.386%201.967-4.386%204.386v19.529c0%202.417%201.967%204.382%204.386%204.382h18.214c2.419%200%204.386-1.965%204.386-4.382v-19.529c0-2.419-1.967-4.386-4.386-4.386h-18.214z%22%3E%3C/path%3E%3C/svg%3E"), __webpack_require__.b);
|
|
286
|
+
var ___CSS_LOADER_URL_IMPORT_1___ = new URL(/* asset import */ __webpack_require__(/*! data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20fill%3D%22%230654ba%22%20d%3D%22M0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705zM5.313%2017.587l7.039%206.839%2013.831-13.439-2.636-2.561-10.929%2010.62-4.442-4.317-2.862%202.858z%22%3E%3C/path%3E%3C/svg%3E */ "data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20fill%3D%22%230654ba%22%20d%3D%22M0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705zM5.313%2017.587l7.039%206.839%2013.831-13.439-2.636-2.561-10.929%2010.62-4.442-4.317-2.862%202.858z%22%3E%3C/path%3E%3C/svg%3E"), __webpack_require__.b);
|
|
287
|
+
var ___CSS_LOADER_URL_IMPORT_2___ = new URL(/* asset import */ __webpack_require__(/*! data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20viewBox%3D%220%200%2032%2032%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705z%22%20fill%3D%22%23f00%22%2F%3E%3Cpath%20d%3D%22m8%208%2016%2016%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M24%208L8%2024%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E */ "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20viewBox%3D%220%200%2032%2032%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705z%22%20fill%3D%22%23f00%22%2F%3E%3Cpath%20d%3D%22m8%208%2016%2016%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M24%208L8%2024%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E"), __webpack_require__.b);
|
|
288
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
289
|
+
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
|
|
290
|
+
var ___CSS_LOADER_URL_REPLACEMENT_1___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_1___);
|
|
291
|
+
var ___CSS_LOADER_URL_REPLACEMENT_2___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_2___);
|
|
292
|
+
// Module
|
|
293
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.apx-tristate {
|
|
294
|
+
display: inline-block;
|
|
295
|
+
vertical-align: middle;
|
|
296
|
+
text-align: center;
|
|
297
|
+
cursor: pointer;
|
|
298
|
+
position: relative;
|
|
299
|
+
min-width:13px;
|
|
300
|
+
min-height:13px;
|
|
301
|
+
background-size: contain;
|
|
302
|
+
background-color: white;
|
|
303
|
+
border-radius:3px;
|
|
304
|
+
}
|
|
305
|
+
.apx-tristate.unchecked {
|
|
306
|
+
background-image: url(${___CSS_LOADER_URL_REPLACEMENT_0___});
|
|
307
|
+
}
|
|
308
|
+
.apx-tristate.checked {
|
|
309
|
+
background-image: url(${___CSS_LOADER_URL_REPLACEMENT_1___});
|
|
310
|
+
background-repeat: no-repeat;
|
|
311
|
+
background-position: center;
|
|
312
|
+
}
|
|
313
|
+
.apx-tristate.crossed {
|
|
314
|
+
background-image: url(${___CSS_LOADER_URL_REPLACEMENT_2___});
|
|
315
|
+
background-repeat: no-repeat;
|
|
316
|
+
background-position: center;
|
|
317
|
+
}`, "",{"version":3,"sources":["webpack://./modules/tristate/css/tristate.css"],"names":[],"mappings":"AAAA;IACI,qBAAqB;IACrB,sBAAsB;IACtB,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,wBAAwB;IACxB,uBAAuB;IACvB,iBAAiB;AACrB;AACA;IACI,yDAAylB;AAC7lB;AACA;IACI,yDAA6e;IAC7e,4BAA4B;IAC5B,2BAA2B;AAC/B;AACA;IACI,yDAAsnB;IACtnB,4BAA4B;IAC5B,2BAA2B;AAC/B","sourcesContent":[".apx-tristate {\r\n display: inline-block;\r\n vertical-align: middle;\r\n text-align: center;\r\n cursor: pointer;\r\n position: relative;\r\n min-width:13px;\r\n min-height:13px;\r\n background-size: contain;\r\n background-color: white;\r\n border-radius:3px;\r\n}\r\n.apx-tristate.unchecked {\r\n background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20%20fill%3D%22%23cccccc%22%20d%3D%22M25.107%2032.030h-18.214c-3.456%200-6.268-2.81-6.268-6.264v-19.529c0-3.456%202.812-6.268%206.268-6.268h18.214c3.456%200%206.268%202.812%206.268%206.268v19.529c0%203.452-2.812%206.264-6.268%206.264zM6.893%201.85c-2.419%200-4.386%201.967-4.386%204.386v19.529c0%202.417%201.967%204.382%204.386%204.382h18.214c2.419%200%204.386-1.965%204.386-4.382v-19.529c0-2.419-1.967-4.386-4.386-4.386h-18.214z%22%3E%3C/path%3E%3C/svg%3E');\r\n}\r\n.apx-tristate.checked {\r\n background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20fill%3D%22%230654ba%22%20d%3D%22M0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705zM5.313%2017.587l7.039%206.839%2013.831-13.439-2.636-2.561-10.929%2010.62-4.442-4.317-2.862%202.858z%22%3E%3C/path%3E%3C/svg%3E');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n.apx-tristate.crossed {\r\n background-image: url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20viewBox%3D%220%200%2032%2032%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705z%22%20fill%3D%22%23f00%22%2F%3E%3Cpath%20d%3D%22m8%208%2016%2016%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M24%208L8%2024%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}"],"sourceRoot":""}]);
|
|
318
|
+
// Exports
|
|
319
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
/***/ }),
|
|
323
|
+
|
|
324
|
+
/***/ "./node_modules/css-loader/dist/runtime/api.js":
|
|
325
|
+
/*!*****************************************************!*\
|
|
326
|
+
!*** ./node_modules/css-loader/dist/runtime/api.js ***!
|
|
327
|
+
\*****************************************************/
|
|
328
|
+
/***/ ((module) => {
|
|
329
|
+
|
|
330
|
+
"use strict";
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
/*
|
|
334
|
+
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
335
|
+
Author Tobias Koppers @sokra
|
|
336
|
+
*/
|
|
337
|
+
module.exports = function (cssWithMappingToString) {
|
|
338
|
+
var list = [];
|
|
339
|
+
|
|
340
|
+
// return the list of modules as css string
|
|
341
|
+
list.toString = function toString() {
|
|
342
|
+
return this.map(function (item) {
|
|
343
|
+
var content = "";
|
|
344
|
+
var needLayer = typeof item[5] !== "undefined";
|
|
345
|
+
if (item[4]) {
|
|
346
|
+
content += "@supports (".concat(item[4], ") {");
|
|
347
|
+
}
|
|
348
|
+
if (item[2]) {
|
|
349
|
+
content += "@media ".concat(item[2], " {");
|
|
350
|
+
}
|
|
351
|
+
if (needLayer) {
|
|
352
|
+
content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
|
|
353
|
+
}
|
|
354
|
+
content += cssWithMappingToString(item);
|
|
355
|
+
if (needLayer) {
|
|
356
|
+
content += "}";
|
|
357
|
+
}
|
|
358
|
+
if (item[2]) {
|
|
359
|
+
content += "}";
|
|
360
|
+
}
|
|
361
|
+
if (item[4]) {
|
|
362
|
+
content += "}";
|
|
363
|
+
}
|
|
364
|
+
return content;
|
|
365
|
+
}).join("");
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
// import a list of modules into the list
|
|
369
|
+
list.i = function i(modules, media, dedupe, supports, layer) {
|
|
370
|
+
if (typeof modules === "string") {
|
|
371
|
+
modules = [[null, modules, undefined]];
|
|
372
|
+
}
|
|
373
|
+
var alreadyImportedModules = {};
|
|
374
|
+
if (dedupe) {
|
|
375
|
+
for (var k = 0; k < this.length; k++) {
|
|
376
|
+
var id = this[k][0];
|
|
377
|
+
if (id != null) {
|
|
378
|
+
alreadyImportedModules[id] = true;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
for (var _k = 0; _k < modules.length; _k++) {
|
|
383
|
+
var item = [].concat(modules[_k]);
|
|
384
|
+
if (dedupe && alreadyImportedModules[item[0]]) {
|
|
385
|
+
continue;
|
|
386
|
+
}
|
|
387
|
+
if (typeof layer !== "undefined") {
|
|
388
|
+
if (typeof item[5] === "undefined") {
|
|
389
|
+
item[5] = layer;
|
|
390
|
+
} else {
|
|
391
|
+
item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
|
|
392
|
+
item[5] = layer;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
if (media) {
|
|
396
|
+
if (!item[2]) {
|
|
397
|
+
item[2] = media;
|
|
398
|
+
} else {
|
|
399
|
+
item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
|
|
400
|
+
item[2] = media;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
if (supports) {
|
|
404
|
+
if (!item[4]) {
|
|
405
|
+
item[4] = "".concat(supports);
|
|
406
|
+
} else {
|
|
407
|
+
item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
|
|
408
|
+
item[4] = supports;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
list.push(item);
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
return list;
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
/***/ }),
|
|
418
|
+
|
|
419
|
+
/***/ "./node_modules/css-loader/dist/runtime/getUrl.js":
|
|
420
|
+
/*!********************************************************!*\
|
|
421
|
+
!*** ./node_modules/css-loader/dist/runtime/getUrl.js ***!
|
|
422
|
+
\********************************************************/
|
|
423
|
+
/***/ ((module) => {
|
|
424
|
+
|
|
425
|
+
"use strict";
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
module.exports = function (url, options) {
|
|
429
|
+
if (!options) {
|
|
430
|
+
options = {};
|
|
431
|
+
}
|
|
432
|
+
if (!url) {
|
|
433
|
+
return url;
|
|
434
|
+
}
|
|
435
|
+
url = String(url.__esModule ? url.default : url);
|
|
436
|
+
|
|
437
|
+
// If url is already wrapped in quotes, remove them
|
|
438
|
+
if (/^['"].*['"]$/.test(url)) {
|
|
439
|
+
url = url.slice(1, -1);
|
|
440
|
+
}
|
|
441
|
+
if (options.hash) {
|
|
442
|
+
url += options.hash;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// Should url be wrapped?
|
|
446
|
+
// See https://drafts.csswg.org/css-values-3/#urls
|
|
447
|
+
if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) {
|
|
448
|
+
return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
|
|
449
|
+
}
|
|
450
|
+
return url;
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
/***/ }),
|
|
454
|
+
|
|
455
|
+
/***/ "./node_modules/css-loader/dist/runtime/sourceMaps.js":
|
|
456
|
+
/*!************************************************************!*\
|
|
457
|
+
!*** ./node_modules/css-loader/dist/runtime/sourceMaps.js ***!
|
|
458
|
+
\************************************************************/
|
|
459
|
+
/***/ ((module) => {
|
|
460
|
+
|
|
461
|
+
"use strict";
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
module.exports = function (item) {
|
|
465
|
+
var content = item[1];
|
|
466
|
+
var cssMapping = item[3];
|
|
467
|
+
if (!cssMapping) {
|
|
468
|
+
return content;
|
|
469
|
+
}
|
|
470
|
+
if (typeof btoa === "function") {
|
|
471
|
+
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
|
|
472
|
+
var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
|
|
473
|
+
var sourceMapping = "/*# ".concat(data, " */");
|
|
474
|
+
return [content].concat([sourceMapping]).join("\n");
|
|
475
|
+
}
|
|
476
|
+
return [content].join("\n");
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
/***/ }),
|
|
480
|
+
|
|
481
|
+
/***/ "./modules/dialog/html/dialog.html?raw":
|
|
482
|
+
/*!*********************************************!*\
|
|
483
|
+
!*** ./modules/dialog/html/dialog.html?raw ***!
|
|
484
|
+
\*********************************************/
|
|
485
|
+
/***/ ((module) => {
|
|
486
|
+
|
|
487
|
+
// Module
|
|
488
|
+
var code = "<div class=\"APX-dialog\">\r\n <div class=\"APX-dialog-content\">\r\n <span class=\"APX-close-dialog\">×</span>\r\n <h2 class=\"APX-dialog-title\"></h2>\r\n <div class=\"APX-dialog-dynamic-content\"></div>\r\n <div class=\"APX-dialog-button-container\"></div>\r\n </div>\r\n</div>";
|
|
489
|
+
// Exports
|
|
490
|
+
module.exports = code;
|
|
491
|
+
|
|
492
|
+
/***/ }),
|
|
493
|
+
|
|
494
|
+
/***/ "./modules/dialog/css/dialog.css":
|
|
495
|
+
/*!***************************************!*\
|
|
496
|
+
!*** ./modules/dialog/css/dialog.css ***!
|
|
497
|
+
\***************************************/
|
|
498
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
499
|
+
|
|
500
|
+
"use strict";
|
|
501
|
+
__webpack_require__.r(__webpack_exports__);
|
|
502
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
503
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
504
|
+
/* harmony export */ });
|
|
505
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
506
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
507
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
|
|
508
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
509
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
|
|
510
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
511
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
|
|
512
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
513
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
|
|
514
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
515
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
|
|
516
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
517
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_dialog_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!./dialog.css */ "./node_modules/css-loader/dist/cjs.js!./modules/dialog/css/dialog.css");
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
var options = {};
|
|
530
|
+
|
|
531
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
532
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
533
|
+
|
|
534
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
535
|
+
|
|
536
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
537
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
538
|
+
|
|
539
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_dialog_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_dialog_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_dialog_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_dialog_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
/***/ }),
|
|
548
|
+
|
|
549
|
+
/***/ "./modules/toast/css/toast.css":
|
|
550
|
+
/*!*************************************!*\
|
|
551
|
+
!*** ./modules/toast/css/toast.css ***!
|
|
552
|
+
\*************************************/
|
|
553
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
554
|
+
|
|
555
|
+
"use strict";
|
|
556
|
+
__webpack_require__.r(__webpack_exports__);
|
|
557
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
558
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
559
|
+
/* harmony export */ });
|
|
560
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
561
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
562
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
|
|
563
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
564
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
|
|
565
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
566
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
|
|
567
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
568
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
|
|
569
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
570
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
|
|
571
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
572
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_toast_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!./toast.css */ "./node_modules/css-loader/dist/cjs.js!./modules/toast/css/toast.css");
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
var options = {};
|
|
585
|
+
|
|
586
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
587
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
588
|
+
|
|
589
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
590
|
+
|
|
591
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
592
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
593
|
+
|
|
594
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_toast_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_toast_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_toast_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_toast_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
/***/ }),
|
|
603
|
+
|
|
604
|
+
/***/ "./modules/tristate/css/tristate.css":
|
|
605
|
+
/*!*******************************************!*\
|
|
606
|
+
!*** ./modules/tristate/css/tristate.css ***!
|
|
607
|
+
\*******************************************/
|
|
608
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
609
|
+
|
|
610
|
+
"use strict";
|
|
611
|
+
__webpack_require__.r(__webpack_exports__);
|
|
612
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
613
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
614
|
+
/* harmony export */ });
|
|
615
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
|
616
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
617
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
|
|
618
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
619
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
|
|
620
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
621
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
|
|
622
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
623
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
|
|
624
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
625
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
|
|
626
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
627
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_tristate_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!./tristate.css */ "./node_modules/css-loader/dist/cjs.js!./modules/tristate/css/tristate.css");
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
var options = {};
|
|
640
|
+
|
|
641
|
+
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
|
642
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
643
|
+
|
|
644
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
645
|
+
|
|
646
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
647
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
648
|
+
|
|
649
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_tristate_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_tristate_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_tristate_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_tristate_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
/***/ }),
|
|
658
|
+
|
|
659
|
+
/***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":
|
|
660
|
+
/*!****************************************************************************!*\
|
|
661
|
+
!*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
|
|
662
|
+
\****************************************************************************/
|
|
663
|
+
/***/ ((module) => {
|
|
664
|
+
|
|
665
|
+
"use strict";
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
var stylesInDOM = [];
|
|
669
|
+
function getIndexByIdentifier(identifier) {
|
|
670
|
+
var result = -1;
|
|
671
|
+
for (var i = 0; i < stylesInDOM.length; i++) {
|
|
672
|
+
if (stylesInDOM[i].identifier === identifier) {
|
|
673
|
+
result = i;
|
|
674
|
+
break;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
return result;
|
|
678
|
+
}
|
|
679
|
+
function modulesToDom(list, options) {
|
|
680
|
+
var idCountMap = {};
|
|
681
|
+
var identifiers = [];
|
|
682
|
+
for (var i = 0; i < list.length; i++) {
|
|
683
|
+
var item = list[i];
|
|
684
|
+
var id = options.base ? item[0] + options.base : item[0];
|
|
685
|
+
var count = idCountMap[id] || 0;
|
|
686
|
+
var identifier = "".concat(id, " ").concat(count);
|
|
687
|
+
idCountMap[id] = count + 1;
|
|
688
|
+
var indexByIdentifier = getIndexByIdentifier(identifier);
|
|
689
|
+
var obj = {
|
|
690
|
+
css: item[1],
|
|
691
|
+
media: item[2],
|
|
692
|
+
sourceMap: item[3],
|
|
693
|
+
supports: item[4],
|
|
694
|
+
layer: item[5]
|
|
695
|
+
};
|
|
696
|
+
if (indexByIdentifier !== -1) {
|
|
697
|
+
stylesInDOM[indexByIdentifier].references++;
|
|
698
|
+
stylesInDOM[indexByIdentifier].updater(obj);
|
|
699
|
+
} else {
|
|
700
|
+
var updater = addElementStyle(obj, options);
|
|
701
|
+
options.byIndex = i;
|
|
702
|
+
stylesInDOM.splice(i, 0, {
|
|
703
|
+
identifier: identifier,
|
|
704
|
+
updater: updater,
|
|
705
|
+
references: 1
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
identifiers.push(identifier);
|
|
709
|
+
}
|
|
710
|
+
return identifiers;
|
|
711
|
+
}
|
|
712
|
+
function addElementStyle(obj, options) {
|
|
713
|
+
var api = options.domAPI(options);
|
|
714
|
+
api.update(obj);
|
|
715
|
+
var updater = function updater(newObj) {
|
|
716
|
+
if (newObj) {
|
|
717
|
+
if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
api.update(obj = newObj);
|
|
721
|
+
} else {
|
|
722
|
+
api.remove();
|
|
723
|
+
}
|
|
724
|
+
};
|
|
725
|
+
return updater;
|
|
726
|
+
}
|
|
727
|
+
module.exports = function (list, options) {
|
|
728
|
+
options = options || {};
|
|
729
|
+
list = list || [];
|
|
730
|
+
var lastIdentifiers = modulesToDom(list, options);
|
|
731
|
+
return function update(newList) {
|
|
732
|
+
newList = newList || [];
|
|
733
|
+
for (var i = 0; i < lastIdentifiers.length; i++) {
|
|
734
|
+
var identifier = lastIdentifiers[i];
|
|
735
|
+
var index = getIndexByIdentifier(identifier);
|
|
736
|
+
stylesInDOM[index].references--;
|
|
737
|
+
}
|
|
738
|
+
var newLastIdentifiers = modulesToDom(newList, options);
|
|
739
|
+
for (var _i = 0; _i < lastIdentifiers.length; _i++) {
|
|
740
|
+
var _identifier = lastIdentifiers[_i];
|
|
741
|
+
var _index = getIndexByIdentifier(_identifier);
|
|
742
|
+
if (stylesInDOM[_index].references === 0) {
|
|
743
|
+
stylesInDOM[_index].updater();
|
|
744
|
+
stylesInDOM.splice(_index, 1);
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
lastIdentifiers = newLastIdentifiers;
|
|
748
|
+
};
|
|
749
|
+
};
|
|
750
|
+
|
|
751
|
+
/***/ }),
|
|
752
|
+
|
|
753
|
+
/***/ "./node_modules/style-loader/dist/runtime/insertBySelector.js":
|
|
754
|
+
/*!********************************************************************!*\
|
|
755
|
+
!*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***!
|
|
756
|
+
\********************************************************************/
|
|
757
|
+
/***/ ((module) => {
|
|
758
|
+
|
|
759
|
+
"use strict";
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
var memo = {};
|
|
763
|
+
|
|
764
|
+
/* istanbul ignore next */
|
|
765
|
+
function getTarget(target) {
|
|
766
|
+
if (typeof memo[target] === "undefined") {
|
|
767
|
+
var styleTarget = document.querySelector(target);
|
|
768
|
+
|
|
769
|
+
// Special case to return head of iframe instead of iframe itself
|
|
770
|
+
if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
|
|
771
|
+
try {
|
|
772
|
+
// This will throw an exception if access to iframe is blocked
|
|
773
|
+
// due to cross-origin restrictions
|
|
774
|
+
styleTarget = styleTarget.contentDocument.head;
|
|
775
|
+
} catch (e) {
|
|
776
|
+
// istanbul ignore next
|
|
777
|
+
styleTarget = null;
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
memo[target] = styleTarget;
|
|
781
|
+
}
|
|
782
|
+
return memo[target];
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/* istanbul ignore next */
|
|
786
|
+
function insertBySelector(insert, style) {
|
|
787
|
+
var target = getTarget(insert);
|
|
788
|
+
if (!target) {
|
|
789
|
+
throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
|
|
790
|
+
}
|
|
791
|
+
target.appendChild(style);
|
|
792
|
+
}
|
|
793
|
+
module.exports = insertBySelector;
|
|
794
|
+
|
|
795
|
+
/***/ }),
|
|
796
|
+
|
|
797
|
+
/***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js":
|
|
798
|
+
/*!**********************************************************************!*\
|
|
799
|
+
!*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***!
|
|
800
|
+
\**********************************************************************/
|
|
801
|
+
/***/ ((module) => {
|
|
802
|
+
|
|
803
|
+
"use strict";
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+
/* istanbul ignore next */
|
|
807
|
+
function insertStyleElement(options) {
|
|
808
|
+
var element = document.createElement("style");
|
|
809
|
+
options.setAttributes(element, options.attributes);
|
|
810
|
+
options.insert(element, options.options);
|
|
811
|
+
return element;
|
|
812
|
+
}
|
|
813
|
+
module.exports = insertStyleElement;
|
|
814
|
+
|
|
815
|
+
/***/ }),
|
|
816
|
+
|
|
817
|
+
/***/ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":
|
|
818
|
+
/*!**********************************************************************************!*\
|
|
819
|
+
!*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!
|
|
820
|
+
\**********************************************************************************/
|
|
821
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
822
|
+
|
|
823
|
+
"use strict";
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
/* istanbul ignore next */
|
|
827
|
+
function setAttributesWithoutAttributes(styleElement) {
|
|
828
|
+
var nonce = true ? __webpack_require__.nc : 0;
|
|
829
|
+
if (nonce) {
|
|
830
|
+
styleElement.setAttribute("nonce", nonce);
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
module.exports = setAttributesWithoutAttributes;
|
|
834
|
+
|
|
835
|
+
/***/ }),
|
|
836
|
+
|
|
837
|
+
/***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js":
|
|
838
|
+
/*!***************************************************************!*\
|
|
839
|
+
!*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***!
|
|
840
|
+
\***************************************************************/
|
|
841
|
+
/***/ ((module) => {
|
|
842
|
+
|
|
843
|
+
"use strict";
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
/* istanbul ignore next */
|
|
847
|
+
function apply(styleElement, options, obj) {
|
|
848
|
+
var css = "";
|
|
849
|
+
if (obj.supports) {
|
|
850
|
+
css += "@supports (".concat(obj.supports, ") {");
|
|
851
|
+
}
|
|
852
|
+
if (obj.media) {
|
|
853
|
+
css += "@media ".concat(obj.media, " {");
|
|
854
|
+
}
|
|
855
|
+
var needLayer = typeof obj.layer !== "undefined";
|
|
856
|
+
if (needLayer) {
|
|
857
|
+
css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
|
|
858
|
+
}
|
|
859
|
+
css += obj.css;
|
|
860
|
+
if (needLayer) {
|
|
861
|
+
css += "}";
|
|
862
|
+
}
|
|
863
|
+
if (obj.media) {
|
|
864
|
+
css += "}";
|
|
865
|
+
}
|
|
866
|
+
if (obj.supports) {
|
|
867
|
+
css += "}";
|
|
868
|
+
}
|
|
869
|
+
var sourceMap = obj.sourceMap;
|
|
870
|
+
if (sourceMap && typeof btoa !== "undefined") {
|
|
871
|
+
css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
// For old IE
|
|
875
|
+
/* istanbul ignore if */
|
|
876
|
+
options.styleTagTransform(css, styleElement, options.options);
|
|
877
|
+
}
|
|
878
|
+
function removeStyleElement(styleElement) {
|
|
879
|
+
// istanbul ignore if
|
|
880
|
+
if (styleElement.parentNode === null) {
|
|
881
|
+
return false;
|
|
882
|
+
}
|
|
883
|
+
styleElement.parentNode.removeChild(styleElement);
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
/* istanbul ignore next */
|
|
887
|
+
function domAPI(options) {
|
|
888
|
+
if (typeof document === "undefined") {
|
|
889
|
+
return {
|
|
890
|
+
update: function update() {},
|
|
891
|
+
remove: function remove() {}
|
|
892
|
+
};
|
|
893
|
+
}
|
|
894
|
+
var styleElement = options.insertStyleElement(options);
|
|
895
|
+
return {
|
|
896
|
+
update: function update(obj) {
|
|
897
|
+
apply(styleElement, options, obj);
|
|
898
|
+
},
|
|
899
|
+
remove: function remove() {
|
|
900
|
+
removeStyleElement(styleElement);
|
|
901
|
+
}
|
|
902
|
+
};
|
|
903
|
+
}
|
|
904
|
+
module.exports = domAPI;
|
|
905
|
+
|
|
906
|
+
/***/ }),
|
|
907
|
+
|
|
908
|
+
/***/ "./node_modules/style-loader/dist/runtime/styleTagTransform.js":
|
|
909
|
+
/*!*********************************************************************!*\
|
|
910
|
+
!*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***!
|
|
911
|
+
\*********************************************************************/
|
|
912
|
+
/***/ ((module) => {
|
|
913
|
+
|
|
914
|
+
"use strict";
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
/* istanbul ignore next */
|
|
918
|
+
function styleTagTransform(css, styleElement) {
|
|
919
|
+
if (styleElement.styleSheet) {
|
|
920
|
+
styleElement.styleSheet.cssText = css;
|
|
921
|
+
} else {
|
|
922
|
+
while (styleElement.firstChild) {
|
|
923
|
+
styleElement.removeChild(styleElement.firstChild);
|
|
924
|
+
}
|
|
925
|
+
styleElement.appendChild(document.createTextNode(css));
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
module.exports = styleTagTransform;
|
|
929
|
+
|
|
930
|
+
/***/ }),
|
|
931
|
+
|
|
932
|
+
/***/ "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20viewBox%3D%220%200%2032%2032%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705z%22%20fill%3D%22%23f00%22%2F%3E%3Cpath%20d%3D%22m8%208%2016%2016%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M24%208L8%2024%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E":
|
|
933
|
+
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
934
|
+
!*** data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20viewBox%3D%220%200%2032%2032%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705z%22%20fill%3D%22%23f00%22%2F%3E%3Cpath%20d%3D%22m8%208%2016%2016%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M24%208L8%2024%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E ***!
|
|
935
|
+
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
936
|
+
/***/ ((module) => {
|
|
937
|
+
|
|
938
|
+
"use strict";
|
|
939
|
+
module.exports = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20viewBox%3D%220%200%2032%2032%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705z%22%20fill%3D%22%23f00%22%2F%3E%3Cpath%20d%3D%22m8%208%2016%2016%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M24%208L8%2024%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E";
|
|
940
|
+
|
|
941
|
+
/***/ }),
|
|
942
|
+
|
|
943
|
+
/***/ "data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20%20fill%3D%22%23cccccc%22%20d%3D%22M25.107%2032.030h-18.214c-3.456%200-6.268-2.81-6.268-6.264v-19.529c0-3.456%202.812-6.268%206.268-6.268h18.214c3.456%200%206.268%202.812%206.268%206.268v19.529c0%203.452-2.812%206.264-6.268%206.264zM6.893%201.85c-2.419%200-4.386%201.967-4.386%204.386v19.529c0%202.417%201.967%204.382%204.386%204.382h18.214c2.419%200%204.386-1.965%204.386-4.382v-19.529c0-2.419-1.967-4.386-4.386-4.386h-18.214z%22%3E%3C/path%3E%3C/svg%3E":
|
|
944
|
+
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
945
|
+
!*** data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20%20fill%3D%22%23cccccc%22%20d%3D%22M25.107%2032.030h-18.214c-3.456%200-6.268-2.81-6.268-6.264v-19.529c0-3.456%202.812-6.268%206.268-6.268h18.214c3.456%200%206.268%202.812%206.268%206.268v19.529c0%203.452-2.812%206.264-6.268%206.264zM6.893%201.85c-2.419%200-4.386%201.967-4.386%204.386v19.529c0%202.417%201.967%204.382%204.386%204.382h18.214c2.419%200%204.386-1.965%204.386-4.382v-19.529c0-2.419-1.967-4.386-4.386-4.386h-18.214z%22%3E%3C/path%3E%3C/svg%3E ***!
|
|
946
|
+
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
947
|
+
/***/ ((module) => {
|
|
948
|
+
|
|
949
|
+
"use strict";
|
|
950
|
+
module.exports = "data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20%20fill%3D%22%23cccccc%22%20d%3D%22M25.107%2032.030h-18.214c-3.456%200-6.268-2.81-6.268-6.264v-19.529c0-3.456%202.812-6.268%206.268-6.268h18.214c3.456%200%206.268%202.812%206.268%206.268v19.529c0%203.452-2.812%206.264-6.268%206.264zM6.893%201.85c-2.419%200-4.386%201.967-4.386%204.386v19.529c0%202.417%201.967%204.382%204.386%204.382h18.214c2.419%200%204.386-1.965%204.386-4.382v-19.529c0-2.419-1.967-4.386-4.386-4.386h-18.214z%22%3E%3C/path%3E%3C/svg%3E";
|
|
951
|
+
|
|
952
|
+
/***/ }),
|
|
953
|
+
|
|
954
|
+
/***/ "data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20fill%3D%22%230654ba%22%20d%3D%22M0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705zM5.313%2017.587l7.039%206.839%2013.831-13.439-2.636-2.561-10.929%2010.62-4.442-4.317-2.862%202.858z%22%3E%3C/path%3E%3C/svg%3E":
|
|
955
|
+
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
956
|
+
!*** data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20fill%3D%22%230654ba%22%20d%3D%22M0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705zM5.313%2017.587l7.039%206.839%2013.831-13.439-2.636-2.561-10.929%2010.62-4.442-4.317-2.862%202.858z%22%3E%3C/path%3E%3C/svg%3E ***!
|
|
957
|
+
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
958
|
+
/***/ ((module) => {
|
|
959
|
+
|
|
960
|
+
"use strict";
|
|
961
|
+
module.exports = "data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20fill%3D%22%230654ba%22%20d%3D%22M0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705zM5.313%2017.587l7.039%206.839%2013.831-13.439-2.636-2.561-10.929%2010.62-4.442-4.317-2.862%202.858z%22%3E%3C/path%3E%3C/svg%3E";
|
|
962
|
+
|
|
963
|
+
/***/ }),
|
|
964
|
+
|
|
965
|
+
/***/ "./modules/common.mjs":
|
|
966
|
+
/*!****************************!*\
|
|
967
|
+
!*** ./modules/common.mjs ***!
|
|
968
|
+
\****************************/
|
|
969
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
970
|
+
|
|
971
|
+
"use strict";
|
|
972
|
+
__webpack_require__.r(__webpack_exports__);
|
|
973
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
974
|
+
/* harmony export */ loadCss: () => (/* binding */ loadCss)
|
|
975
|
+
/* harmony export */ });
|
|
976
|
+
// Function to load the CSS from a given URL
|
|
977
|
+
function loadCss(url) {
|
|
978
|
+
return fetch(url).then(function (response) {
|
|
979
|
+
return response.text();
|
|
980
|
+
}).then(function (css) {
|
|
981
|
+
var styleSheet = document.createElement("style");
|
|
982
|
+
styleSheet.type = "text/css";
|
|
983
|
+
styleSheet.textContent = css; // Use textContent instead of innerText
|
|
984
|
+
document.head.appendChild(styleSheet);
|
|
985
|
+
})["catch"](function (error) {
|
|
986
|
+
console.error("Failed to load CSS:", error);
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
/***/ }),
|
|
992
|
+
|
|
993
|
+
/***/ "./modules/dialog/dialog.mjs":
|
|
994
|
+
/*!***********************************!*\
|
|
995
|
+
!*** ./modules/dialog/dialog.mjs ***!
|
|
996
|
+
\***********************************/
|
|
997
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
998
|
+
|
|
999
|
+
"use strict";
|
|
1000
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1001
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1002
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1003
|
+
/* harmony export */ });
|
|
1004
|
+
/* harmony import */ var _css_dialog_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css/dialog.css */ "./modules/dialog/css/dialog.css");
|
|
1005
|
+
/* harmony import */ var _html_dialog_html_raw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./html/dialog.html?raw */ "./modules/dialog/html/dialog.html?raw");
|
|
1006
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1007
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
1008
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
1009
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
1010
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1011
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1012
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1013
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
1014
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1015
|
+
// Importing the CSS and HTML templates
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
var createDialog = function createDialog(options) {
|
|
1019
|
+
var dialogDefaults = {
|
|
1020
|
+
title: '',
|
|
1021
|
+
content: '',
|
|
1022
|
+
contentURI: '',
|
|
1023
|
+
buttons: [],
|
|
1024
|
+
size: 'medium',
|
|
1025
|
+
showLoadingIndicator: false,
|
|
1026
|
+
contentMethod: 'GET',
|
|
1027
|
+
contentData: null,
|
|
1028
|
+
contentHeaders: undefined
|
|
1029
|
+
};
|
|
1030
|
+
var _dialogDefaults$optio = _objectSpread(_objectSpread({}, dialogDefaults), options),
|
|
1031
|
+
title = _dialogDefaults$optio.title,
|
|
1032
|
+
content = _dialogDefaults$optio.content,
|
|
1033
|
+
contentURI = _dialogDefaults$optio.contentURI,
|
|
1034
|
+
buttons = _dialogDefaults$optio.buttons,
|
|
1035
|
+
size = _dialogDefaults$optio.size,
|
|
1036
|
+
showLoadingIndicator = _dialogDefaults$optio.showLoadingIndicator,
|
|
1037
|
+
contentMethod = _dialogDefaults$optio.contentMethod,
|
|
1038
|
+
contentData = _dialogDefaults$optio.contentData,
|
|
1039
|
+
contentHeaders = _dialogDefaults$optio.contentHeaders;
|
|
1040
|
+
var wrapper = document.createElement('div');
|
|
1041
|
+
wrapper.innerHTML = _html_dialog_html_raw__WEBPACK_IMPORTED_MODULE_1__.trim();
|
|
1042
|
+
var dialogElement = wrapper.firstChild;
|
|
1043
|
+
|
|
1044
|
+
// Lifecycle event management
|
|
1045
|
+
var lifecycleResolvers = {};
|
|
1046
|
+
var lifecycleEvents = {};
|
|
1047
|
+
|
|
1048
|
+
// Define lifecycle promises as properties
|
|
1049
|
+
['opening', 'opened', 'closing', 'closed', 'contentLoading', 'contentLoaded'].forEach(function (event) {
|
|
1050
|
+
lifecycleEvents[event] = new Promise(function (resolve) {
|
|
1051
|
+
lifecycleResolvers[event] = resolve;
|
|
1052
|
+
});
|
|
1053
|
+
});
|
|
1054
|
+
var triggerEvent = function triggerEvent(event) {
|
|
1055
|
+
if (lifecycleResolvers[event]) {
|
|
1056
|
+
lifecycleResolvers[event]();
|
|
1057
|
+
} else {
|
|
1058
|
+
console.warn("No resolver found for lifecycle event: ".concat(event));
|
|
1059
|
+
}
|
|
1060
|
+
};
|
|
1061
|
+
var dialog = {
|
|
1062
|
+
element: dialogElement,
|
|
1063
|
+
buttons: {},
|
|
1064
|
+
isClosed: false,
|
|
1065
|
+
lifecycle: lifecycleEvents,
|
|
1066
|
+
// Lifecycle promises directly exposed here
|
|
1067
|
+
disableButton: function disableButton(key) {
|
|
1068
|
+
var button = dialogElement.querySelector(".APX-dialog-button[data-key=\"".concat(key, "\"]"));
|
|
1069
|
+
if (button) {
|
|
1070
|
+
button.disabled = true;
|
|
1071
|
+
button.classList.add('APX-dialog-button-disabled');
|
|
1072
|
+
}
|
|
1073
|
+
},
|
|
1074
|
+
enableButton: function enableButton(key) {
|
|
1075
|
+
var button = dialogElement.querySelector(".APX-dialog-button[data-key=\"".concat(key, "\"]"));
|
|
1076
|
+
if (button) {
|
|
1077
|
+
button.disabled = false;
|
|
1078
|
+
button.classList.remove('APX-dialog-button-disabled');
|
|
1079
|
+
}
|
|
1080
|
+
},
|
|
1081
|
+
open: function () {
|
|
1082
|
+
var _open = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
1083
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1084
|
+
while (1) switch (_context.prev = _context.next) {
|
|
1085
|
+
case 0:
|
|
1086
|
+
_context.prev = 0;
|
|
1087
|
+
triggerEvent('opening');
|
|
1088
|
+
_context.next = 4;
|
|
1089
|
+
return dialog.lifecycle.opening;
|
|
1090
|
+
case 4:
|
|
1091
|
+
if (!(showLoadingIndicator && contentURI)) {
|
|
1092
|
+
_context.next = 12;
|
|
1093
|
+
break;
|
|
1094
|
+
}
|
|
1095
|
+
// Append dialog to the DOM and display it first
|
|
1096
|
+
document.body.appendChild(dialogElement);
|
|
1097
|
+
dialogElement.style.display = "flex";
|
|
1098
|
+
|
|
1099
|
+
// Show loading indicator
|
|
1100
|
+
dialogElement.querySelector(".APX-dialog-dynamic-content").innerHTML = '<div class="APX-dialog-loading-indicator"></div>';
|
|
1101
|
+
|
|
1102
|
+
// Load content after dialog is visible
|
|
1103
|
+
_context.next = 10;
|
|
1104
|
+
return fetchAndInsertContent();
|
|
1105
|
+
case 10:
|
|
1106
|
+
_context.next = 16;
|
|
1107
|
+
break;
|
|
1108
|
+
case 12:
|
|
1109
|
+
_context.next = 14;
|
|
1110
|
+
return fetchAndInsertContent();
|
|
1111
|
+
case 14:
|
|
1112
|
+
// Append dialog to the DOM and display it
|
|
1113
|
+
document.body.appendChild(dialogElement);
|
|
1114
|
+
dialogElement.style.display = "flex";
|
|
1115
|
+
case 16:
|
|
1116
|
+
triggerEvent('opened');
|
|
1117
|
+
_context.next = 19;
|
|
1118
|
+
return dialog.lifecycle.opened;
|
|
1119
|
+
case 19:
|
|
1120
|
+
_context.next = 24;
|
|
1121
|
+
break;
|
|
1122
|
+
case 21:
|
|
1123
|
+
_context.prev = 21;
|
|
1124
|
+
_context.t0 = _context["catch"](0);
|
|
1125
|
+
console.error('Error opening dialog:', _context.t0);
|
|
1126
|
+
case 24:
|
|
1127
|
+
return _context.abrupt("return", dialog);
|
|
1128
|
+
case 25:
|
|
1129
|
+
case "end":
|
|
1130
|
+
return _context.stop();
|
|
1131
|
+
}
|
|
1132
|
+
}, _callee, null, [[0, 21]]);
|
|
1133
|
+
}));
|
|
1134
|
+
function open() {
|
|
1135
|
+
return _open.apply(this, arguments);
|
|
1136
|
+
}
|
|
1137
|
+
return open;
|
|
1138
|
+
}(),
|
|
1139
|
+
close: function () {
|
|
1140
|
+
var _close = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
1141
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1142
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
1143
|
+
case 0:
|
|
1144
|
+
_context2.prev = 0;
|
|
1145
|
+
triggerEvent('closing');
|
|
1146
|
+
_context2.next = 4;
|
|
1147
|
+
return dialog.lifecycle.closing;
|
|
1148
|
+
case 4:
|
|
1149
|
+
// Cleanup and remove dialog
|
|
1150
|
+
closeDialogAndCleanup();
|
|
1151
|
+
triggerEvent('closed');
|
|
1152
|
+
_context2.next = 8;
|
|
1153
|
+
return dialog.lifecycle.closed;
|
|
1154
|
+
case 8:
|
|
1155
|
+
_context2.next = 13;
|
|
1156
|
+
break;
|
|
1157
|
+
case 10:
|
|
1158
|
+
_context2.prev = 10;
|
|
1159
|
+
_context2.t0 = _context2["catch"](0);
|
|
1160
|
+
console.error('Error during dialog closing:', _context2.t0);
|
|
1161
|
+
case 13:
|
|
1162
|
+
return _context2.abrupt("return", dialog);
|
|
1163
|
+
case 14:
|
|
1164
|
+
case "end":
|
|
1165
|
+
return _context2.stop();
|
|
1166
|
+
}
|
|
1167
|
+
}, _callee2, null, [[0, 10]]);
|
|
1168
|
+
}));
|
|
1169
|
+
function close() {
|
|
1170
|
+
return _close.apply(this, arguments);
|
|
1171
|
+
}
|
|
1172
|
+
return close;
|
|
1173
|
+
}()
|
|
1174
|
+
};
|
|
1175
|
+
var closeDialogAndCleanup = function closeDialogAndCleanup() {
|
|
1176
|
+
if (dialog.isClosed) return;
|
|
1177
|
+
dialog.isClosed = true;
|
|
1178
|
+
dialogElement.style.display = "none";
|
|
1179
|
+
if (document.body.contains(dialogElement)) {
|
|
1180
|
+
document.body.removeChild(dialogElement);
|
|
1181
|
+
}
|
|
1182
|
+
};
|
|
1183
|
+
var setDialogSize = function setDialogSize() {
|
|
1184
|
+
var dialogContent = dialogElement.querySelector(".APX-dialog-content");
|
|
1185
|
+
var sizes = {
|
|
1186
|
+
small: {
|
|
1187
|
+
width: '300px',
|
|
1188
|
+
height: '200px'
|
|
1189
|
+
},
|
|
1190
|
+
medium: {
|
|
1191
|
+
width: '500px',
|
|
1192
|
+
height: '400px'
|
|
1193
|
+
},
|
|
1194
|
+
large: {
|
|
1195
|
+
width: '800px',
|
|
1196
|
+
height: '600px'
|
|
1197
|
+
}
|
|
1198
|
+
};
|
|
1199
|
+
if (size === 'auto') return;
|
|
1200
|
+
var selectedSize = sizes[size] || _typeof(size) === 'object' && size;
|
|
1201
|
+
if (selectedSize) {
|
|
1202
|
+
dialogContent.style.minWidth = selectedSize.width || '500px';
|
|
1203
|
+
dialogContent.style.minHeight = selectedSize.height || '400px';
|
|
1204
|
+
}
|
|
1205
|
+
};
|
|
1206
|
+
var addButtons = function addButtons() {
|
|
1207
|
+
var buttonContainer = dialogElement.querySelector(".APX-dialog-button-container");
|
|
1208
|
+
buttons.forEach(function (_ref) {
|
|
1209
|
+
var key = _ref.key,
|
|
1210
|
+
label = _ref.label,
|
|
1211
|
+
_ref$order = _ref.order,
|
|
1212
|
+
order = _ref$order === void 0 ? 0 : _ref$order,
|
|
1213
|
+
_ref$align = _ref.align,
|
|
1214
|
+
align = _ref$align === void 0 ? 'flex-end' : _ref$align,
|
|
1215
|
+
_ref$closeOnClick = _ref.closeOnClick,
|
|
1216
|
+
closeOnClick = _ref$closeOnClick === void 0 ? true : _ref$closeOnClick;
|
|
1217
|
+
var button = document.createElement('button');
|
|
1218
|
+
button.classList.add('APX-dialog-button');
|
|
1219
|
+
button.textContent = label;
|
|
1220
|
+
button.style.order = order;
|
|
1221
|
+
button.setAttribute('data-key', key);
|
|
1222
|
+
|
|
1223
|
+
// Create button context with disable/enable methods
|
|
1224
|
+
var buttonContext = {
|
|
1225
|
+
disable: function disable() {
|
|
1226
|
+
button.disabled = true;
|
|
1227
|
+
button.classList.add('APX-dialog-button-disabled');
|
|
1228
|
+
},
|
|
1229
|
+
enable: function enable() {
|
|
1230
|
+
button.disabled = false;
|
|
1231
|
+
button.classList.remove('APX-dialog-button-disabled');
|
|
1232
|
+
},
|
|
1233
|
+
key: key,
|
|
1234
|
+
element: button
|
|
1235
|
+
};
|
|
1236
|
+
if (closeOnClick) {
|
|
1237
|
+
// Handle as a one-time Promise
|
|
1238
|
+
var firstClickResolved = false;
|
|
1239
|
+
var firstClickPromise = new Promise(function (resolve) {
|
|
1240
|
+
button.onclick = function () {
|
|
1241
|
+
if (!firstClickResolved && !button.disabled) {
|
|
1242
|
+
firstClickResolved = true;
|
|
1243
|
+
resolve({
|
|
1244
|
+
dialog: dialog,
|
|
1245
|
+
button: buttonContext
|
|
1246
|
+
}); // Pass both dialog and button context
|
|
1247
|
+
dialog.close(); // Close the dialog
|
|
1248
|
+
}
|
|
1249
|
+
};
|
|
1250
|
+
});
|
|
1251
|
+
|
|
1252
|
+
// Assign the promise for chaining with `.then`
|
|
1253
|
+
dialog.buttons[key] = firstClickPromise;
|
|
1254
|
+
} else {
|
|
1255
|
+
// Handle as a repeated event handler
|
|
1256
|
+
var handlers = []; // Store handlers for `.then()`
|
|
1257
|
+
|
|
1258
|
+
var clickPromise = {
|
|
1259
|
+
then: function then(callback) {
|
|
1260
|
+
if (typeof callback === 'function') {
|
|
1261
|
+
handlers.push(callback); // Add to handlers
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
return clickPromise; // Allow chaining
|
|
1265
|
+
}
|
|
1266
|
+
};
|
|
1267
|
+
|
|
1268
|
+
button.onclick = function () {
|
|
1269
|
+
if (!button.disabled) {
|
|
1270
|
+
handlers.forEach(function (handler) {
|
|
1271
|
+
return handler({
|
|
1272
|
+
dialog: dialog,
|
|
1273
|
+
button: buttonContext
|
|
1274
|
+
});
|
|
1275
|
+
}); // Pass both dialog and button context
|
|
1276
|
+
}
|
|
1277
|
+
};
|
|
1278
|
+
|
|
1279
|
+
dialog.buttons[key] = clickPromise; // Assign the "fake" promise
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
buttonContainer.appendChild(button);
|
|
1283
|
+
buttonContainer.style.justifyContent = align;
|
|
1284
|
+
});
|
|
1285
|
+
};
|
|
1286
|
+
var fetchAndInsertContent = /*#__PURE__*/function () {
|
|
1287
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
1288
|
+
var originalCursor, dynamicContent, contentHtml;
|
|
1289
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
1290
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
1291
|
+
case 0:
|
|
1292
|
+
originalCursor = document.body.style.cursor;
|
|
1293
|
+
document.body.style.cursor = 'wait';
|
|
1294
|
+
dynamicContent = dialogElement.querySelector(".APX-dialog-dynamic-content");
|
|
1295
|
+
_context3.prev = 3;
|
|
1296
|
+
triggerEvent('contentLoading');
|
|
1297
|
+
_context3.next = 7;
|
|
1298
|
+
return dialog.lifecycle.contentLoading;
|
|
1299
|
+
case 7:
|
|
1300
|
+
if (!contentURI) {
|
|
1301
|
+
_context3.next = 13;
|
|
1302
|
+
break;
|
|
1303
|
+
}
|
|
1304
|
+
_context3.next = 10;
|
|
1305
|
+
return fetchContent(contentURI);
|
|
1306
|
+
case 10:
|
|
1307
|
+
_context3.t0 = _context3.sent;
|
|
1308
|
+
_context3.next = 14;
|
|
1309
|
+
break;
|
|
1310
|
+
case 13:
|
|
1311
|
+
_context3.t0 = content;
|
|
1312
|
+
case 14:
|
|
1313
|
+
contentHtml = _context3.t0;
|
|
1314
|
+
dynamicContent.innerHTML = contentHtml;
|
|
1315
|
+
triggerEvent('contentLoaded');
|
|
1316
|
+
_context3.next = 19;
|
|
1317
|
+
return dialog.lifecycle.contentLoaded;
|
|
1318
|
+
case 19:
|
|
1319
|
+
_context3.next = 24;
|
|
1320
|
+
break;
|
|
1321
|
+
case 21:
|
|
1322
|
+
_context3.prev = 21;
|
|
1323
|
+
_context3.t1 = _context3["catch"](3);
|
|
1324
|
+
console.error('Error loading content:', _context3.t1);
|
|
1325
|
+
case 24:
|
|
1326
|
+
_context3.prev = 24;
|
|
1327
|
+
document.body.style.cursor = originalCursor;
|
|
1328
|
+
return _context3.finish(24);
|
|
1329
|
+
case 27:
|
|
1330
|
+
case "end":
|
|
1331
|
+
return _context3.stop();
|
|
1332
|
+
}
|
|
1333
|
+
}, _callee3, null, [[3, 21, 24, 27]]);
|
|
1334
|
+
}));
|
|
1335
|
+
return function fetchAndInsertContent() {
|
|
1336
|
+
return _ref2.apply(this, arguments);
|
|
1337
|
+
};
|
|
1338
|
+
}();
|
|
1339
|
+
var fetchContent = /*#__PURE__*/function () {
|
|
1340
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(uri) {
|
|
1341
|
+
var method, headers, hasContentType, init, body, isFormData, isURLSearchParams, isBlob, isString, isPlainObject, response;
|
|
1342
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
1343
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
1344
|
+
case 0:
|
|
1345
|
+
method = (contentMethod || 'GET').toUpperCase(); // Always allow custom headers; we only add Content-Type when we can infer it
|
|
1346
|
+
headers = _objectSpread({}, contentHeaders || {});
|
|
1347
|
+
hasContentType = Object.keys(headers).some(function (k) {
|
|
1348
|
+
return k.toLowerCase() === 'content-type';
|
|
1349
|
+
});
|
|
1350
|
+
/**
|
|
1351
|
+
* Build RequestInit depending on method and contentData type.
|
|
1352
|
+
* We avoid setting Content-Type for FormData and raw string/Blob payloads,
|
|
1353
|
+
* unless the caller explicitly provided it via contentHeaders.
|
|
1354
|
+
*/
|
|
1355
|
+
init = {
|
|
1356
|
+
method: method
|
|
1357
|
+
};
|
|
1358
|
+
if (method === 'POST') {
|
|
1359
|
+
body = undefined;
|
|
1360
|
+
isFormData = typeof FormData !== 'undefined' && contentData instanceof FormData;
|
|
1361
|
+
isURLSearchParams = typeof URLSearchParams !== 'undefined' && contentData instanceof URLSearchParams;
|
|
1362
|
+
isBlob = typeof Blob !== 'undefined' && contentData instanceof Blob;
|
|
1363
|
+
isString = typeof contentData === 'string';
|
|
1364
|
+
isPlainObject = contentData && _typeof(contentData) === 'object' && !isFormData && !isURLSearchParams && !isBlob;
|
|
1365
|
+
if (isFormData) {
|
|
1366
|
+
body = contentData;
|
|
1367
|
+
// Do not set Content-Type for FormData; browser will set the boundary
|
|
1368
|
+
} else if (isURLSearchParams) {
|
|
1369
|
+
body = contentData;
|
|
1370
|
+
if (!hasContentType) headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
1371
|
+
} else if (isPlainObject) {
|
|
1372
|
+
body = JSON.stringify(contentData);
|
|
1373
|
+
if (!hasContentType) headers['Content-Type'] = 'application/json';
|
|
1374
|
+
} else if (isString || isBlob) {
|
|
1375
|
+
body = contentData;
|
|
1376
|
+
// Content-Type left to caller if needed
|
|
1377
|
+
} else if (contentData != null) {
|
|
1378
|
+
// Fallback: try send as-is
|
|
1379
|
+
body = contentData;
|
|
1380
|
+
}
|
|
1381
|
+
if (body !== undefined) {
|
|
1382
|
+
init.body = body;
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
if (Object.keys(headers).length > 0) {
|
|
1386
|
+
init.headers = headers;
|
|
1387
|
+
}
|
|
1388
|
+
_context4.next = 8;
|
|
1389
|
+
return fetch(uri, init);
|
|
1390
|
+
case 8:
|
|
1391
|
+
response = _context4.sent;
|
|
1392
|
+
if (response.ok) {
|
|
1393
|
+
_context4.next = 11;
|
|
1394
|
+
break;
|
|
1395
|
+
}
|
|
1396
|
+
throw new Error("Failed to fetch content: ".concat(response.statusText));
|
|
1397
|
+
case 11:
|
|
1398
|
+
return _context4.abrupt("return", response.text());
|
|
1399
|
+
case 12:
|
|
1400
|
+
case "end":
|
|
1401
|
+
return _context4.stop();
|
|
1402
|
+
}
|
|
1403
|
+
}, _callee4);
|
|
1404
|
+
}));
|
|
1405
|
+
return function fetchContent(_x) {
|
|
1406
|
+
return _ref3.apply(this, arguments);
|
|
1407
|
+
};
|
|
1408
|
+
}();
|
|
1409
|
+
|
|
1410
|
+
// Initialize dialog
|
|
1411
|
+
setDialogSize();
|
|
1412
|
+
addButtons();
|
|
1413
|
+
|
|
1414
|
+
// Set title and close button handler
|
|
1415
|
+
dialogElement.querySelector(".APX-dialog-title").textContent = title;
|
|
1416
|
+
dialogElement.querySelector('.APX-close-dialog').onclick = dialog.close;
|
|
1417
|
+
return dialog;
|
|
1418
|
+
};
|
|
1419
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createDialog);
|
|
1420
|
+
|
|
1421
|
+
/***/ }),
|
|
1422
|
+
|
|
1423
|
+
/***/ "./modules/listen/listen.mjs":
|
|
1424
|
+
/*!***********************************!*\
|
|
1425
|
+
!*** ./modules/listen/listen.mjs ***!
|
|
1426
|
+
\***********************************/
|
|
1427
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
1428
|
+
|
|
1429
|
+
"use strict";
|
|
1430
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1431
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1432
|
+
/* harmony export */ "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
|
|
1433
|
+
/* harmony export */ });
|
|
1434
|
+
var counter = 0;
|
|
1435
|
+
var doCallbacks = {};
|
|
1436
|
+
var timeouts = {};
|
|
1437
|
+
|
|
1438
|
+
/**
|
|
1439
|
+
* This function adds an event listener to the elements and returns an object with a do method to add callback functions.
|
|
1440
|
+
* @param {Object} apx - The apx object to augment with the listen function.
|
|
1441
|
+
* @returns {Object} - The augmented apx object.
|
|
1442
|
+
*/
|
|
1443
|
+
/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(apx) {
|
|
1444
|
+
var elements = apx.elements;
|
|
1445
|
+
|
|
1446
|
+
/**
|
|
1447
|
+
* Adds an event listener to the elements and returns an object with a do method to add callback functions.
|
|
1448
|
+
* @param {string} eventType - The type of event to listen for (e.g. 'click', 'keydown', etc.).
|
|
1449
|
+
* @param {string} [selector] - The CSS selector to use for event delegation (optional).
|
|
1450
|
+
* @returns {Object} - An object with a do method to add callback functions.
|
|
1451
|
+
* @example
|
|
1452
|
+
* apx.listen('click', '.my-button').do((event) => {
|
|
1453
|
+
* console.log('Button clicked!', event.target);
|
|
1454
|
+
* });
|
|
1455
|
+
*/
|
|
1456
|
+
apx.listen = function (eventTypes, secondArgument, thirdArgument) {
|
|
1457
|
+
var selector;
|
|
1458
|
+
var options = {};
|
|
1459
|
+
// Determine if the second argument is a selector or options
|
|
1460
|
+
if (typeof secondArgument === 'string') {
|
|
1461
|
+
selector = secondArgument;
|
|
1462
|
+
options = thirdArgument || {};
|
|
1463
|
+
} else {
|
|
1464
|
+
options = secondArgument || {};
|
|
1465
|
+
}
|
|
1466
|
+
var uniqueId = generateUniqueId();
|
|
1467
|
+
var timeoutDuration = options.timeout || 0;
|
|
1468
|
+
if (!Array.isArray(eventTypes)) {
|
|
1469
|
+
eventTypes = [eventTypes]; // Ensure eventTypes is an array
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
eventTypes.forEach(function (eventType) {
|
|
1473
|
+
elements.forEach(function (element) {
|
|
1474
|
+
element.addEventListener(eventType, function (event) {
|
|
1475
|
+
executeCallbacks(event, uniqueId, timeoutDuration, selector, element);
|
|
1476
|
+
});
|
|
1477
|
+
});
|
|
1478
|
+
});
|
|
1479
|
+
return {
|
|
1480
|
+
/**
|
|
1481
|
+
* Adds a callback function to the doCallbacks object for the current event listener.
|
|
1482
|
+
* @param {Function} doCallback - The callback function to execute when the event is triggered.
|
|
1483
|
+
* @returns {Object} - Returns the current object to allow for chained calls.
|
|
1484
|
+
* @example
|
|
1485
|
+
* apx.listen('click', '.my-button').do((event) => {
|
|
1486
|
+
* console.log('Button clicked!', event.target);
|
|
1487
|
+
* }).do((event) => {
|
|
1488
|
+
* console.log('Another callback function!');
|
|
1489
|
+
* });
|
|
1490
|
+
*/
|
|
1491
|
+
"do": function _do(doCallback) {
|
|
1492
|
+
if (!doCallbacks[uniqueId]) {
|
|
1493
|
+
doCallbacks[uniqueId] = [];
|
|
1494
|
+
}
|
|
1495
|
+
doCallbacks[uniqueId].push(doCallback);
|
|
1496
|
+
return this; // Return the object to allow for chained calls
|
|
1497
|
+
}
|
|
1498
|
+
};
|
|
1499
|
+
};
|
|
1500
|
+
|
|
1501
|
+
/**
|
|
1502
|
+
* Manually triggers the registered callbacks for a given event type on all elements or creates a new event if a string is provided.
|
|
1503
|
+
* @param {string|Event} event - The event to trigger. This can be an event type string (like 'click') or an actual Event object.
|
|
1504
|
+
*/
|
|
1505
|
+
apx.trigger = function (event) {
|
|
1506
|
+
var eventType;
|
|
1507
|
+
if (typeof event === 'string') {
|
|
1508
|
+
eventType = event;
|
|
1509
|
+
event = new Event(event, {
|
|
1510
|
+
bubbles: true,
|
|
1511
|
+
cancelable: true
|
|
1512
|
+
});
|
|
1513
|
+
} else if (event instanceof Event) {
|
|
1514
|
+
eventType = event.type;
|
|
1515
|
+
} else {
|
|
1516
|
+
console.error('Invalid event type provided to apx.trigger. It must be either a string or Event object.');
|
|
1517
|
+
return;
|
|
1518
|
+
}
|
|
1519
|
+
apx.elements.forEach(function (element) {
|
|
1520
|
+
element.dispatchEvent(event); // This will allow the event to bubble up naturally.
|
|
1521
|
+
});
|
|
1522
|
+
|
|
1523
|
+
// Handle event delegation manually by executing callbacks if the target matches the selector
|
|
1524
|
+
Object.keys(doCallbacks).forEach(function (uniqueId) {
|
|
1525
|
+
var callbackDetails = doCallbacks[uniqueId];
|
|
1526
|
+
if (callbackDetails && callbackDetails.eventType === eventType) {
|
|
1527
|
+
// Check if the event target matches the selector used during listener registration
|
|
1528
|
+
var selector = callbackDetails.selector;
|
|
1529
|
+
if (!selector || event.target.matches(selector)) {
|
|
1530
|
+
executeCallbacks(event, uniqueId, 0, selector, event.target); // Immediate execution, no timeout
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
});
|
|
1534
|
+
};
|
|
1535
|
+
|
|
1536
|
+
return apx;
|
|
1537
|
+
}
|
|
1538
|
+
;
|
|
1539
|
+
function executeCallbacks(event, uniqueId, timeoutDuration) {
|
|
1540
|
+
var selector = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
|
1541
|
+
var element = arguments.length > 4 ? arguments[4] : undefined;
|
|
1542
|
+
var matchedElement = selector ? closest(event.target, selector) : element;
|
|
1543
|
+
if (!matchedElement) {
|
|
1544
|
+
return;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
// Clear any previous timeout for this uniqueId to prevent unintended behavior
|
|
1548
|
+
clearTimeout(timeouts[uniqueId]);
|
|
1549
|
+
|
|
1550
|
+
// Function to handle the execution of callbacks
|
|
1551
|
+
function handleCallbackExecution() {
|
|
1552
|
+
if (doCallbacks[uniqueId]) {
|
|
1553
|
+
doCallbacks[uniqueId].reduce(function (prevPromise, doCallback) {
|
|
1554
|
+
return prevPromise.then(function () {
|
|
1555
|
+
return new Promise(function (resolve, reject) {
|
|
1556
|
+
try {
|
|
1557
|
+
var result = doCallback.bind(matchedElement)(event);
|
|
1558
|
+
if (result instanceof Promise) {
|
|
1559
|
+
result.then(resolve)["catch"](reject);
|
|
1560
|
+
} else {
|
|
1561
|
+
resolve(result);
|
|
1562
|
+
}
|
|
1563
|
+
} catch (error) {
|
|
1564
|
+
reject(error);
|
|
1565
|
+
}
|
|
1566
|
+
});
|
|
1567
|
+
});
|
|
1568
|
+
}, Promise.resolve())["catch"](function (error) {
|
|
1569
|
+
console.error('Error in callback chain:', error);
|
|
1570
|
+
});
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
// Check if timeoutDuration is zero to decide whether to delay the callback execution or not
|
|
1575
|
+
if (timeoutDuration === 0) {
|
|
1576
|
+
handleCallbackExecution();
|
|
1577
|
+
} else {
|
|
1578
|
+
timeouts[uniqueId] = setTimeout(handleCallbackExecution, timeoutDuration);
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
function generateUniqueId() {
|
|
1582
|
+
var randomPart = Math.random().toString(36).substr(2, 9); // More randomness
|
|
1583
|
+
var uniqueId = "".concat(Date.now(), "_").concat(randomPart, "_").concat(counter);
|
|
1584
|
+
counter = (counter + 1) % 1000; // Reset counter to avoid overflow
|
|
1585
|
+
|
|
1586
|
+
return uniqueId;
|
|
1587
|
+
}
|
|
1588
|
+
function closest(element, selector) {
|
|
1589
|
+
while (element && element.nodeType === 1) {
|
|
1590
|
+
if (element.matches(selector)) {
|
|
1591
|
+
return element;
|
|
1592
|
+
}
|
|
1593
|
+
element = element.parentNode;
|
|
1594
|
+
}
|
|
1595
|
+
return null;
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
/***/ }),
|
|
1599
|
+
|
|
1600
|
+
/***/ "./modules/toast/toast.mjs":
|
|
1601
|
+
/*!*********************************!*\
|
|
1602
|
+
!*** ./modules/toast/toast.mjs ***!
|
|
1603
|
+
\*********************************/
|
|
1604
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
1605
|
+
|
|
1606
|
+
"use strict";
|
|
1607
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1608
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1609
|
+
/* harmony export */ ToastManager: () => (/* binding */ ToastManager),
|
|
1610
|
+
/* harmony export */ createToastManager: () => (/* binding */ createToastManager),
|
|
1611
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
1612
|
+
/* harmony export */ toast: () => (/* binding */ toast)
|
|
1613
|
+
/* harmony export */ });
|
|
1614
|
+
/* harmony import */ var _css_toast_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css/toast.css */ "./modules/toast/css/toast.css");
|
|
1615
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1616
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
1617
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
1618
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
1619
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
1620
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
1621
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
1622
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1623
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1624
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1625
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1626
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
1627
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
1628
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
1629
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1630
|
+
// Minimal, framework-agnostic ToastManager for APX
|
|
1631
|
+
// ESM-first, no side effects on import. DOM only when used.
|
|
1632
|
+
|
|
1633
|
+
|
|
1634
|
+
/**
|
|
1635
|
+
* @typedef {Object} ToastConfig
|
|
1636
|
+
* @property {'bottom-right'|'bottom-left'|'top-right'|'top-left'} [position]
|
|
1637
|
+
* @property {number} [maxToasts]
|
|
1638
|
+
* @property {number} [defaultDurationMs]
|
|
1639
|
+
* @property {number} [zIndex]
|
|
1640
|
+
* @property {'polite'|'assertive'|'off'} [ariaLive]
|
|
1641
|
+
* @property {number} [gap]
|
|
1642
|
+
* @property {boolean} [dedupe]
|
|
1643
|
+
* @property {string} [containerClass]
|
|
1644
|
+
* @property {number} [offset]
|
|
1645
|
+
*/
|
|
1646
|
+
|
|
1647
|
+
/**
|
|
1648
|
+
* @typedef {Object} ToastOptions
|
|
1649
|
+
* @property {string|Node} message
|
|
1650
|
+
* @property {'info'|'success'|'warning'|'danger'} [type]
|
|
1651
|
+
* @property {number} [durationMs]
|
|
1652
|
+
* @property {boolean} [dismissible]
|
|
1653
|
+
* @property {string} [id]
|
|
1654
|
+
* @property {(ref: ToastRef, ev: MouseEvent) => void} [onClick]
|
|
1655
|
+
* @property {(ref: ToastRef, reason: 'timeout'|'close'|'api'|'overflow') => void} [onClose]
|
|
1656
|
+
* @property {string} [className]
|
|
1657
|
+
*/
|
|
1658
|
+
|
|
1659
|
+
/**
|
|
1660
|
+
* @typedef {Object} ToastRef
|
|
1661
|
+
* @property {string} id
|
|
1662
|
+
* @property {HTMLElement} el
|
|
1663
|
+
* @property {(reason?: 'api'|'close') => void} close
|
|
1664
|
+
* @property {(partial: Partial<ToastOptions>) => void} update
|
|
1665
|
+
* @property {() => Promise<void>} whenClosed
|
|
1666
|
+
* @property {(event: 'close'|'click', handler: Function) => () => void} on
|
|
1667
|
+
* @property {(event: 'close'|'click', handler: Function) => void} off
|
|
1668
|
+
*/
|
|
1669
|
+
|
|
1670
|
+
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
1671
|
+
var DEFAULT_CONFIG = {
|
|
1672
|
+
position: 'bottom-right',
|
|
1673
|
+
maxToasts: 5,
|
|
1674
|
+
defaultDurationMs: 5000,
|
|
1675
|
+
zIndex: 11000,
|
|
1676
|
+
ariaLive: 'polite',
|
|
1677
|
+
gap: 8,
|
|
1678
|
+
dedupe: false,
|
|
1679
|
+
containerClass: '',
|
|
1680
|
+
offset: 0
|
|
1681
|
+
};
|
|
1682
|
+
|
|
1683
|
+
/**
|
|
1684
|
+
* Create an element with classes
|
|
1685
|
+
*/
|
|
1686
|
+
function createEl(tag, classNames) {
|
|
1687
|
+
var el = document.createElement(tag);
|
|
1688
|
+
if (classNames) {
|
|
1689
|
+
classNames.split(' ').filter(Boolean).forEach(function (c) {
|
|
1690
|
+
return el.classList.add(c);
|
|
1691
|
+
});
|
|
1692
|
+
}
|
|
1693
|
+
return el;
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
/**
|
|
1697
|
+
* ToastManager class
|
|
1698
|
+
*/
|
|
1699
|
+
var ToastManager = /*#__PURE__*/function () {
|
|
1700
|
+
/** @param {Partial<ToastConfig>=} config */
|
|
1701
|
+
function ToastManager(config) {
|
|
1702
|
+
_classCallCheck(this, ToastManager);
|
|
1703
|
+
/** @type {ToastConfig} */
|
|
1704
|
+
this.config = _objectSpread(_objectSpread({}, DEFAULT_CONFIG), config || {});
|
|
1705
|
+
/** @type {HTMLElement|null} */
|
|
1706
|
+
this.container = null;
|
|
1707
|
+
/** @type {Map<string, ToastRef>} */
|
|
1708
|
+
this.idToRef = new Map();
|
|
1709
|
+
/** @type {ToastRef[]} */
|
|
1710
|
+
this.open = [];
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
/** @param {Partial<ToastConfig>} config */
|
|
1714
|
+
_createClass(ToastManager, [{
|
|
1715
|
+
key: "configure",
|
|
1716
|
+
value: function configure(config) {
|
|
1717
|
+
this.config = _objectSpread(_objectSpread({}, this.config), config || {});
|
|
1718
|
+
if (this.container) this.applyContainerConfig();
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
/** @param {'polite'|'assertive'|'off'} mode */
|
|
1722
|
+
}, {
|
|
1723
|
+
key: "setAriaLive",
|
|
1724
|
+
value: function setAriaLive(mode) {
|
|
1725
|
+
this.configure({
|
|
1726
|
+
ariaLive: mode
|
|
1727
|
+
});
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
/** @returns {ToastRef[]} */
|
|
1731
|
+
}, {
|
|
1732
|
+
key: "getOpenToasts",
|
|
1733
|
+
value: function getOpenToasts() {
|
|
1734
|
+
return this.open.slice();
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
/** @param {ToastOptions} opts */
|
|
1738
|
+
}, {
|
|
1739
|
+
key: "show",
|
|
1740
|
+
value: function show(opts) {
|
|
1741
|
+
var _this = this;
|
|
1742
|
+
if (!isBrowser) return (/** @type {any} */null
|
|
1743
|
+
);
|
|
1744
|
+
var options = this.normalizeOptions(opts);
|
|
1745
|
+
if (this.config.dedupe && options.id && this.idToRef.has(options.id)) {
|
|
1746
|
+
var _ref = this.idToRef.get(options.id);
|
|
1747
|
+
_ref.update(options);
|
|
1748
|
+
return _ref;
|
|
1749
|
+
}
|
|
1750
|
+
this.ensureContainer();
|
|
1751
|
+
var toastEl = createEl('div', "APX-toast APX-toast--".concat(options.type));
|
|
1752
|
+
toastEl.setAttribute('role', 'status');
|
|
1753
|
+
var toastId = options.id || "t_".concat(Date.now(), "_").concat(Math.random().toString(36).slice(2, 8));
|
|
1754
|
+
toastEl.dataset.toastId = toastId;
|
|
1755
|
+
if (options.className) toastEl.className += " ".concat(options.className);
|
|
1756
|
+
var contentEl = createEl('div', 'APX-toast__content');
|
|
1757
|
+
if (typeof options.message === 'string') {
|
|
1758
|
+
contentEl.textContent = options.message;
|
|
1759
|
+
} else if (options.message) {
|
|
1760
|
+
contentEl.appendChild(options.message);
|
|
1761
|
+
}
|
|
1762
|
+
toastEl.appendChild(contentEl);
|
|
1763
|
+
var closeBtn = null;
|
|
1764
|
+
if (options.dismissible !== false) {
|
|
1765
|
+
closeBtn = createEl('button', 'APX-toast__close');
|
|
1766
|
+
closeBtn.setAttribute('aria-label', 'Close');
|
|
1767
|
+
closeBtn.type = 'button';
|
|
1768
|
+
toastEl.appendChild(closeBtn);
|
|
1769
|
+
}
|
|
1770
|
+
this.container.appendChild(toastEl);
|
|
1771
|
+
|
|
1772
|
+
// Enter animation
|
|
1773
|
+
toastEl.classList.add('APX-toast--enter');
|
|
1774
|
+
requestAnimationFrame(function () {
|
|
1775
|
+
toastEl.classList.add('APX-toast--enter-active');
|
|
1776
|
+
});
|
|
1777
|
+
|
|
1778
|
+
// Event handling and timers
|
|
1779
|
+
var remaining = options.durationMs;
|
|
1780
|
+
var timerId = null;
|
|
1781
|
+
var startTs = null;
|
|
1782
|
+
var handlers = {
|
|
1783
|
+
click: new Set(),
|
|
1784
|
+
close: new Set()
|
|
1785
|
+
};
|
|
1786
|
+
var startTimer = function startTimer() {
|
|
1787
|
+
if (!remaining || remaining <= 0) return; // sticky
|
|
1788
|
+
startTs = Date.now();
|
|
1789
|
+
timerId = window.setTimeout(function () {
|
|
1790
|
+
return ref.close('timeout');
|
|
1791
|
+
}, remaining);
|
|
1792
|
+
};
|
|
1793
|
+
var pauseTimer = function pauseTimer() {
|
|
1794
|
+
if (timerId != null) {
|
|
1795
|
+
window.clearTimeout(timerId);
|
|
1796
|
+
timerId = null;
|
|
1797
|
+
if (startTs != null) remaining -= Date.now() - startTs;
|
|
1798
|
+
}
|
|
1799
|
+
};
|
|
1800
|
+
|
|
1801
|
+
/** @type {ToastRef} */
|
|
1802
|
+
var ref = {
|
|
1803
|
+
id: toastId,
|
|
1804
|
+
el: toastEl,
|
|
1805
|
+
close: function close(reason) {
|
|
1806
|
+
cleanup(reason || 'api');
|
|
1807
|
+
},
|
|
1808
|
+
update: function update(partial) {
|
|
1809
|
+
var merged = _this.normalizeOptions(_objectSpread(_objectSpread({}, options), partial));
|
|
1810
|
+
// update content
|
|
1811
|
+
if (typeof merged.message === 'string') {
|
|
1812
|
+
contentEl.textContent = merged.message;
|
|
1813
|
+
} else if (merged.message) {
|
|
1814
|
+
contentEl.innerHTML = '';
|
|
1815
|
+
contentEl.appendChild(merged.message);
|
|
1816
|
+
}
|
|
1817
|
+
// update type class
|
|
1818
|
+
['info', 'success', 'warning', 'danger'].forEach(function (t) {
|
|
1819
|
+
return toastEl.classList.remove("APX-toast--".concat(t));
|
|
1820
|
+
});
|
|
1821
|
+
toastEl.classList.add("APX-toast--".concat(merged.type));
|
|
1822
|
+
// update classes
|
|
1823
|
+
if (options.className !== merged.className) {
|
|
1824
|
+
var _toastEl$classList, _toastEl$classList2;
|
|
1825
|
+
if (options.className) (_toastEl$classList = toastEl.classList).remove.apply(_toastEl$classList, _toConsumableArray(options.className.split(' ').filter(Boolean)));
|
|
1826
|
+
if (merged.className) (_toastEl$classList2 = toastEl.classList).add.apply(_toastEl$classList2, _toConsumableArray(merged.className.split(' ').filter(Boolean)));
|
|
1827
|
+
}
|
|
1828
|
+
// update duration logic
|
|
1829
|
+
options.durationMs = merged.durationMs;
|
|
1830
|
+
remaining = merged.durationMs;
|
|
1831
|
+
pauseTimer();
|
|
1832
|
+
startTimer();
|
|
1833
|
+
},
|
|
1834
|
+
whenClosed: function whenClosed() {
|
|
1835
|
+
return closedPromise;
|
|
1836
|
+
},
|
|
1837
|
+
on: function on(event, handler) {
|
|
1838
|
+
handlers[event].add(handler);
|
|
1839
|
+
return function () {
|
|
1840
|
+
return ref.off(event, handler);
|
|
1841
|
+
};
|
|
1842
|
+
},
|
|
1843
|
+
off: function off(event, handler) {
|
|
1844
|
+
handlers[event]["delete"](handler);
|
|
1845
|
+
}
|
|
1846
|
+
};
|
|
1847
|
+
var notify = function notify(event, arg) {
|
|
1848
|
+
return handlers[event].forEach(function (fn) {
|
|
1849
|
+
try {
|
|
1850
|
+
fn(arg);
|
|
1851
|
+
} catch (_) {}
|
|
1852
|
+
});
|
|
1853
|
+
};
|
|
1854
|
+
var closedPromise = new Promise(function (resolve) {
|
|
1855
|
+
var finish = function finish(reason) {
|
|
1856
|
+
notify('close', reason);
|
|
1857
|
+
if (typeof options.onClose === 'function') {
|
|
1858
|
+
try {
|
|
1859
|
+
options.onClose(ref, reason);
|
|
1860
|
+
} catch (_) {}
|
|
1861
|
+
}
|
|
1862
|
+
resolve();
|
|
1863
|
+
};
|
|
1864
|
+
var cleanup = function cleanup(reason) {
|
|
1865
|
+
if (!toastEl) return;
|
|
1866
|
+
pauseTimer();
|
|
1867
|
+
// If overflow, remove immediately to enforce hard cap
|
|
1868
|
+
if (reason === 'overflow') {
|
|
1869
|
+
if (toastEl.parentElement) toastEl.parentElement.removeChild(toastEl);
|
|
1870
|
+
var idx = _this.open.indexOf(ref);
|
|
1871
|
+
if (idx >= 0) _this.open.splice(idx, 1);
|
|
1872
|
+
_this.idToRef["delete"](toastId);
|
|
1873
|
+
finish(reason);
|
|
1874
|
+
return;
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
// Otherwise, animate out
|
|
1878
|
+
toastEl.classList.add('APX-toast--exit');
|
|
1879
|
+
requestAnimationFrame(function () {
|
|
1880
|
+
return toastEl.classList.add('APX-toast--exit-active');
|
|
1881
|
+
});
|
|
1882
|
+
var removeEl = function removeEl() {
|
|
1883
|
+
toastEl.removeEventListener('transitionend', removeEl);
|
|
1884
|
+
if (toastEl.parentElement) toastEl.parentElement.removeChild(toastEl);
|
|
1885
|
+
var idx = _this.open.indexOf(ref);
|
|
1886
|
+
if (idx >= 0) _this.open.splice(idx, 1);
|
|
1887
|
+
_this.idToRef["delete"](toastId);
|
|
1888
|
+
finish(reason);
|
|
1889
|
+
};
|
|
1890
|
+
toastEl.addEventListener('transitionend', removeEl);
|
|
1891
|
+
};
|
|
1892
|
+
|
|
1893
|
+
// attach close behavior
|
|
1894
|
+
ref.close = function (reason) {
|
|
1895
|
+
return cleanup(reason || 'api');
|
|
1896
|
+
};
|
|
1897
|
+
});
|
|
1898
|
+
|
|
1899
|
+
// Click handling
|
|
1900
|
+
toastEl.addEventListener('click', function (ev) {
|
|
1901
|
+
notify('click', ev);
|
|
1902
|
+
if (typeof options.onClick === 'function') {
|
|
1903
|
+
try {
|
|
1904
|
+
options.onClick(ref, ev);
|
|
1905
|
+
} catch (_) {}
|
|
1906
|
+
}
|
|
1907
|
+
});
|
|
1908
|
+
|
|
1909
|
+
// Hover pause
|
|
1910
|
+
toastEl.addEventListener('mouseenter', pauseTimer);
|
|
1911
|
+
toastEl.addEventListener('mouseleave', function () {
|
|
1912
|
+
return startTimer();
|
|
1913
|
+
});
|
|
1914
|
+
if (closeBtn) closeBtn.addEventListener('click', function (ev) {
|
|
1915
|
+
ev.stopPropagation();
|
|
1916
|
+
ref.close('close');
|
|
1917
|
+
});
|
|
1918
|
+
|
|
1919
|
+
// Track
|
|
1920
|
+
this.open.push(ref);
|
|
1921
|
+
this.idToRef.set(toastId, ref);
|
|
1922
|
+
|
|
1923
|
+
// Overflow policy
|
|
1924
|
+
if (this.open.length > this.config.maxToasts) {
|
|
1925
|
+
var oldest = this.open[0];
|
|
1926
|
+
oldest.close('overflow');
|
|
1927
|
+
}
|
|
1928
|
+
startTimer();
|
|
1929
|
+
return ref;
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
/**
|
|
1933
|
+
* Convenience helpers
|
|
1934
|
+
*/
|
|
1935
|
+
}, {
|
|
1936
|
+
key: "info",
|
|
1937
|
+
value: function info(message, opts) {
|
|
1938
|
+
return this.show(_objectSpread(_objectSpread({}, opts || {}), {}, {
|
|
1939
|
+
message: message,
|
|
1940
|
+
type: 'info'
|
|
1941
|
+
}));
|
|
1942
|
+
}
|
|
1943
|
+
}, {
|
|
1944
|
+
key: "success",
|
|
1945
|
+
value: function success(message, opts) {
|
|
1946
|
+
return this.show(_objectSpread(_objectSpread({}, opts || {}), {}, {
|
|
1947
|
+
message: message,
|
|
1948
|
+
type: 'success'
|
|
1949
|
+
}));
|
|
1950
|
+
}
|
|
1951
|
+
}, {
|
|
1952
|
+
key: "warning",
|
|
1953
|
+
value: function warning(message, opts) {
|
|
1954
|
+
return this.show(_objectSpread(_objectSpread({}, opts || {}), {}, {
|
|
1955
|
+
message: message,
|
|
1956
|
+
type: 'warning'
|
|
1957
|
+
}));
|
|
1958
|
+
}
|
|
1959
|
+
}, {
|
|
1960
|
+
key: "danger",
|
|
1961
|
+
value: function danger(message, opts) {
|
|
1962
|
+
return this.show(_objectSpread(_objectSpread({}, opts || {}), {}, {
|
|
1963
|
+
message: message,
|
|
1964
|
+
type: 'danger'
|
|
1965
|
+
}));
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
/** @param {'api'|'overflow'} [reason] */
|
|
1969
|
+
}, {
|
|
1970
|
+
key: "closeAll",
|
|
1971
|
+
value: function closeAll(reason) {
|
|
1972
|
+
// copy to avoid mutation during iteration
|
|
1973
|
+
var all = this.open.slice();
|
|
1974
|
+
all.forEach(function (r) {
|
|
1975
|
+
return r.close(reason || 'api');
|
|
1976
|
+
});
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
/** @param {ToastOptions} opts */
|
|
1980
|
+
}, {
|
|
1981
|
+
key: "normalizeOptions",
|
|
1982
|
+
value: function normalizeOptions(opts) {
|
|
1983
|
+
var o = _objectSpread({}, opts);
|
|
1984
|
+
if (!o.type) o.type = 'info';
|
|
1985
|
+
if (typeof o.dismissible !== 'boolean') o.dismissible = true;
|
|
1986
|
+
if (typeof o.durationMs !== 'number') o.durationMs = this.config.defaultDurationMs;
|
|
1987
|
+
return o;
|
|
1988
|
+
}
|
|
1989
|
+
}, {
|
|
1990
|
+
key: "ensureContainer",
|
|
1991
|
+
value: function ensureContainer() {
|
|
1992
|
+
if (this.container || !isBrowser) return;
|
|
1993
|
+
var c = createEl('div', 'APX-toast-container');
|
|
1994
|
+
var pos = this.config.position || 'bottom-right';
|
|
1995
|
+
c.classList.add("APX-toast-container--".concat(pos));
|
|
1996
|
+
if (this.config.containerClass) c.classList.add(this.config.containerClass);
|
|
1997
|
+
c.style.zIndex = String(this.config.zIndex);
|
|
1998
|
+
c.style.gap = "".concat(this.config.gap, "px");
|
|
1999
|
+
if (this.config.offset) {
|
|
2000
|
+
var offset = "".concat(this.config.offset, "px");
|
|
2001
|
+
if (pos.includes('bottom')) c.style.bottom = offset;else c.style.top = offset;
|
|
2002
|
+
if (pos.includes('right')) c.style.right = offset;else c.style.left = offset;
|
|
2003
|
+
}
|
|
2004
|
+
c.setAttribute('aria-live', String(this.config.ariaLive));
|
|
2005
|
+
document.body.appendChild(c);
|
|
2006
|
+
this.container = c;
|
|
2007
|
+
this.applyContainerConfig();
|
|
2008
|
+
}
|
|
2009
|
+
}, {
|
|
2010
|
+
key: "applyContainerConfig",
|
|
2011
|
+
value: function applyContainerConfig() {
|
|
2012
|
+
var _this$container$class;
|
|
2013
|
+
if (!this.container) return;
|
|
2014
|
+
this.container.style.zIndex = String(this.config.zIndex);
|
|
2015
|
+
this.container.style.gap = "".concat(this.config.gap, "px");
|
|
2016
|
+
this.container.setAttribute('aria-live', String(this.config.ariaLive));
|
|
2017
|
+
// Update position class
|
|
2018
|
+
var posClasses = ['bottom-right', 'bottom-left', 'top-right', 'top-left'].map(function (p) {
|
|
2019
|
+
return "APX-toast-container--".concat(p);
|
|
2020
|
+
});
|
|
2021
|
+
(_this$container$class = this.container.classList).remove.apply(_this$container$class, _toConsumableArray(posClasses));
|
|
2022
|
+
this.container.classList.add("APX-toast-container--".concat(this.config.position));
|
|
2023
|
+
}
|
|
2024
|
+
}]);
|
|
2025
|
+
return ToastManager;
|
|
2026
|
+
}();
|
|
2027
|
+
/**
|
|
2028
|
+
* @param {Partial<ToastConfig>=} config
|
|
2029
|
+
* @returns {ToastManager}
|
|
2030
|
+
*/
|
|
2031
|
+
function createToastManager(config) {
|
|
2032
|
+
return new ToastManager(config);
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
// High-level APX.toast API (default & named managers)
|
|
2036
|
+
var _defaultManager = null;
|
|
2037
|
+
var _getDefault = function _getDefault() {
|
|
2038
|
+
if (!_defaultManager) _defaultManager = createToastManager();
|
|
2039
|
+
return _defaultManager;
|
|
2040
|
+
};
|
|
2041
|
+
|
|
2042
|
+
/**
|
|
2043
|
+
* Toast API surface to be attached as APX.toast.
|
|
2044
|
+
* Callable form proxies to defaultManager.show(opts): APX.toast({...})
|
|
2045
|
+
*/
|
|
2046
|
+
function toast(opts) {
|
|
2047
|
+
return _getDefault().show(opts);
|
|
2048
|
+
}
|
|
2049
|
+
Object.assign(toast, {
|
|
2050
|
+
/**
|
|
2051
|
+
* Create a manager. If first arg is string, register as named under toast.custom[name]
|
|
2052
|
+
* @param {string|Partial<ToastConfig>} nameOrConfig
|
|
2053
|
+
* @param {Partial<ToastConfig>=} maybeConfig
|
|
2054
|
+
* @returns {ToastManager}
|
|
2055
|
+
*/
|
|
2056
|
+
create: function create(nameOrConfig, maybeConfig) {
|
|
2057
|
+
if (typeof nameOrConfig === 'string') {
|
|
2058
|
+
var name = nameOrConfig;
|
|
2059
|
+
var manager = new ToastManager(_objectSpread({}, maybeConfig || {}));
|
|
2060
|
+
if (!toast.custom) toast.custom = {};
|
|
2061
|
+
toast.custom[name] = manager;
|
|
2062
|
+
return manager;
|
|
2063
|
+
}
|
|
2064
|
+
return new ToastManager(_objectSpread({}, nameOrConfig || {}));
|
|
2065
|
+
},
|
|
2066
|
+
/** @type {Record<string, ToastManager>} */
|
|
2067
|
+
custom: {},
|
|
2068
|
+
/** @param {string} name */
|
|
2069
|
+
use: function use(name) {
|
|
2070
|
+
return toast.custom && toast.custom[name] || null;
|
|
2071
|
+
},
|
|
2072
|
+
Manager: ToastManager,
|
|
2073
|
+
show: function show(opts) {
|
|
2074
|
+
return _getDefault().show(opts);
|
|
2075
|
+
},
|
|
2076
|
+
info: function info(message, opts) {
|
|
2077
|
+
return _getDefault().info(message, opts);
|
|
2078
|
+
},
|
|
2079
|
+
success: function success(message, opts) {
|
|
2080
|
+
return _getDefault().success(message, opts);
|
|
2081
|
+
},
|
|
2082
|
+
warning: function warning(message, opts) {
|
|
2083
|
+
return _getDefault().warning(message, opts);
|
|
2084
|
+
},
|
|
2085
|
+
danger: function danger(message, opts) {
|
|
2086
|
+
return _getDefault().danger(message, opts);
|
|
2087
|
+
},
|
|
2088
|
+
configure: function configure(config) {
|
|
2089
|
+
return _getDefault().configure(config);
|
|
2090
|
+
},
|
|
2091
|
+
setAriaLive: function setAriaLive(mode) {
|
|
2092
|
+
return _getDefault().setAriaLive(mode);
|
|
2093
|
+
},
|
|
2094
|
+
closeAll: function closeAll(reason) {
|
|
2095
|
+
return _getDefault().closeAll(reason);
|
|
2096
|
+
},
|
|
2097
|
+
getOpenToasts: function getOpenToasts() {
|
|
2098
|
+
return _getDefault().getOpenToasts();
|
|
2099
|
+
}
|
|
2100
|
+
});
|
|
2101
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toast);
|
|
2102
|
+
|
|
2103
|
+
|
|
2104
|
+
/***/ }),
|
|
2105
|
+
|
|
2106
|
+
/***/ "./modules/tristate/tristate.mjs":
|
|
2107
|
+
/*!***************************************!*\
|
|
2108
|
+
!*** ./modules/tristate/tristate.mjs ***!
|
|
2109
|
+
\***************************************/
|
|
2110
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
2111
|
+
|
|
2112
|
+
"use strict";
|
|
2113
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2114
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2115
|
+
/* harmony export */ "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
|
|
2116
|
+
/* harmony export */ });
|
|
2117
|
+
/* harmony import */ var _css_tristate_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css/tristate.css */ "./modules/tristate/css/tristate.css");
|
|
2118
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2119
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
2120
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
2121
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
2122
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2123
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
2124
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
2125
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
2126
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
2127
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2128
|
+
|
|
2129
|
+
|
|
2130
|
+
/**
|
|
2131
|
+
* Creates a tri-state checkbox for each checkbox element in the apx.elements array.
|
|
2132
|
+
* @param {Array<HTMLElement>} apx - An array of HTMLElements which is returned by APX()
|
|
2133
|
+
* @example
|
|
2134
|
+
* // Call the tristate function on an array of checkbox elements
|
|
2135
|
+
* apx.tristate();
|
|
2136
|
+
*/
|
|
2137
|
+
/* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(apx) {
|
|
2138
|
+
apx.tristate = function () {
|
|
2139
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2140
|
+
apx.elements.forEach(function (element) {
|
|
2141
|
+
if (element.type === 'checkbox') {
|
|
2142
|
+
var _createTriStateCheckb = createTriStateCheckbox(element, options),
|
|
2143
|
+
_createTriStateCheckb2 = _slicedToArray(_createTriStateCheckb, 3),
|
|
2144
|
+
originalCheckbox = _createTriStateCheckb2[0],
|
|
2145
|
+
tristateDom = _createTriStateCheckb2[1],
|
|
2146
|
+
hiddenInput = _createTriStateCheckb2[2];
|
|
2147
|
+
//If there is a "options.callbacks.after" callback in options call it
|
|
2148
|
+
if (options.callbacks && options.callbacks.after && typeof options.callbacks.after === 'function') {
|
|
2149
|
+
options.callbacks.after(originalCheckbox, tristateDom, hiddenInput);
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
});
|
|
2153
|
+
};
|
|
2154
|
+
}
|
|
2155
|
+
function toggleTriStateCheckboxState(customCheckbox, actualCheckbox, hiddenInput) {
|
|
2156
|
+
if (customCheckbox.classList.contains('checked')) {
|
|
2157
|
+
customCheckbox.classList.remove('checked');
|
|
2158
|
+
customCheckbox.classList.add('crossed');
|
|
2159
|
+
actualCheckbox.checked = false;
|
|
2160
|
+
hiddenInput.value = 'false';
|
|
2161
|
+
} else if (customCheckbox.classList.contains('crossed')) {
|
|
2162
|
+
customCheckbox.classList.remove('crossed');
|
|
2163
|
+
customCheckbox.classList.add('unchecked');
|
|
2164
|
+
hiddenInput.removeAttribute('name'); // Ensure the hidden input doesn't post any value
|
|
2165
|
+
hiddenInput.removeAttribute('value'); // Ensure the hidden input doesn't post any value
|
|
2166
|
+
} else {
|
|
2167
|
+
customCheckbox.classList.remove('unchecked');
|
|
2168
|
+
customCheckbox.classList.add('checked');
|
|
2169
|
+
actualCheckbox.checked = true;
|
|
2170
|
+
hiddenInput.value = 'true';
|
|
2171
|
+
hiddenInput.setAttribute('name', actualCheckbox.dataset.name); // Restore the name for posting
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
function createTriStateCheckbox(checkboxElement, options) {
|
|
2176
|
+
var _tristateDom$classLis;
|
|
2177
|
+
//get the checkbox margins including browser default
|
|
2178
|
+
var checkboxStyle = window.getComputedStyle(checkboxElement);
|
|
2179
|
+
// Hide the original checkbox
|
|
2180
|
+
checkboxElement.style.display = 'none';
|
|
2181
|
+
|
|
2182
|
+
// Create the custom checkbox div and set its initial state
|
|
2183
|
+
var tristateDom = document.createElement('div');
|
|
2184
|
+
tristateDom.classList.add('apx-tristate');
|
|
2185
|
+
if (options.size) {
|
|
2186
|
+
if (options.size.width) {
|
|
2187
|
+
tristateDom.style.width = options.size.width + 'px';
|
|
2188
|
+
}
|
|
2189
|
+
if (options.size.height) {
|
|
2190
|
+
tristateDom.style.height = options.size.height + 'px';
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
if (options.classes) (_tristateDom$classLis = tristateDom.classList).add.apply(_tristateDom$classLis, _toConsumableArray(computeClasses(options.classes)));
|
|
2194
|
+
tristateDom.style.margin = checkboxStyle.margin;
|
|
2195
|
+
if (checkboxElement.checked) {
|
|
2196
|
+
tristateDom.classList.add('checked');
|
|
2197
|
+
} else {
|
|
2198
|
+
tristateDom.classList.add('unchecked');
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
// Create the hidden input field
|
|
2202
|
+
var hiddenInput = document.createElement('input');
|
|
2203
|
+
hiddenInput.type = 'hidden';
|
|
2204
|
+
hiddenInput.name = checkboxElement.name; // Copy the name from the original checkbox
|
|
2205
|
+
checkboxElement.dataset.name = checkboxElement.name; // Store the name in a data attribute for later use
|
|
2206
|
+
checkboxElement.removeAttribute('name'); // Remove the name from the original checkbox to avoid double posting
|
|
2207
|
+
|
|
2208
|
+
if (options.defaultState) setDefaultState(options, tristateDom, hiddenInput);else {
|
|
2209
|
+
// Set the initial value for the hidden input based on the checkbox's state
|
|
2210
|
+
if (checkboxElement.checked) {
|
|
2211
|
+
hiddenInput.value = 'true';
|
|
2212
|
+
} else {
|
|
2213
|
+
hiddenInput.name = ''; // Ensure the hidden input doesn't post any value
|
|
2214
|
+
hiddenInput.value = '';
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
//handle accessibility, set the tabindex to the same as the checkbox
|
|
2219
|
+
tristateDom.tabIndex = checkboxElement.tabIndex;
|
|
2220
|
+
|
|
2221
|
+
// Insert the hidden input inside the custom checkbox div
|
|
2222
|
+
tristateDom.appendChild(hiddenInput);
|
|
2223
|
+
|
|
2224
|
+
// Insert it next to the actual checkbox
|
|
2225
|
+
checkboxElement.parentNode.insertBefore(tristateDom, checkboxElement.nextSibling);
|
|
2226
|
+
|
|
2227
|
+
// Add event listener
|
|
2228
|
+
tristateDom.addEventListener('click', function (e) {
|
|
2229
|
+
toggleTriStateCheckboxState(tristateDom, checkboxElement, hiddenInput);
|
|
2230
|
+
bubbleEventsToOriginalCheckbox(options, checkboxElement, tristateDom, hiddenInput, e);
|
|
2231
|
+
});
|
|
2232
|
+
tristateDom.addEventListener('keyup', onkeyup.bind(null, checkboxElement));
|
|
2233
|
+
return [checkboxElement, tristateDom, hiddenInput];
|
|
2234
|
+
}
|
|
2235
|
+
function setDefaultState(options, tristateDom, hiddenInput) {
|
|
2236
|
+
//for all values possible for defaultState, set the initial state of the checkbox
|
|
2237
|
+
if (options.defaultState === 'checked') {
|
|
2238
|
+
tristateDom.classList.remove('unchecked');
|
|
2239
|
+
tristateDom.classList.add('checked');
|
|
2240
|
+
hiddenInput.value = 'true';
|
|
2241
|
+
} else if (options.defaultState === 'unchecked') {
|
|
2242
|
+
tristateDom.classList.remove('checked');
|
|
2243
|
+
tristateDom.classList.add('unchecked');
|
|
2244
|
+
hiddenInput.removeAttribute('name'); // Ensure the hidden input doesn't post any value
|
|
2245
|
+
hiddenInput.removeAttribute('value'); // Ensure the hidden input doesn't post any value
|
|
2246
|
+
} else if (options.defaultState === 'crossed') {
|
|
2247
|
+
tristateDom.classList.remove('checked');
|
|
2248
|
+
tristateDom.classList.add('crossed');
|
|
2249
|
+
hiddenInput.value = 'false';
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
function computeClasses(classes) {
|
|
2253
|
+
var computedClasses = [];
|
|
2254
|
+
if (typeof classes === 'string') {
|
|
2255
|
+
//replace multiple white spaces with a single space
|
|
2256
|
+
classes = classes.replace(/\s\s+/g, ' ');
|
|
2257
|
+
if (classes.indexOf(' ') > -1) computedClasses = classes.split(' ');else if (classes.indexOf(',') > -1) computedClasses = classes.split(',');else computedClasses = [classes];
|
|
2258
|
+
} else if (Array.isArray(classes)) {
|
|
2259
|
+
computedClasses = classes;
|
|
2260
|
+
}
|
|
2261
|
+
return computedClasses;
|
|
2262
|
+
}
|
|
2263
|
+
function bubbleEventsToOriginalCheckbox(options, checkboxElement, tristateDom, hiddenInput, event) {
|
|
2264
|
+
//if options.callbacks.change is set, call it
|
|
2265
|
+
if (options.callbacks && options.callbacks.change && typeof options.callbacks.change === 'function') {
|
|
2266
|
+
options.callbacks.change(checkboxElement, tristateDom, hiddenInput);
|
|
2267
|
+
}
|
|
2268
|
+
if (!options.bubbleEvents) return;
|
|
2269
|
+
if (event.type === 'click') {
|
|
2270
|
+
checkboxElement.dispatchEvent(new MouseEvent('click', {
|
|
2271
|
+
bubbles: true,
|
|
2272
|
+
cancelable: true
|
|
2273
|
+
}));
|
|
2274
|
+
} else if (event.type === 'keyup') {
|
|
2275
|
+
checkboxElement.dispatchEvent(new KeyboardEvent('keyup', {
|
|
2276
|
+
key: ' ',
|
|
2277
|
+
bubbles: true,
|
|
2278
|
+
cancelable: true
|
|
2279
|
+
}));
|
|
2280
|
+
} else if (event.type === 'change') {
|
|
2281
|
+
checkboxElement.dispatchEvent(new Event('change', {
|
|
2282
|
+
bubbles: true,
|
|
2283
|
+
cancelable: true
|
|
2284
|
+
}));
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
function onkeyup(checkboxElement, event) {
|
|
2288
|
+
if (event.keyCode === 32) {
|
|
2289
|
+
bubbleEventsToOriginalCheckbox(checkboxElement, event);
|
|
2290
|
+
event.preventDefault();
|
|
2291
|
+
event.target.click();
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
/***/ })
|
|
2296
|
+
|
|
2297
|
+
/******/ });
|
|
2298
|
+
/************************************************************************/
|
|
2299
|
+
/******/ // The module cache
|
|
2300
|
+
/******/ var __webpack_module_cache__ = {};
|
|
2301
|
+
/******/
|
|
2302
|
+
/******/ // The require function
|
|
2303
|
+
/******/ function __webpack_require__(moduleId) {
|
|
2304
|
+
/******/ // Check if module is in cache
|
|
2305
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
2306
|
+
/******/ if (cachedModule !== undefined) {
|
|
2307
|
+
/******/ return cachedModule.exports;
|
|
2308
|
+
/******/ }
|
|
2309
|
+
/******/ // Create a new module (and put it into the cache)
|
|
2310
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
2311
|
+
/******/ id: moduleId,
|
|
2312
|
+
/******/ // no module.loaded needed
|
|
2313
|
+
/******/ exports: {}
|
|
2314
|
+
/******/ };
|
|
2315
|
+
/******/
|
|
2316
|
+
/******/ // Execute the module function
|
|
2317
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
2318
|
+
/******/
|
|
2319
|
+
/******/ // Return the exports of the module
|
|
2320
|
+
/******/ return module.exports;
|
|
2321
|
+
/******/ }
|
|
2322
|
+
/******/
|
|
2323
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
2324
|
+
/******/ __webpack_require__.m = __webpack_modules__;
|
|
2325
|
+
/******/
|
|
2326
|
+
/************************************************************************/
|
|
2327
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
2328
|
+
/******/ (() => {
|
|
2329
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
2330
|
+
/******/ __webpack_require__.n = (module) => {
|
|
2331
|
+
/******/ var getter = module && module.__esModule ?
|
|
2332
|
+
/******/ () => (module['default']) :
|
|
2333
|
+
/******/ () => (module);
|
|
2334
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
2335
|
+
/******/ return getter;
|
|
2336
|
+
/******/ };
|
|
2337
|
+
/******/ })();
|
|
2338
|
+
/******/
|
|
2339
|
+
/******/ /* webpack/runtime/define property getters */
|
|
2340
|
+
/******/ (() => {
|
|
2341
|
+
/******/ // define getter functions for harmony exports
|
|
2342
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
2343
|
+
/******/ for(var key in definition) {
|
|
2344
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
2345
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
2346
|
+
/******/ }
|
|
2347
|
+
/******/ }
|
|
2348
|
+
/******/ };
|
|
2349
|
+
/******/ })();
|
|
2350
|
+
/******/
|
|
2351
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
2352
|
+
/******/ (() => {
|
|
2353
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
2354
|
+
/******/ })();
|
|
2355
|
+
/******/
|
|
2356
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
2357
|
+
/******/ (() => {
|
|
2358
|
+
/******/ // define __esModule on exports
|
|
2359
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
2360
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
2361
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2362
|
+
/******/ }
|
|
2363
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
2364
|
+
/******/ };
|
|
2365
|
+
/******/ })();
|
|
2366
|
+
/******/
|
|
2367
|
+
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
2368
|
+
/******/ (() => {
|
|
2369
|
+
/******/ __webpack_require__.b = document.baseURI || self.location.href;
|
|
2370
|
+
/******/
|
|
2371
|
+
/******/ // object to store loaded and loading chunks
|
|
2372
|
+
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
2373
|
+
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
|
2374
|
+
/******/ var installedChunks = {
|
|
2375
|
+
/******/ "main": 0
|
|
2376
|
+
/******/ };
|
|
2377
|
+
/******/
|
|
2378
|
+
/******/ // no chunk on demand loading
|
|
2379
|
+
/******/
|
|
2380
|
+
/******/ // no prefetching
|
|
2381
|
+
/******/
|
|
2382
|
+
/******/ // no preloaded
|
|
2383
|
+
/******/
|
|
2384
|
+
/******/ // no HMR
|
|
2385
|
+
/******/
|
|
2386
|
+
/******/ // no HMR manifest
|
|
2387
|
+
/******/
|
|
2388
|
+
/******/ // no on chunks loaded
|
|
2389
|
+
/******/
|
|
2390
|
+
/******/ // no jsonp function
|
|
2391
|
+
/******/ })();
|
|
2392
|
+
/******/
|
|
2393
|
+
/******/ /* webpack/runtime/nonce */
|
|
2394
|
+
/******/ (() => {
|
|
2395
|
+
/******/ __webpack_require__.nc = undefined;
|
|
2396
|
+
/******/ })();
|
|
2397
|
+
/******/
|
|
2398
|
+
/************************************************************************/
|
|
2399
|
+
var __webpack_exports__ = {};
|
|
2400
|
+
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
2401
|
+
(() => {
|
|
2402
|
+
"use strict";
|
|
2403
|
+
/*!*****************!*\
|
|
2404
|
+
!*** ./APX.mjs ***!
|
|
2405
|
+
\*****************/
|
|
2406
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2407
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2408
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
2409
|
+
/* harmony export */ });
|
|
2410
|
+
/* harmony import */ var _modules_listen_listen_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modules/listen/listen.mjs */ "./modules/listen/listen.mjs");
|
|
2411
|
+
/* harmony import */ var _modules_tristate_tristate_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/tristate/tristate.mjs */ "./modules/tristate/tristate.mjs");
|
|
2412
|
+
/* harmony import */ var _modules_dialog_dialog_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/dialog/dialog.mjs */ "./modules/dialog/dialog.mjs");
|
|
2413
|
+
/* harmony import */ var _modules_toast_toast_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/toast/toast.mjs */ "./modules/toast/toast.mjs");
|
|
2414
|
+
/* harmony import */ var _modules_common_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/common.mjs */ "./modules/common.mjs");
|
|
2415
|
+
|
|
2416
|
+
|
|
2417
|
+
|
|
2418
|
+
|
|
2419
|
+
|
|
2420
|
+
|
|
2421
|
+
/**
|
|
2422
|
+
* Creates an APX object that wraps one or more HTML elements.
|
|
2423
|
+
* @param {string|HTMLElement|NodeList|HTMLCollection|Array<HTMLElement>|jQuery|Function} input - The input to create the APX object from.
|
|
2424
|
+
* @returns {Object} The APX object.
|
|
2425
|
+
* @throws {Error} If the input type is invalid.
|
|
2426
|
+
* @example
|
|
2427
|
+
* // XPath
|
|
2428
|
+
* const apx1 = APX('//div[@class="example"]');
|
|
2429
|
+
*
|
|
2430
|
+
* // CSS selector
|
|
2431
|
+
* const apx2 = APX('.example');
|
|
2432
|
+
*
|
|
2433
|
+
* // Single element
|
|
2434
|
+
* const element = document.querySelector('.example');
|
|
2435
|
+
* const apx3 = APX(element);
|
|
2436
|
+
*
|
|
2437
|
+
* // NodeList or HTMLCollection
|
|
2438
|
+
* const nodeList = document.querySelectorAll('.example');
|
|
2439
|
+
* const apx4 = APX(nodeList);
|
|
2440
|
+
*
|
|
2441
|
+
* // Array of elements
|
|
2442
|
+
* const elements = [document.querySelector('.example1'), document.querySelector('.example2')];
|
|
2443
|
+
* const apx5 = APX(elements);
|
|
2444
|
+
*
|
|
2445
|
+
* // jQuery object
|
|
2446
|
+
* const $example = $('.example');
|
|
2447
|
+
* const apx6 = APX($example);
|
|
2448
|
+
*
|
|
2449
|
+
* // Function returning an APX object
|
|
2450
|
+
* const apx7 = APX(() => APX('.example'));
|
|
2451
|
+
*/
|
|
2452
|
+
var APX = function APX(input) {
|
|
2453
|
+
var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;
|
|
2454
|
+
var elements;
|
|
2455
|
+
|
|
2456
|
+
// Validate context
|
|
2457
|
+
if (typeof context === 'string') {
|
|
2458
|
+
context = document.querySelector(context);
|
|
2459
|
+
} else if (APX.isAPXObject(context)) {
|
|
2460
|
+
context = context.first();
|
|
2461
|
+
} else if (!(context instanceof HTMLElement || context instanceof Document)) {
|
|
2462
|
+
throw new Error('Invalid context for APX');
|
|
2463
|
+
}
|
|
2464
|
+
if (typeof input === 'string' && input.startsWith('//')) {
|
|
2465
|
+
// XPath with context
|
|
2466
|
+
elements = document.evaluate(input, context, null, XPathResult.ANY_TYPE, null);
|
|
2467
|
+
var nodes = [];
|
|
2468
|
+
var node = elements.iterateNext();
|
|
2469
|
+
while (node) {
|
|
2470
|
+
nodes.push(node);
|
|
2471
|
+
node = elements.iterateNext();
|
|
2472
|
+
}
|
|
2473
|
+
elements = nodes;
|
|
2474
|
+
} else if (typeof input === 'string') {
|
|
2475
|
+
// CSS selector with context
|
|
2476
|
+
elements = context.querySelectorAll(input);
|
|
2477
|
+
} else if (input instanceof HTMLElement) {
|
|
2478
|
+
// Single element within context
|
|
2479
|
+
elements = context.contains(input) ? [input] : [];
|
|
2480
|
+
} else if (input instanceof NodeList || input instanceof HTMLCollection) {
|
|
2481
|
+
// NodeList or HTMLCollection within context
|
|
2482
|
+
elements = Array.from(input).filter(function (el) {
|
|
2483
|
+
return context.contains(el);
|
|
2484
|
+
});
|
|
2485
|
+
} else if (Array.isArray(input) && input.every(function (el) {
|
|
2486
|
+
return el instanceof HTMLElement;
|
|
2487
|
+
})) {
|
|
2488
|
+
// Array of elements within context
|
|
2489
|
+
elements = input.filter(function (el) {
|
|
2490
|
+
return context.contains(el);
|
|
2491
|
+
});
|
|
2492
|
+
} else if (typeof jQuery != 'undefined' && input instanceof jQuery) {
|
|
2493
|
+
// jQuery object within context
|
|
2494
|
+
elements = Array.from(input.get()).filter(function (el) {
|
|
2495
|
+
return context.contains(el);
|
|
2496
|
+
});
|
|
2497
|
+
} else if (typeof input === 'function') {
|
|
2498
|
+
// Function returning an APX object with context
|
|
2499
|
+
elements = APX(input(), context);
|
|
2500
|
+
} else {
|
|
2501
|
+
throw new Error('Invalid input type for APX');
|
|
2502
|
+
}
|
|
2503
|
+
var apx = {
|
|
2504
|
+
elements: elements,
|
|
2505
|
+
_isAPXObject: true
|
|
2506
|
+
};
|
|
2507
|
+
apx.length = elements.length;
|
|
2508
|
+
apx.each = function (callback) {
|
|
2509
|
+
if (this.elements instanceof Array) this.elements.forEach(callback);
|
|
2510
|
+
if (this.elements instanceof NodeList) Array.from(this.elements).forEach(callback);
|
|
2511
|
+
return this;
|
|
2512
|
+
};
|
|
2513
|
+
apx.get = function (index) {
|
|
2514
|
+
return this.elements[index];
|
|
2515
|
+
};
|
|
2516
|
+
apx.all = function () {
|
|
2517
|
+
if (this.elements instanceof Array) return this.elements;
|
|
2518
|
+
if (this.elements instanceof NodeList) return Array.from(this.elements);
|
|
2519
|
+
return this;
|
|
2520
|
+
};
|
|
2521
|
+
apx.first = function () {
|
|
2522
|
+
return this.get(0);
|
|
2523
|
+
};
|
|
2524
|
+
(0,_modules_listen_listen_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(apx);
|
|
2525
|
+
(0,_modules_tristate_tristate_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])(apx);
|
|
2526
|
+
return apx;
|
|
2527
|
+
};
|
|
2528
|
+
APX.loadCss = _modules_common_mjs__WEBPACK_IMPORTED_MODULE_4__.loadCss;
|
|
2529
|
+
APX.dialog = _modules_dialog_dialog_mjs__WEBPACK_IMPORTED_MODULE_2__["default"];
|
|
2530
|
+
APX.toast = _modules_toast_toast_mjs__WEBPACK_IMPORTED_MODULE_3__["default"];
|
|
2531
|
+
APX.isAPXObject = function (obj) {
|
|
2532
|
+
return obj && obj._isAPXObject === true;
|
|
2533
|
+
};
|
|
2534
|
+
APX.is_numeric = function (n) {
|
|
2535
|
+
return !isNaN(n - parseFloat(n));
|
|
2536
|
+
};
|
|
2537
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (APX);
|
|
2538
|
+
})();
|
|
2539
|
+
|
|
2540
|
+
window.APX = __webpack_exports__["default"];
|
|
2541
|
+
/******/ })()
|
|
2542
|
+
;
|
|
2543
|
+
//# sourceMappingURL=APX.standalone.js.map
|