siam-ui-utils 3.1.2 → 3.1.4
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/dist/_virtual/index.js +2 -2
- package/dist/custom-input/CustomInputCheckbox.js +1 -2
- package/dist/custom-input/CustomInputCheckbox.js.map +1 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Badge.js +2 -2
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Badge.js.map +1 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Button.js +2 -2
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Button.js.map +1 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/CloseButton.js +2 -2
- package/dist/node_modules/@neolution-ch/reactstrap/esm/CloseButton.js.map +1 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Col.js +3 -3
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Col.js.map +1 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/FormGroup.js +2 -2
- package/dist/node_modules/@neolution-ch/reactstrap/esm/FormGroup.js.map +1 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Input.js +2 -2
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Input.js.map +1 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Label.js +3 -3
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Label.js.map +1 -1
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Row.js +2 -2
- package/dist/node_modules/@neolution-ch/reactstrap/esm/Row.js.map +1 -1
- package/dist/react-notifications/index.js +3 -8
- package/dist/react-notifications/index.js.map +1 -1
- package/dist/select/custom-select/index.js +3 -85
- package/dist/select/custom-select/index.js.map +1 -1
- package/package.json +5 -1
- package/dist/_virtual/events.js +0 -6
- package/dist/_virtual/events.js.map +0 -1
- package/dist/_virtual/events2.js +0 -5
- package/dist/_virtual/events2.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -8
- package/dist/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -13
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -8
- package/dist/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -13
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -9
- package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +0 -1
- package/dist/node_modules/dom-helpers/esm/addClass.js +0 -10
- package/dist/node_modules/dom-helpers/esm/addClass.js.map +0 -1
- package/dist/node_modules/dom-helpers/esm/hasClass.js +0 -8
- package/dist/node_modules/dom-helpers/esm/hasClass.js.map +0 -1
- package/dist/node_modules/dom-helpers/esm/removeClass.js +0 -16
- package/dist/node_modules/dom-helpers/esm/removeClass.js.map +0 -1
- package/dist/node_modules/events/events.js +0 -372
- package/dist/node_modules/events/events.js.map +0 -1
- package/dist/node_modules/react-transition-group/esm/CSSTransition.js +0 -275
- package/dist/node_modules/react-transition-group/esm/CSSTransition.js.map +0 -1
- package/dist/node_modules/react-transition-group/esm/Transition.js +0 -441
- package/dist/node_modules/react-transition-group/esm/Transition.js.map +0 -1
- package/dist/node_modules/react-transition-group/esm/TransitionGroup.js +0 -146
- package/dist/node_modules/react-transition-group/esm/TransitionGroup.js.map +0 -1
- package/dist/node_modules/react-transition-group/esm/TransitionGroupContext.js +0 -6
- package/dist/node_modules/react-transition-group/esm/TransitionGroupContext.js.map +0 -1
- package/dist/node_modules/react-transition-group/esm/config.js +0 -7
- package/dist/node_modules/react-transition-group/esm/config.js.map +0 -1
- package/dist/node_modules/react-transition-group/esm/utils/ChildMapping.js +0 -100
- package/dist/node_modules/react-transition-group/esm/utils/ChildMapping.js.map +0 -1
- package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js +0 -24
- package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js.map +0 -1
- package/dist/node_modules/react-transition-group/esm/utils/reflow.js +0 -7
- package/dist/node_modules/react-transition-group/esm/utils/reflow.js.map +0 -1
- package/dist/react-notifications/Notification.js +0 -73
- package/dist/react-notifications/Notification.js.map +0 -1
- package/dist/react-notifications/NotificationContainer.js +0 -59
- package/dist/react-notifications/NotificationContainer.js.map +0 -1
- package/dist/react-notifications/NotificationManager.js +0 -174
- package/dist/react-notifications/NotificationManager.js.map +0 -1
- package/dist/react-notifications/Notifications.js +0 -72
- package/dist/react-notifications/Notifications.js.map +0 -1
- package/dist/react-notifications/constants.js +0 -26
- package/dist/react-notifications/constants.js.map +0 -1
- package/dist/react-notifications/notifications.css +0 -213
- package/dist/select/custom-select/constants.js +0 -8
- package/dist/select/custom-select/constants.js.map +0 -1
|
@@ -1,88 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import Label from "../../node_modules/@neolution-ch/reactstrap/esm/Label.js";
|
|
5
|
-
import { CustomSelectInput } from "../custom-select-input/index.js";
|
|
6
|
-
import { LABELS } from "./constants.js";
|
|
7
|
-
const { SIN_DATOS, SELECCIONE } = LABELS;
|
|
8
|
-
const CustomSelect = (props) => {
|
|
9
|
-
const [firstElement] = useState(props.firstElement);
|
|
10
|
-
const [newItem] = useState(props.newItem);
|
|
11
|
-
const [selectedIoption, setIoption] = useState({});
|
|
12
|
-
const [customStylesOption] = useState(props.customStylesOption);
|
|
13
|
-
const [customStyles, setCustomStyles] = useState({});
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
if (newItem) {
|
|
16
|
-
props.options.push(newItem);
|
|
17
|
-
}
|
|
18
|
-
}, [newItem, props.options]);
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
const { options = [] } = props;
|
|
21
|
-
if (firstElement && Number(options?.length) > 1) {
|
|
22
|
-
const propIOption = options.filter((item) => item === firstElement);
|
|
23
|
-
if (propIOption?.length === 0) {
|
|
24
|
-
props.options.unshift(firstElement);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}, [firstElement, props.options]);
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
const { selectedValue } = props;
|
|
30
|
-
const errorProp = { value: null };
|
|
31
|
-
if (selectedValue || firstElement && firstElement.value === selectedValue) {
|
|
32
|
-
const propIOption = props.options.filter(({ value }) => {
|
|
33
|
-
return JSON.stringify(value) === JSON.stringify(selectedValue);
|
|
34
|
-
});
|
|
35
|
-
if (propIOption[0]) {
|
|
36
|
-
setIoption(propIOption[0]);
|
|
37
|
-
if (!Object.getOwnPropertyDescriptor(selectedIoption, "label")) {
|
|
38
|
-
props.onChange(propIOption[0]);
|
|
39
|
-
}
|
|
40
|
-
} else {
|
|
41
|
-
setIoption(errorProp);
|
|
42
|
-
props.onChange(errorProp);
|
|
43
|
-
}
|
|
44
|
-
} else if (props.options.length > 0) {
|
|
45
|
-
setIoption(errorProp);
|
|
46
|
-
props.onChange(errorProp);
|
|
47
|
-
}
|
|
48
|
-
}, [props.selectedValue, props.options, firstElement]);
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
if (customStylesOption) {
|
|
51
|
-
const stylesOption = {
|
|
52
|
-
option: (base, { data }) => {
|
|
53
|
-
return {
|
|
54
|
-
...base,
|
|
55
|
-
color: data.fields && data.fields[customStylesOption.fieldMatch] === customStylesOption.valueMatch ? "blue !important" : "",
|
|
56
|
-
fontWeight: data.fields && data.fields[customStylesOption.fieldMatch] === customStylesOption.valueMatch ? "bold" : ""
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
setCustomStyles(stylesOption);
|
|
61
|
-
}
|
|
62
|
-
}, [customStylesOption]);
|
|
63
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
64
|
-
props.label && props.label !== "" && /* @__PURE__ */ jsxs(Label, { className: "mb-0", children: [
|
|
65
|
-
props.label,
|
|
66
|
-
":"
|
|
67
|
-
] }),
|
|
68
|
-
/* @__PURE__ */ jsx(
|
|
69
|
-
Select,
|
|
70
|
-
{
|
|
71
|
-
...props,
|
|
72
|
-
components: { Input: CustomSelectInput },
|
|
73
|
-
className: "react-select",
|
|
74
|
-
classNamePrefix: "react-select",
|
|
75
|
-
name: "form-field-name",
|
|
76
|
-
value: Object.getOwnPropertyDescriptor(selectedIoption, "label") ? selectedIoption : "",
|
|
77
|
-
onChange: props.onChange,
|
|
78
|
-
options: props.options,
|
|
79
|
-
placeholder: Number(props.options.length) === 0 ? SIN_DATOS : props.placeholder || SELECCIONE,
|
|
80
|
-
isDisabled: props.disabled,
|
|
81
|
-
styles: customStyles
|
|
82
|
-
}
|
|
83
|
-
)
|
|
84
|
-
] });
|
|
85
|
-
};
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Select } from "siam-ui";
|
|
3
|
+
const CustomSelect = (props) => /* @__PURE__ */ jsx(Select, { ...props, style: { fontSize: "12px" } });
|
|
86
4
|
export {
|
|
87
5
|
CustomSelect
|
|
88
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/select/custom-select/index.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/select/custom-select/index.tsx"],"sourcesContent":["import { Select, type SelectProps } from 'siam-ui';\nimport React from 'react';\n\nexport const CustomSelect: React.FC<SelectProps> = (props) => (\n <Select {...props} style={{ fontSize: '12px' }} />\n);\nexport default CustomSelect;\n"],"names":[],"mappings":";;AAGO,MAAM,eAAsC,CAAC,UAClD,oBAAC,QAAA,EAAQ,GAAG,OAAO,OAAO,EAAE,UAAU,SAAO,CAAG;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "siam-ui-utils",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"ampf-react",
|
|
6
6
|
"ampf-utils",
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"react-intl": "^7.1.14",
|
|
103
103
|
"react-notifications": "^1.7.4",
|
|
104
104
|
"react-select": "^5.10.2",
|
|
105
|
+
"siam-ui": "^0.1.20",
|
|
105
106
|
"siam-utils": "^1.1.4",
|
|
106
107
|
"styled-components": "^6.1.12"
|
|
107
108
|
},
|
|
@@ -129,5 +130,8 @@
|
|
|
129
130
|
"vite": "^7.0.1",
|
|
130
131
|
"vite-plugin-commonjs": "^0.10.3",
|
|
131
132
|
"vitest": "^3.2.4"
|
|
133
|
+
},
|
|
134
|
+
"overrides": {
|
|
135
|
+
"react-popper": "2.3.0"
|
|
132
136
|
}
|
|
133
137
|
}
|
package/dist/_virtual/events.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/_virtual/events2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assertThisInitialized.js","sources":["../../../../../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"],"sourcesContent":["function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nexport { _assertThisInitialized as default };"],"names":[],"mappings":"AAAA,SAAS,uBAAuB,GAAG;AACjC,MAAI,WAAW,EAAG,OAAM,IAAI,eAAe,2DAA2D;AACtG,SAAO;AACT;","x_google_ignoreList":[0]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
function _extends() {
|
|
2
|
-
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
3
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
4
|
-
var t = arguments[e];
|
|
5
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
6
|
-
}
|
|
7
|
-
return n;
|
|
8
|
-
}, _extends.apply(null, arguments);
|
|
9
|
-
}
|
|
10
|
-
export {
|
|
11
|
-
_extends as default
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=extends.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extends.js","sources":["../../../../../../node_modules/@babel/runtime/helpers/esm/extends.js"],"sourcesContent":["function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };"],"names":[],"mappings":"AAAA,SAAS,WAAW;AAClB,SAAO,WAAW,OAAO,SAAS,OAAO,OAAO,KAAI,IAAK,SAAU,GAAG;AACpE,aAAS,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;AACzC,UAAI,IAAI,UAAU,CAAC;AACnB,eAAS,KAAK,EAAG,EAAC,CAAA,GAAI,eAAe,KAAK,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;AAAA,IAChE;AACA,WAAO;AAAA,EACT,GAAG,SAAS,MAAM,MAAM,SAAS;AACnC;","x_google_ignoreList":[0]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import _setPrototypeOf from "./setPrototypeOf.js";
|
|
2
|
-
function _inheritsLoose(t, o) {
|
|
3
|
-
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
|
|
4
|
-
}
|
|
5
|
-
export {
|
|
6
|
-
_inheritsLoose as default
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=inheritsLoose.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inheritsLoose.js","sources":["../../../../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js"],"sourcesContent":["import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };"],"names":["setPrototypeOf"],"mappings":";AACA,SAAS,eAAe,GAAG,GAAG;AAC5B,IAAE,YAAY,OAAO,OAAO,EAAE,SAAS,GAAG,EAAE,UAAU,cAAc,GAAGA,gBAAe,GAAG,CAAC;AAC5F;","x_google_ignoreList":[0]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
2
|
-
if (null == r) return {};
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
5
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
6
|
-
t[n] = r[n];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
}
|
|
10
|
-
export {
|
|
11
|
-
_objectWithoutPropertiesLoose as default
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=objectWithoutPropertiesLoose.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"objectWithoutPropertiesLoose.js","sources":["../../../../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"],"sourcesContent":["function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };"],"names":[],"mappings":"AAAA,SAAS,8BAA8B,GAAG,GAAG;AAC3C,MAAI,QAAQ,EAAG,QAAO,CAAA;AACtB,MAAI,IAAI,CAAA;AACR,WAAS,KAAK,EAAG,KAAI,CAAA,EAAG,eAAe,KAAK,GAAG,CAAC,GAAG;AACjD,QAAI,OAAO,EAAE,QAAQ,CAAC,EAAG;AACzB,MAAE,CAAC,IAAI,EAAE,CAAC;AAAA,EACZ;AACA,SAAO;AACT;","x_google_ignoreList":[0]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
function _setPrototypeOf(t, e) {
|
|
2
|
-
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
|
|
3
|
-
return t2.__proto__ = e2, t2;
|
|
4
|
-
}, _setPrototypeOf(t, e);
|
|
5
|
-
}
|
|
6
|
-
export {
|
|
7
|
-
_setPrototypeOf as default
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=setPrototypeOf.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setPrototypeOf.js","sources":["../../../../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"],"sourcesContent":["function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };"],"names":["t","e"],"mappings":"AAAA,SAAS,gBAAgB,GAAG,GAAG;AAC7B,SAAO,kBAAkB,OAAO,iBAAiB,OAAO,eAAe,KAAI,IAAK,SAAUA,IAAGC,IAAG;AAC9F,WAAOD,GAAE,YAAYC,IAAGD;AAAA,EAC1B,GAAG,gBAAgB,GAAG,CAAC;AACzB;","x_google_ignoreList":[0]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import hasClass from "./hasClass.js";
|
|
2
|
-
function addClass(element, className) {
|
|
3
|
-
if (element.classList) element.classList.add(className);
|
|
4
|
-
else if (!hasClass(element, className)) if (typeof element.className === "string") element.className = element.className + " " + className;
|
|
5
|
-
else element.setAttribute("class", (element.className && element.className.baseVal || "") + " " + className);
|
|
6
|
-
}
|
|
7
|
-
export {
|
|
8
|
-
addClass as default
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=addClass.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addClass.js","sources":["../../../../node_modules/dom-helpers/esm/addClass.js"],"sourcesContent":["import hasClass from './hasClass';\n/**\n * Adds a CSS class to a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\nexport default function addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + \" \" + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + \" \" + className);\n}"],"names":[],"mappings":";AAQe,SAAS,SAAS,SAAS,WAAW;AACnD,MAAI,QAAQ,UAAW,SAAQ,UAAU,IAAI,SAAS;AAAA,WAAW,CAAC,SAAS,SAAS,SAAS,EAAG,KAAI,OAAO,QAAQ,cAAc,SAAU,SAAQ,YAAY,QAAQ,YAAY,MAAM;AAAA,MAAe,SAAQ,aAAa,UAAU,QAAQ,aAAa,QAAQ,UAAU,WAAW,MAAM,MAAM,SAAS;AAChT;","x_google_ignoreList":[0]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
function hasClass(element, className) {
|
|
2
|
-
if (element.classList) return !!className && element.classList.contains(className);
|
|
3
|
-
return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
|
|
4
|
-
}
|
|
5
|
-
export {
|
|
6
|
-
hasClass as default
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=hasClass.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hasClass.js","sources":["../../../../node_modules/dom-helpers/esm/hasClass.js"],"sourcesContent":["/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}"],"names":[],"mappings":"AAMe,SAAS,SAAS,SAAS,WAAW;AACnD,MAAI,QAAQ,UAAW,QAAO,CAAC,CAAC,aAAa,QAAQ,UAAU,SAAS,SAAS;AACjF,UAAQ,OAAO,QAAQ,UAAU,WAAW,QAAQ,aAAa,KAAK,QAAQ,MAAM,YAAY,GAAG,MAAM;AAC3G;","x_google_ignoreList":[0]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
function replaceClassName(origClass, classToRemove) {
|
|
2
|
-
return origClass.replace(new RegExp("(^|\\s)" + classToRemove + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
|
|
3
|
-
}
|
|
4
|
-
function removeClass(element, className) {
|
|
5
|
-
if (element.classList) {
|
|
6
|
-
element.classList.remove(className);
|
|
7
|
-
} else if (typeof element.className === "string") {
|
|
8
|
-
element.className = replaceClassName(element.className, className);
|
|
9
|
-
} else {
|
|
10
|
-
element.setAttribute("class", replaceClassName(element.className && element.className.baseVal || "", className));
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export {
|
|
14
|
-
removeClass as default
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=removeClass.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"removeClass.js","sources":["../../../../node_modules/dom-helpers/esm/removeClass.js"],"sourcesContent":["function replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp(\"(^|\\\\s)\" + classToRemove + \"(?:\\\\s|$)\", 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n/**\n * Removes a CSS class from a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\n\nexport default function removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n } else if (typeof element.className === 'string') {\n element.className = replaceClassName(element.className, className);\n } else {\n element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n }\n}"],"names":[],"mappings":"AAAA,SAAS,iBAAiB,WAAW,eAAe;AAClD,SAAO,UAAU,QAAQ,IAAI,OAAO,YAAY,gBAAgB,aAAa,GAAG,GAAG,IAAI,EAAE,QAAQ,QAAQ,GAAG,EAAE,QAAQ,cAAc,EAAE;AACxI;AASe,SAAS,YAAY,SAAS,WAAW;AACtD,MAAI,QAAQ,WAAW;AACrB,YAAQ,UAAU,OAAO,SAAS;AAAA,EACpC,WAAW,OAAO,QAAQ,cAAc,UAAU;AAChD,YAAQ,YAAY,iBAAiB,QAAQ,WAAW,SAAS;AAAA,EACnE,OAAO;AACL,YAAQ,aAAa,SAAS,iBAAiB,QAAQ,aAAa,QAAQ,UAAU,WAAW,IAAI,SAAS,CAAC;AAAA,EACjH;AACF;","x_google_ignoreList":[0]}
|
|
@@ -1,372 +0,0 @@
|
|
|
1
|
-
import { __module as events } from "../../_virtual/events2.js";
|
|
2
|
-
var hasRequiredEvents;
|
|
3
|
-
function requireEvents() {
|
|
4
|
-
if (hasRequiredEvents) return events.exports;
|
|
5
|
-
hasRequiredEvents = 1;
|
|
6
|
-
var R = typeof Reflect === "object" ? Reflect : null;
|
|
7
|
-
var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
|
|
8
|
-
return Function.prototype.apply.call(target, receiver, args);
|
|
9
|
-
};
|
|
10
|
-
var ReflectOwnKeys;
|
|
11
|
-
if (R && typeof R.ownKeys === "function") {
|
|
12
|
-
ReflectOwnKeys = R.ownKeys;
|
|
13
|
-
} else if (Object.getOwnPropertySymbols) {
|
|
14
|
-
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
15
|
-
return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
|
|
16
|
-
};
|
|
17
|
-
} else {
|
|
18
|
-
ReflectOwnKeys = function ReflectOwnKeys2(target) {
|
|
19
|
-
return Object.getOwnPropertyNames(target);
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
function ProcessEmitWarning(warning) {
|
|
23
|
-
if (console && console.warn) console.warn(warning);
|
|
24
|
-
}
|
|
25
|
-
var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value) {
|
|
26
|
-
return value !== value;
|
|
27
|
-
};
|
|
28
|
-
function EventEmitter() {
|
|
29
|
-
EventEmitter.init.call(this);
|
|
30
|
-
}
|
|
31
|
-
events.exports = EventEmitter;
|
|
32
|
-
events.exports.once = once;
|
|
33
|
-
EventEmitter.EventEmitter = EventEmitter;
|
|
34
|
-
EventEmitter.prototype._events = void 0;
|
|
35
|
-
EventEmitter.prototype._eventsCount = 0;
|
|
36
|
-
EventEmitter.prototype._maxListeners = void 0;
|
|
37
|
-
var defaultMaxListeners = 10;
|
|
38
|
-
function checkListener(listener) {
|
|
39
|
-
if (typeof listener !== "function") {
|
|
40
|
-
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
Object.defineProperty(EventEmitter, "defaultMaxListeners", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function() {
|
|
46
|
-
return defaultMaxListeners;
|
|
47
|
-
},
|
|
48
|
-
set: function(arg) {
|
|
49
|
-
if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
|
|
50
|
-
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
|
|
51
|
-
}
|
|
52
|
-
defaultMaxListeners = arg;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
EventEmitter.init = function() {
|
|
56
|
-
if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {
|
|
57
|
-
this._events = /* @__PURE__ */ Object.create(null);
|
|
58
|
-
this._eventsCount = 0;
|
|
59
|
-
}
|
|
60
|
-
this._maxListeners = this._maxListeners || void 0;
|
|
61
|
-
};
|
|
62
|
-
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
|
63
|
-
if (typeof n !== "number" || n < 0 || NumberIsNaN(n)) {
|
|
64
|
-
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + ".");
|
|
65
|
-
}
|
|
66
|
-
this._maxListeners = n;
|
|
67
|
-
return this;
|
|
68
|
-
};
|
|
69
|
-
function _getMaxListeners(that) {
|
|
70
|
-
if (that._maxListeners === void 0)
|
|
71
|
-
return EventEmitter.defaultMaxListeners;
|
|
72
|
-
return that._maxListeners;
|
|
73
|
-
}
|
|
74
|
-
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
|
75
|
-
return _getMaxListeners(this);
|
|
76
|
-
};
|
|
77
|
-
EventEmitter.prototype.emit = function emit(type) {
|
|
78
|
-
var args = [];
|
|
79
|
-
for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
|
|
80
|
-
var doError = type === "error";
|
|
81
|
-
var events2 = this._events;
|
|
82
|
-
if (events2 !== void 0)
|
|
83
|
-
doError = doError && events2.error === void 0;
|
|
84
|
-
else if (!doError)
|
|
85
|
-
return false;
|
|
86
|
-
if (doError) {
|
|
87
|
-
var er;
|
|
88
|
-
if (args.length > 0)
|
|
89
|
-
er = args[0];
|
|
90
|
-
if (er instanceof Error) {
|
|
91
|
-
throw er;
|
|
92
|
-
}
|
|
93
|
-
var err = new Error("Unhandled error." + (er ? " (" + er.message + ")" : ""));
|
|
94
|
-
err.context = er;
|
|
95
|
-
throw err;
|
|
96
|
-
}
|
|
97
|
-
var handler = events2[type];
|
|
98
|
-
if (handler === void 0)
|
|
99
|
-
return false;
|
|
100
|
-
if (typeof handler === "function") {
|
|
101
|
-
ReflectApply(handler, this, args);
|
|
102
|
-
} else {
|
|
103
|
-
var len = handler.length;
|
|
104
|
-
var listeners = arrayClone(handler, len);
|
|
105
|
-
for (var i = 0; i < len; ++i)
|
|
106
|
-
ReflectApply(listeners[i], this, args);
|
|
107
|
-
}
|
|
108
|
-
return true;
|
|
109
|
-
};
|
|
110
|
-
function _addListener(target, type, listener, prepend) {
|
|
111
|
-
var m;
|
|
112
|
-
var events2;
|
|
113
|
-
var existing;
|
|
114
|
-
checkListener(listener);
|
|
115
|
-
events2 = target._events;
|
|
116
|
-
if (events2 === void 0) {
|
|
117
|
-
events2 = target._events = /* @__PURE__ */ Object.create(null);
|
|
118
|
-
target._eventsCount = 0;
|
|
119
|
-
} else {
|
|
120
|
-
if (events2.newListener !== void 0) {
|
|
121
|
-
target.emit(
|
|
122
|
-
"newListener",
|
|
123
|
-
type,
|
|
124
|
-
listener.listener ? listener.listener : listener
|
|
125
|
-
);
|
|
126
|
-
events2 = target._events;
|
|
127
|
-
}
|
|
128
|
-
existing = events2[type];
|
|
129
|
-
}
|
|
130
|
-
if (existing === void 0) {
|
|
131
|
-
existing = events2[type] = listener;
|
|
132
|
-
++target._eventsCount;
|
|
133
|
-
} else {
|
|
134
|
-
if (typeof existing === "function") {
|
|
135
|
-
existing = events2[type] = prepend ? [listener, existing] : [existing, listener];
|
|
136
|
-
} else if (prepend) {
|
|
137
|
-
existing.unshift(listener);
|
|
138
|
-
} else {
|
|
139
|
-
existing.push(listener);
|
|
140
|
-
}
|
|
141
|
-
m = _getMaxListeners(target);
|
|
142
|
-
if (m > 0 && existing.length > m && !existing.warned) {
|
|
143
|
-
existing.warned = true;
|
|
144
|
-
var w = new Error("Possible EventEmitter memory leak detected. " + existing.length + " " + String(type) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
145
|
-
w.name = "MaxListenersExceededWarning";
|
|
146
|
-
w.emitter = target;
|
|
147
|
-
w.type = type;
|
|
148
|
-
w.count = existing.length;
|
|
149
|
-
ProcessEmitWarning(w);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return target;
|
|
153
|
-
}
|
|
154
|
-
EventEmitter.prototype.addListener = function addListener(type, listener) {
|
|
155
|
-
return _addListener(this, type, listener, false);
|
|
156
|
-
};
|
|
157
|
-
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
|
158
|
-
EventEmitter.prototype.prependListener = function prependListener(type, listener) {
|
|
159
|
-
return _addListener(this, type, listener, true);
|
|
160
|
-
};
|
|
161
|
-
function onceWrapper() {
|
|
162
|
-
if (!this.fired) {
|
|
163
|
-
this.target.removeListener(this.type, this.wrapFn);
|
|
164
|
-
this.fired = true;
|
|
165
|
-
if (arguments.length === 0)
|
|
166
|
-
return this.listener.call(this.target);
|
|
167
|
-
return this.listener.apply(this.target, arguments);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
function _onceWrap(target, type, listener) {
|
|
171
|
-
var state = { fired: false, wrapFn: void 0, target, type, listener };
|
|
172
|
-
var wrapped = onceWrapper.bind(state);
|
|
173
|
-
wrapped.listener = listener;
|
|
174
|
-
state.wrapFn = wrapped;
|
|
175
|
-
return wrapped;
|
|
176
|
-
}
|
|
177
|
-
EventEmitter.prototype.once = function once2(type, listener) {
|
|
178
|
-
checkListener(listener);
|
|
179
|
-
this.on(type, _onceWrap(this, type, listener));
|
|
180
|
-
return this;
|
|
181
|
-
};
|
|
182
|
-
EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) {
|
|
183
|
-
checkListener(listener);
|
|
184
|
-
this.prependListener(type, _onceWrap(this, type, listener));
|
|
185
|
-
return this;
|
|
186
|
-
};
|
|
187
|
-
EventEmitter.prototype.removeListener = function removeListener(type, listener) {
|
|
188
|
-
var list, events2, position, i, originalListener;
|
|
189
|
-
checkListener(listener);
|
|
190
|
-
events2 = this._events;
|
|
191
|
-
if (events2 === void 0)
|
|
192
|
-
return this;
|
|
193
|
-
list = events2[type];
|
|
194
|
-
if (list === void 0)
|
|
195
|
-
return this;
|
|
196
|
-
if (list === listener || list.listener === listener) {
|
|
197
|
-
if (--this._eventsCount === 0)
|
|
198
|
-
this._events = /* @__PURE__ */ Object.create(null);
|
|
199
|
-
else {
|
|
200
|
-
delete events2[type];
|
|
201
|
-
if (events2.removeListener)
|
|
202
|
-
this.emit("removeListener", type, list.listener || listener);
|
|
203
|
-
}
|
|
204
|
-
} else if (typeof list !== "function") {
|
|
205
|
-
position = -1;
|
|
206
|
-
for (i = list.length - 1; i >= 0; i--) {
|
|
207
|
-
if (list[i] === listener || list[i].listener === listener) {
|
|
208
|
-
originalListener = list[i].listener;
|
|
209
|
-
position = i;
|
|
210
|
-
break;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
if (position < 0)
|
|
214
|
-
return this;
|
|
215
|
-
if (position === 0)
|
|
216
|
-
list.shift();
|
|
217
|
-
else {
|
|
218
|
-
spliceOne(list, position);
|
|
219
|
-
}
|
|
220
|
-
if (list.length === 1)
|
|
221
|
-
events2[type] = list[0];
|
|
222
|
-
if (events2.removeListener !== void 0)
|
|
223
|
-
this.emit("removeListener", type, originalListener || listener);
|
|
224
|
-
}
|
|
225
|
-
return this;
|
|
226
|
-
};
|
|
227
|
-
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
|
228
|
-
EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) {
|
|
229
|
-
var listeners, events2, i;
|
|
230
|
-
events2 = this._events;
|
|
231
|
-
if (events2 === void 0)
|
|
232
|
-
return this;
|
|
233
|
-
if (events2.removeListener === void 0) {
|
|
234
|
-
if (arguments.length === 0) {
|
|
235
|
-
this._events = /* @__PURE__ */ Object.create(null);
|
|
236
|
-
this._eventsCount = 0;
|
|
237
|
-
} else if (events2[type] !== void 0) {
|
|
238
|
-
if (--this._eventsCount === 0)
|
|
239
|
-
this._events = /* @__PURE__ */ Object.create(null);
|
|
240
|
-
else
|
|
241
|
-
delete events2[type];
|
|
242
|
-
}
|
|
243
|
-
return this;
|
|
244
|
-
}
|
|
245
|
-
if (arguments.length === 0) {
|
|
246
|
-
var keys = Object.keys(events2);
|
|
247
|
-
var key;
|
|
248
|
-
for (i = 0; i < keys.length; ++i) {
|
|
249
|
-
key = keys[i];
|
|
250
|
-
if (key === "removeListener") continue;
|
|
251
|
-
this.removeAllListeners(key);
|
|
252
|
-
}
|
|
253
|
-
this.removeAllListeners("removeListener");
|
|
254
|
-
this._events = /* @__PURE__ */ Object.create(null);
|
|
255
|
-
this._eventsCount = 0;
|
|
256
|
-
return this;
|
|
257
|
-
}
|
|
258
|
-
listeners = events2[type];
|
|
259
|
-
if (typeof listeners === "function") {
|
|
260
|
-
this.removeListener(type, listeners);
|
|
261
|
-
} else if (listeners !== void 0) {
|
|
262
|
-
for (i = listeners.length - 1; i >= 0; i--) {
|
|
263
|
-
this.removeListener(type, listeners[i]);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
return this;
|
|
267
|
-
};
|
|
268
|
-
function _listeners(target, type, unwrap) {
|
|
269
|
-
var events2 = target._events;
|
|
270
|
-
if (events2 === void 0)
|
|
271
|
-
return [];
|
|
272
|
-
var evlistener = events2[type];
|
|
273
|
-
if (evlistener === void 0)
|
|
274
|
-
return [];
|
|
275
|
-
if (typeof evlistener === "function")
|
|
276
|
-
return unwrap ? [evlistener.listener || evlistener] : [evlistener];
|
|
277
|
-
return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
|
|
278
|
-
}
|
|
279
|
-
EventEmitter.prototype.listeners = function listeners(type) {
|
|
280
|
-
return _listeners(this, type, true);
|
|
281
|
-
};
|
|
282
|
-
EventEmitter.prototype.rawListeners = function rawListeners(type) {
|
|
283
|
-
return _listeners(this, type, false);
|
|
284
|
-
};
|
|
285
|
-
EventEmitter.listenerCount = function(emitter, type) {
|
|
286
|
-
if (typeof emitter.listenerCount === "function") {
|
|
287
|
-
return emitter.listenerCount(type);
|
|
288
|
-
} else {
|
|
289
|
-
return listenerCount.call(emitter, type);
|
|
290
|
-
}
|
|
291
|
-
};
|
|
292
|
-
EventEmitter.prototype.listenerCount = listenerCount;
|
|
293
|
-
function listenerCount(type) {
|
|
294
|
-
var events2 = this._events;
|
|
295
|
-
if (events2 !== void 0) {
|
|
296
|
-
var evlistener = events2[type];
|
|
297
|
-
if (typeof evlistener === "function") {
|
|
298
|
-
return 1;
|
|
299
|
-
} else if (evlistener !== void 0) {
|
|
300
|
-
return evlistener.length;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
return 0;
|
|
304
|
-
}
|
|
305
|
-
EventEmitter.prototype.eventNames = function eventNames() {
|
|
306
|
-
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
|
307
|
-
};
|
|
308
|
-
function arrayClone(arr, n) {
|
|
309
|
-
var copy = new Array(n);
|
|
310
|
-
for (var i = 0; i < n; ++i)
|
|
311
|
-
copy[i] = arr[i];
|
|
312
|
-
return copy;
|
|
313
|
-
}
|
|
314
|
-
function spliceOne(list, index) {
|
|
315
|
-
for (; index + 1 < list.length; index++)
|
|
316
|
-
list[index] = list[index + 1];
|
|
317
|
-
list.pop();
|
|
318
|
-
}
|
|
319
|
-
function unwrapListeners(arr) {
|
|
320
|
-
var ret = new Array(arr.length);
|
|
321
|
-
for (var i = 0; i < ret.length; ++i) {
|
|
322
|
-
ret[i] = arr[i].listener || arr[i];
|
|
323
|
-
}
|
|
324
|
-
return ret;
|
|
325
|
-
}
|
|
326
|
-
function once(emitter, name) {
|
|
327
|
-
return new Promise(function(resolve, reject) {
|
|
328
|
-
function errorListener(err) {
|
|
329
|
-
emitter.removeListener(name, resolver);
|
|
330
|
-
reject(err);
|
|
331
|
-
}
|
|
332
|
-
function resolver() {
|
|
333
|
-
if (typeof emitter.removeListener === "function") {
|
|
334
|
-
emitter.removeListener("error", errorListener);
|
|
335
|
-
}
|
|
336
|
-
resolve([].slice.call(arguments));
|
|
337
|
-
}
|
|
338
|
-
eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
|
|
339
|
-
if (name !== "error") {
|
|
340
|
-
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
|
|
345
|
-
if (typeof emitter.on === "function") {
|
|
346
|
-
eventTargetAgnosticAddListener(emitter, "error", handler, flags);
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
|
350
|
-
if (typeof emitter.on === "function") {
|
|
351
|
-
if (flags.once) {
|
|
352
|
-
emitter.once(name, listener);
|
|
353
|
-
} else {
|
|
354
|
-
emitter.on(name, listener);
|
|
355
|
-
}
|
|
356
|
-
} else if (typeof emitter.addEventListener === "function") {
|
|
357
|
-
emitter.addEventListener(name, function wrapListener(arg) {
|
|
358
|
-
if (flags.once) {
|
|
359
|
-
emitter.removeEventListener(name, wrapListener);
|
|
360
|
-
}
|
|
361
|
-
listener(arg);
|
|
362
|
-
});
|
|
363
|
-
} else {
|
|
364
|
-
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
return events.exports;
|
|
368
|
-
}
|
|
369
|
-
export {
|
|
370
|
-
requireEvents as __require
|
|
371
|
-
};
|
|
372
|
-
//# sourceMappingURL=events.js.map
|