@producteca/producteca-ui-kit 1.68.0 → 1.70.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/dist/components/dropdown/dropdown.sx.d.ts +2 -2
- package/dist/components/patterns/conditionalOperator/conditionalOperator.d.ts +3 -0
- package/dist/components/table/table/table.examples.d.ts +1 -0
- package/dist/components/table/tableBody/tableBody.d.ts +1 -1
- package/dist/components/table/tableBody/tableBody.types.d.ts +6 -1
- package/dist/locales/description.d.ts +2 -1
- package/dist/locales/es.d.ts +1 -0
- package/dist/producteca-ui-kit.es.js +163 -45
- package/dist/producteca-ui-kit.umd.js +35 -35
- package/dist/style.css +1 -1
- package/dist/utils/debugLogger.d.ts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/withDebugHandlers.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import {
|
|
4
|
+
import { jsx as jsx$1, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import React__default, { isValidElement, cloneElement, Children,
|
|
6
|
+
import React__default, { forwardRef, isValidElement, cloneElement, Children, useContext, useState, useCallback, useLayoutEffect, useRef, useMemo, createContext, Component, Fragment, useEffect, memo, createElement, useReducer } from "react";
|
|
7
7
|
import * as ReactDOM from "react-dom";
|
|
8
8
|
import ReactDOM__default, { createPortal, unstable_batchedUpdates } from "react-dom";
|
|
9
9
|
function r(e) {
|
|
@@ -19,6 +19,57 @@ function clsx() {
|
|
|
19
19
|
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
20
20
|
return n;
|
|
21
21
|
}
|
|
22
|
+
const DEBUG_ENVS = ["local", "development"];
|
|
23
|
+
const readEnv = () => {
|
|
24
|
+
const proc = globalThis.process;
|
|
25
|
+
if (proc?.env?.ENV) return proc.env.ENV;
|
|
26
|
+
const escapeHatch = globalThis.__PRODUCTECA_UI_ENV__;
|
|
27
|
+
if (typeof escapeHatch === "string") return escapeHatch;
|
|
28
|
+
return void 0;
|
|
29
|
+
};
|
|
30
|
+
const isDebugEnabled = () => DEBUG_ENVS.indexOf(readEnv() ?? "") !== -1;
|
|
31
|
+
const logHandler = (component, handler, args) => {
|
|
32
|
+
console.debug(`[producteca-ui-kit] ${component}.${handler} →`, ...args);
|
|
33
|
+
};
|
|
34
|
+
const MAX_DEPTH = 4;
|
|
35
|
+
const isFunction$5 = (value) => typeof value === "function";
|
|
36
|
+
const isHandlerKey = (key) => /^on[A-Z]/.test(key);
|
|
37
|
+
const isReactElement = (value) => typeof value === "object" && value !== null && "$$typeof" in value;
|
|
38
|
+
const isPlainObject$3 = (value) => {
|
|
39
|
+
if (typeof value !== "object" || value === null || isReactElement(value)) return false;
|
|
40
|
+
const proto = Object.getPrototypeOf(value);
|
|
41
|
+
return proto === Object.prototype || proto === null;
|
|
42
|
+
};
|
|
43
|
+
const wrapHandler = (fn3, componentName, path) => (...args) => {
|
|
44
|
+
logHandler(componentName, path, args);
|
|
45
|
+
return fn3(...args);
|
|
46
|
+
};
|
|
47
|
+
const wrapDeep = (value, componentName, path, depth) => {
|
|
48
|
+
if (depth > MAX_DEPTH) return value;
|
|
49
|
+
if (Array.isArray(value)) {
|
|
50
|
+
return value.map((item2, index2) => wrapDeep(item2, componentName, `${path}[${index2}]`, depth + 1));
|
|
51
|
+
}
|
|
52
|
+
if (isPlainObject$3(value)) {
|
|
53
|
+
const next2 = {};
|
|
54
|
+
for (const key of Object.keys(value)) {
|
|
55
|
+
const child = value[key];
|
|
56
|
+
const childPath = path ? `${path}.${key}` : key;
|
|
57
|
+
next2[key] = isHandlerKey(key) && isFunction$5(child) ? wrapHandler(child, componentName, childPath) : wrapDeep(child, componentName, childPath, depth + 1);
|
|
58
|
+
}
|
|
59
|
+
return next2;
|
|
60
|
+
}
|
|
61
|
+
return value;
|
|
62
|
+
};
|
|
63
|
+
function withDebugHandlers(Component2, componentName) {
|
|
64
|
+
if (!isDebugEnabled()) return Component2;
|
|
65
|
+
const Wrapped = forwardRef((props, ref) => {
|
|
66
|
+
const next2 = wrapDeep(props, componentName, "", 0);
|
|
67
|
+
const Cmp = Component2;
|
|
68
|
+
return /* @__PURE__ */ jsx$1(Cmp, { ...next2, ...ref ? { ref } : {} });
|
|
69
|
+
});
|
|
70
|
+
Wrapped.displayName = `withDebugHandlers(${componentName})`;
|
|
71
|
+
return Wrapped;
|
|
72
|
+
}
|
|
22
73
|
const btn = "button-module_btn_XFZLT";
|
|
23
74
|
const disabled$9 = "button-module_disabled_tB8LZ";
|
|
24
75
|
const fullwidth$2 = "button-module_fullwidth_03y8a";
|
|
@@ -49,7 +100,7 @@ const styles$J = {
|
|
|
49
100
|
error: error$4,
|
|
50
101
|
outline: outline$1
|
|
51
102
|
};
|
|
52
|
-
const
|
|
103
|
+
const ButtonBase$1 = React__default.forwardRef(({
|
|
53
104
|
type = "button",
|
|
54
105
|
variant = "primary",
|
|
55
106
|
size: size2 = "lg",
|
|
@@ -79,7 +130,8 @@ const Button$2 = React__default.forwardRef(({
|
|
|
79
130
|
}
|
|
80
131
|
);
|
|
81
132
|
});
|
|
82
|
-
|
|
133
|
+
ButtonBase$1.displayName = "Button";
|
|
134
|
+
const Button$2 = withDebugHandlers(ButtonBase$1, "Button");
|
|
83
135
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
84
136
|
function getDefaultExportFromCjs(x) {
|
|
85
137
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
@@ -9980,7 +10032,7 @@ const ColorValues = map$2(allColors, "color");
|
|
|
9980
10032
|
const Shades = map$2(Colors["grey"], (color2, shade) => shade);
|
|
9981
10033
|
const Categories = map$2(Colors, (shades, category) => category);
|
|
9982
10034
|
const isValidColor = (color2) => includes$1(ColorValues, color2);
|
|
9983
|
-
const
|
|
10035
|
+
const CustomIconBase = ({
|
|
9984
10036
|
color: color2 = getColor("grey", "500"),
|
|
9985
10037
|
size: size2 = "16",
|
|
9986
10038
|
sx,
|
|
@@ -10021,6 +10073,7 @@ const _translateSizeToFontSize = (size2) => {
|
|
|
10021
10073
|
};
|
|
10022
10074
|
return transform[size2] || transform["16"];
|
|
10023
10075
|
};
|
|
10076
|
+
const CustomIcon = withDebugHandlers(CustomIconBase, "CustomIcon");
|
|
10024
10077
|
const chip = "chip-module_chip_U3kfP";
|
|
10025
10078
|
const title$8 = "chip-module_title_DARz9";
|
|
10026
10079
|
const text = "chip-module_text_4xvju";
|
|
@@ -10051,7 +10104,7 @@ const styles$H = {
|
|
|
10051
10104
|
primary,
|
|
10052
10105
|
action: action$1
|
|
10053
10106
|
};
|
|
10054
|
-
const
|
|
10107
|
+
const ChipBase = ({ isActive, title: title2, text: text2, content: content2, onRemove = void 0, disabled: disabled2 = false, variant = "primary", size: size2 = "lg" }) => {
|
|
10055
10108
|
const canRemove = onRemove && !disabled2;
|
|
10056
10109
|
return /* @__PURE__ */ jsx$1(Grow, { in: !!text2 || !!title2 || !!content2, unmountOnExit: true, children: /* @__PURE__ */ jsxs("span", { className: clsx(styles$H.chip, styles$H[variant], styles$H[size2], { [styles$H.disabled]: disabled2, [styles$H.active]: isActive }), children: [
|
|
10057
10110
|
content2,
|
|
@@ -10066,6 +10119,7 @@ const Chip$1 = ({ isActive, title: title2, text: text2, content: content2, onRem
|
|
|
10066
10119
|
canRemove && /* @__PURE__ */ jsx$1(CustomIcon, { className: styles$H.action, size: "8", onClick: canRemove ? onRemove : void 0, color: getColor("grey", "700"), children: /* @__PURE__ */ jsx$1(CloseRoundedIcon, {}) })
|
|
10067
10120
|
] }) });
|
|
10068
10121
|
};
|
|
10122
|
+
const Chip$1 = withDebugHandlers(ChipBase, "Chip");
|
|
10069
10123
|
const defaultColor$c = getColor("grey", "500");
|
|
10070
10124
|
const SearchPublication = ({ size: size2 = 100, color: color2 = defaultColor$c }) => {
|
|
10071
10125
|
const resolvedColor = isValidColor(color2) ? color2 : defaultColor$c;
|
|
@@ -19753,7 +19807,7 @@ const columns: TableColumn<MyRow>[] = [
|
|
|
19753
19807
|
const tableBodyExample = `
|
|
19754
19808
|
## Uso del componente
|
|
19755
19809
|
|
|
19756
|
-
\`Table.Body\` renderiza las filas de datos. Lee las columnas del contexto provisto por \`Table\`.
|
|
19810
|
+
\`Table.Body\` renderiza las filas de datos. Lee las columnas del contexto provisto por \`Table\`. Integra \`AsyncContent\` internamente, por lo que acepta las props de estado (\`isLoading\`, \`error\`, \`empty\`, \`success\`) para mostrar el loader, el error o el estado vacío dentro de la tabla.
|
|
19757
19811
|
|
|
19758
19812
|
### Ejemplo básico:
|
|
19759
19813
|
|
|
@@ -19763,13 +19817,15 @@ const tableBodyExample = `
|
|
|
19763
19817
|
</Table>
|
|
19764
19818
|
\`\`\`
|
|
19765
19819
|
|
|
19766
|
-
###
|
|
19820
|
+
### Con estados asíncronos:
|
|
19767
19821
|
|
|
19768
19822
|
\`\`\`tsx
|
|
19769
19823
|
<Table columns={columns}>
|
|
19824
|
+
<Table.Header />
|
|
19770
19825
|
<Table.Body
|
|
19771
|
-
data={
|
|
19772
|
-
|
|
19826
|
+
data={rows}
|
|
19827
|
+
isLoading={isLoading}
|
|
19828
|
+
empty={{ text: 'No hay datos', actionText: 'Cargar', onClick: loadData }}
|
|
19773
19829
|
/>
|
|
19774
19830
|
</Table>
|
|
19775
19831
|
\`\`\`
|
|
@@ -19803,6 +19859,28 @@ const columns: TableColumn<MyRow>[] = [
|
|
|
19803
19859
|
]
|
|
19804
19860
|
\`\`\`
|
|
19805
19861
|
`;
|
|
19862
|
+
const tableAsyncContentExample = `
|
|
19863
|
+
\`Table.Body\` integra \`AsyncContent\` internamente: recibe las mismas props de estado (\`isLoading\`, \`error\`, \`empty\`, \`success\`) y resuelve el loader, el error y el estado vacío **dentro** de la tabla, sin desmontar el \`Table.Header\`.
|
|
19864
|
+
|
|
19865
|
+
El estado vacío se deriva de \`data\` (no hace falta pasar \`items\`). Cuando hay filas y no hay carga/error, se renderizan las filas normalmente.
|
|
19866
|
+
|
|
19867
|
+
### Ejemplo:
|
|
19868
|
+
|
|
19869
|
+
\`\`\`tsx
|
|
19870
|
+
<Table columns={columns}>
|
|
19871
|
+
<Table.Header />
|
|
19872
|
+
<Table.Body
|
|
19873
|
+
data={rows}
|
|
19874
|
+
isLoading={isLoading}
|
|
19875
|
+
empty={{
|
|
19876
|
+
text: 'No hay datos disponibles',
|
|
19877
|
+
actionText: 'Cargar datos',
|
|
19878
|
+
onClick: loadData,
|
|
19879
|
+
}}
|
|
19880
|
+
/>
|
|
19881
|
+
</Table>
|
|
19882
|
+
\`\`\`
|
|
19883
|
+
`;
|
|
19806
19884
|
const spinnerExample = `
|
|
19807
19885
|
## Uso del componente
|
|
19808
19886
|
|
|
@@ -20081,7 +20159,8 @@ const es$3 = {
|
|
|
20081
20159
|
example: spinnerExample
|
|
20082
20160
|
},
|
|
20083
20161
|
table: {
|
|
20084
|
-
example: tableExample
|
|
20162
|
+
example: tableExample,
|
|
20163
|
+
asyncContent: tableAsyncContentExample
|
|
20085
20164
|
},
|
|
20086
20165
|
tableHeader: {
|
|
20087
20166
|
example: tableHeaderExample
|
|
@@ -20658,7 +20737,7 @@ const ClearComponent = ({
|
|
|
20658
20737
|
return isClearable && (isArrayWithSome || hasSelectedValue) ? /* @__PURE__ */ jsx$1("a", { className: styles$B["producteca-select-field__is-clearable"], onClick: () => handleChange(null), children: /* @__PURE__ */ jsx$1(CustomIcon, { children: /* @__PURE__ */ jsx$1(ClearRounded, {}) }) }) : null;
|
|
20659
20738
|
};
|
|
20660
20739
|
const _valueGetter = (option, getter) => getter ? getter(option) : option?.value;
|
|
20661
|
-
const
|
|
20740
|
+
const SelectFieldBase = (props) => {
|
|
20662
20741
|
const {
|
|
20663
20742
|
name,
|
|
20664
20743
|
label: label2,
|
|
@@ -20796,6 +20875,7 @@ const SelectField = (props) => {
|
|
|
20796
20875
|
] })
|
|
20797
20876
|
] });
|
|
20798
20877
|
};
|
|
20878
|
+
const SelectField = withDebugHandlers(SelectFieldBase, "SelectField");
|
|
20799
20879
|
const disabled$7 = "textInput-module_disabled_zmiie";
|
|
20800
20880
|
const fullwidth = "textInput-module_fullwidth_uG3VU";
|
|
20801
20881
|
const lg$9 = "textInput-module_lg_rvzUN";
|
|
@@ -20821,7 +20901,7 @@ const styles$A = {
|
|
|
20821
20901
|
sm: sm$a,
|
|
20822
20902
|
title: title$7
|
|
20823
20903
|
};
|
|
20824
|
-
const
|
|
20904
|
+
const TextInputBase = (props) => {
|
|
20825
20905
|
const {
|
|
20826
20906
|
isValid: isValid2,
|
|
20827
20907
|
onChange: onChange2,
|
|
@@ -20911,6 +20991,7 @@ const TextInput = (props) => {
|
|
|
20911
20991
|
}
|
|
20912
20992
|
);
|
|
20913
20993
|
};
|
|
20994
|
+
const TextInput = withDebugHandlers(TextInputBase, "TextInput");
|
|
20914
20995
|
const Visibility = createSvgIcon(/* @__PURE__ */ jsx$1("path", {
|
|
20915
20996
|
d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"
|
|
20916
20997
|
}), "Visibility");
|
|
@@ -57738,7 +57819,7 @@ const getPickerProps = ({
|
|
|
57738
57819
|
}
|
|
57739
57820
|
}
|
|
57740
57821
|
});
|
|
57741
|
-
const
|
|
57822
|
+
const DatePickerInputBase = (props) => {
|
|
57742
57823
|
const {
|
|
57743
57824
|
meta,
|
|
57744
57825
|
name,
|
|
@@ -57872,6 +57953,7 @@ const DatePickerInput = (props) => {
|
|
|
57872
57953
|
}
|
|
57873
57954
|
);
|
|
57874
57955
|
};
|
|
57956
|
+
const DatePickerInput = withDebugHandlers(DatePickerInputBase, "DatePickerInput");
|
|
57875
57957
|
const DatePicker2 = ({ label: label2, rightAdornment, ...props }) => {
|
|
57876
57958
|
return /* @__PURE__ */ jsx$1(FormField, { type: "date", label: label2, rightAdornment, ...props });
|
|
57877
57959
|
};
|
|
@@ -65374,7 +65456,7 @@ const styles$u = {
|
|
|
65374
65456
|
md: md$5,
|
|
65375
65457
|
sm: sm$7
|
|
65376
65458
|
};
|
|
65377
|
-
const
|
|
65459
|
+
const CheckboxInputGroupBase = ({
|
|
65378
65460
|
title: title2,
|
|
65379
65461
|
name,
|
|
65380
65462
|
type = "checkbox",
|
|
@@ -65423,7 +65505,8 @@ const CheckboxInputGroup = ({
|
|
|
65423
65505
|
}) })
|
|
65424
65506
|
] });
|
|
65425
65507
|
};
|
|
65426
|
-
const
|
|
65508
|
+
const CheckboxInputGroup = withDebugHandlers(CheckboxInputGroupBase, "CheckboxInputGroup");
|
|
65509
|
+
const CheckboxInputBase = ({
|
|
65427
65510
|
id,
|
|
65428
65511
|
name,
|
|
65429
65512
|
checked,
|
|
@@ -65451,6 +65534,7 @@ const CheckboxInput = ({
|
|
|
65451
65534
|
}
|
|
65452
65535
|
);
|
|
65453
65536
|
};
|
|
65537
|
+
const CheckboxInput = withDebugHandlers(CheckboxInputBase, "CheckboxInput");
|
|
65454
65538
|
var baseKeys$1 = _baseKeys, getTag$1 = _getTag, isArguments = isArguments_1, isArray = isArray_1, isArrayLike$2 = isArrayLike_1, isBuffer = isBufferExports, isPrototype = _isPrototype, isTypedArray = isTypedArray_1;
|
|
65455
65539
|
var mapTag$1 = "[object Map]", setTag$1 = "[object Set]";
|
|
65456
65540
|
var objectProto = Object.prototype;
|
|
@@ -65590,7 +65674,7 @@ const _convertValueToOption = (value) => {
|
|
|
65590
65674
|
if (!value) return null;
|
|
65591
65675
|
return { value, label: value };
|
|
65592
65676
|
};
|
|
65593
|
-
const
|
|
65677
|
+
const SearcherBase = (props) => {
|
|
65594
65678
|
const {
|
|
65595
65679
|
name,
|
|
65596
65680
|
label: label2,
|
|
@@ -65780,6 +65864,7 @@ const Searcher = (props) => {
|
|
|
65780
65864
|
)
|
|
65781
65865
|
] });
|
|
65782
65866
|
};
|
|
65867
|
+
const Searcher = withDebugHandlers(SearcherBase, "Searcher");
|
|
65783
65868
|
const title$5 = "switchInput-module_title_lBK2p";
|
|
65784
65869
|
const disabled$4 = "switchInput-module_disabled_yz9dR";
|
|
65785
65870
|
const lg$5 = "switchInput-module_lg_WMIDO";
|
|
@@ -65798,7 +65883,7 @@ const styles$s = {
|
|
|
65798
65883
|
md: md$4,
|
|
65799
65884
|
sm: sm$6
|
|
65800
65885
|
};
|
|
65801
|
-
const
|
|
65886
|
+
const SwitchInputGroupBase = ({
|
|
65802
65887
|
title: title2,
|
|
65803
65888
|
name,
|
|
65804
65889
|
items,
|
|
@@ -65861,7 +65946,8 @@ const SwitchInputGroup = ({
|
|
|
65861
65946
|
}) })
|
|
65862
65947
|
] });
|
|
65863
65948
|
};
|
|
65864
|
-
const
|
|
65949
|
+
const SwitchInputGroup = withDebugHandlers(SwitchInputGroupBase, "SwitchInputGroup");
|
|
65950
|
+
const SwitchInputBase = ({
|
|
65865
65951
|
id,
|
|
65866
65952
|
name,
|
|
65867
65953
|
checked,
|
|
@@ -65887,6 +65973,7 @@ const SwitchInput = ({
|
|
|
65887
65973
|
}
|
|
65888
65974
|
);
|
|
65889
65975
|
};
|
|
65976
|
+
const SwitchInput = withDebugHandlers(SwitchInputBase, "SwitchInput");
|
|
65890
65977
|
const styles$r = {
|
|
65891
65978
|
"async-content-container": "asyncContent-module_async-content-container_UEl81",
|
|
65892
65979
|
"state-container": "asyncContent-module_state-container_FgE4I",
|
|
@@ -65928,7 +66015,7 @@ const styles$p = {
|
|
|
65928
66015
|
"weight-900": "link-module_weight-900_Yxl7i",
|
|
65929
66016
|
disabled: disabled$3
|
|
65930
66017
|
};
|
|
65931
|
-
const
|
|
66018
|
+
const LinkBase = React__default.memo(React__default.forwardRef(({
|
|
65932
66019
|
size: size2 = "md",
|
|
65933
66020
|
decoration = "none",
|
|
65934
66021
|
weight,
|
|
@@ -65973,9 +66060,10 @@ const Link = React__default.memo(React__default.forwardRef(({
|
|
|
65973
66060
|
}
|
|
65974
66061
|
);
|
|
65975
66062
|
}));
|
|
65976
|
-
|
|
66063
|
+
LinkBase.displayName = "Link";
|
|
66064
|
+
const Link = withDebugHandlers(LinkBase, "Link");
|
|
65977
66065
|
const DefaultIcon$1 = /* @__PURE__ */ jsx$1(EmptyStateIcon, {});
|
|
65978
|
-
const
|
|
66066
|
+
const EmptyStateBase = ({
|
|
65979
66067
|
onActionClick,
|
|
65980
66068
|
icon: icon2 = DefaultIcon$1,
|
|
65981
66069
|
actionText = locale("reloadPage"),
|
|
@@ -65996,6 +66084,7 @@ const EmptyState = ({
|
|
|
65996
66084
|
] })
|
|
65997
66085
|
] });
|
|
65998
66086
|
};
|
|
66087
|
+
const EmptyState = withDebugHandlers(EmptyStateBase, "EmptyState");
|
|
65999
66088
|
const ErrorView = memo(({
|
|
66000
66089
|
text: text2,
|
|
66001
66090
|
actionText,
|
|
@@ -66108,7 +66197,7 @@ const _getStatusComponent = ({
|
|
|
66108
66197
|
};
|
|
66109
66198
|
return statusComponents[status];
|
|
66110
66199
|
};
|
|
66111
|
-
const
|
|
66200
|
+
const AsyncContentBase = memo(({
|
|
66112
66201
|
error: error2,
|
|
66113
66202
|
empty,
|
|
66114
66203
|
success: success2,
|
|
@@ -66129,7 +66218,8 @@ const AsyncContent = memo(({
|
|
|
66129
66218
|
success: success2
|
|
66130
66219
|
}) });
|
|
66131
66220
|
});
|
|
66132
|
-
|
|
66221
|
+
AsyncContentBase.displayName = "AsyncContent";
|
|
66222
|
+
const AsyncContent = withDebugHandlers(AsyncContentBase, "AsyncContent");
|
|
66133
66223
|
const fullPage = "actionBar-module_fullPage_A4wiw";
|
|
66134
66224
|
const modal$1 = "actionBar-module_modal_jZfAJ";
|
|
66135
66225
|
const page = "actionBar-module_page_Oq8Jb";
|
|
@@ -66139,7 +66229,7 @@ const styles$o = {
|
|
|
66139
66229
|
modal: modal$1,
|
|
66140
66230
|
page
|
|
66141
66231
|
};
|
|
66142
|
-
const
|
|
66232
|
+
const ActionBarBase = ({ variant = "page", saveProps, cancelProps, previousProps }) => {
|
|
66143
66233
|
const { onCancel, label: cancelText = locale("cancel") } = cancelProps || {};
|
|
66144
66234
|
const { onPrevious, label: previousText = locale("previous"), ...previousOtherProps } = previousProps || {};
|
|
66145
66235
|
const { onSave, label: saveText = locale("save"), ...saveOtherProps } = saveProps || {};
|
|
@@ -66149,13 +66239,14 @@ const ActionBar = ({ variant = "page", saveProps, cancelProps, previousProps })
|
|
|
66149
66239
|
!!onSave && /* @__PURE__ */ jsx$1(Button$2, { label: saveText, onClick: onSave, ...saveOtherProps })
|
|
66150
66240
|
] });
|
|
66151
66241
|
};
|
|
66242
|
+
const ActionBar = withDebugHandlers(ActionBarBase, "ActionBar");
|
|
66152
66243
|
const Check = createSvgIcon(/* @__PURE__ */ jsx$1("path", {
|
|
66153
66244
|
d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
|
|
66154
66245
|
}), "Check");
|
|
66155
66246
|
const ContentCopy = createSvgIcon(/* @__PURE__ */ jsx$1("path", {
|
|
66156
66247
|
d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"
|
|
66157
66248
|
}), "ContentCopy");
|
|
66158
|
-
const
|
|
66249
|
+
const CopyButtonBase = ({
|
|
66159
66250
|
onClick,
|
|
66160
66251
|
copyText = locale("copyButton.copy"),
|
|
66161
66252
|
copiedText = locale("copyButton.copied"),
|
|
@@ -66199,6 +66290,7 @@ const Icons = ({ copied }) => /* @__PURE__ */ jsxs("div", { className: "copy-btn
|
|
|
66199
66290
|
/* @__PURE__ */ jsx$1("div", { className: `copy-icon ${copied ? "hidden" : ""}`, children: /* @__PURE__ */ jsx$1(ContentCopy, { "data-testid": "ContentCopyIcon" }) }),
|
|
66200
66291
|
/* @__PURE__ */ jsx$1("div", { className: `check-icon ${!copied ? "hidden" : ""}`, children: /* @__PURE__ */ jsx$1(Check, {}) })
|
|
66201
66292
|
] });
|
|
66293
|
+
const CopyButton = withDebugHandlers(CopyButtonBase, "CopyButton");
|
|
66202
66294
|
const dense = "headerSection-module_dense_f1FWn";
|
|
66203
66295
|
const content = "headerSection-module_content_5y2PB";
|
|
66204
66296
|
const title$4 = "headerSection-module_title_cabYm";
|
|
@@ -66302,7 +66394,7 @@ const _getDefaultOptions = () => [
|
|
|
66302
66394
|
{ value: VALUE_OR, label: locale("conditionalOperator.or") },
|
|
66303
66395
|
{ value: VALUE_AND, label: locale("conditionalOperator.and") }
|
|
66304
66396
|
];
|
|
66305
|
-
const
|
|
66397
|
+
const ConditionalOperatorBase = ({
|
|
66306
66398
|
name = "conditionalOperator",
|
|
66307
66399
|
value,
|
|
66308
66400
|
onChange: onChange2,
|
|
@@ -66340,9 +66432,13 @@ const ConditionalOperator = ({
|
|
|
66340
66432
|
}
|
|
66341
66433
|
);
|
|
66342
66434
|
};
|
|
66343
|
-
|
|
66344
|
-
|
|
66345
|
-
|
|
66435
|
+
ConditionalOperatorBase.displayName = "ConditionalOperator";
|
|
66436
|
+
ConditionalOperatorBase.VALUE_OR = VALUE_OR;
|
|
66437
|
+
ConditionalOperatorBase.VALUE_AND = VALUE_AND;
|
|
66438
|
+
const ConditionalOperator = Object.assign(
|
|
66439
|
+
withDebugHandlers(ConditionalOperatorBase, "ConditionalOperator"),
|
|
66440
|
+
{ VALUE_OR, VALUE_AND }
|
|
66441
|
+
);
|
|
66346
66442
|
const AutoStoriesIcon = createSvgIcon(/* @__PURE__ */ jsx$1("path", {
|
|
66347
66443
|
d: "m19 1-5 5v11l5-4.5zM1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5V6c-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6m22 13.5V6c-.6-.45-1.25-.75-2-1v13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5v2c1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5z"
|
|
66348
66444
|
}), "AutoStories");
|
|
@@ -67394,7 +67490,7 @@ const styles$f = {
|
|
|
67394
67490
|
"fit-content": "modal-module_fit-content_CBdg6"
|
|
67395
67491
|
};
|
|
67396
67492
|
const ModalContext = createContext({ isLoading: false });
|
|
67397
|
-
const
|
|
67493
|
+
const ModalBase = ({
|
|
67398
67494
|
open,
|
|
67399
67495
|
onClose,
|
|
67400
67496
|
children,
|
|
@@ -67414,6 +67510,7 @@ const Modal$1 = ({
|
|
|
67414
67510
|
children: /* @__PURE__ */ jsx$1(ModalContext.Provider, { value: { isLoading }, children })
|
|
67415
67511
|
}
|
|
67416
67512
|
) });
|
|
67513
|
+
const Modal$1 = withDebugHandlers(ModalBase, "Modal");
|
|
67417
67514
|
const icon$1 = "modalTitle-module_icon_jKB-M";
|
|
67418
67515
|
const title$3 = "modalTitle-module_title_U2a2X";
|
|
67419
67516
|
const subtitle = "modalTitle-module_subtitle_DTIpI";
|
|
@@ -67473,7 +67570,7 @@ const styles$c = {
|
|
|
67473
67570
|
disabled: disabled$2,
|
|
67474
67571
|
active: active$2
|
|
67475
67572
|
};
|
|
67476
|
-
const
|
|
67573
|
+
const CardBase = ({
|
|
67477
67574
|
sx,
|
|
67478
67575
|
icon: icon2,
|
|
67479
67576
|
title: title2,
|
|
@@ -67503,6 +67600,7 @@ const Card = ({
|
|
|
67503
67600
|
},
|
|
67504
67601
|
title2
|
|
67505
67602
|
);
|
|
67603
|
+
const Card = withDebugHandlers(CardBase, "Card");
|
|
67506
67604
|
const InsertPhotoRoundedIcon = createSvgIcon(/* @__PURE__ */ jsx$1("path", {
|
|
67507
67605
|
d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.9 13.98l2.1 2.53 3.1-3.99c.2-.26.6-.26.8.01l3.51 4.68c.25.33.01.8-.4.8H6.02c-.42 0-.65-.48-.39-.81L8.12 14c.19-.26.57-.27.78-.02"
|
|
67508
67606
|
}), "InsertPhotoRounded");
|
|
@@ -67560,7 +67658,7 @@ const productecaStrategy = {
|
|
|
67560
67658
|
clientId: 1,
|
|
67561
67659
|
iconUrl: "https://imagesproducteca.blob.core.windows.net/producteca/isologo-producteca.svg"
|
|
67562
67660
|
};
|
|
67563
|
-
const
|
|
67661
|
+
const PickChannelModalBase = ({
|
|
67564
67662
|
open,
|
|
67565
67663
|
onClose,
|
|
67566
67664
|
channels,
|
|
@@ -67587,6 +67685,7 @@ const PickChannelModal = ({
|
|
|
67587
67685
|
] })
|
|
67588
67686
|
] }) })
|
|
67589
67687
|
] });
|
|
67688
|
+
const PickChannelModal = withDebugHandlers(PickChannelModalBase, "PickChannelModal");
|
|
67590
67689
|
function getLinearProgressUtilityClass(slot) {
|
|
67591
67690
|
return generateUtilityClass("MuiLinearProgress", slot);
|
|
67592
67691
|
}
|
|
@@ -68110,7 +68209,7 @@ const styles$9 = {
|
|
|
68110
68209
|
warning,
|
|
68111
68210
|
info
|
|
68112
68211
|
};
|
|
68113
|
-
const
|
|
68212
|
+
const AlertBase = ({
|
|
68114
68213
|
message: message2,
|
|
68115
68214
|
variant = "success",
|
|
68116
68215
|
className,
|
|
@@ -68146,6 +68245,7 @@ const Alert = ({
|
|
|
68146
68245
|
}
|
|
68147
68246
|
);
|
|
68148
68247
|
};
|
|
68248
|
+
const Alert = withDebugHandlers(AlertBase, "Alert");
|
|
68149
68249
|
var baseKeys = _baseKeys, getTag = _getTag, isArrayLike$1 = isArrayLike_1, isString = isString_1, stringSize = _stringSize;
|
|
68150
68250
|
var mapTag = "[object Map]", setTag = "[object Set]";
|
|
68151
68251
|
function size(collection) {
|
|
@@ -68185,13 +68285,14 @@ const BreadcrumbItemComponent = ({ item: item2, index: index2, items }) => {
|
|
|
68185
68285
|
" "
|
|
68186
68286
|
] });
|
|
68187
68287
|
};
|
|
68188
|
-
const
|
|
68288
|
+
const BreadcrumbBase = ({
|
|
68189
68289
|
items,
|
|
68190
68290
|
className,
|
|
68191
68291
|
...otherProps
|
|
68192
68292
|
}) => {
|
|
68193
68293
|
return /* @__PURE__ */ jsx$1("nav", { className: clsx(styles$8["breadcrumb"], className), "aria-label": "Breadcrumb", ...otherProps, children: map$2(items, (item2, index2) => /* @__PURE__ */ jsx$1(BreadcrumbItemComponent, { item: item2, index: index2, items }, index2)) });
|
|
68194
68294
|
};
|
|
68295
|
+
const Breadcrumb = withDebugHandlers(BreadcrumbBase, "Breadcrumb");
|
|
68195
68296
|
const MoreVertIcon = createSvgIcon(/* @__PURE__ */ jsx$1("path", {
|
|
68196
68297
|
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"
|
|
68197
68298
|
}), "MoreVert");
|
|
@@ -68259,7 +68360,7 @@ const ItemContent = ({
|
|
|
68259
68360
|
]
|
|
68260
68361
|
}
|
|
68261
68362
|
);
|
|
68262
|
-
const
|
|
68363
|
+
const MenuItemComponentBase = ({
|
|
68263
68364
|
label: label2,
|
|
68264
68365
|
icon: icon2,
|
|
68265
68366
|
onClick,
|
|
@@ -68297,6 +68398,7 @@ const MenuItemComponent = ({
|
|
|
68297
68398
|
}
|
|
68298
68399
|
);
|
|
68299
68400
|
};
|
|
68401
|
+
const MenuItemComponent = withDebugHandlers(MenuItemComponentBase, "MenuItemComponent");
|
|
68300
68402
|
const MenuAction = ({
|
|
68301
68403
|
items,
|
|
68302
68404
|
id = "menu-action-button",
|
|
@@ -68374,7 +68476,7 @@ const styles$6 = {
|
|
|
68374
68476
|
"warning-body": "warningModal-module_warning-body_5DHA9"
|
|
68375
68477
|
};
|
|
68376
68478
|
const DefaultIcon = /* @__PURE__ */ jsx$1(CustomIcon, { size: "32", color: getColor("secondary", "500"), children: /* @__PURE__ */ jsx$1(ErrorIcon, {}) });
|
|
68377
|
-
const
|
|
68479
|
+
const WarningModalBase = ({
|
|
68378
68480
|
open,
|
|
68379
68481
|
icon: icon2,
|
|
68380
68482
|
onSave,
|
|
@@ -68431,6 +68533,7 @@ const WarningModal = ({
|
|
|
68431
68533
|
]
|
|
68432
68534
|
}
|
|
68433
68535
|
);
|
|
68536
|
+
const WarningModal = withDebugHandlers(WarningModalBase, "WarningModal");
|
|
68434
68537
|
var baseIteratee$1 = _baseIteratee, isArrayLike = isArrayLike_1, keys = keys_1;
|
|
68435
68538
|
function createFind$1(findIndexFunc) {
|
|
68436
68539
|
return function(collection, predicate, fromIndex) {
|
|
@@ -68484,7 +68587,7 @@ const styles$5 = {
|
|
|
68484
68587
|
active: active$1,
|
|
68485
68588
|
disabled
|
|
68486
68589
|
};
|
|
68487
|
-
const
|
|
68590
|
+
const TabsBase = ({
|
|
68488
68591
|
sx,
|
|
68489
68592
|
items,
|
|
68490
68593
|
value,
|
|
@@ -68584,6 +68687,7 @@ const sxTab = {
|
|
|
68584
68687
|
padding: 0,
|
|
68585
68688
|
minHeight: 0
|
|
68586
68689
|
};
|
|
68690
|
+
const Tabs2 = withDebugHandlers(TabsBase, "Tabs");
|
|
68587
68691
|
/*! *****************************************************************************
|
|
68588
68692
|
Copyright (c) Microsoft Corporation.
|
|
68589
68693
|
|
|
@@ -72809,7 +72913,7 @@ const styles$4 = {
|
|
|
72809
72913
|
"menu-item-collapsed": "sidebar-module_menu-item-collapsed_-Gz6l",
|
|
72810
72914
|
active
|
|
72811
72915
|
};
|
|
72812
|
-
const
|
|
72916
|
+
const AppSidebarBase = ({ title: title2, items }) => {
|
|
72813
72917
|
const [collapsed2, setCollapsed] = useState(false);
|
|
72814
72918
|
return /* @__PURE__ */ jsx$1("div", { className: styles$4.wrapper, children: /* @__PURE__ */ jsxs(
|
|
72815
72919
|
Sidebar,
|
|
@@ -72837,6 +72941,7 @@ const AppSidebar = ({ title: title2, items }) => {
|
|
|
72837
72941
|
}
|
|
72838
72942
|
) });
|
|
72839
72943
|
};
|
|
72944
|
+
const AppSidebar = withDebugHandlers(AppSidebarBase, "AppSidebar");
|
|
72840
72945
|
const KeyboardArrowDownIcon = createSvgIcon(/* @__PURE__ */ jsx$1("path", {
|
|
72841
72946
|
d: "M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"
|
|
72842
72947
|
}), "KeyboardArrowDown");
|
|
@@ -72874,7 +72979,7 @@ const styles$3 = {
|
|
|
72874
72979
|
sm,
|
|
72875
72980
|
"MuiButton-endIcon": "dropdown-module_MuiButton-endIcon_h9XM7"
|
|
72876
72981
|
};
|
|
72877
|
-
const
|
|
72982
|
+
const DropdownBase = ({
|
|
72878
72983
|
label: label2,
|
|
72879
72984
|
items,
|
|
72880
72985
|
disabled: disabled2 = false,
|
|
@@ -72970,6 +73075,7 @@ const Dropdown = ({
|
|
|
72970
73075
|
)
|
|
72971
73076
|
] });
|
|
72972
73077
|
};
|
|
73078
|
+
const Dropdown = withDebugHandlers(DropdownBase, "Dropdown");
|
|
72973
73079
|
function useCombinedRefs() {
|
|
72974
73080
|
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
72975
73081
|
refs[_key] = arguments[_key];
|
|
@@ -76899,7 +77005,7 @@ const _buildItem = (currentLength) => {
|
|
|
76899
77005
|
value: ""
|
|
76900
77006
|
};
|
|
76901
77007
|
};
|
|
76902
|
-
const
|
|
77008
|
+
const DraggableListBase = ({
|
|
76903
77009
|
label: label2,
|
|
76904
77010
|
addLabel,
|
|
76905
77011
|
onChange: onChange2,
|
|
@@ -77029,6 +77135,7 @@ const DraggableList = ({
|
|
|
77029
77135
|
) })
|
|
77030
77136
|
] });
|
|
77031
77137
|
};
|
|
77138
|
+
const DraggableList = withDebugHandlers(DraggableListBase, "DraggableList");
|
|
77032
77139
|
const CheckRoundedIcon = createSvgIcon(/* @__PURE__ */ jsx$1("path", {
|
|
77033
77140
|
d: "M9 16.17 5.53 12.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71c.39-.39.39-1.02 0-1.41a.996.996 0 0 0-1.41 0z"
|
|
77034
77141
|
}), "CheckRounded");
|
|
@@ -77117,12 +77224,23 @@ const styles = {
|
|
|
77117
77224
|
"header-row": "table-module_header-row_ry6Lv",
|
|
77118
77225
|
"body-row": "table-module_body-row_OMOX0",
|
|
77119
77226
|
"header-cell": "table-module_header-cell_0FEWz",
|
|
77120
|
-
"body-cell": "table-module_body-cell_p4019"
|
|
77227
|
+
"body-cell": "table-module_body-cell_p4019",
|
|
77228
|
+
"body-async": "table-module_body-async_21Z7L"
|
|
77121
77229
|
};
|
|
77122
|
-
const TableBody = ({ data,
|
|
77230
|
+
const TableBody = ({ data, isLoading, error: error2, empty, success: success2 }) => {
|
|
77123
77231
|
const columns = useContext(TableContext);
|
|
77124
|
-
|
|
77125
|
-
|
|
77232
|
+
const showContent = !isLoading && !error2?.value && !success2?.value && data.length > 0;
|
|
77233
|
+
if (!showContent) {
|
|
77234
|
+
return /* @__PURE__ */ jsx$1("tbody", { children: /* @__PURE__ */ jsx$1("tr", { children: /* @__PURE__ */ jsx$1("td", { colSpan: columns.length, className: styles["body-async"], children: /* @__PURE__ */ jsx$1(
|
|
77235
|
+
AsyncContent,
|
|
77236
|
+
{
|
|
77237
|
+
isLoading,
|
|
77238
|
+
error: error2,
|
|
77239
|
+
success: success2,
|
|
77240
|
+
empty: { ...empty, items: data },
|
|
77241
|
+
children: /* @__PURE__ */ jsx$1(Fragment$1, {})
|
|
77242
|
+
}
|
|
77243
|
+
) }) }) });
|
|
77126
77244
|
}
|
|
77127
77245
|
return /* @__PURE__ */ jsx$1("tbody", { children: data.map((row, rowIndex) => /* @__PURE__ */ jsx$1("tr", { className: styles["body-row"], children: columns.map((col) => {
|
|
77128
77246
|
const value = row[col.key];
|