@measured/puck-plugin-heading-analyzer 0.14.0-canary.55740c4 → 0.14.0-canary.5bb1708
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/index.css +74 -45
- package/dist/index.d.ts +12 -3
- package/dist/index.js +208 -128
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.css
CHANGED
@@ -1,60 +1,76 @@
|
|
1
1
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css/#css-module-data */
|
2
|
-
.
|
2
|
+
._SidebarSection_125qe_1 {
|
3
3
|
display: flex;
|
4
4
|
position: relative;
|
5
5
|
flex-direction: column;
|
6
|
-
color: black;
|
6
|
+
color: var(--puck-color-black);
|
7
7
|
}
|
8
|
-
.
|
8
|
+
._SidebarSection_125qe_1:last-of-type {
|
9
9
|
flex-grow: 1;
|
10
10
|
}
|
11
|
-
._SidebarSection-
|
12
|
-
background: white;
|
11
|
+
._SidebarSection-title_125qe_12 {
|
12
|
+
background: var(--puck-color-white);
|
13
13
|
padding: 16px;
|
14
|
-
border-bottom: 1px solid var(--puck-color-grey-
|
15
|
-
border-top: 1px solid var(--puck-color-grey-
|
14
|
+
border-bottom: 1px solid var(--puck-color-grey-09);
|
15
|
+
border-top: 1px solid var(--puck-color-grey-09);
|
16
16
|
overflow-x: auto;
|
17
17
|
}
|
18
|
-
._SidebarSection--
|
18
|
+
._SidebarSection--noBorderTop_125qe_20 > ._SidebarSection-title_125qe_12 {
|
19
19
|
border-top: 0px;
|
20
20
|
}
|
21
|
-
._SidebarSection-
|
21
|
+
._SidebarSection-content_125qe_24 {
|
22
22
|
padding: 16px;
|
23
23
|
}
|
24
|
-
._SidebarSection--
|
24
|
+
._SidebarSection--noPadding_125qe_28 > ._SidebarSection-content_125qe_24 {
|
25
25
|
padding: 0px;
|
26
26
|
}
|
27
|
-
._SidebarSection--
|
27
|
+
._SidebarSection--noPadding_125qe_28 > ._SidebarSection-content_125qe_24:last-child {
|
28
28
|
padding-bottom: 4px;
|
29
29
|
}
|
30
|
-
.
|
30
|
+
._SidebarSection_125qe_1:last-of-type ._SidebarSection-content_125qe_24 {
|
31
31
|
border-bottom: none;
|
32
32
|
flex-grow: 1;
|
33
33
|
}
|
34
|
-
._SidebarSection-
|
35
|
-
|
34
|
+
._SidebarSection-breadcrumbLabel_125qe_41 {
|
35
|
+
background: none;
|
36
|
+
border: 0;
|
37
|
+
border-radius: 2px;
|
38
|
+
color: var(--puck-color-azure-04);
|
39
|
+
cursor: pointer;
|
40
|
+
font: inherit;
|
36
41
|
flex-shrink: 0;
|
42
|
+
padding: 0;
|
43
|
+
transition: color 50ms ease-in;
|
37
44
|
}
|
38
|
-
._SidebarSection-
|
39
|
-
|
40
|
-
|
41
|
-
|
45
|
+
._SidebarSection-breadcrumbLabel_125qe_41:focus-visible {
|
46
|
+
outline: 2px solid var(--puck-color-azure-05);
|
47
|
+
outline-offset: 2px;
|
48
|
+
}
|
49
|
+
@media (hover: hover) and (pointer: fine) {
|
50
|
+
._SidebarSection-breadcrumbLabel_125qe_41:hover {
|
51
|
+
color: var(--puck-color-azure-03);
|
52
|
+
transition: none;
|
53
|
+
}
|
42
54
|
}
|
43
|
-
._SidebarSection-
|
55
|
+
._SidebarSection-breadcrumbLabel_125qe_41:active {
|
56
|
+
color: var(--puck-color-azure-02);
|
57
|
+
transition: none;
|
58
|
+
}
|
59
|
+
._SidebarSection-breadcrumbs_125qe_70 {
|
44
60
|
align-items: center;
|
45
61
|
display: flex;
|
46
62
|
gap: 4px;
|
47
63
|
}
|
48
|
-
._SidebarSection-
|
64
|
+
._SidebarSection-breadcrumb_125qe_41 {
|
49
65
|
align-items: center;
|
50
66
|
display: flex;
|
51
67
|
gap: 4px;
|
52
68
|
}
|
53
|
-
._SidebarSection-
|
69
|
+
._SidebarSection-heading_125qe_82 {
|
54
70
|
padding-right: 16px;
|
55
71
|
}
|
56
|
-
._SidebarSection-
|
57
|
-
background: white;
|
72
|
+
._SidebarSection-loadingOverlay_125qe_86 {
|
73
|
+
background: var(--puck-color-white);
|
58
74
|
display: flex;
|
59
75
|
justify-content: center;
|
60
76
|
align-items: center;
|
@@ -69,54 +85,53 @@
|
|
69
85
|
}
|
70
86
|
|
71
87
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/Heading/styles.module.css/#css-module-data */
|
72
|
-
.
|
88
|
+
._Heading_qxrry_1 {
|
73
89
|
display: block;
|
74
90
|
color: var(--puck-color-black);
|
75
|
-
font-family: var(--puck-font-stack);
|
76
91
|
font-weight: 700;
|
77
92
|
margin: 0;
|
78
93
|
}
|
79
|
-
.
|
94
|
+
._Heading_qxrry_1 b {
|
80
95
|
font-weight: 700;
|
81
96
|
}
|
82
|
-
._Heading--
|
97
|
+
._Heading--xxxxl_qxrry_12 {
|
83
98
|
font-size: var(--puck-font-size-xxxxl);
|
84
99
|
letter-spacing: 0.08ch;
|
85
100
|
font-weight: 800;
|
86
101
|
}
|
87
|
-
._Heading--
|
102
|
+
._Heading--xxxl_qxrry_18 {
|
88
103
|
font-size: var(--puck-font-size-xxxl);
|
89
104
|
}
|
90
|
-
._Heading--
|
105
|
+
._Heading--xxl_qxrry_22 {
|
91
106
|
font-size: var(--puck-font-size-xxl);
|
92
107
|
}
|
93
|
-
._Heading--
|
108
|
+
._Heading--xl_qxrry_26 {
|
94
109
|
font-size: var(--puck-font-size-xl);
|
95
110
|
}
|
96
|
-
._Heading--
|
111
|
+
._Heading--l_qxrry_30 {
|
97
112
|
font-size: var(--puck-font-size-l);
|
98
113
|
}
|
99
|
-
._Heading--
|
114
|
+
._Heading--m_qxrry_34 {
|
100
115
|
font-size: var(--puck-font-size-m);
|
101
116
|
}
|
102
|
-
._Heading--
|
117
|
+
._Heading--s_qxrry_38 {
|
103
118
|
font-size: var(--puck-font-size-s);
|
104
119
|
}
|
105
|
-
._Heading--
|
120
|
+
._Heading--xs_qxrry_42 {
|
106
121
|
font-size: var(--puck-font-size-xs);
|
107
122
|
}
|
108
123
|
|
109
124
|
/* css-module:/home/runner/work/puck/puck/packages/core/components/OutlineList/styles.module.css/#css-module-data */
|
110
|
-
.
|
111
|
-
color: var(--puck-color-grey-
|
112
|
-
font-family: var(--puck-font-
|
125
|
+
._OutlineList_18bgy_1 {
|
126
|
+
color: var(--puck-color-grey-03);
|
127
|
+
font-family: var(--puck-font-family);
|
113
128
|
margin: 0;
|
114
129
|
padding-left: 16px;
|
115
130
|
position: relative;
|
116
131
|
list-style: none;
|
117
132
|
}
|
118
|
-
.
|
119
|
-
background: var(--puck-color-grey-
|
133
|
+
._OutlineList_18bgy_1::before {
|
134
|
+
background: var(--puck-color-grey-08);
|
120
135
|
position: absolute;
|
121
136
|
left: -1px;
|
122
137
|
top: 0px;
|
@@ -124,12 +139,12 @@
|
|
124
139
|
height: calc(100% - 9px);
|
125
140
|
content: "";
|
126
141
|
}
|
127
|
-
.
|
142
|
+
._OutlineListItem_18bgy_20 {
|
128
143
|
position: relative;
|
129
144
|
margin-bottom: 4px;
|
130
145
|
}
|
131
|
-
.
|
132
|
-
background: var(--puck-color-grey-
|
146
|
+
._OutlineListItem_18bgy_20::before {
|
147
|
+
background: var(--puck-color-grey-08);
|
133
148
|
position: absolute;
|
134
149
|
left: -17px;
|
135
150
|
top: 9px;
|
@@ -137,10 +152,24 @@
|
|
137
152
|
height: 1px;
|
138
153
|
content: "";
|
139
154
|
}
|
140
|
-
._OutlineListItem--
|
141
|
-
color: var(--puck-color-blue);
|
155
|
+
._OutlineListItem--clickable_18bgy_35 {
|
142
156
|
cursor: pointer;
|
157
|
+
transition: color 50ms ease-in;
|
158
|
+
}
|
159
|
+
._OutlineListItem--clickable_18bgy_35:focus-visible {
|
160
|
+
outline: 2px solid var(--puck-color-azure-05);
|
161
|
+
outline-offset: 2px;
|
162
|
+
}
|
163
|
+
@media (hover: hover) and (pointer: fine) {
|
164
|
+
._OutlineListItem--clickable_18bgy_35:hover {
|
165
|
+
color: var(--puck-color-azure-04);
|
166
|
+
transition: none;
|
167
|
+
}
|
168
|
+
}
|
169
|
+
._OutlineListItem--clickable_18bgy_35:active {
|
170
|
+
color: var(--puck-color-azure-03);
|
171
|
+
transition: none;
|
143
172
|
}
|
144
|
-
.
|
173
|
+
._OutlineListItem_18bgy_20 > ._OutlineList_18bgy_1 {
|
145
174
|
margin: 8px 0;
|
146
175
|
}
|
package/dist/index.d.ts
CHANGED
@@ -43,6 +43,8 @@ type ArrayField<Props extends {
|
|
43
43
|
};
|
44
44
|
defaultItemProps?: Props[0];
|
45
45
|
getItemSummary?: (item: Props[0], index?: number) => string;
|
46
|
+
max?: number;
|
47
|
+
min?: number;
|
46
48
|
};
|
47
49
|
type ObjectField<Props extends {
|
48
50
|
[key: string]: any;
|
@@ -51,7 +53,7 @@ type ObjectField<Props extends {
|
|
51
53
|
}> = BaseField & {
|
52
54
|
type: "object";
|
53
55
|
objectFields: {
|
54
|
-
[SubPropName in keyof Props
|
56
|
+
[SubPropName in keyof Props]: Field<Props[SubPropName]>;
|
55
57
|
};
|
56
58
|
};
|
57
59
|
type Adaptor<AdaptorParams = {}, TableShape extends Record<string, any> = {}, PropShape = TableShape> = {
|
@@ -79,11 +81,15 @@ type ExternalField<Props extends {
|
|
79
81
|
placeholder?: string;
|
80
82
|
fetchList: (params: {
|
81
83
|
query: string;
|
84
|
+
filters: Record<string, any>;
|
82
85
|
}) => Promise<any[] | null>;
|
83
86
|
mapProp?: (value: any) => Props;
|
87
|
+
mapRow?: (value: any) => Record<string, string | number>;
|
84
88
|
getItemSummary: (item: Props, index?: number) => string;
|
85
89
|
showSearch?: boolean;
|
86
90
|
initialQuery?: string;
|
91
|
+
filterFields?: Record<string, Field>;
|
92
|
+
initialFilters?: Record<string, any>;
|
87
93
|
};
|
88
94
|
type CustomField<Props extends {
|
89
95
|
[key: string]: any;
|
@@ -141,7 +147,7 @@ type RenderFunc<Props extends {
|
|
141
147
|
[key: string]: any;
|
142
148
|
} = {
|
143
149
|
children: ReactNode;
|
144
|
-
}> =
|
150
|
+
}> = (props: Props) => ReactElement;
|
145
151
|
declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "components", "componentItem", "outline", "puck", "preview"];
|
146
152
|
type OverrideKey = (typeof overrideKeys)[number];
|
147
153
|
type OverridesGeneric<Shape extends {
|
@@ -171,7 +177,10 @@ type Overrides = OverridesGeneric<{
|
|
171
177
|
className?: string;
|
172
178
|
}>;
|
173
179
|
components: RenderFunc;
|
174
|
-
componentItem: RenderFunc
|
180
|
+
componentItem: RenderFunc<{
|
181
|
+
children: ReactNode;
|
182
|
+
name: string;
|
183
|
+
}>;
|
175
184
|
outline: RenderFunc;
|
176
185
|
puck: RenderFunc;
|
177
186
|
}>;
|
package/dist/index.js
CHANGED
@@ -49958,7 +49958,7 @@ var require_dist = __commonJS({
|
|
49958
49958
|
var HostPortal = 4;
|
49959
49959
|
var HostComponent = 5;
|
49960
49960
|
var HostText = 6;
|
49961
|
-
var
|
49961
|
+
var Fragment13 = 7;
|
49962
49962
|
var Mode = 8;
|
49963
49963
|
var ContextConsumer = 9;
|
49964
49964
|
var ContextProvider = 10;
|
@@ -51114,7 +51114,7 @@ var require_dist = __commonJS({
|
|
51114
51114
|
return "DehydratedFragment";
|
51115
51115
|
case ForwardRef:
|
51116
51116
|
return getWrappedName$1(type, type.render, "ForwardRef");
|
51117
|
-
case
|
51117
|
+
case Fragment13:
|
51118
51118
|
return "Fragment";
|
51119
51119
|
case HostComponent:
|
51120
51120
|
return type;
|
@@ -60785,7 +60785,7 @@ var require_dist = __commonJS({
|
|
60785
60785
|
}
|
60786
60786
|
}
|
60787
60787
|
function updateFragment2(returnFiber, current2, fragment, lanes, key) {
|
60788
|
-
if (current2 === null || current2.tag !==
|
60788
|
+
if (current2 === null || current2.tag !== Fragment13) {
|
60789
60789
|
var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
|
60790
60790
|
created.return = returnFiber;
|
60791
60791
|
return created;
|
@@ -61188,7 +61188,7 @@ var require_dist = __commonJS({
|
|
61188
61188
|
if (child.key === key) {
|
61189
61189
|
var elementType = element.type;
|
61190
61190
|
if (elementType === REACT_FRAGMENT_TYPE) {
|
61191
|
-
if (child.tag ===
|
61191
|
+
if (child.tag === Fragment13) {
|
61192
61192
|
deleteRemainingChildren(returnFiber, child.sibling);
|
61193
61193
|
var existing = useFiber(child, element.props.children);
|
61194
61194
|
existing.return = returnFiber;
|
@@ -65363,7 +65363,7 @@ var require_dist = __commonJS({
|
|
65363
65363
|
var _resolvedProps2 = workInProgress2.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
|
65364
65364
|
return updateForwardRef(current2, workInProgress2, type, _resolvedProps2, renderLanes2);
|
65365
65365
|
}
|
65366
|
-
case
|
65366
|
+
case Fragment13:
|
65367
65367
|
return updateFragment(current2, workInProgress2, renderLanes2);
|
65368
65368
|
case Mode:
|
65369
65369
|
return updateMode(current2, workInProgress2, renderLanes2);
|
@@ -65636,7 +65636,7 @@ var require_dist = __commonJS({
|
|
65636
65636
|
case SimpleMemoComponent:
|
65637
65637
|
case FunctionComponent:
|
65638
65638
|
case ForwardRef:
|
65639
|
-
case
|
65639
|
+
case Fragment13:
|
65640
65640
|
case Mode:
|
65641
65641
|
case Profiler:
|
65642
65642
|
case ContextConsumer:
|
@@ -69895,7 +69895,7 @@ var require_dist = __commonJS({
|
|
69895
69895
|
return fiber;
|
69896
69896
|
}
|
69897
69897
|
function createFiberFromFragment(elements, mode, lanes, key) {
|
69898
|
-
var fiber = createFiber(
|
69898
|
+
var fiber = createFiber(Fragment13, elements, key, mode);
|
69899
69899
|
fiber.lanes = lanes;
|
69900
69900
|
return fiber;
|
69901
69901
|
}
|
@@ -71035,7 +71035,7 @@ var require_dist = __commonJS({
|
|
71035
71035
|
init_react_import2();
|
71036
71036
|
var import_react22 = require("react");
|
71037
71037
|
init_react_import2();
|
71038
|
-
var Button_module_default = { "Button": "
|
71038
|
+
var Button_module_default = { "Button": "_Button_8fn3a_1", "Button--medium": "_Button--medium_8fn3a_29", "Button--large": "_Button--large_8fn3a_37", "Button-icon": "_Button-icon_8fn3a_44", "Button--primary": "_Button--primary_8fn3a_48", "Button--secondary": "_Button--secondary_8fn3a_67", "Button--flush": "_Button--flush_8fn3a_82", "Button--disabled": "_Button--disabled_8fn3a_86", "Button--fullWidth": "_Button--fullWidth_8fn3a_93", "Button-spinner": "_Button-spinner_8fn3a_98" };
|
71039
71039
|
init_react_import2();
|
71040
71040
|
var import_classnames2 = __toESM2(require_classnames2());
|
71041
71041
|
var getClassNameFactory2 = (rootClass, styles, { baseClass = "" } = {}) => (options = {}) => {
|
@@ -71085,7 +71085,7 @@ var require_dist = __commonJS({
|
|
71085
71085
|
}) => {
|
71086
71086
|
const [loading, setLoading] = (0, import_react22.useState)(loadingProp);
|
71087
71087
|
(0, import_react22.useEffect)(() => setLoading(loadingProp), [loadingProp]);
|
71088
|
-
const ElementType = href ? "a" :
|
71088
|
+
const ElementType = href ? "a" : type ? "button" : "span";
|
71089
71089
|
const el = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
71090
71090
|
ElementType,
|
71091
71091
|
{
|
@@ -71113,10 +71113,7 @@ var require_dist = __commonJS({
|
|
71113
71113
|
children: [
|
71114
71114
|
icon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: getClassName4("icon"), children: icon }),
|
71115
71115
|
children,
|
71116
|
-
loading && /* @__PURE__ */ (0, import_jsx_runtime7.
|
71117
|
-
"\xA0\xA0",
|
71118
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_spinners2.ClipLoader, { "aria-label": "loading", color: "inherit", size: "14px" })
|
71119
|
-
] })
|
71116
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: getClassName4("spinner"), children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_spinners2.ClipLoader, { "aria-label": "loading", color: "inherit", size: "14px" }) })
|
71120
71117
|
]
|
71121
71118
|
}
|
71122
71119
|
);
|
@@ -71125,7 +71122,7 @@ var require_dist = __commonJS({
|
|
71125
71122
|
init_react_import2();
|
71126
71123
|
var import_dnd2 = (init_dnd_esm(), __toCommonJS(dnd_esm_exports));
|
71127
71124
|
init_react_import2();
|
71128
|
-
var styles_module_default4 = { "
|
71125
|
+
var styles_module_default4 = { "Drawer": "_Drawer_6zh0b_1", "DrawerItem-default": "_DrawerItem-default_6zh0b_5", "DrawerItem-draggableWrapper": "_DrawerItem-draggableWrapper_6zh0b_5", "DrawerItem": "_DrawerItem_6zh0b_5", "DrawerItem-draggable": "_DrawerItem-draggable_6zh0b_5", "Drawer--isDraggingFrom": "_Drawer--isDraggingFrom_6zh0b_31", "DrawerItem-name": "_DrawerItem-name_6zh0b_47" };
|
71129
71126
|
init_react_import2();
|
71130
71127
|
var import_dnd = (init_dnd_esm(), __toCommonJS(dnd_esm_exports));
|
71131
71128
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
@@ -71190,7 +71187,7 @@ var require_dist = __commonJS({
|
|
71190
71187
|
return result;
|
71191
71188
|
};
|
71192
71189
|
init_react_import2();
|
71193
|
-
var styles_module_default22 = { "DragIcon": "
|
71190
|
+
var styles_module_default22 = { "DragIcon": "_DragIcon_1p5wn_1" };
|
71194
71191
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
71195
71192
|
var getClassName22 = get_class_name_factory_default2("DragIcon", styles_module_default22);
|
71196
71193
|
var DragIcon = () => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: getClassName22(), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("svg", { viewBox: "0 0 20 20", width: "12", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" }) }) });
|
@@ -71221,16 +71218,17 @@ var require_dist = __commonJS({
|
|
71221
71218
|
name,
|
71222
71219
|
children,
|
71223
71220
|
id,
|
71221
|
+
label,
|
71224
71222
|
index
|
71225
71223
|
}) => {
|
71226
71224
|
const ctx = (0, import_react32.useContext)(drawerContext);
|
71227
71225
|
const resolvedId = `${ctx.droppableId}::${id || name}`;
|
71228
71226
|
const CustomInner = (0, import_react32.useMemo)(
|
71229
|
-
() => children || (({ children: children2 }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: getClassNameItem2("default"), children: children2 })),
|
71227
|
+
() => children || (({ children: children2, name: name2 }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: getClassNameItem2("default"), children: children2 })),
|
71230
71228
|
[children]
|
71231
71229
|
);
|
71232
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DrawerDraggable, { id: resolvedId, index, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(CustomInner, { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: getClassNameItem2("draggableWrapper"), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: getClassNameItem2("draggable"), children: [
|
71233
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: getClassNameItem2("name"), children: name }),
|
71230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DrawerDraggable, { id: resolvedId, index, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(CustomInner, { name, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: getClassNameItem2("draggableWrapper"), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: getClassNameItem2("draggable"), children: [
|
71231
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: getClassNameItem2("name"), children: label != null ? label : name }),
|
71234
71232
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: getClassNameItem2("icon"), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DragIcon, {}) })
|
71235
71233
|
] }) }) }) });
|
71236
71234
|
};
|
@@ -71260,7 +71258,7 @@ var require_dist = __commonJS({
|
|
71260
71258
|
var import_react62 = require("react");
|
71261
71259
|
var import_dnd3 = (init_dnd_esm(), __toCommonJS(dnd_esm_exports));
|
71262
71260
|
init_react_import2();
|
71263
|
-
var styles_module_default32 = { "DraggableComponent": "
|
71261
|
+
var styles_module_default32 = { "DraggableComponent": "_DraggableComponent_1vpvt_1", "DraggableComponent--isDragging": "_DraggableComponent--isDragging_1vpvt_10", "DraggableComponent-contents": "_DraggableComponent-contents_1vpvt_16", "DraggableComponent-overlay": "_DraggableComponent-overlay_1vpvt_29", "DraggableComponent-loadingOverlay": "_DraggableComponent-loadingOverlay_1vpvt_42", "DraggableComponent--isLocked": "_DraggableComponent--isLocked_1vpvt_58", "DraggableComponent--forceHover": "_DraggableComponent--forceHover_1vpvt_64", "DraggableComponent--isSelected": "_DraggableComponent--isSelected_1vpvt_69", "DraggableComponent--indicativeHover": "_DraggableComponent--indicativeHover_1vpvt_74", "DraggableComponent-actions": "_DraggableComponent-actions_1vpvt_100", "DraggableComponent-actionsLabel": "_DraggableComponent-actionsLabel_1vpvt_125", "DraggableComponent-action": "_DraggableComponent-action_1vpvt_100" };
|
71264
71262
|
init_react_import2();
|
71265
71263
|
init_react_import2();
|
71266
71264
|
var import_react42 = require("react");
|
@@ -71404,6 +71402,18 @@ var require_dist = __commonJS({
|
|
71404
71402
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
71405
71403
|
]);
|
71406
71404
|
init_react_import2();
|
71405
|
+
var SlidersHorizontal = createLucideIcon2("SlidersHorizontal", [
|
71406
|
+
["line", { x1: "21", x2: "14", y1: "4", y2: "4", key: "obuewd" }],
|
71407
|
+
["line", { x1: "10", x2: "3", y1: "4", y2: "4", key: "1q6298" }],
|
71408
|
+
["line", { x1: "21", x2: "12", y1: "12", y2: "12", key: "1iu8h1" }],
|
71409
|
+
["line", { x1: "8", x2: "3", y1: "12", y2: "12", key: "ntss68" }],
|
71410
|
+
["line", { x1: "21", x2: "16", y1: "20", y2: "20", key: "14d8ph" }],
|
71411
|
+
["line", { x1: "12", x2: "3", y1: "20", y2: "20", key: "m0wm8r" }],
|
71412
|
+
["line", { x1: "14", x2: "14", y1: "2", y2: "6", key: "14e1ph" }],
|
71413
|
+
["line", { x1: "8", x2: "8", y1: "10", y2: "14", key: "1i6ji0" }],
|
71414
|
+
["line", { x1: "16", x2: "16", y1: "18", y2: "22", key: "1lctlv" }]
|
71415
|
+
]);
|
71416
|
+
init_react_import2();
|
71407
71417
|
var Trash = createLucideIcon2("Trash", [
|
71408
71418
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
71409
71419
|
["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
|
@@ -71537,7 +71547,7 @@ var require_dist = __commonJS({
|
|
71537
71547
|
return __spreadProps2(__spreadValues2({}, item), { props: dynamicProps[item.props.id] || item.props });
|
71538
71548
|
};
|
71539
71549
|
init_react_import2();
|
71540
|
-
var styles_module_default42 = { "DropZone": "
|
71550
|
+
var styles_module_default42 = { "DropZone": "_DropZone_utidm_1", "DropZone--zoomEnabled": "_DropZone--zoomEnabled_utidm_10", "DropZone-renderWrapper": "_DropZone-renderWrapper_utidm_14", "DropZone-content": "_DropZone-content_utidm_18", "DropZone--userIsDragging": "_DropZone--userIsDragging_utidm_23", "DropZone--draggingOverArea": "_DropZone--draggingOverArea_utidm_27", "DropZone--draggingNewComponent": "_DropZone--draggingNewComponent_utidm_28", "DropZone--isAreaSelected": "_DropZone--isAreaSelected_utidm_34", "DropZone--hoveringOverArea": "_DropZone--hoveringOverArea_utidm_35", "DropZone--isDisabled": "_DropZone--isDisabled_utidm_36", "DropZone--isRootZone": "_DropZone--isRootZone_utidm_37", "DropZone--hasChildren": "_DropZone--hasChildren_utidm_43", "DropZone--isDestination": "_DropZone--isDestination_utidm_48", "DropZone-item": "_DropZone-item_utidm_56", "DropZone-hitbox": "_DropZone-hitbox_utidm_60" };
|
71541
71551
|
init_react_import2();
|
71542
71552
|
var import_react72 = require("react");
|
71543
71553
|
var import_use_debounce = (init_index_module(), __toCommonJS(index_module_exports));
|
@@ -71817,7 +71827,7 @@ var require_dist = __commonJS({
|
|
71817
71827
|
},
|
71818
71828
|
children: [
|
71819
71829
|
content.map((item, i2) => {
|
71820
|
-
var _a2, _b;
|
71830
|
+
var _a2, _b, _c;
|
71821
71831
|
const componentId = item.props.id;
|
71822
71832
|
const defaultedProps = __spreadProps2(__spreadValues2(__spreadValues2({}, (_a2 = config.components[item.type]) == null ? void 0 : _a2.defaultProps), item.props), {
|
71823
71833
|
puck: { renderDropZone: DropZone },
|
@@ -71847,14 +71857,14 @@ var require_dist = __commonJS({
|
|
71847
71857
|
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
71848
71858
|
DraggableComponent,
|
71849
71859
|
{
|
71850
|
-
label: item.type.toString(),
|
71860
|
+
label: (_b = config.components[item.type]["label"]) != null ? _b : item.type.toString(),
|
71851
71861
|
id: `draggable-${componentId}`,
|
71852
71862
|
index: i2,
|
71853
71863
|
isSelected,
|
71854
71864
|
isLocked: userIsDragging,
|
71855
71865
|
forceHover: hoveringComponent === componentId && !userIsDragging,
|
71856
71866
|
indicativeHover: userIsDragging && containsZone && hoveringArea === componentId,
|
71857
|
-
isLoading: (
|
71867
|
+
isLoading: (_c = appContext22.componentState[componentId]) == null ? void 0 : _c.loading,
|
71858
71868
|
onMount: () => {
|
71859
71869
|
ctx.registerPath({
|
71860
71870
|
index: i2,
|
@@ -71942,7 +71952,7 @@ var require_dist = __commonJS({
|
|
71942
71952
|
{
|
71943
71953
|
"data-puck-placeholder": true,
|
71944
71954
|
style: __spreadProps2(__spreadValues2({}, placeholderStyle), {
|
71945
|
-
background: "var(--puck-color-azure-
|
71955
|
+
background: "var(--puck-color-azure-06)",
|
71946
71956
|
opacity: 0.3,
|
71947
71957
|
zIndex: 0
|
71948
71958
|
})
|
@@ -72000,7 +72010,7 @@ var require_dist = __commonJS({
|
|
72000
72010
|
init_react_import2();
|
72001
72011
|
var import_react102 = require("react");
|
72002
72012
|
init_react_import2();
|
72003
|
-
var IconButton_module_default = { "IconButton": "
|
72013
|
+
var IconButton_module_default = { "IconButton": "_IconButton_1xqlg_1", "IconButton-title": "_IconButton-title_1xqlg_33" };
|
72004
72014
|
var import_react_spinners3 = (init_esm(), __toCommonJS(esm_exports));
|
72005
72015
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
72006
72016
|
var getClassName6 = get_class_name_factory_default2("IconButton", IconButton_module_default);
|
@@ -72105,10 +72115,10 @@ var require_dist = __commonJS({
|
|
72105
72115
|
};
|
72106
72116
|
init_react_import2();
|
72107
72117
|
init_react_import2();
|
72108
|
-
var styles_module_default5 = { "SidebarSection": "
|
72118
|
+
var styles_module_default5 = { "SidebarSection": "_SidebarSection_125qe_1", "SidebarSection-title": "_SidebarSection-title_125qe_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_125qe_20", "SidebarSection-content": "_SidebarSection-content_125qe_24", "SidebarSection--noPadding": "_SidebarSection--noPadding_125qe_28", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_125qe_41", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_125qe_70", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_125qe_41", "SidebarSection-heading": "_SidebarSection-heading_125qe_82", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_125qe_86" };
|
72109
72119
|
init_react_import2();
|
72110
72120
|
init_react_import2();
|
72111
|
-
var styles_module_default6 = { "Heading": "
|
72121
|
+
var styles_module_default6 = { "Heading": "_Heading_qxrry_1", "Heading--xxxxl": "_Heading--xxxxl_qxrry_12", "Heading--xxxl": "_Heading--xxxl_qxrry_18", "Heading--xxl": "_Heading--xxl_qxrry_22", "Heading--xl": "_Heading--xl_qxrry_26", "Heading--l": "_Heading--l_qxrry_30", "Heading--m": "_Heading--m_qxrry_34", "Heading--s": "_Heading--s_qxrry_38", "Heading--xs": "_Heading--xs_qxrry_42" };
|
72112
72122
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
72113
72123
|
var getClassName7 = get_class_name_factory_default2("Heading", styles_module_default6);
|
72114
72124
|
var Heading2 = ({ children, rank, size = "m" }) => {
|
@@ -72210,7 +72220,7 @@ var require_dist = __commonJS({
|
|
72210
72220
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: getClassName8("title"), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: getClassName8("breadcrumbs"), children: [
|
72211
72221
|
showBreadcrumbs ? breadcrumbs.map((breadcrumb, i2) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: getClassName8("breadcrumb"), children: [
|
72212
72222
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
72213
|
-
"
|
72223
|
+
"button",
|
72214
72224
|
{
|
72215
72225
|
className: getClassName8("breadcrumbLabel"),
|
72216
72226
|
onClick: () => setUi({ itemSelector: breadcrumb.selector }),
|
@@ -72694,7 +72704,10 @@ var require_dist = __commonJS({
|
|
72694
72704
|
);
|
72695
72705
|
const runResolvers = () => __async(void 0, null, function* () {
|
72696
72706
|
const newData = newAppState.data;
|
72697
|
-
const flatContent = Object.keys(newData.zones || {}).reduce((acc, zone) => [...acc, ...newData.zones[zone]], newData.content).filter((item) =>
|
72707
|
+
const flatContent = Object.keys(newData.zones || {}).reduce((acc, zone) => [...acc, ...newData.zones[zone]], newData.content).filter((item) => {
|
72708
|
+
var _a;
|
72709
|
+
return !!((_a = config.components[item.type]) == null ? void 0 : _a.resolveData);
|
72710
|
+
});
|
72698
72711
|
const applyIfChange = (dynamicDataMap, dynamicRoot) => {
|
72699
72712
|
const processed = applyDynamicProps(
|
72700
72713
|
appState.data,
|
@@ -72760,7 +72773,7 @@ var require_dist = __commonJS({
|
|
72760
72773
|
};
|
72761
72774
|
init_react_import2();
|
72762
72775
|
init_react_import2();
|
72763
|
-
var styles_module_default7 = { "MenuBar": "
|
72776
|
+
var styles_module_default7 = { "MenuBar": "_MenuBar_8pf8c_1", "MenuBar--menuOpen": "_MenuBar--menuOpen_8pf8c_14", "MenuBar-inner": "_MenuBar-inner_8pf8c_29", "MenuBar-history": "_MenuBar-history_8pf8c_45" };
|
72764
72777
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
72765
72778
|
var getClassName9 = get_class_name_factory_default2("MenuBar", styles_module_default7);
|
72766
72779
|
var MenuBar = ({
|
@@ -72796,14 +72809,14 @@ var require_dist = __commonJS({
|
|
72796
72809
|
ChevronLeft,
|
72797
72810
|
{
|
72798
72811
|
size: 21,
|
72799
|
-
stroke: hasPast ? "var(--puck-color-black)" : "var(--puck-color-grey-
|
72812
|
+
stroke: hasPast ? "var(--puck-color-black)" : "var(--puck-color-grey-08)"
|
72800
72813
|
}
|
72801
72814
|
) }),
|
72802
72815
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconButton, { title: "redo", disabled: !hasFuture, onClick: forward, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
72803
72816
|
ChevronRight2,
|
72804
72817
|
{
|
72805
72818
|
size: 21,
|
72806
|
-
stroke: hasFuture ? "var(--puck-color-black)" : "var(--puck-color-grey-
|
72819
|
+
stroke: hasFuture ? "var(--puck-color-black)" : "var(--puck-color-grey-08)"
|
72807
72820
|
}
|
72808
72821
|
) })
|
72809
72822
|
] }),
|
@@ -72826,17 +72839,17 @@ var require_dist = __commonJS({
|
|
72826
72839
|
);
|
72827
72840
|
};
|
72828
72841
|
init_react_import2();
|
72829
|
-
var styles_module_default8 = { "Puck": "
|
72842
|
+
var styles_module_default8 = { "Puck": "_Puck_1mnww_19", "Puck--leftSideBarVisible": "_Puck--leftSideBarVisible_1mnww_36", "Puck--rightSideBarVisible": "_Puck--rightSideBarVisible_1mnww_42", "Puck-header": "_Puck-header_1mnww_96", "Puck-headerInner": "_Puck-headerInner_1mnww_105", "Puck-headerToggle": "_Puck-headerToggle_1mnww_115", "Puck-rightSideBarToggle": "_Puck-rightSideBarToggle_1mnww_122", "Puck-leftSideBarToggle": "_Puck-leftSideBarToggle_1mnww_123", "Puck-headerTitle": "_Puck-headerTitle_1mnww_127", "Puck-headerPath": "_Puck-headerPath_1mnww_131", "Puck-headerTools": "_Puck-headerTools_1mnww_138", "Puck-menuButton": "_Puck-menuButton_1mnww_144", "Puck--menuOpen": "_Puck--menuOpen_1mnww_149", "Puck-leftSideBar": "_Puck-leftSideBar_1mnww_123", "Puck-frame": "_Puck-frame_1mnww_168", "Puck-root": "_Puck-root_1mnww_176", "Puck-rightSideBar": "_Puck-rightSideBar_1mnww_122" };
|
72830
72843
|
init_react_import2();
|
72831
72844
|
var import_react_spinners6 = (init_esm(), __toCommonJS(esm_exports));
|
72832
72845
|
init_react_import2();
|
72833
72846
|
init_react_import2();
|
72834
|
-
var styles_module_default9 = { "Input": "
|
72847
|
+
var styles_module_default9 = { "Input": "_Input_1qi5b_1", "Input-label": "_Input-label_1qi5b_26", "Input-labelIcon": "_Input-labelIcon_1qi5b_34", "Input-disabledIcon": "_Input-disabledIcon_1qi5b_41", "Input-input": "_Input-input_1qi5b_46", "Input--readOnly": "_Input--readOnly_1qi5b_90", "Input-radioGroupItems": "_Input-radioGroupItems_1qi5b_101", "Input-radio": "_Input-radio_1qi5b_101", "Input-radioInner": "_Input-radioInner_1qi5b_118", "Input-radioInput": "_Input-radioInput_1qi5b_163" };
|
72835
72848
|
var import_react18 = require("react");
|
72836
72849
|
init_react_import2();
|
72837
72850
|
init_react_import2();
|
72838
72851
|
init_react_import2();
|
72839
|
-
var styles_module_default10 = { "ArrayField": "
|
72852
|
+
var styles_module_default10 = { "ArrayField": "_ArrayField_1txra_5", "ArrayField--isDraggingFrom": "_ArrayField--isDraggingFrom_1txra_13", "ArrayField-addButton": "_ArrayField-addButton_1txra_17", "ArrayField--hasItems": "_ArrayField--hasItems_1txra_32", "ArrayFieldItem": "_ArrayFieldItem_1txra_61", "ArrayFieldItem--isDragging": "_ArrayFieldItem--isDragging_1txra_69", "ArrayFieldItem--isExpanded": "_ArrayFieldItem--isExpanded_1txra_74", "ArrayFieldItem-summary": "_ArrayFieldItem-summary_1txra_84", "ArrayFieldItem--readOnly": "_ArrayFieldItem--readOnly_1txra_108", "ArrayFieldItem-body": "_ArrayFieldItem-body_1txra_142", "ArrayFieldItem-fieldset": "_ArrayFieldItem-fieldset_1txra_150", "ArrayFieldItem-rhs": "_ArrayFieldItem-rhs_1txra_157", "ArrayFieldItem-actions": "_ArrayFieldItem-actions_1txra_163" };
|
72840
72853
|
var import_dnd5 = (init_dnd_esm(), __toCommonJS(dnd_esm_exports));
|
72841
72854
|
var import_dnd6 = (init_dnd_esm(), __toCommonJS(dnd_esm_exports));
|
72842
72855
|
var import_react14 = require("react");
|
@@ -73002,6 +73015,7 @@ var require_dist = __commonJS({
|
|
73002
73015
|
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: getClassNameItem22("actions"), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: getClassNameItem22("action"), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
73003
73016
|
IconButton,
|
73004
73017
|
{
|
73018
|
+
disabled: field.min !== void 0 && field.min >= localState.arrayState.items.length,
|
73005
73019
|
onClick: (e2) => {
|
73006
73020
|
e2.stopPropagation();
|
73007
73021
|
const existingValue = [
|
@@ -73066,6 +73080,7 @@ var require_dist = __commonJS({
|
|
73066
73080
|
"button",
|
73067
73081
|
{
|
73068
73082
|
className: getClassName10("addButton"),
|
73083
|
+
disabled: field.max !== void 0 && localState.arrayState.items.length >= field.max,
|
73069
73084
|
onClick: () => {
|
73070
73085
|
const existingValue = value || [];
|
73071
73086
|
const newValue = [
|
@@ -73075,7 +73090,7 @@ var require_dist = __commonJS({
|
|
73075
73090
|
const newArrayState = regenerateArrayState(newValue);
|
73076
73091
|
onChange(newValue, mapArrayStateToUi(newArrayState));
|
73077
73092
|
},
|
73078
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Plus, { size:
|
73093
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Plus, { size: 21 })
|
73079
73094
|
}
|
73080
73095
|
)
|
73081
73096
|
]
|
@@ -73124,6 +73139,7 @@ var require_dist = __commonJS({
|
|
73124
73139
|
}
|
73125
73140
|
},
|
73126
73141
|
readOnly,
|
73142
|
+
tabIndex: readOnly ? -1 : void 0,
|
73127
73143
|
id,
|
73128
73144
|
min: field.type === "number" ? field.min : void 0,
|
73129
73145
|
max: field.type === "number" ? field.max : void 0
|
@@ -73137,11 +73153,11 @@ var require_dist = __commonJS({
|
|
73137
73153
|
init_react_import2();
|
73138
73154
|
var import_react16 = require("react");
|
73139
73155
|
init_react_import2();
|
73140
|
-
var styles_module_default11 = { "ExternalInput": "
|
73156
|
+
var styles_module_default11 = { "ExternalInput-actions": "_ExternalInput-actions_q3l5a_1", "ExternalInput-button": "_ExternalInput-button_q3l5a_5", "ExternalInput--dataSelected": "_ExternalInput--dataSelected_q3l5a_25", "ExternalInput-detachButton": "_ExternalInput-detachButton_q3l5a_32", "ExternalInputModal": "_ExternalInputModal_q3l5a_74", "ExternalInputModal-grid": "_ExternalInputModal-grid_q3l5a_84", "ExternalInputModal--filtersToggled": "_ExternalInputModal--filtersToggled_q3l5a_95", "ExternalInputModal-filters": "_ExternalInputModal-filters_q3l5a_100", "ExternalInputModal-masthead": "_ExternalInputModal-masthead_q3l5a_119", "ExternalInputModal-tableWrapper": "_ExternalInputModal-tableWrapper_q3l5a_128", "ExternalInputModal-table": "_ExternalInputModal-table_q3l5a_128", "ExternalInputModal-thead": "_ExternalInputModal-thead_q3l5a_144", "ExternalInputModal-th": "_ExternalInputModal-th_q3l5a_144", "ExternalInputModal-td": "_ExternalInputModal-td_q3l5a_159", "ExternalInputModal-tr": "_ExternalInputModal-tr_q3l5a_164", "ExternalInputModal-tbody": "_ExternalInputModal-tbody_q3l5a_171", "ExternalInputModal--hasData": "_ExternalInputModal--hasData_q3l5a_197", "ExternalInputModal-loadingBanner": "_ExternalInputModal-loadingBanner_q3l5a_201", "ExternalInputModal--isLoading": "_ExternalInputModal--isLoading_q3l5a_218", "ExternalInputModal-searchForm": "_ExternalInputModal-searchForm_q3l5a_222", "ExternalInputModal-search": "_ExternalInputModal-search_q3l5a_222", "ExternalInputModal-searchIcon": "_ExternalInputModal-searchIcon_q3l5a_259", "ExternalInputModal-searchIconText": "_ExternalInputModal-searchIconText_q3l5a_284", "ExternalInputModal-searchInput": "_ExternalInputModal-searchInput_q3l5a_294", "ExternalInputModal-searchActions": "_ExternalInputModal-searchActions_q3l5a_308", "ExternalInputModal-searchActionIcon": "_ExternalInputModal-searchActionIcon_q3l5a_321", "ExternalInputModal-footer": "_ExternalInputModal-footer_q3l5a_325" };
|
73141
73157
|
init_react_import2();
|
73142
73158
|
var import_react15 = require("react");
|
73143
73159
|
init_react_import2();
|
73144
|
-
var styles_module_default12 = { "Modal": "
|
73160
|
+
var styles_module_default12 = { "Modal": "_Modal_zud0i_1", "Modal--isOpen": "_Modal--isOpen_zud0i_15", "Modal-inner": "_Modal-inner_zud0i_19" };
|
73145
73161
|
var import_react_dom3 = __toESM2(require_react_dom2());
|
73146
73162
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
73147
73163
|
var getClassName12 = get_class_name_factory_default2("Modal", styles_module_default12);
|
@@ -73181,13 +73197,23 @@ var require_dist = __commonJS({
|
|
73181
73197
|
name,
|
73182
73198
|
id
|
73183
73199
|
}) => {
|
73184
|
-
const {
|
73200
|
+
const {
|
73201
|
+
mapProp = (val) => val,
|
73202
|
+
mapRow = (val) => val,
|
73203
|
+
filterFields
|
73204
|
+
} = field || {};
|
73185
73205
|
const [data, setData] = (0, import_react16.useState)([]);
|
73186
73206
|
const [isOpen, setOpen] = (0, import_react16.useState)(false);
|
73187
73207
|
const [isLoading, setIsLoading] = (0, import_react16.useState)(true);
|
73208
|
+
const hasFilterFields = !!filterFields;
|
73209
|
+
const [filters, setFilters] = (0, import_react16.useState)(field.initialFilters || {});
|
73210
|
+
const [filtersToggled, setFiltersToggled] = (0, import_react16.useState)(hasFilterFields);
|
73211
|
+
const mappedData = (0, import_react16.useMemo)(() => {
|
73212
|
+
return data.map(mapRow);
|
73213
|
+
}, [data]);
|
73188
73214
|
const keys = (0, import_react16.useMemo)(() => {
|
73189
73215
|
const validKeys = /* @__PURE__ */ new Set();
|
73190
|
-
for (const item of
|
73216
|
+
for (const item of mappedData) {
|
73191
73217
|
for (const key of Object.keys(item)) {
|
73192
73218
|
if (typeof item[key] === "string" || typeof item[key] === "number") {
|
73193
73219
|
validKeys.add(key);
|
@@ -73195,13 +73221,13 @@ var require_dist = __commonJS({
|
|
73195
73221
|
}
|
73196
73222
|
}
|
73197
73223
|
return Array.from(validKeys);
|
73198
|
-
}, [
|
73224
|
+
}, [mappedData]);
|
73199
73225
|
const [searchQuery, setSearchQuery] = (0, import_react16.useState)(field.initialQuery || "");
|
73200
73226
|
const search = (0, import_react16.useCallback)(
|
73201
|
-
(query) => __async(void 0, null, function* () {
|
73227
|
+
(query, filters2) => __async(void 0, null, function* () {
|
73202
73228
|
setIsLoading(true);
|
73203
|
-
const cacheKey = `${id}-${name}-${query}`;
|
73204
|
-
const listData = dataCache[cacheKey] || (yield field.fetchList({ query }));
|
73229
|
+
const cacheKey = `${id}-${name}-${query}-${JSON.stringify(filters2)}`;
|
73230
|
+
const listData = dataCache[cacheKey] || (yield field.fetchList({ query, filters: filters2 }));
|
73205
73231
|
if (listData) {
|
73206
73232
|
setData(listData);
|
73207
73233
|
setIsLoading(false);
|
@@ -73211,7 +73237,7 @@ var require_dist = __commonJS({
|
|
73211
73237
|
[name, field]
|
73212
73238
|
);
|
73213
73239
|
(0, import_react16.useEffect)(() => {
|
73214
|
-
search(searchQuery);
|
73240
|
+
search(searchQuery, filters);
|
73215
73241
|
}, []);
|
73216
73242
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
73217
73243
|
"div",
|
@@ -73246,78 +73272,109 @@ var require_dist = __commonJS({
|
|
73246
73272
|
)
|
73247
73273
|
] }),
|
73248
73274
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Modal, { onClose: () => setOpen(false), isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
73249
|
-
"
|
73275
|
+
"form",
|
73250
73276
|
{
|
73251
73277
|
className: getClassNameModal({
|
73252
73278
|
isLoading,
|
73253
73279
|
loaded: !isLoading,
|
73254
|
-
hasData:
|
73280
|
+
hasData: mappedData.length > 0,
|
73281
|
+
filtersToggled
|
73255
73282
|
}),
|
73283
|
+
onSubmit: (e2) => {
|
73284
|
+
e2.preventDefault();
|
73285
|
+
search(searchQuery, filters);
|
73286
|
+
},
|
73256
73287
|
children: [
|
73257
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.
|
73258
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.
|
73259
|
-
|
73260
|
-
"
|
73261
|
-
|
73262
|
-
|
73263
|
-
onSubmit: (e2) => {
|
73264
|
-
e2.preventDefault();
|
73265
|
-
search(searchQuery);
|
73266
|
-
},
|
73267
|
-
children: [
|
73268
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: getClassNameModal("search"), children: [
|
73269
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: getClassNameModal("searchIconText"), children: "Search" }),
|
73270
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassNameModal("searchIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Search, { size: "18" }) }),
|
73271
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
73272
|
-
"input",
|
73273
|
-
{
|
73274
|
-
className: getClassNameModal("searchInput"),
|
73275
|
-
name: "q",
|
73276
|
-
type: "search",
|
73277
|
-
placeholder: "Search",
|
73278
|
-
onChange: (e2) => {
|
73279
|
-
setSearchQuery(e2.currentTarget.value);
|
73280
|
-
},
|
73281
|
-
autoComplete: "off",
|
73282
|
-
value: searchQuery
|
73283
|
-
}
|
73284
|
-
)
|
73285
|
-
] }),
|
73286
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { type: "submit", loading: isLoading, disabled: isLoading, children: "Search" })
|
73287
|
-
]
|
73288
|
-
}
|
73289
|
-
)
|
73290
|
-
] }),
|
73291
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: getClassNameModal("tableWrapper"), children: [
|
73292
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("table", { className: getClassNameModal("table"), children: [
|
73293
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { className: getClassNameModal("thead"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tr", { className: getClassNameModal("tr"), children: keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
73294
|
-
"th",
|
73288
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassNameModal("masthead"), children: field.showSearch ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: getClassNameModal("searchForm"), children: [
|
73289
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: getClassNameModal("search"), children: [
|
73290
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: getClassNameModal("searchIconText"), children: "Search" }),
|
73291
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassNameModal("searchIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Search, { size: "18" }) }),
|
73292
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
73293
|
+
"input",
|
73295
73294
|
{
|
73296
|
-
className: getClassNameModal("
|
73297
|
-
|
73298
|
-
|
73295
|
+
className: getClassNameModal("searchInput"),
|
73296
|
+
name: "q",
|
73297
|
+
type: "search",
|
73298
|
+
placeholder: field.placeholder,
|
73299
|
+
onChange: (e2) => {
|
73300
|
+
setSearchQuery(e2.currentTarget.value);
|
73301
|
+
},
|
73302
|
+
autoComplete: "off",
|
73303
|
+
value: searchQuery
|
73304
|
+
}
|
73305
|
+
)
|
73306
|
+
] }),
|
73307
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: getClassNameModal("searchActions"), children: [
|
73308
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { type: "submit", loading: isLoading, fullWidth: true, children: "Search" }),
|
73309
|
+
hasFilterFields && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassNameModal("searchActionIcon"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
73310
|
+
IconButton,
|
73311
|
+
{
|
73312
|
+
title: "Toggle filters",
|
73313
|
+
onClick: (e2) => {
|
73314
|
+
e2.preventDefault();
|
73315
|
+
e2.stopPropagation();
|
73316
|
+
setFiltersToggled(!filtersToggled);
|
73317
|
+
},
|
73318
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SlidersHorizontal, { size: 20 })
|
73319
|
+
}
|
73320
|
+
) })
|
73321
|
+
] })
|
73322
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Heading2, { rank: 2, size: "xs", children: field.placeholder || "Select data" }) }),
|
73323
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: getClassNameModal("grid"), children: [
|
73324
|
+
hasFilterFields && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassNameModal("filters"), children: hasFilterFields && Object.keys(filterFields).map((fieldName) => {
|
73325
|
+
const filterField = filterFields[fieldName];
|
73326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
73327
|
+
InputOrGroup,
|
73328
|
+
{
|
73329
|
+
field: filterField,
|
73330
|
+
name: fieldName,
|
73331
|
+
id: `external_field_${fieldName}_filter`,
|
73332
|
+
label: filterField.label || fieldName,
|
73333
|
+
value: filters[fieldName],
|
73334
|
+
onChange: (value2) => {
|
73335
|
+
const newFilters = __spreadProps2(__spreadValues2({}, filters), { [fieldName]: value2 });
|
73336
|
+
setFilters(newFilters);
|
73337
|
+
search(searchQuery, newFilters);
|
73338
|
+
}
|
73299
73339
|
},
|
73300
|
-
|
73301
|
-
)
|
73302
|
-
|
73303
|
-
|
73304
|
-
|
73340
|
+
fieldName
|
73341
|
+
);
|
73342
|
+
}) }),
|
73343
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: getClassNameModal("tableWrapper"), children: [
|
73344
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("table", { className: getClassNameModal("table"), children: [
|
73345
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { className: getClassNameModal("thead"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tr", { className: getClassNameModal("tr"), children: keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
73346
|
+
"th",
|
73305
73347
|
{
|
73306
|
-
|
73307
|
-
|
73308
|
-
|
73309
|
-
onChange(mapProp(item));
|
73310
|
-
setOpen(false);
|
73311
|
-
},
|
73312
|
-
children: keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: getClassNameModal("td"), children: item[key] }, key))
|
73348
|
+
className: getClassNameModal("th"),
|
73349
|
+
style: { textAlign: "left" },
|
73350
|
+
children: key
|
73313
73351
|
},
|
73314
|
-
|
73315
|
-
)
|
73316
|
-
|
73317
|
-
|
73318
|
-
|
73352
|
+
key
|
73353
|
+
)) }) }),
|
73354
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tbody", { className: getClassNameModal("tbody"), children: mappedData.map((item, i2) => {
|
73355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
73356
|
+
"tr",
|
73357
|
+
{
|
73358
|
+
style: { whiteSpace: "nowrap" },
|
73359
|
+
className: getClassNameModal("tr"),
|
73360
|
+
onClick: () => {
|
73361
|
+
onChange(mapProp(data[i2]));
|
73362
|
+
setOpen(false);
|
73363
|
+
},
|
73364
|
+
children: keys.map((key) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("td", { className: getClassNameModal("td"), children: item[key] }, key))
|
73365
|
+
},
|
73366
|
+
i2
|
73367
|
+
);
|
73368
|
+
}) })
|
73369
|
+
] }),
|
73370
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: getClassNameModal("loadingBanner"), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_spinners5.ClipLoader, { size: 24, "aria-label": "Loading" }) })
|
73371
|
+
] })
|
73319
73372
|
] }),
|
73320
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.
|
73373
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: getClassNameModal("footer"), children: [
|
73374
|
+
mappedData.length,
|
73375
|
+
" result",
|
73376
|
+
mappedData.length === 1 ? "" : "s"
|
73377
|
+
] })
|
73321
73378
|
]
|
73322
73379
|
}
|
73323
73380
|
) })
|
@@ -73361,6 +73418,7 @@ var require_dist = __commonJS({
|
|
73361
73418
|
// DEPRECATED
|
73362
73419
|
placeholder: ((_a = deprecatedField.adaptor) == null ? void 0 : _a.name) ? `Select from ${deprecatedField.adaptor.name}` : validField.placeholder || "Select data",
|
73363
73420
|
mapProp: ((_b = deprecatedField.adaptor) == null ? void 0 : _b.mapProp) || validField.mapProp,
|
73421
|
+
mapRow: validField.mapRow,
|
73364
73422
|
fetchList: ((_c = deprecatedField.adaptor) == null ? void 0 : _c.fetchList) ? () => __async(void 0, null, function* () {
|
73365
73423
|
return yield deprecatedField.adaptor.fetchList(
|
73366
73424
|
deprecatedField.adaptorParams
|
@@ -73503,6 +73561,7 @@ var require_dist = __commonJS({
|
|
73503
73561
|
value: typeof value === "undefined" ? "" : value,
|
73504
73562
|
onChange: (e2) => onChange(e2.currentTarget.value),
|
73505
73563
|
readOnly,
|
73564
|
+
tabIndex: readOnly ? -1 : void 0,
|
73506
73565
|
rows: 5
|
73507
73566
|
}
|
73508
73567
|
)
|
@@ -73512,7 +73571,7 @@ var require_dist = __commonJS({
|
|
73512
73571
|
var import_use_debounce2 = (init_index_module(), __toCommonJS(index_module_exports));
|
73513
73572
|
init_react_import2();
|
73514
73573
|
init_react_import2();
|
73515
|
-
var styles_module_default13 = { "ObjectField": "
|
73574
|
+
var styles_module_default13 = { "ObjectField": "_ObjectField_15j63_5", "ObjectField-fieldset": "_ObjectField-fieldset_15j63_13" };
|
73516
73575
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
73517
73576
|
var getClassName17 = get_class_name_factory_default2("ObjectField", styles_module_default13);
|
73518
73577
|
var getClassNameItem3 = get_class_name_factory_default2("ObjectFieldItem", styles_module_default13);
|
@@ -73670,7 +73729,7 @@ var require_dist = __commonJS({
|
|
73670
73729
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Render2, __spreadProps2(__spreadValues2({}, mergedProps), { children }));
|
73671
73730
|
};
|
73672
73731
|
init_react_import2();
|
73673
|
-
var styles_module_default14 = { "PuckFields": "
|
73732
|
+
var styles_module_default14 = { "PuckFields": "_PuckFields_17k3p_1", "PuckFields-loadingOverlay": "_PuckFields-loadingOverlay_17k3p_6" };
|
73674
73733
|
var import_react19 = require("react");
|
73675
73734
|
var import_jsx_runtime222 = require("react/jsx-runtime");
|
73676
73735
|
var getClassName19 = get_class_name_factory_default2("PuckFields", styles_module_default14);
|
@@ -73817,15 +73876,16 @@ var require_dist = __commonJS({
|
|
73817
73876
|
var import_react20 = require("react");
|
73818
73877
|
init_react_import2();
|
73819
73878
|
init_react_import2();
|
73820
|
-
var styles_module_default15 = { "ComponentList": "
|
73879
|
+
var styles_module_default15 = { "ComponentList": "_ComponentList_odh9d_1", "ComponentList--isExpanded": "_ComponentList--isExpanded_odh9d_5", "ComponentList-content": "_ComponentList-content_odh9d_9", "ComponentList-title": "_ComponentList-title_odh9d_17", "ComponentList-titleIcon": "_ComponentList-titleIcon_odh9d_53" };
|
73821
73880
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
73822
73881
|
var getClassName20 = get_class_name_factory_default2("ComponentList", styles_module_default15);
|
73823
73882
|
var ComponentListItem = ({
|
73824
73883
|
name,
|
73884
|
+
label,
|
73825
73885
|
index
|
73826
73886
|
}) => {
|
73827
73887
|
const { overrides } = useAppContext2();
|
73828
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Drawer.Item, { name, index, children: overrides.componentItem });
|
73888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Drawer.Item, { label, name, index, children: overrides.componentItem });
|
73829
73889
|
};
|
73830
73890
|
var ComponentList = ({
|
73831
73891
|
children,
|
@@ -73836,7 +73896,7 @@ var require_dist = __commonJS({
|
|
73836
73896
|
const { expanded = true } = state.ui.componentList[id] || {};
|
73837
73897
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: getClassName20({ isExpanded: expanded }), children: [
|
73838
73898
|
title && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
73839
|
-
"
|
73899
|
+
"button",
|
73840
73900
|
{
|
73841
73901
|
className: getClassName20("title"),
|
73842
73902
|
onClick: () => setUi({
|
@@ -73854,9 +73914,11 @@ var require_dist = __commonJS({
|
|
73854
73914
|
}
|
73855
73915
|
),
|
73856
73916
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName20("content"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Drawer, { droppableId: `component-list${title ? `:${title}` : ""}`, children: children || Object.keys(config.components).map((componentKey, i2) => {
|
73917
|
+
var _a;
|
73857
73918
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
73858
73919
|
ComponentListItem,
|
73859
73920
|
{
|
73921
|
+
label: (_a = config.components[componentKey]["label"]) != null ? _a : componentKey,
|
73860
73922
|
name: componentKey,
|
73861
73923
|
index: i2
|
73862
73924
|
},
|
@@ -73885,10 +73947,12 @@ var require_dist = __commonJS({
|
|
73885
73947
|
id: categoryKey,
|
73886
73948
|
title: category.title || categoryKey,
|
73887
73949
|
children: category.components.map((componentName, i2) => {
|
73950
|
+
var _a2;
|
73888
73951
|
matchedComponents.push(componentName);
|
73889
73952
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
73890
73953
|
ComponentList.Item,
|
73891
73954
|
{
|
73955
|
+
label: (_a2 = config.components[componentName]["label"]) != null ? _a2 : componentName,
|
73892
73956
|
name: componentName,
|
73893
73957
|
index: i2
|
73894
73958
|
},
|
@@ -73911,10 +73975,12 @@ var require_dist = __commonJS({
|
|
73911
73975
|
id: "other",
|
73912
73976
|
title: ((_c = ui.componentList.other) == null ? void 0 : _c.title) || "Other",
|
73913
73977
|
children: remainingComponents.map((componentName, i2) => {
|
73978
|
+
var _a2;
|
73914
73979
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
73915
73980
|
ComponentList.Item,
|
73916
73981
|
{
|
73917
73982
|
name: componentName,
|
73983
|
+
label: (_a2 = config.components[componentName]["label"]) != null ? _a2 : componentName,
|
73918
73984
|
index: i2
|
73919
73985
|
},
|
73920
73986
|
componentName
|
@@ -73927,7 +73993,7 @@ var require_dist = __commonJS({
|
|
73927
73993
|
}
|
73928
73994
|
setComponentList(_componentList);
|
73929
73995
|
}
|
73930
|
-
}, [config.categories, ui.componentList]);
|
73996
|
+
}, [config.categories, config.components, ui.componentList]);
|
73931
73997
|
return componentList;
|
73932
73998
|
};
|
73933
73999
|
var import_react21 = require("react");
|
@@ -73982,7 +74048,7 @@ var require_dist = __commonJS({
|
|
73982
74048
|
};
|
73983
74049
|
init_react_import2();
|
73984
74050
|
init_react_import2();
|
73985
|
-
var styles_module_default16 = { "LayerTree": "
|
74051
|
+
var styles_module_default16 = { "LayerTree": "_LayerTree_1pgw8_1", "LayerTree-zoneTitle": "_LayerTree-zoneTitle_1pgw8_11", "LayerTree-helper": "_LayerTree-helper_1pgw8_17", "Layer": "_Layer_1pgw8_1", "Layer-inner": "_Layer-inner_1pgw8_29", "Layer--containsZone": "_Layer--containsZone_1pgw8_35", "Layer-clickable": "_Layer-clickable_1pgw8_39", "Layer--isSelected": "_Layer--isSelected_1pgw8_61", "Layer-chevron": "_Layer-chevron_1pgw8_77", "Layer--childIsSelected": "_Layer--childIsSelected_1pgw8_78", "Layer-zones": "_Layer-zones_1pgw8_82", "Layer-title": "_Layer-title_1pgw8_96", "Layer-name": "_Layer-name_1pgw8_105", "Layer-icon": "_Layer-icon_1pgw8_111", "Layer-zoneIcon": "_Layer-zoneIcon_1pgw8_116" };
|
73986
74052
|
init_react_import2();
|
73987
74053
|
var scrollIntoView2 = (el) => {
|
73988
74054
|
const oldStyle = __spreadValues2({}, el.style);
|
@@ -74007,6 +74073,7 @@ var require_dist = __commonJS({
|
|
74007
74073
|
var getClassNameLayer = get_class_name_factory_default2("Layer", styles_module_default16);
|
74008
74074
|
var LayerTree = ({
|
74009
74075
|
data,
|
74076
|
+
config,
|
74010
74077
|
zoneContent,
|
74011
74078
|
itemSelector,
|
74012
74079
|
setItemSelector,
|
@@ -74024,6 +74091,7 @@ var require_dist = __commonJS({
|
|
74024
74091
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("ul", { className: getClassName21(), children: [
|
74025
74092
|
zoneContent.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: getClassName21("helper"), children: "No items" }),
|
74026
74093
|
zoneContent.map((item, i2) => {
|
74094
|
+
var _a;
|
74027
74095
|
const isSelected = (itemSelector == null ? void 0 : itemSelector.index) === i2 && (itemSelector.zone === zone || itemSelector.zone === rootDroppableId2 && !zone);
|
74028
74096
|
const zonesForItem = findZonesForArea(data, item.props.id);
|
74029
74097
|
const containsZone = Object.keys(zonesForItem).length > 0;
|
@@ -74048,7 +74116,7 @@ var require_dist = __commonJS({
|
|
74048
74116
|
}),
|
74049
74117
|
children: [
|
74050
74118
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: getClassNameLayer("inner"), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
74051
|
-
"
|
74119
|
+
"button",
|
74052
74120
|
{
|
74053
74121
|
className: getClassNameLayer("clickable"),
|
74054
74122
|
onClick: () => {
|
@@ -74088,7 +74156,7 @@ var require_dist = __commonJS({
|
|
74088
74156
|
),
|
74089
74157
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: getClassNameLayer("title"), children: [
|
74090
74158
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: getClassNameLayer("icon"), children: item.type === "Text" || item.type === "Heading" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Type, { size: "16" }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(LayoutGrid, { size: "16" }) }),
|
74091
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: getClassNameLayer("name"), children: item.type })
|
74159
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: getClassNameLayer("name"), children: (_a = config.components[item.type]["label"]) != null ? _a : item.type })
|
74092
74160
|
] })
|
74093
74161
|
]
|
74094
74162
|
}
|
@@ -74096,6 +74164,7 @@ var require_dist = __commonJS({
|
|
74096
74164
|
containsZone && Object.keys(zonesForItem).map((zoneKey, idx) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: getClassNameLayer("zones"), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
74097
74165
|
LayerTree,
|
74098
74166
|
{
|
74167
|
+
config,
|
74099
74168
|
data,
|
74100
74169
|
zoneContent: zones[zoneKey],
|
74101
74170
|
setItemSelector,
|
@@ -74115,7 +74184,7 @@ var require_dist = __commonJS({
|
|
74115
74184
|
var import_react24 = require("react");
|
74116
74185
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
74117
74186
|
var Outline = () => {
|
74118
|
-
const { dispatch, state, overrides } = useAppContext2();
|
74187
|
+
const { dispatch, state, overrides, config } = useAppContext2();
|
74119
74188
|
const { data, ui } = state;
|
74120
74189
|
const { itemSelector } = ui;
|
74121
74190
|
const setItemSelector = (0, import_react24.useCallback)(
|
@@ -74132,6 +74201,7 @@ var require_dist = __commonJS({
|
|
74132
74201
|
(ctx == null ? void 0 : ctx.activeZones) && (ctx == null ? void 0 : ctx.activeZones[rootDroppableId2]) && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
74133
74202
|
LayerTree,
|
74134
74203
|
{
|
74204
|
+
config,
|
74135
74205
|
data,
|
74136
74206
|
label: areaContainsZones(data, "root") ? rootDroppableId2 : "",
|
74137
74207
|
zoneContent: data.content,
|
@@ -74144,6 +74214,7 @@ var require_dist = __commonJS({
|
|
74144
74214
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
74145
74215
|
LayerTree,
|
74146
74216
|
{
|
74217
|
+
config,
|
74147
74218
|
data,
|
74148
74219
|
label: zoneKey,
|
74149
74220
|
zone: zoneKey,
|
@@ -74276,6 +74347,7 @@ var require_dist = __commonJS({
|
|
74276
74347
|
headerTitle,
|
74277
74348
|
headerPath
|
74278
74349
|
}) {
|
74350
|
+
var _a;
|
74279
74351
|
const historyStore = useHistoryStore();
|
74280
74352
|
const [reducer2] = (0, import_react26.useState)(
|
74281
74353
|
() => createReducer({ config, record: historyStore.record })
|
@@ -74385,8 +74457,8 @@ var require_dist = __commonJS({
|
|
74385
74457
|
console.warn(
|
74386
74458
|
"`renderHeader` is deprecated. Please use `overrides.header` and the `usePuck` hook instead"
|
74387
74459
|
);
|
74388
|
-
const RenderHeader = (
|
74389
|
-
var _b =
|
74460
|
+
const RenderHeader = (_a2) => {
|
74461
|
+
var _b = _a2, { actions } = _b, props = __objRest2(_b, ["actions"]);
|
74390
74462
|
const Comp = renderHeader;
|
74391
74463
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Comp, __spreadProps2(__spreadValues2({}, props), { dispatch, state: appState, children: actions }));
|
74392
74464
|
};
|
@@ -74609,7 +74681,7 @@ var require_dist = __commonJS({
|
|
74609
74681
|
"div",
|
74610
74682
|
{
|
74611
74683
|
style: {
|
74612
|
-
background: "var(--puck-color-grey-
|
74684
|
+
background: "var(--puck-color-grey-11)",
|
74613
74685
|
height: "100%",
|
74614
74686
|
flexGrow: 1
|
74615
74687
|
}
|
@@ -74624,7 +74696,7 @@ var require_dist = __commonJS({
|
|
74624
74696
|
noPadding: true,
|
74625
74697
|
noBorderTop: true,
|
74626
74698
|
showBreadcrumbs: true,
|
74627
|
-
title: selectedItem ? selectedItem.type : "Page",
|
74699
|
+
title: selectedItem ? (_a = config.components[selectedItem.type]["label"]) != null ? _a : selectedItem.type : "Page",
|
74628
74700
|
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Fields, {})
|
74629
74701
|
}
|
74630
74702
|
) })
|
@@ -74746,8 +74818,8 @@ var require_dist = __commonJS({
|
|
74746
74818
|
});
|
74747
74819
|
init_react_import2();
|
74748
74820
|
var usePuck2 = () => {
|
74749
|
-
const { state: appState, config, dispatch } = useAppContext2();
|
74750
|
-
return { appState, config, dispatch };
|
74821
|
+
const { state: appState, config, history, dispatch } = useAppContext2();
|
74822
|
+
return { appState, config, dispatch, history };
|
74751
74823
|
};
|
74752
74824
|
}
|
74753
74825
|
});
|
@@ -74822,7 +74894,7 @@ init_react_import();
|
|
74822
74894
|
|
74823
74895
|
// css-module:/home/runner/work/puck/puck/packages/core/components/SidebarSection/styles.module.css#css-module
|
74824
74896
|
init_react_import();
|
74825
|
-
var styles_module_default = { "SidebarSection": "
|
74897
|
+
var styles_module_default = { "SidebarSection": "_SidebarSection_125qe_1", "SidebarSection-title": "_SidebarSection-title_125qe_12", "SidebarSection--noBorderTop": "_SidebarSection--noBorderTop_125qe_20", "SidebarSection-content": "_SidebarSection-content_125qe_24", "SidebarSection--noPadding": "_SidebarSection--noPadding_125qe_28", "SidebarSection-breadcrumbLabel": "_SidebarSection-breadcrumbLabel_125qe_41", "SidebarSection-breadcrumbs": "_SidebarSection-breadcrumbs_125qe_70", "SidebarSection-breadcrumb": "_SidebarSection-breadcrumb_125qe_41", "SidebarSection-heading": "_SidebarSection-heading_125qe_82", "SidebarSection-loadingOverlay": "_SidebarSection-loadingOverlay_125qe_86" };
|
74826
74898
|
|
74827
74899
|
// ../core/lib/get-class-name-factory.ts
|
74828
74900
|
init_react_import();
|
@@ -74861,7 +74933,7 @@ init_react_import();
|
|
74861
74933
|
|
74862
74934
|
// css-module:/home/runner/work/puck/puck/packages/core/components/Heading/styles.module.css#css-module
|
74863
74935
|
init_react_import();
|
74864
|
-
var styles_module_default2 = { "Heading": "
|
74936
|
+
var styles_module_default2 = { "Heading": "_Heading_qxrry_1", "Heading--xxxxl": "_Heading--xxxxl_qxrry_12", "Heading--xxxl": "_Heading--xxxl_qxrry_18", "Heading--xxl": "_Heading--xxl_qxrry_22", "Heading--xl": "_Heading--xl_qxrry_26", "Heading--l": "_Heading--l_qxrry_30", "Heading--m": "_Heading--m_qxrry_34", "Heading--s": "_Heading--s_qxrry_38", "Heading--xs": "_Heading--xs_qxrry_42" };
|
74865
74937
|
|
74866
74938
|
// ../core/components/Heading/index.tsx
|
74867
74939
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
@@ -75117,7 +75189,7 @@ var SidebarSection = ({
|
|
75117
75189
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: getClassName2("title"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: getClassName2("breadcrumbs"), children: [
|
75118
75190
|
showBreadcrumbs ? breadcrumbs.map((breadcrumb, i2) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: getClassName2("breadcrumb"), children: [
|
75119
75191
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
75120
|
-
"
|
75192
|
+
"button",
|
75121
75193
|
{
|
75122
75194
|
className: getClassName2("breadcrumbLabel"),
|
75123
75195
|
onClick: () => setUi({ itemSelector: breadcrumb.selector }),
|
@@ -75140,7 +75212,7 @@ init_react_import();
|
|
75140
75212
|
|
75141
75213
|
// css-module:/home/runner/work/puck/puck/packages/core/components/OutlineList/styles.module.css#css-module
|
75142
75214
|
init_react_import();
|
75143
|
-
var styles_module_default3 = { "OutlineList": "
|
75215
|
+
var styles_module_default3 = { "OutlineList": "_OutlineList_18bgy_1", "OutlineListItem": "_OutlineListItem_18bgy_20", "OutlineListItem--clickable": "_OutlineListItem--clickable_18bgy_35" };
|
75144
75216
|
|
75145
75217
|
// ../core/components/OutlineList/index.tsx
|
75146
75218
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
@@ -75263,7 +75335,7 @@ var HeadingAnalyzer = () => {
|
|
75263
75335
|
const oldStyle = __spreadValues({}, el.style);
|
75264
75336
|
if (el) {
|
75265
75337
|
scrollIntoView(el);
|
75266
|
-
el.style.outline = "4px solid var(--puck-color-rose-
|
75338
|
+
el.style.outline = "4px solid var(--puck-color-rose-06)";
|
75267
75339
|
el.style.outlineOffset = "4px";
|
75268
75340
|
setTimeout(() => {
|
75269
75341
|
el.style.outline = oldStyle.outline || "";
|
@@ -75271,7 +75343,7 @@ var HeadingAnalyzer = () => {
|
|
75271
75343
|
}, 2e3);
|
75272
75344
|
}
|
75273
75345
|
},
|
75274
|
-
children: props.missing ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { style: { color: "var(--puck-color-red)" }, children: [
|
75346
|
+
children: props.missing ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { style: { color: "var(--puck-color-red-04)" }, children: [
|
75275
75347
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("b", { children: [
|
75276
75348
|
"H",
|
75277
75349
|
props.rank
|
@@ -75542,6 +75614,14 @@ lucide-react/dist/esm/icons/search.js:
|
|
75542
75614
|
* See the LICENSE file in the root directory of this source tree.
|
75543
75615
|
*)
|
75544
75616
|
|
75617
|
+
lucide-react/dist/esm/icons/sliders-horizontal.js:
|
75618
|
+
(**
|
75619
|
+
* @license lucide-react v0.298.0 - ISC
|
75620
|
+
*
|
75621
|
+
* This source code is licensed under the ISC license.
|
75622
|
+
* See the LICENSE file in the root directory of this source tree.
|
75623
|
+
*)
|
75624
|
+
|
75545
75625
|
lucide-react/dist/esm/icons/trash.js:
|
75546
75626
|
(**
|
75547
75627
|
* @license lucide-react v0.298.0 - ISC
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@measured/puck-plugin-heading-analyzer",
|
3
|
-
"version": "0.14.0-canary.
|
3
|
+
"version": "0.14.0-canary.5bb1708",
|
4
4
|
"author": "Measured Corporation Ltd <hello@measured.co>",
|
5
5
|
"repository": "measuredco/puck",
|
6
6
|
"bugs": "https://github.com/measuredco/puck/issues",
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"dist"
|
19
19
|
],
|
20
20
|
"devDependencies": {
|
21
|
-
"@measured/puck": "^0.14.0-canary.
|
21
|
+
"@measured/puck": "^0.14.0-canary.5bb1708",
|
22
22
|
"@types/react": "^18.2.0",
|
23
23
|
"@types/react-dom": "^18.2.0",
|
24
24
|
"eslint": "^7.32.0",
|