aprog 2.3.31 → 2.3.32
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/index.js
CHANGED
|
@@ -23,7 +23,7 @@ export {
|
|
|
23
23
|
} from './src/html.js';
|
|
24
24
|
export { prism } from "./src/prism.js";
|
|
25
25
|
export { uniquePage } from "./src/pages.js";
|
|
26
|
-
export { state, wrap, toast, abort, useTableDrag, callback } from "./src/helper.js";
|
|
26
|
+
export { state, wrap, toast, abort, useTableDrag, callback, json } from "./src/helper.js";
|
|
27
27
|
export { loadTranslations, translate } from "./src/translator.js";
|
|
28
28
|
export { svg } from "./src/svg.js";
|
|
29
29
|
export { Modal, modal, closeAllModals, closeThisModal } from "./src/modal.js";
|
|
@@ -31,3 +31,6 @@ export { default as AbortError } from './src/classes/AbortError.js';
|
|
|
31
31
|
export { default as SmartWrapper } from './src/classes/SmartWrapper.js';
|
|
32
32
|
export { default as StateWrapper } from './src/classes/StateWrapper.js';
|
|
33
33
|
export { default as Toast } from './src/classes/Toast.js';
|
|
34
|
+
export { ButtonConstructor } from './src/constructs/ButtonConstructor.js';
|
|
35
|
+
export { InputConstructor } from './src/constructs/InputConstructor.js';
|
|
36
|
+
export { SelectConstructor } from './src/constructs/SelectConstructor.js';
|
package/package.json
CHANGED
package/src/helper.js
CHANGED
|
@@ -114,3 +114,20 @@ export const useTableDrag = (selectorOrElement, onReorder = null, time = 1000) =
|
|
|
114
114
|
* @returns {Function}
|
|
115
115
|
*/
|
|
116
116
|
export const callback = (fn, ...args) => (...extra) => fn(...args, ...extra);
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Universal function for JSON
|
|
120
|
+
* @param value
|
|
121
|
+
* @returns {*|string}
|
|
122
|
+
*/
|
|
123
|
+
export const json = (value) => {
|
|
124
|
+
if (typeof value === 'string') {
|
|
125
|
+
return JSON.parse(value);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (value !== null && typeof value === 'object') {
|
|
129
|
+
return JSON.stringify(value);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return value;
|
|
133
|
+
}
|
package/src/svg.js
CHANGED
|
@@ -238,15 +238,16 @@ export const svg = ({
|
|
|
238
238
|
`,
|
|
239
239
|
|
|
240
240
|
earth: `
|
|
241
|
-
<svg id="${id}"
|
|
242
|
-
class="${classes}"
|
|
243
|
-
width="${w}"
|
|
244
|
-
height="${h}"
|
|
245
|
-
fill="${fill}"
|
|
246
|
-
stroke="${stroke}"
|
|
247
|
-
stroke-width="${strokeWidth}"
|
|
248
|
-
viewBox="0 0
|
|
249
|
-
<path d="
|
|
241
|
+
<svg id="${id}"
|
|
242
|
+
class="${classes}"
|
|
243
|
+
width="${w}"
|
|
244
|
+
height="${h}"
|
|
245
|
+
fill="${fill}"
|
|
246
|
+
stroke="${stroke}"
|
|
247
|
+
stroke-width="${strokeWidth}"
|
|
248
|
+
viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
|
|
249
|
+
<path d="M511.434,239.204c-4.138-63.963-31.794-121.624-74.418-164.217c-17.682-17.685-37.951-32.809-60.22-44.74 C340.806,10.962,299.67,0,256,0C185.365,0,121.273,28.67,74.984,74.988C28.663,121.273,0,185.361,0,256 c0,70.639,28.663,134.735,74.984,181.013C121.273,483.329,185.365,512,256,512c10.178,0,20.211-0.593,30.092-1.757 c25.423-2.974,49.714-9.666,72.278-19.558c18.337-8.004,35.573-18.099,51.38-29.968c9.642-7.261,18.755-15.194,27.266-23.704 C483.337,390.734,512,326.639,512,256C512,250.347,511.82,244.748,511.434,239.204z M368.22,213.758 c-8.983,3.483-31.286,4.653-36.252,1.343c-4.943-3.272-17.416-7.379-22.444-6.488c-5.032,0.89,1.604,8.416-4.259,9.338 c-5.86,0.898-13.395-3.208-19.294-7.44c-5.856-4.162-15.144-5.794-15.144-5.794c-2.26-0.273-4.529-0.547-6.789-0.804 c-3.365-6.762-1.608-22.096-13.52-18.63c-11.903,3.475-51.197,10.416-59.77,12.11c-8.573,1.726-18.81,15.39-25.63,25.532 c-6.843,10.244-25.481,42.241-28.842,47.215c-3.365,5.059-4.884,36.65-4.79,44.833c0.085,8.339,37.322,42.623,49.022,44.107 c11.759,1.616,43.697-6.66,52.091-8.417c8.429-1.695,13.309,9.557,19.977,9.431c6.699-0.117,14.948,2.983,8.159,12.689 c-6.82,9.634-6.851,14.413-0.328,20.597c6.547,6.247,19.169,29.381,10.506,47.707c-8.604,18.341-2.292,27.008,2.323,34.262 c0.948,1.491,1.932,3.552,2.916,5.988c-6.637,0.594-13.363,0.89-20.152,0.89c-62.51,0-118.985-25.297-159.97-66.25 C55.07,374.986,29.764,318.51,29.764,256c0-62.51,25.306-118.986,66.266-159.978c40.984-40.952,97.459-66.25,159.97-66.25 c7.765,0,15.476,0.382,23.042,1.155c-1.488,1.101-3.127,2.233-5.032,3.365c-12.649,7.558-17.744,10.931-27.058,13.453 c-9.35,2.506-5.895,21.292-2.475,24.713c3.428,3.42,11.076-0.844,17.006-4.225c5.922-3.365,7.648,3.42,7.675,5.973 c0,2.561,3.424,12.806,8.484,11.111c5.095-1.695,13.457-18.7,12.594-21.222c-0.863-2.569-4.263-9.378,1.608-14.437 c5.805-5.028,12.465-9.198,18.278-13.368c1.811,0.406,3.596,0.891,5.352,1.39c-0.508,1.257-1.667,2.802-3.568,4.498 c-6.64,5.871-9.139,10.103-9.139,10.103s-1.581,13.563,2.62,13.563c4.197,0.023,15.897-2.436,21.698-4.107 c5.836-1.67,5.868,3.428,0.058,5.091c-5.832,1.639-10.834,4.169-10.834,4.169c-0.835,2.522-1.636,5.092-2.471,7.613 c-8.366,5.068-11.7,12.719-11.7,12.719s-37.123,0.804-39.739,1.663c-2.53,0.812-1.694-7.675-1.694-7.675s2.498-8.55-1.729-7.714 c-4.197,0.866-4.224,8.347-4.224,8.55c-0.566,3.396-1.132,6.816-1.667,10.236c0,0-16.194,3.396-19.618,6.84 c-3.392,3.428-14.5,13.672-17.053,15.421c-2.565,1.694-11.134,4.286-14.562,6.012c-3.424,1.734,10.271,7.722,10.271,10.275 c0,2.561,0.031,14.554-5.118,15.414c-5.126,0.866-29.143,0.898-29.143,0.898s-7.683,27.414-5.954,29.982 c1.726,2.553,12.856,8.51,19.708,7.652c6.844-0.874,22.233-8.573,22.233-8.573c2.264-5.153,4.556-10.283,6.848-15.421 c4.552-4.856,9.108-9.713,13.664-14.585c0,0.023,10.236,4.255,13.664,0.828c3.388-3.42,10.15-6.855,10.209-6.855 c0.027,0,6.781,12.781,11.017,14.468c4.251,1.709,11.841,8.487,12.676,12.75c0.836,4.255,1.667,11.907,4.197,10.174 c2.534-1.726,6.789-11.93,6.789-11.93s5.891-3.428-0.836-6.817c-6.73-3.365-18.575-15.272-20.273-17.834 c-1.694-2.561-0.832-10.244,5.091-6.847c5.954,3.428,21.94,18.692,21.94,18.692s0.835,7.675,5.001,11.048 c4.197,3.358,8.366,9.284,8.366,12.68c-0.031,3.396-0.031,5.06,5.801,5.028c5.868-0.031,3.424-11.041,3.424-13.57 c0-2.561-0.8-7.652,3.365-7.652c4.166-0.031,10.806,3.303,10.806,3.303s-4.228,16.974,4.044,19.434 c8.339,2.444,33.82-4.575,33.731-0.351C373.342,191.053,377.246,210.284,368.22,213.758z M415.969,415.977 c-6.043,6.028-12.414,11.728-19.11,17.052c-0.597-11.728-0.445-31.677,1.159-39.477c1.995-9.377,19.559-16.459,27.832-29.405 c8.334-13.008,21.257-27.828,18.844-46.863c-14.141,7.034-22.116,10.603-29.827,6.113c-7.71-4.497-15.178-20.394-18.247-26.828 c-2.862-6.16-29.408-56.733-24.587-60.332c5.032-3.31,28.515,39.212,37.565,51.76c9.142,12.742,5.535,28.975,24.618,18.52 c19.047-10.448,42.358-29.178,45.543-37.362c3.276-8.151-8.334-28.842-13.066-23.846c-4.646,5.06-18.576,7.152-18.607,7.152 c-5.954-10.681-11.997-21.495-18.126-32.387c0,0,7.887-0.149,15.538,6.215c7.71,6.403,22.92,14.109,31.942,15.413 c1.218,0.195,2.678,0.219,4.346,0.133c0.296,4.669,0.448,9.401,0.448,14.164C482.236,318.51,456.93,374.986,415.969,415.977z"></path>
|
|
250
|
+
<path d="M205.232,89.526c2.569,1.718-1.698,9.432-5.114,15.429c-3.42,5.996-1.706,9.417-1.706,9.417 s16.272-2.577,19.688-4.295c3.416-1.701,5.973-12.844,3.4-15.412c-2.569-2.569-11.138-10.268-11.15-12.837 c0-2.569,0.839-11.977-2.596-14.523c-3.42-2.576-11.119,2.28-11.103,7.684C196.655,78.415,202.66,87.808,205.232,89.526z"></path>
|
|
250
251
|
</svg>
|
|
251
252
|
`
|
|
252
253
|
}
|