@uniformdev/mesh-sdk-react 19.134.3-alpha.28 → 19.136.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/index.d.mts +2 -54
- package/dist/index.d.ts +2 -54
- package/dist/index.esm.js +194 -279
- package/dist/index.js +296 -373
- package/dist/index.mjs +194 -279
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -33,9 +33,9 @@ var src_exports = {};
|
|
|
33
33
|
__export(src_exports, {
|
|
34
34
|
$createVariableNode: () => $createVariableNode,
|
|
35
35
|
$isVariableNode: () => $isVariableNode,
|
|
36
|
-
AddListButton: () =>
|
|
37
|
-
Button: () =>
|
|
38
|
-
Callout: () =>
|
|
36
|
+
AddListButton: () => import_design_system41.AddListButton,
|
|
37
|
+
Button: () => import_design_system41.Button,
|
|
38
|
+
Callout: () => import_design_system41.Callout,
|
|
39
39
|
ControlledValuePlugin: () => ControlledValuePlugin,
|
|
40
40
|
DISCONNECT_VARIABLE_COMMAND: () => DISCONNECT_VARIABLE_COMMAND,
|
|
41
41
|
DamSelectedItem: () => DamSelectedItem,
|
|
@@ -47,24 +47,24 @@ __export(src_exports, {
|
|
|
47
47
|
DataTypeEditor: () => DataTypeEditor,
|
|
48
48
|
DefaultSearchRow: () => DefaultSearchRow,
|
|
49
49
|
DefaultSelectedItem: () => DefaultSelectedItem,
|
|
50
|
-
DrawerContent: () =>
|
|
50
|
+
DrawerContent: () => import_design_system41.DrawerContent,
|
|
51
51
|
EDIT_VARIABLE_COMMAND: () => EDIT_VARIABLE_COMMAND,
|
|
52
52
|
EntrySearch: () => EntrySearch,
|
|
53
|
-
Heading: () =>
|
|
53
|
+
Heading: () => import_design_system41.Heading,
|
|
54
54
|
INSERT_VARIABLE_COMMAND: () => INSERT_VARIABLE_COMMAND,
|
|
55
55
|
Icons: () => icons_exports,
|
|
56
|
-
Input: () =>
|
|
57
|
-
InputComboBox: () =>
|
|
58
|
-
InputKeywordSearch: () =>
|
|
59
|
-
InputSelect: () =>
|
|
60
|
-
InputToggle: () =>
|
|
56
|
+
Input: () => import_design_system41.Input,
|
|
57
|
+
InputComboBox: () => import_design_system41.InputComboBox,
|
|
58
|
+
InputKeywordSearch: () => import_design_system41.InputKeywordSearch,
|
|
59
|
+
InputSelect: () => import_design_system41.InputSelect,
|
|
60
|
+
InputToggle: () => import_design_system41.InputToggle,
|
|
61
61
|
InputVariables: () => InputVariables,
|
|
62
|
-
Label: () =>
|
|
62
|
+
Label: () => import_design_system41.Label,
|
|
63
63
|
LinkButton: () => LinkButton,
|
|
64
|
-
LoadingIndicator: () =>
|
|
65
|
-
LoadingOverlay: () =>
|
|
66
|
-
Menu: () =>
|
|
67
|
-
MenuItem: () =>
|
|
64
|
+
LoadingIndicator: () => import_design_system41.LoadingIndicator,
|
|
65
|
+
LoadingOverlay: () => import_design_system41.LoadingOverlay,
|
|
66
|
+
Menu: () => import_design_system41.Menu,
|
|
67
|
+
MenuItem: () => import_design_system41.MenuItem,
|
|
68
68
|
MeshApp: () => MeshApp,
|
|
69
69
|
OPEN_INSERT_VARIABLE_COMMAND: () => OPEN_INSERT_VARIABLE_COMMAND,
|
|
70
70
|
ObjectSearchContainer: () => ObjectSearchContainer,
|
|
@@ -78,22 +78,22 @@ __export(src_exports, {
|
|
|
78
78
|
ObjectSearchResultList: () => ObjectSearchResultList,
|
|
79
79
|
ParamTypeDynamicDataProvider: () => ParamTypeDynamicDataProvider,
|
|
80
80
|
ParameterConnectionIndicator: () => ParameterConnectionIndicator,
|
|
81
|
-
ParameterGroup: () =>
|
|
82
|
-
ParameterImage: () =>
|
|
83
|
-
ParameterImageInner: () =>
|
|
84
|
-
ParameterInput: () =>
|
|
85
|
-
ParameterInputInner: () =>
|
|
86
|
-
ParameterLabel: () =>
|
|
87
|
-
ParameterMenuButton: () =>
|
|
81
|
+
ParameterGroup: () => import_design_system41.ParameterGroup,
|
|
82
|
+
ParameterImage: () => import_design_system41.ParameterImage,
|
|
83
|
+
ParameterImageInner: () => import_design_system41.ParameterImageInner,
|
|
84
|
+
ParameterInput: () => import_design_system41.ParameterInput,
|
|
85
|
+
ParameterInputInner: () => import_design_system41.ParameterInputInner,
|
|
86
|
+
ParameterLabel: () => import_design_system41.ParameterLabel,
|
|
87
|
+
ParameterMenuButton: () => import_design_system41.ParameterMenuButton,
|
|
88
88
|
ParameterOrSingleVariable: () => ParameterOrSingleVariable,
|
|
89
|
-
ParameterSelect: () =>
|
|
90
|
-
ParameterSelectInner: () =>
|
|
91
|
-
ParameterShell: () =>
|
|
89
|
+
ParameterSelect: () => import_design_system41.ParameterSelect,
|
|
90
|
+
ParameterSelectInner: () => import_design_system41.ParameterSelectInner,
|
|
91
|
+
ParameterShell: () => import_design_system41.ParameterShell,
|
|
92
92
|
ParameterShellContext: () => import_design_system14.ParameterShellContext,
|
|
93
|
-
ParameterTextarea: () =>
|
|
94
|
-
ParameterTextareaInner: () =>
|
|
95
|
-
ParameterToggle: () =>
|
|
96
|
-
ParameterToggleInner: () =>
|
|
93
|
+
ParameterTextarea: () => import_design_system41.ParameterTextarea,
|
|
94
|
+
ParameterTextareaInner: () => import_design_system41.ParameterTextareaInner,
|
|
95
|
+
ParameterToggle: () => import_design_system41.ParameterToggle,
|
|
96
|
+
ParameterToggleInner: () => import_design_system41.ParameterToggleInner,
|
|
97
97
|
ParameterVariables: () => ParameterVariables,
|
|
98
98
|
ProductPreviewList: () => ProductPreviewList,
|
|
99
99
|
ProductQuery: () => ProductQuery,
|
|
@@ -112,20 +112,19 @@ __export(src_exports, {
|
|
|
112
112
|
RequestUrl: () => RequestUrl,
|
|
113
113
|
RequestUrlInput: () => RequestUrlInput,
|
|
114
114
|
ResolvableLoadingValue: () => ResolvableLoadingValue,
|
|
115
|
-
ScrollableList: () =>
|
|
116
|
-
ScrollableListItem: () =>
|
|
115
|
+
ScrollableList: () => import_design_system41.ScrollableList,
|
|
116
|
+
ScrollableListItem: () => import_design_system41.ScrollableListItem,
|
|
117
117
|
SelectionField: () => SelectionField,
|
|
118
|
-
Switch: () =>
|
|
118
|
+
Switch: () => import_design_system41.Switch,
|
|
119
119
|
TextVariableRenderer: () => TextVariableRenderer,
|
|
120
|
-
Textarea: () =>
|
|
121
|
-
Theme: () =>
|
|
120
|
+
Textarea: () => import_design_system41.Textarea,
|
|
121
|
+
Theme: () => import_design_system41.Theme,
|
|
122
122
|
VariableEditor: () => VariableEditor,
|
|
123
123
|
VariableNode: () => VariableNode,
|
|
124
124
|
VariablesList: () => VariablesList,
|
|
125
125
|
VariablesPlugin: () => VariablesPlugin,
|
|
126
126
|
VariablesProvider: () => VariablesProvider,
|
|
127
127
|
badgeIcon: () => badgeIcon,
|
|
128
|
-
bindableFiltersMapper: () => bindableFiltersMapper,
|
|
129
128
|
convertConnectedDataToVariable: () => convertConnectedDataToVariable,
|
|
130
129
|
createLocationValidator: () => createLocationValidator,
|
|
131
130
|
damSelectItemImage: () => damSelectItemImage,
|
|
@@ -4232,9 +4231,8 @@ function $isTargetWithinDecorator(target) {
|
|
|
4232
4231
|
}
|
|
4233
4232
|
|
|
4234
4233
|
// src/components/Variables/InputVariables.tsx
|
|
4235
|
-
var
|
|
4236
|
-
var
|
|
4237
|
-
var import_react52 = require("react");
|
|
4234
|
+
var import_design_system20 = require("@uniformdev/design-system");
|
|
4235
|
+
var import_react50 = require("react");
|
|
4238
4236
|
var import_uuid2 = require("uuid");
|
|
4239
4237
|
|
|
4240
4238
|
// src/components/Variables/composer/EditorRefPlugin.tsx
|
|
@@ -4358,102 +4356,9 @@ var placeholderCompact = import_react42.css`
|
|
|
4358
4356
|
inset: var(--spacing-sm) var(--spacing-lg) var(--spacing-sm) var(--spacing-base);
|
|
4359
4357
|
`;
|
|
4360
4358
|
|
|
4361
|
-
// src/components/Variables/styles/ParameterVariables.styles.ts
|
|
4362
|
-
var import_react43 = require("@emotion/react");
|
|
4363
|
-
var import_design_system19 = require("@uniformdev/design-system");
|
|
4364
|
-
var variableBindButton = import_react43.css`
|
|
4365
|
-
align-items: center;
|
|
4366
|
-
border: none;
|
|
4367
|
-
border-radius: var(--rounded-base);
|
|
4368
|
-
background: none;
|
|
4369
|
-
display: flex;
|
|
4370
|
-
height: 1.2rem;
|
|
4371
|
-
padding: var(--spacing-2xs);
|
|
4372
|
-
transition: background var(--duration-fast) var(--timing-ease-out),
|
|
4373
|
-
color var(--duration-fast) var(--timing-ease-out);
|
|
4374
|
-
width: 1.2rem;
|
|
4375
|
-
|
|
4376
|
-
&:hover,
|
|
4377
|
-
&[aria-pressed='true']:not(:disabled) {
|
|
4378
|
-
background: var(--brand-secondary-3);
|
|
4379
|
-
color: var(--white);
|
|
4380
|
-
}
|
|
4381
|
-
|
|
4382
|
-
&[aria-disabled='true'] {
|
|
4383
|
-
background: none;
|
|
4384
|
-
color: currentColor;
|
|
4385
|
-
}
|
|
4386
|
-
|
|
4387
|
-
// fixes menu resizing issue within iframes
|
|
4388
|
-
// see https://linear.app/uniform/issue/UNI-3068/mesh-integration-resizing-with-menus
|
|
4389
|
-
+ [role='menu'] {
|
|
4390
|
-
max-height: unset;
|
|
4391
|
-
}
|
|
4392
|
-
`;
|
|
4393
|
-
var input2 = import_react43.css`
|
|
4394
|
-
display: block;
|
|
4395
|
-
appearance: none;
|
|
4396
|
-
box-sizing: border-box;
|
|
4397
|
-
background: var(--white);
|
|
4398
|
-
border: 1px solid var(--gray-200);
|
|
4399
|
-
border-radius: var(--rounded-sm);
|
|
4400
|
-
color: var(--gray-700);
|
|
4401
|
-
font-size: var(--fs-sm);
|
|
4402
|
-
line-height: 1.5;
|
|
4403
|
-
min-height: 2rem;
|
|
4404
|
-
padding: var(--spacing-sm);
|
|
4405
|
-
width: 100%;
|
|
4406
|
-
position: relative;
|
|
4407
|
-
white-space: normal;
|
|
4408
|
-
transition-property: background, border-color, color, box-shadow, border-radius;
|
|
4409
|
-
transition-duration: var(--duration-fast);
|
|
4410
|
-
transition-timing-function: var(--timing-ease-out);
|
|
4411
|
-
|
|
4412
|
-
&::placeholder {
|
|
4413
|
-
color: var(--gray-400);
|
|
4414
|
-
}
|
|
4415
|
-
|
|
4416
|
-
&:focus,
|
|
4417
|
-
&:focus-within {
|
|
4418
|
-
border-radius: var(--rounded-sm);
|
|
4419
|
-
box-shadow: var(--elevation-100);
|
|
4420
|
-
border: 1px solid var(--accent-dark-active);
|
|
4421
|
-
outline: none;
|
|
4422
|
-
}
|
|
4423
|
-
&:hover {
|
|
4424
|
-
border: 1px solid var(--accent-dark-hover);
|
|
4425
|
-
}
|
|
4426
|
-
|
|
4427
|
-
&:disabled,
|
|
4428
|
-
&:disabled::placeholder,
|
|
4429
|
-
&:disabled:hover {
|
|
4430
|
-
border-radius: var(--rounded-sm);
|
|
4431
|
-
cursor: not-allowed;
|
|
4432
|
-
color: var(--gray-400);
|
|
4433
|
-
}
|
|
4434
|
-
|
|
4435
|
-
&[readonly],
|
|
4436
|
-
&[contenteditable='false'] {
|
|
4437
|
-
cursor: not-allowed;
|
|
4438
|
-
color: var(--gray-400);
|
|
4439
|
-
}
|
|
4440
|
-
|
|
4441
|
-
> p {
|
|
4442
|
-
margin: 0;
|
|
4443
|
-
}
|
|
4444
|
-
`;
|
|
4445
|
-
var inputMultiLine = (lines) => import_react43.css`
|
|
4446
|
-
${import_design_system19.scrollbarStyles}
|
|
4447
|
-
// 1.5 = line height, spacing-sm = top and bottom padding + spacing-xs to give a slight increase in height
|
|
4448
|
-
// as the text looked to close to the bottom of the input
|
|
4449
|
-
height: calc(${lines * 1.5}em + var(--spacing-sm) + var(--spacing-xs));
|
|
4450
|
-
resize: vertical;
|
|
4451
|
-
overflow: auto;
|
|
4452
|
-
`;
|
|
4453
|
-
|
|
4454
4359
|
// src/components/Variables/toolbox/InputVariablesProvider.tsx
|
|
4455
4360
|
var React10 = __toESM(require("react"));
|
|
4456
|
-
var
|
|
4361
|
+
var import_react43 = require("react");
|
|
4457
4362
|
|
|
4458
4363
|
// src/components/Variables/util/hasReferencedVariables.ts
|
|
4459
4364
|
var import_canvas5 = require("@uniformdev/canvas");
|
|
@@ -4498,7 +4403,7 @@ function useInputVariablesState({
|
|
|
4498
4403
|
const hadVariablesInValueForReals = inputWhenNoVariables ? hadVariablesInValue : hasVariablesInValue;
|
|
4499
4404
|
const disableVariablesForReals = disableVariables || Object.keys(variables).length === 0 && !showAddVariableMenuOption;
|
|
4500
4405
|
const disableResetForReals = !inputWhenNoVariables || !hadVariablesInValueForReals;
|
|
4501
|
-
const sharedMenuProps = (0,
|
|
4406
|
+
const sharedMenuProps = (0, import_react43.useMemo)(
|
|
4502
4407
|
() => ({
|
|
4503
4408
|
menuTooltip,
|
|
4504
4409
|
showAddVariableMenuOption,
|
|
@@ -4529,15 +4434,15 @@ function useInputVariablesState({
|
|
|
4529
4434
|
}
|
|
4530
4435
|
|
|
4531
4436
|
// src/components/Variables/toolbox/VariableField.styles.ts
|
|
4532
|
-
var
|
|
4533
|
-
var labelText =
|
|
4437
|
+
var import_react44 = require("@emotion/react");
|
|
4438
|
+
var labelText = import_react44.css`
|
|
4534
4439
|
align-items: center;
|
|
4535
4440
|
display: flex;
|
|
4536
4441
|
gap: var(--spacing-xs);
|
|
4537
4442
|
font-weight: var(--fw-regular);
|
|
4538
4443
|
margin: 0 0 var(--spacing-xs);
|
|
4539
4444
|
`;
|
|
4540
|
-
var
|
|
4445
|
+
var variableBindButton = import_react44.css`
|
|
4541
4446
|
align-items: center;
|
|
4542
4447
|
border: none;
|
|
4543
4448
|
border-radius: var(--rounded-base);
|
|
@@ -4568,8 +4473,8 @@ var import_lexical6 = require("lexical");
|
|
|
4568
4473
|
// src/components/Variables/toolbox/SelectVariableMenu.tsx
|
|
4569
4474
|
var import_BsFillPlusCircleFill = require("@react-icons/all-files/bs/BsFillPlusCircleFill");
|
|
4570
4475
|
var import_CgUsbC = require("@react-icons/all-files/cg/CgUsbC");
|
|
4571
|
-
var
|
|
4572
|
-
var
|
|
4476
|
+
var import_design_system19 = require("@uniformdev/design-system");
|
|
4477
|
+
var import_react45 = require("react");
|
|
4573
4478
|
var import_jsx_runtime35 = require("@emotion/react/jsx-runtime");
|
|
4574
4479
|
function SelectVariableMenu({
|
|
4575
4480
|
onSelectVariable,
|
|
@@ -4584,7 +4489,7 @@ function SelectVariableMenu({
|
|
|
4584
4489
|
filterVariable
|
|
4585
4490
|
}) {
|
|
4586
4491
|
const { variables, canDispatch, readOnly } = useVariables(true);
|
|
4587
|
-
const btnRef = (0,
|
|
4492
|
+
const btnRef = (0, import_react45.useRef)(null);
|
|
4588
4493
|
const { editVariable } = useVariableEditor();
|
|
4589
4494
|
const variablesGroups = variablesToGroupedList(variables, filterVariable, getEditorContext == null ? void 0 : getEditorContext());
|
|
4590
4495
|
const showAddVariableMenuOptionForReals = showAddVariableMenuOption && canDispatch && !readOnly;
|
|
@@ -4593,7 +4498,7 @@ function SelectVariableMenu({
|
|
|
4593
4498
|
return null;
|
|
4594
4499
|
}
|
|
4595
4500
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4596
|
-
|
|
4501
|
+
import_design_system19.Menu,
|
|
4597
4502
|
{
|
|
4598
4503
|
placement: portal ? "bottom-end" : "bottom-start",
|
|
4599
4504
|
portal,
|
|
@@ -4612,7 +4517,7 @@ function SelectVariableMenu({
|
|
|
4612
4517
|
menuLabel: menuTooltip,
|
|
4613
4518
|
children: [
|
|
4614
4519
|
showAddVariableMenuOptionForReals ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4615
|
-
|
|
4520
|
+
import_design_system19.MenuItem,
|
|
4616
4521
|
{
|
|
4617
4522
|
onClick: async () => {
|
|
4618
4523
|
const result = await editVariable("", getEditorContext == null ? void 0 : getEditorContext());
|
|
@@ -4622,19 +4527,19 @@ function SelectVariableMenu({
|
|
|
4622
4527
|
onSelectVariable == null ? void 0 : onSelectVariable(result.selectedVariable);
|
|
4623
4528
|
},
|
|
4624
4529
|
"data-testid": "add-variable-button",
|
|
4625
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4530
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_design_system19.HorizontalRhythm, { gap: "sm", align: "center", children: [
|
|
4626
4531
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_BsFillPlusCircleFill.BsFillPlusCircleFill, { fill: "var(--gray-500)", size: "1.25em" }),
|
|
4627
4532
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: typeof showAddVariableMenuOption === "string" ? showAddVariableMenuOption : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_jsx_runtime35.Fragment, { children: "Add\u2026" }) })
|
|
4628
4533
|
] })
|
|
4629
4534
|
}
|
|
4630
4535
|
) : null,
|
|
4631
|
-
showAddVariableMenuOptionForReals && menuHasVariableOptions ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4536
|
+
showAddVariableMenuOptionForReals && menuHasVariableOptions ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_design_system19.MenuItemSeparator, {}) : null,
|
|
4632
4537
|
variablesGroups.map((group) => {
|
|
4633
4538
|
var _a;
|
|
4634
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4539
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_design_system19.MenuGroup, { title: (_a = group.name) != null ? _a : "", children: group.variables.map((variable) => {
|
|
4635
4540
|
const { name, displayName, helpText } = variable;
|
|
4636
4541
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4637
|
-
|
|
4542
|
+
import_design_system19.MenuItem,
|
|
4638
4543
|
{
|
|
4639
4544
|
id: name,
|
|
4640
4545
|
css: menuItemTextGroup,
|
|
@@ -4648,9 +4553,9 @@ function SelectVariableMenu({
|
|
|
4648
4553
|
);
|
|
4649
4554
|
}) }, group.name);
|
|
4650
4555
|
}),
|
|
4651
|
-
menuHasVariableOptions && onResetVariables ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4652
|
-
onResetVariables ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4653
|
-
tip && (menuHasVariableOptions || onResetVariables) ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4556
|
+
menuHasVariableOptions && onResetVariables ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_design_system19.MenuItemSeparator, {}) : null,
|
|
4557
|
+
onResetVariables ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_design_system19.MenuItem, { onClick: onResetVariables, css: { color: "var(--brand-secondary-5)" }, children: "Reset" }) : null,
|
|
4558
|
+
tip && (menuHasVariableOptions || onResetVariables) ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_design_system19.MenuItemSeparator, {}) : null,
|
|
4654
4559
|
tip ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("i", { css: variablesTipText, children: tip }) : null
|
|
4655
4560
|
]
|
|
4656
4561
|
}
|
|
@@ -4700,7 +4605,7 @@ function VariableField({
|
|
|
4700
4605
|
VariablesComposerVariableMenu,
|
|
4701
4606
|
{
|
|
4702
4607
|
...selectVariableMenuOptions,
|
|
4703
|
-
buttonCss: [
|
|
4608
|
+
buttonCss: [variableBindButton, selectVariableMenuOptions == null ? void 0 : selectVariableMenuOptions.buttonCss],
|
|
4704
4609
|
buttonProps: isActive ? { "aria-pressed": "true" } : void 0
|
|
4705
4610
|
}
|
|
4706
4611
|
) : null;
|
|
@@ -4718,14 +4623,14 @@ var import_LexicalAutoFocusPlugin = require("@lexical/react/LexicalAutoFocusPlug
|
|
|
4718
4623
|
var import_LexicalClearEditorPlugin = require("@lexical/react/LexicalClearEditorPlugin");
|
|
4719
4624
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
4720
4625
|
var import_LexicalOnChangePlugin = require("@lexical/react/LexicalOnChangePlugin");
|
|
4721
|
-
var
|
|
4626
|
+
var import_react48 = require("react");
|
|
4722
4627
|
|
|
4723
4628
|
// src/components/Variables/composer/DisablePlugin.tsx
|
|
4724
4629
|
var import_LexicalComposerContext7 = require("@lexical/react/LexicalComposerContext");
|
|
4725
|
-
var
|
|
4630
|
+
var import_react46 = require("react");
|
|
4726
4631
|
function DisablePlugin({ disabled }) {
|
|
4727
4632
|
const [editor] = (0, import_LexicalComposerContext7.useLexicalComposerContext)();
|
|
4728
|
-
(0,
|
|
4633
|
+
(0, import_react46.useEffect)(() => {
|
|
4729
4634
|
editor.setEditable(!disabled);
|
|
4730
4635
|
}, [editor, disabled]);
|
|
4731
4636
|
return null;
|
|
@@ -4734,10 +4639,10 @@ function DisablePlugin({ disabled }) {
|
|
|
4734
4639
|
// src/components/Variables/composer/SingleLineTextPlugin.tsx
|
|
4735
4640
|
var import_LexicalComposerContext8 = require("@lexical/react/LexicalComposerContext");
|
|
4736
4641
|
var import_lexical7 = require("lexical");
|
|
4737
|
-
var
|
|
4642
|
+
var import_react47 = require("react");
|
|
4738
4643
|
function SingleLineTextPlugin() {
|
|
4739
4644
|
const [editor] = (0, import_LexicalComposerContext8.useLexicalComposerContext)();
|
|
4740
|
-
(0,
|
|
4645
|
+
(0, import_react47.useEffect)(() => {
|
|
4741
4646
|
editor.registerNodeTransform(import_lexical7.LineBreakNode, (node) => {
|
|
4742
4647
|
node.remove();
|
|
4743
4648
|
});
|
|
@@ -4790,8 +4695,8 @@ function VariablesComposer(props) {
|
|
|
4790
4695
|
autoFocus,
|
|
4791
4696
|
...variablesPluginProps
|
|
4792
4697
|
} = props;
|
|
4793
|
-
const [lastEmittedValue, setLastEmittedValue] = (0,
|
|
4794
|
-
const editorConfig = (0,
|
|
4698
|
+
const [lastEmittedValue, setLastEmittedValue] = (0, import_react48.useState)(value);
|
|
4699
|
+
const editorConfig = (0, import_react48.useMemo)(
|
|
4795
4700
|
() => ({
|
|
4796
4701
|
namespace: "uniform",
|
|
4797
4702
|
onError(error) {
|
|
@@ -4803,8 +4708,8 @@ function VariablesComposer(props) {
|
|
|
4803
4708
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4804
4709
|
[]
|
|
4805
4710
|
);
|
|
4806
|
-
const editorState = (0,
|
|
4807
|
-
const updateTimeout = (0,
|
|
4711
|
+
const editorState = (0, import_react48.useRef)();
|
|
4712
|
+
const updateTimeout = (0, import_react48.useRef)();
|
|
4808
4713
|
if (typeof document === "undefined")
|
|
4809
4714
|
return null;
|
|
4810
4715
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_LexicalComposer.LexicalComposer, { initialConfig: editorConfig, children: [
|
|
@@ -4847,10 +4752,10 @@ var import_LexicalHistoryPlugin = require("@lexical/react/LexicalHistoryPlugin")
|
|
|
4847
4752
|
var import_LexicalPlainTextPlugin = require("@lexical/react/LexicalPlainTextPlugin");
|
|
4848
4753
|
var import_utils4 = require("@lexical/utils");
|
|
4849
4754
|
var import_lexical9 = require("lexical");
|
|
4850
|
-
var
|
|
4755
|
+
var import_react49 = require("react");
|
|
4851
4756
|
var import_jsx_runtime39 = require("@emotion/react/jsx-runtime");
|
|
4852
4757
|
function VariablesComposerInput({
|
|
4853
|
-
css:
|
|
4758
|
+
css: css37,
|
|
4854
4759
|
placeholder,
|
|
4855
4760
|
...contentEditableProps
|
|
4856
4761
|
}) {
|
|
@@ -4869,7 +4774,7 @@ function VariablesComposerInput({
|
|
|
4869
4774
|
}
|
|
4870
4775
|
function RichishCopyAndPastePlugin() {
|
|
4871
4776
|
const [editor] = (0, import_LexicalComposerContext9.useLexicalComposerContext)();
|
|
4872
|
-
(0,
|
|
4777
|
+
(0, import_react49.useEffect)(() => {
|
|
4873
4778
|
return (0, import_utils4.mergeRegister)(
|
|
4874
4779
|
editor.registerCommand(
|
|
4875
4780
|
import_lexical9.COPY_COMMAND,
|
|
@@ -4953,7 +4858,6 @@ function InputVariables(props) {
|
|
|
4953
4858
|
value,
|
|
4954
4859
|
enableEditingVariables,
|
|
4955
4860
|
disableInlineMenu,
|
|
4956
|
-
showMenuPosition,
|
|
4957
4861
|
onChange,
|
|
4958
4862
|
transformPaste,
|
|
4959
4863
|
showAddVariableMenuOption,
|
|
@@ -4973,7 +4877,7 @@ function InputVariables(props) {
|
|
|
4973
4877
|
styleVariant = "default",
|
|
4974
4878
|
renderMenuInPortal
|
|
4975
4879
|
} = props;
|
|
4976
|
-
const [finalId] = (0,
|
|
4880
|
+
const [finalId] = (0, import_react50.useState)(id != null ? id : () => (0, import_uuid2.v4)());
|
|
4977
4881
|
const { dispatch, canDispatch, isEditing } = useVariables(true);
|
|
4978
4882
|
const { disableVariablesForReals, hadVariablesInValue, sharedMenuProps } = useInputVariablesState(props);
|
|
4979
4883
|
const useInputWithNoVariables = Boolean(inputWhenNoVariables && !hadVariablesInValue);
|
|
@@ -4987,64 +4891,40 @@ function InputVariables(props) {
|
|
|
4987
4891
|
},
|
|
4988
4892
|
css: disabled ? inputDisabled : "",
|
|
4989
4893
|
children: [
|
|
4990
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.
|
|
4991
|
-
|
|
4894
|
+
useInputWithNoVariables ? inputWhenNoVariables : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
4895
|
+
InputVariablesOverlayMenu,
|
|
4992
4896
|
{
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
import_design_system21.Caption,
|
|
5019
|
-
{
|
|
5020
|
-
css: [
|
|
5021
|
-
placeholderCaption,
|
|
5022
|
-
styleVariant === "compact" ? placeholderCompact : null
|
|
5023
|
-
],
|
|
5024
|
-
children: placeholder
|
|
5025
|
-
}
|
|
5026
|
-
) : void 0
|
|
5027
|
-
}
|
|
5028
|
-
)
|
|
5029
|
-
}
|
|
5030
|
-
),
|
|
5031
|
-
disableVariablesForReals || showMenuPosition !== "inline-right" ? null : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5032
|
-
VariablesComposerVariableMenu,
|
|
5033
|
-
{
|
|
5034
|
-
...sharedMenuProps,
|
|
5035
|
-
buttonCss: variableBindButton,
|
|
5036
|
-
tip: useInputWithNoVariables ? void 0 : "Tip: access this list by typing $$",
|
|
5037
|
-
buttonProps: hadVariablesInValue ? { "aria-pressed": "true" } : void 0,
|
|
5038
|
-
replaceValueOnVariableInsert: useInputWithNoVariables
|
|
5039
|
-
}
|
|
5040
|
-
)
|
|
5041
|
-
]
|
|
4897
|
+
...sharedMenuProps,
|
|
4898
|
+
disabled: disableVariablesForReals || disableInlineMenu === true || disableInlineMenu === "by-input",
|
|
4899
|
+
portal: renderMenuInPortal,
|
|
4900
|
+
replaceValueOnVariableInsert: useInputWithNoVariables,
|
|
4901
|
+
useInputWhenNoVariables: useInputWithNoVariables,
|
|
4902
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
4903
|
+
VariablesComposerInput,
|
|
4904
|
+
{
|
|
4905
|
+
id: finalId,
|
|
4906
|
+
"aria-label": ariaLabel,
|
|
4907
|
+
"data-testid": dataTestId ? dataTestId : "input-container",
|
|
4908
|
+
"data-text-value": value,
|
|
4909
|
+
css: [input, styleVariant === "compact" ? inputCompact : null],
|
|
4910
|
+
placeholder: placeholder ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
4911
|
+
import_design_system20.Caption,
|
|
4912
|
+
{
|
|
4913
|
+
css: [
|
|
4914
|
+
placeholderCaption,
|
|
4915
|
+
styleVariant === "compact" ? placeholderCompact : null
|
|
4916
|
+
],
|
|
4917
|
+
children: placeholder
|
|
4918
|
+
}
|
|
4919
|
+
) : void 0
|
|
4920
|
+
}
|
|
4921
|
+
)
|
|
5042
4922
|
}
|
|
5043
4923
|
),
|
|
5044
|
-
caption ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5045
|
-
errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5046
|
-
warningMessage ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5047
|
-
infoMessage ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
4924
|
+
caption ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_design_system20.Caption, { children: caption }) : null,
|
|
4925
|
+
errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_design_system20.ErrorMessage, { message: errorMessage }) : null,
|
|
4926
|
+
warningMessage ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_design_system20.WarningMessage, { message: warningMessage }) : null,
|
|
4927
|
+
infoMessage ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_design_system20.InfoMessage, { message: infoMessage }) : null
|
|
5048
4928
|
]
|
|
5049
4929
|
}
|
|
5050
4930
|
);
|
|
@@ -5060,7 +4940,7 @@ function InputVariables(props) {
|
|
|
5060
4940
|
},
|
|
5061
4941
|
id: finalId,
|
|
5062
4942
|
isActive: hadVariablesInValue,
|
|
5063
|
-
disableVariables: disableVariablesForReals ||
|
|
4943
|
+
disableVariables: disableVariablesForReals || disableInlineMenu === "by-label",
|
|
5064
4944
|
children: input3
|
|
5065
4945
|
}
|
|
5066
4946
|
);
|
|
@@ -5116,7 +4996,102 @@ function InputVariablesOverlayMenu({
|
|
|
5116
4996
|
var import_CgUsbC2 = require("@react-icons/all-files/cg/CgUsbC");
|
|
5117
4997
|
var import_canvas7 = require("@uniformdev/canvas");
|
|
5118
4998
|
var import_design_system22 = require("@uniformdev/design-system");
|
|
5119
|
-
var
|
|
4999
|
+
var import_react52 = require("react");
|
|
5000
|
+
|
|
5001
|
+
// src/components/Variables/styles/ParameterVariables.styles.ts
|
|
5002
|
+
var import_react51 = require("@emotion/react");
|
|
5003
|
+
var import_design_system21 = require("@uniformdev/design-system");
|
|
5004
|
+
var variableBindButton2 = import_react51.css`
|
|
5005
|
+
align-items: center;
|
|
5006
|
+
border: none;
|
|
5007
|
+
border-radius: var(--rounded-base);
|
|
5008
|
+
background: none;
|
|
5009
|
+
display: flex;
|
|
5010
|
+
height: 1.2rem;
|
|
5011
|
+
padding: var(--spacing-2xs);
|
|
5012
|
+
transition: background var(--duration-fast) var(--timing-ease-out),
|
|
5013
|
+
color var(--duration-fast) var(--timing-ease-out);
|
|
5014
|
+
width: 1.2rem;
|
|
5015
|
+
|
|
5016
|
+
&:hover,
|
|
5017
|
+
&[aria-pressed='true']:not(:disabled) {
|
|
5018
|
+
background: var(--brand-secondary-3);
|
|
5019
|
+
color: var(--white);
|
|
5020
|
+
}
|
|
5021
|
+
|
|
5022
|
+
&[aria-disabled='true'] {
|
|
5023
|
+
background: none;
|
|
5024
|
+
color: currentColor;
|
|
5025
|
+
}
|
|
5026
|
+
|
|
5027
|
+
// fixes menu resizing issue within iframes
|
|
5028
|
+
// see https://linear.app/uniform/issue/UNI-3068/mesh-integration-resizing-with-menus
|
|
5029
|
+
+ [role='menu'] {
|
|
5030
|
+
max-height: unset;
|
|
5031
|
+
}
|
|
5032
|
+
`;
|
|
5033
|
+
var input2 = import_react51.css`
|
|
5034
|
+
display: block;
|
|
5035
|
+
appearance: none;
|
|
5036
|
+
box-sizing: border-box;
|
|
5037
|
+
background: var(--white);
|
|
5038
|
+
border: 1px solid var(--gray-200);
|
|
5039
|
+
border-radius: var(--rounded-sm);
|
|
5040
|
+
color: var(--gray-700);
|
|
5041
|
+
font-size: var(--fs-sm);
|
|
5042
|
+
line-height: 1.5;
|
|
5043
|
+
min-height: 2rem;
|
|
5044
|
+
padding: var(--spacing-sm);
|
|
5045
|
+
width: 100%;
|
|
5046
|
+
position: relative;
|
|
5047
|
+
white-space: normal;
|
|
5048
|
+
transition-property: background, border-color, color, box-shadow, border-radius;
|
|
5049
|
+
transition-duration: var(--duration-fast);
|
|
5050
|
+
transition-timing-function: var(--timing-ease-out);
|
|
5051
|
+
|
|
5052
|
+
&::placeholder {
|
|
5053
|
+
color: var(--gray-400);
|
|
5054
|
+
}
|
|
5055
|
+
|
|
5056
|
+
&:focus,
|
|
5057
|
+
&:focus-within {
|
|
5058
|
+
border-radius: var(--rounded-sm);
|
|
5059
|
+
box-shadow: var(--elevation-100);
|
|
5060
|
+
border: 1px solid var(--accent-dark-active);
|
|
5061
|
+
outline: none;
|
|
5062
|
+
}
|
|
5063
|
+
&:hover {
|
|
5064
|
+
border: 1px solid var(--accent-dark-hover);
|
|
5065
|
+
}
|
|
5066
|
+
|
|
5067
|
+
&:disabled,
|
|
5068
|
+
&:disabled::placeholder,
|
|
5069
|
+
&:disabled:hover {
|
|
5070
|
+
border-radius: var(--rounded-sm);
|
|
5071
|
+
cursor: not-allowed;
|
|
5072
|
+
color: var(--gray-400);
|
|
5073
|
+
}
|
|
5074
|
+
|
|
5075
|
+
&[readonly],
|
|
5076
|
+
&[contenteditable='false'] {
|
|
5077
|
+
cursor: not-allowed;
|
|
5078
|
+
color: var(--gray-400);
|
|
5079
|
+
}
|
|
5080
|
+
|
|
5081
|
+
> p {
|
|
5082
|
+
margin: 0;
|
|
5083
|
+
}
|
|
5084
|
+
`;
|
|
5085
|
+
var inputMultiLine = (lines) => import_react51.css`
|
|
5086
|
+
${import_design_system21.scrollbarStyles}
|
|
5087
|
+
// 1.5 = line height, spacing-sm = top and bottom padding + spacing-xs to give a slight increase in height
|
|
5088
|
+
// as the text looked to close to the bottom of the input
|
|
5089
|
+
height: calc(${lines * 1.5}em + var(--spacing-sm) + var(--spacing-xs));
|
|
5090
|
+
resize: vertical;
|
|
5091
|
+
overflow: auto;
|
|
5092
|
+
`;
|
|
5093
|
+
|
|
5094
|
+
// src/components/Variables/ParameterConnectionIndicator.tsx
|
|
5120
5095
|
var import_jsx_runtime41 = require("@emotion/react/jsx-runtime");
|
|
5121
5096
|
function ParameterConnectionIndicator({
|
|
5122
5097
|
children,
|
|
@@ -5125,7 +5100,7 @@ function ParameterConnectionIndicator({
|
|
|
5125
5100
|
disabled,
|
|
5126
5101
|
menuTooltip = "Insert variable"
|
|
5127
5102
|
}) {
|
|
5128
|
-
const hasVariablesInValue = (0,
|
|
5103
|
+
const hasVariablesInValue = (0, import_react52.useMemo)(() => {
|
|
5129
5104
|
let result = false;
|
|
5130
5105
|
(0, import_canvas7.bindVariablesToObject)({
|
|
5131
5106
|
value,
|
|
@@ -5148,7 +5123,7 @@ function ParameterConnectionIndicator({
|
|
|
5148
5123
|
{
|
|
5149
5124
|
title: menuTooltip,
|
|
5150
5125
|
"aria-pressed": hasVariablesInValue,
|
|
5151
|
-
css: [menuBtn,
|
|
5126
|
+
css: [menuBtn, variableBindButton2],
|
|
5152
5127
|
type: "button",
|
|
5153
5128
|
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_CgUsbC2.CgUsbC, { size: "1.4rem" })
|
|
5154
5129
|
}
|
|
@@ -5162,21 +5137,21 @@ function ParameterConnectionIndicator({
|
|
|
5162
5137
|
|
|
5163
5138
|
// src/components/Variables/ParameterOrSingleVariable.tsx
|
|
5164
5139
|
var import_design_system23 = require("@uniformdev/design-system");
|
|
5165
|
-
var
|
|
5140
|
+
var import_react54 = require("react");
|
|
5166
5141
|
|
|
5167
5142
|
// src/components/Variables/composer/OnDisconnectPlugin.tsx
|
|
5168
5143
|
var import_LexicalComposerContext10 = require("@lexical/react/LexicalComposerContext");
|
|
5169
5144
|
var import_utils5 = require("@lexical/utils");
|
|
5170
5145
|
var import_lexical10 = require("lexical");
|
|
5171
|
-
var
|
|
5146
|
+
var import_react53 = require("react");
|
|
5172
5147
|
function OnDisconnectPlugin({
|
|
5173
5148
|
onDisconnect
|
|
5174
5149
|
}) {
|
|
5175
5150
|
const [editor] = (0, import_LexicalComposerContext10.useLexicalComposerContext)();
|
|
5176
5151
|
const { variables } = useVariables(true);
|
|
5177
|
-
const variablesRef = (0,
|
|
5152
|
+
const variablesRef = (0, import_react53.useRef)(variables);
|
|
5178
5153
|
variablesRef.current = variables;
|
|
5179
|
-
(0,
|
|
5154
|
+
(0, import_react53.useEffect)(() => {
|
|
5180
5155
|
return (0, import_utils5.mergeRegister)(
|
|
5181
5156
|
editor.registerCommand(
|
|
5182
5157
|
DISCONNECT_VARIABLE_COMMAND,
|
|
@@ -5221,7 +5196,7 @@ function ParameterOrSingleVariable(props) {
|
|
|
5221
5196
|
hasVariablesInValue,
|
|
5222
5197
|
setHadVariablesInValue
|
|
5223
5198
|
} = useInputVariablesState(props);
|
|
5224
|
-
const handleDisconnect = (0,
|
|
5199
|
+
const handleDisconnect = (0, import_react54.useCallback)(
|
|
5225
5200
|
(variable) => {
|
|
5226
5201
|
setHadVariablesInValue(false);
|
|
5227
5202
|
if (onDisconnect) {
|
|
@@ -5260,7 +5235,7 @@ function ParameterOrSingleVariable(props) {
|
|
|
5260
5235
|
VariablesComposerVariableMenu,
|
|
5261
5236
|
{
|
|
5262
5237
|
...sharedMenuProps,
|
|
5263
|
-
buttonCss: [
|
|
5238
|
+
buttonCss: [variableBindButton2],
|
|
5264
5239
|
buttonProps: hasVariablesInValue ? { "aria-pressed": "true" } : void 0,
|
|
5265
5240
|
replaceValueOnVariableInsert: true,
|
|
5266
5241
|
filterVariable
|
|
@@ -5274,7 +5249,7 @@ function ParameterOrSingleVariable(props) {
|
|
|
5274
5249
|
}
|
|
5275
5250
|
|
|
5276
5251
|
// src/components/Variables/ParameterVariables.tsx
|
|
5277
|
-
var
|
|
5252
|
+
var import_react55 = require("@emotion/react");
|
|
5278
5253
|
var import_design_system24 = require("@uniformdev/design-system");
|
|
5279
5254
|
var import_jsx_runtime43 = require("@emotion/react/jsx-runtime");
|
|
5280
5255
|
function ParameterVariables(props) {
|
|
@@ -5333,8 +5308,8 @@ function ParameterVariables(props) {
|
|
|
5333
5308
|
"data-text-value": value,
|
|
5334
5309
|
css: [
|
|
5335
5310
|
input2,
|
|
5336
|
-
typeof multiLine === "number" ? inputMultiLine(multiLine) : multiLine === true ? inputMultiLine(2) :
|
|
5337
|
-
inputCss != null ? inputCss :
|
|
5311
|
+
typeof multiLine === "number" ? inputMultiLine(multiLine) : multiLine === true ? inputMultiLine(2) : import_react55.css``,
|
|
5312
|
+
inputCss != null ? inputCss : import_react55.css``
|
|
5338
5313
|
]
|
|
5339
5314
|
}
|
|
5340
5315
|
) }),
|
|
@@ -5342,7 +5317,7 @@ function ParameterVariables(props) {
|
|
|
5342
5317
|
VariablesComposerVariableMenu,
|
|
5343
5318
|
{
|
|
5344
5319
|
...sharedMenuProps,
|
|
5345
|
-
buttonCss: [
|
|
5320
|
+
buttonCss: [variableBindButton2],
|
|
5346
5321
|
tip: useInputWhenNoVariables ? void 0 : "Tip: access this list by typing $$",
|
|
5347
5322
|
buttonProps: hasVariablesInValue ? { "aria-pressed": "true" } : void 0,
|
|
5348
5323
|
replaceValueOnVariableInsert: useInputWhenNoVariables
|
|
@@ -5370,13 +5345,13 @@ ${prettifyBindExpression(bindExpression)}`
|
|
|
5370
5345
|
}
|
|
5371
5346
|
|
|
5372
5347
|
// src/components/Variables/VariablesList.tsx
|
|
5373
|
-
var
|
|
5348
|
+
var import_react57 = require("@emotion/react");
|
|
5374
5349
|
var import_design_system25 = require("@uniformdev/design-system");
|
|
5375
5350
|
var import_react_beautiful_dnd3 = require("react-beautiful-dnd");
|
|
5376
5351
|
|
|
5377
5352
|
// src/components/Variables/styles/VariablesList.styles.ts
|
|
5378
|
-
var
|
|
5379
|
-
var tableRow = (isDragging) =>
|
|
5353
|
+
var import_react56 = require("@emotion/react");
|
|
5354
|
+
var tableRow = (isDragging) => import_react56.css`
|
|
5380
5355
|
position: relative;
|
|
5381
5356
|
${isDragging ? `
|
|
5382
5357
|
display: table;
|
|
@@ -5384,7 +5359,7 @@ var tableRow = (isDragging) => import_react57.css`
|
|
|
5384
5359
|
top: auto !important;
|
|
5385
5360
|
` : void 0}
|
|
5386
5361
|
`;
|
|
5387
|
-
var tableCellDragIcon =
|
|
5362
|
+
var tableCellDragIcon = import_react56.css`
|
|
5388
5363
|
&::after {
|
|
5389
5364
|
content: '';
|
|
5390
5365
|
display: block;
|
|
@@ -5402,7 +5377,7 @@ var tableCellDragIcon = import_react57.css`
|
|
|
5402
5377
|
opacity: 1;
|
|
5403
5378
|
}
|
|
5404
5379
|
`;
|
|
5405
|
-
var variableName =
|
|
5380
|
+
var variableName = import_react56.css`
|
|
5406
5381
|
border: none;
|
|
5407
5382
|
font-weight: var(--fw-medium);
|
|
5408
5383
|
padding: 0;
|
|
@@ -5412,7 +5387,7 @@ var variableName = import_react57.css`
|
|
|
5412
5387
|
white-space: nowrap;
|
|
5413
5388
|
max-width: 20ch;
|
|
5414
5389
|
`;
|
|
5415
|
-
var variableValue =
|
|
5390
|
+
var variableValue = import_react56.css`
|
|
5416
5391
|
overflow: hidden;
|
|
5417
5392
|
text-overflow: ellipsis;
|
|
5418
5393
|
white-space: nowrap;
|
|
@@ -5489,7 +5464,7 @@ function VariablesList() {
|
|
|
5489
5464
|
title: `delete ${text}`,
|
|
5490
5465
|
css: [
|
|
5491
5466
|
import_design_system25.button,
|
|
5492
|
-
|
|
5467
|
+
import_react57.css`
|
|
5493
5468
|
background: transparent;
|
|
5494
5469
|
`
|
|
5495
5470
|
],
|
|
@@ -5618,9 +5593,9 @@ function TextVariableRenderer({ definition, value, setValue }) {
|
|
|
5618
5593
|
}
|
|
5619
5594
|
|
|
5620
5595
|
// src/components/Request/RequestBody.tsx
|
|
5621
|
-
var
|
|
5596
|
+
var import_react59 = require("@emotion/react");
|
|
5622
5597
|
var import_design_system27 = require("@uniformdev/design-system");
|
|
5623
|
-
var
|
|
5598
|
+
var import_react60 = require("react");
|
|
5624
5599
|
|
|
5625
5600
|
// src/components/Request/RequestProvider.tsx
|
|
5626
5601
|
var React11 = __toESM(require("react"));
|
|
@@ -5704,11 +5679,11 @@ function useRequest() {
|
|
|
5704
5679
|
}
|
|
5705
5680
|
|
|
5706
5681
|
// src/components/Request/styles/Request.styles.ts
|
|
5707
|
-
var
|
|
5708
|
-
var innerContentStyles =
|
|
5682
|
+
var import_react58 = require("@emotion/react");
|
|
5683
|
+
var innerContentStyles = import_react58.css`
|
|
5709
5684
|
background: var(--white);
|
|
5710
5685
|
`;
|
|
5711
|
-
var requestTypeContainer = (bgColor) =>
|
|
5686
|
+
var requestTypeContainer = (bgColor) => import_react58.css`
|
|
5712
5687
|
align-items: start;
|
|
5713
5688
|
background: ${bgColor};
|
|
5714
5689
|
display: grid;
|
|
@@ -5746,11 +5721,11 @@ var LANGUAGE_TO_CONTENT_TYPE = {
|
|
|
5746
5721
|
};
|
|
5747
5722
|
function RequestBody() {
|
|
5748
5723
|
const { request, dispatch } = useRequest();
|
|
5749
|
-
const [language, setLanguage] = (0,
|
|
5724
|
+
const [language, setLanguage] = (0, import_react60.useState)("json");
|
|
5750
5725
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
5751
5726
|
"div",
|
|
5752
5727
|
{
|
|
5753
|
-
css:
|
|
5728
|
+
css: import_react59.css`
|
|
5754
5729
|
background: var(--white);
|
|
5755
5730
|
`,
|
|
5756
5731
|
children: [
|
|
@@ -5758,7 +5733,7 @@ function RequestBody() {
|
|
|
5758
5733
|
RequestTypeContainer,
|
|
5759
5734
|
{
|
|
5760
5735
|
bgColor: "var(--gray-100)",
|
|
5761
|
-
css:
|
|
5736
|
+
css: import_react59.css`
|
|
5762
5737
|
padding: var(--spacing-sm) var(--spacing-base);
|
|
5763
5738
|
`,
|
|
5764
5739
|
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
@@ -6029,8 +6004,8 @@ function RequestParameters({
|
|
|
6029
6004
|
}
|
|
6030
6005
|
|
|
6031
6006
|
// src/components/Request/RequestUrl.tsx
|
|
6032
|
-
var
|
|
6033
|
-
var
|
|
6007
|
+
var import_react61 = require("@emotion/react");
|
|
6008
|
+
var import_react62 = require("react");
|
|
6034
6009
|
|
|
6035
6010
|
// src/components/Request/urlEncodeRequestParameter.ts
|
|
6036
6011
|
function urlEncodeRequestUrl(url, varValues) {
|
|
@@ -6056,7 +6031,7 @@ function RequestUrl() {
|
|
|
6056
6031
|
var _a, _b;
|
|
6057
6032
|
const { variables } = useVariables();
|
|
6058
6033
|
const { request } = useRequest();
|
|
6059
|
-
const mergedParameters = (0,
|
|
6034
|
+
const mergedParameters = (0, import_react62.useMemo)(() => {
|
|
6060
6035
|
var _a2;
|
|
6061
6036
|
if (!((_a2 = request.baseRequest) == null ? void 0 : _a2.parameters)) {
|
|
6062
6037
|
return request.parameters;
|
|
@@ -6066,7 +6041,7 @@ function RequestUrl() {
|
|
|
6066
6041
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
6067
6042
|
"small",
|
|
6068
6043
|
{
|
|
6069
|
-
css:
|
|
6044
|
+
css: import_react61.css`
|
|
6070
6045
|
display: inline-block;
|
|
6071
6046
|
margin-bottom: var(--spacing-xs);
|
|
6072
6047
|
word-break: break-word;
|
|
@@ -6304,12 +6279,12 @@ var import_design_system31 = require("@uniformdev/design-system");
|
|
|
6304
6279
|
|
|
6305
6280
|
// src/hooks/useInitializeUniformMeshSdk.ts
|
|
6306
6281
|
var import_mesh_sdk = require("@uniformdev/mesh-sdk");
|
|
6307
|
-
var
|
|
6282
|
+
var import_react63 = require("react");
|
|
6308
6283
|
var useInitializeUniformMeshSdk = ({ autoResizingDisabled } = {}) => {
|
|
6309
|
-
const [error, setError] = (0,
|
|
6310
|
-
const [sdk, setSdk] = (0,
|
|
6311
|
-
const initializationInProgress = (0,
|
|
6312
|
-
(0,
|
|
6284
|
+
const [error, setError] = (0, import_react63.useState)();
|
|
6285
|
+
const [sdk, setSdk] = (0, import_react63.useState)();
|
|
6286
|
+
const initializationInProgress = (0, import_react63.useRef)(false);
|
|
6287
|
+
(0, import_react63.useEffect)(
|
|
6313
6288
|
() => {
|
|
6314
6289
|
if (typeof window === "undefined" || sdk) {
|
|
6315
6290
|
return;
|
|
@@ -6367,7 +6342,7 @@ var MeshApp = ({
|
|
|
6367
6342
|
};
|
|
6368
6343
|
|
|
6369
6344
|
// src/components/ObjectSearch/DataRefreshButton.tsx
|
|
6370
|
-
var
|
|
6345
|
+
var import_react64 = require("@emotion/react");
|
|
6371
6346
|
var import_design_system32 = require("@uniformdev/design-system");
|
|
6372
6347
|
var import_jsx_runtime58 = require("@emotion/react/jsx-runtime");
|
|
6373
6348
|
var DataRefreshButton = ({
|
|
@@ -6380,7 +6355,7 @@ var DataRefreshButton = ({
|
|
|
6380
6355
|
!isLoading ? null : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
6381
6356
|
import_design_system32.LoadingIndicator,
|
|
6382
6357
|
{
|
|
6383
|
-
css:
|
|
6358
|
+
css: import_react64.css`
|
|
6384
6359
|
${isLoading ? "opacity: 0.2;" : void 0}
|
|
6385
6360
|
`
|
|
6386
6361
|
}
|
|
@@ -6390,15 +6365,15 @@ var DataRefreshButton = ({
|
|
|
6390
6365
|
};
|
|
6391
6366
|
|
|
6392
6367
|
// src/components/ObjectSearch/ObjectSearchContainer.tsx
|
|
6393
|
-
var
|
|
6368
|
+
var import_react67 = require("@emotion/react");
|
|
6394
6369
|
var import_canvas9 = require("@uniformdev/canvas");
|
|
6395
6370
|
var import_design_system35 = require("@uniformdev/design-system");
|
|
6396
6371
|
|
|
6397
6372
|
// src/components/ObjectSearch/hooks/ObjectSearchContext.tsx
|
|
6398
6373
|
var import_canvas8 = require("@uniformdev/canvas");
|
|
6399
|
-
var
|
|
6374
|
+
var import_react65 = require("react");
|
|
6400
6375
|
var import_jsx_runtime59 = require("@emotion/react/jsx-runtime");
|
|
6401
|
-
var ObjectSearchContext = (0,
|
|
6376
|
+
var ObjectSearchContext = (0, import_react65.createContext)({
|
|
6402
6377
|
onSetQuery: () => {
|
|
6403
6378
|
},
|
|
6404
6379
|
onSelectItem: () => {
|
|
@@ -6419,16 +6394,16 @@ var ObjectSearchProvider = ({
|
|
|
6419
6394
|
children,
|
|
6420
6395
|
defaultQuery
|
|
6421
6396
|
}) => {
|
|
6422
|
-
const [query, setQuery] = (0,
|
|
6397
|
+
const [query, setQuery] = (0, import_react65.useState)({
|
|
6423
6398
|
contentType: "",
|
|
6424
6399
|
keyword: "",
|
|
6425
6400
|
...defaultQuery
|
|
6426
6401
|
});
|
|
6427
6402
|
const { flatVariables } = useVariables(true);
|
|
6428
|
-
const querySearchDeferred = (0,
|
|
6429
|
-
const [selectedItems, setSelectedItems] = (0,
|
|
6430
|
-
const [list, setList] = (0,
|
|
6431
|
-
const onSetQuery = (0,
|
|
6403
|
+
const querySearchDeferred = (0, import_react65.useDeferredValue)(query);
|
|
6404
|
+
const [selectedItems, setSelectedItems] = (0, import_react65.useState)(currentlySelectedItems != null ? currentlySelectedItems : []);
|
|
6405
|
+
const [list, setList] = (0, import_react65.useState)({});
|
|
6406
|
+
const onSetQuery = (0, import_react65.useCallback)(
|
|
6432
6407
|
(value2) => {
|
|
6433
6408
|
if (Array.isArray(value2.contentType) && value2.contentType.length > 0) {
|
|
6434
6409
|
return setQuery({
|
|
@@ -6440,7 +6415,7 @@ var ObjectSearchProvider = ({
|
|
|
6440
6415
|
},
|
|
6441
6416
|
[setQuery]
|
|
6442
6417
|
);
|
|
6443
|
-
const onSelectItem = (0,
|
|
6418
|
+
const onSelectItem = (0, import_react65.useCallback)(
|
|
6444
6419
|
(selectedResult) => {
|
|
6445
6420
|
if (Array.isArray(selectedResult)) {
|
|
6446
6421
|
setSelectedItems(selectedResult);
|
|
@@ -6454,17 +6429,17 @@ var ObjectSearchProvider = ({
|
|
|
6454
6429
|
},
|
|
6455
6430
|
[setSelectedItems, selectedItems]
|
|
6456
6431
|
);
|
|
6457
|
-
const onRemoveAllSelectedItems = (0,
|
|
6432
|
+
const onRemoveAllSelectedItems = (0, import_react65.useCallback)(() => {
|
|
6458
6433
|
setSelectedItems([]);
|
|
6459
6434
|
}, [setSelectedItems]);
|
|
6460
|
-
const onSetList = (0,
|
|
6435
|
+
const onSetList = (0, import_react65.useCallback)(
|
|
6461
6436
|
(value2) => {
|
|
6462
6437
|
setList(value2);
|
|
6463
6438
|
},
|
|
6464
6439
|
[setList]
|
|
6465
6440
|
);
|
|
6466
|
-
const boundQuery = (0,
|
|
6467
|
-
const value = (0,
|
|
6441
|
+
const boundQuery = (0, import_react65.useMemo)(() => bindQuery(query, flatVariables), [query, flatVariables]);
|
|
6442
|
+
const value = (0, import_react65.useMemo)(
|
|
6468
6443
|
() => ({
|
|
6469
6444
|
boundQuery,
|
|
6470
6445
|
onSetQuery,
|
|
@@ -6491,7 +6466,7 @@ var ObjectSearchProvider = ({
|
|
|
6491
6466
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ObjectSearchContext.Provider, { value, children });
|
|
6492
6467
|
};
|
|
6493
6468
|
function useObjectSearchContext() {
|
|
6494
|
-
return (0,
|
|
6469
|
+
return (0, import_react65.useContext)(ObjectSearchContext);
|
|
6495
6470
|
}
|
|
6496
6471
|
function bindQuery(query, inputs) {
|
|
6497
6472
|
const { result, errors } = (0, import_canvas8.bindVariablesToObject)({
|
|
@@ -6509,9 +6484,9 @@ function bindQuery(query, inputs) {
|
|
|
6509
6484
|
var import_design_system34 = require("@uniformdev/design-system");
|
|
6510
6485
|
|
|
6511
6486
|
// src/components/ObjectSearch/styles/ObjectSearchListItem.styles.ts
|
|
6512
|
-
var
|
|
6487
|
+
var import_react66 = require("@emotion/react");
|
|
6513
6488
|
var import_design_system33 = require("@uniformdev/design-system");
|
|
6514
|
-
var ObjectListItemContainer =
|
|
6489
|
+
var ObjectListItemContainer = import_react66.css`
|
|
6515
6490
|
align-items: center;
|
|
6516
6491
|
border: 1px solid var(--gray-300);
|
|
6517
6492
|
border-radius: var(--rounded-base);
|
|
@@ -6520,11 +6495,11 @@ var ObjectListItemContainer = import_react67.css`
|
|
|
6520
6495
|
grid-template-columns: 1fr auto;
|
|
6521
6496
|
padding: var(--spacing-sm);
|
|
6522
6497
|
`;
|
|
6523
|
-
var ObjectListItemContainerDisabled =
|
|
6498
|
+
var ObjectListItemContainerDisabled = import_react66.css`
|
|
6524
6499
|
opacity: var(--opacity-50);
|
|
6525
6500
|
pointer-events: none;
|
|
6526
6501
|
`;
|
|
6527
|
-
var ObjectListItemLoading =
|
|
6502
|
+
var ObjectListItemLoading = import_react66.css`
|
|
6528
6503
|
animation: ${import_design_system33.skeletonLoading} 1s linear infinite alternate;
|
|
6529
6504
|
border-color: transparent;
|
|
6530
6505
|
min-height: 42px;
|
|
@@ -6548,36 +6523,36 @@ var ObjectListItemLoading = import_react67.css`
|
|
|
6548
6523
|
width: 1rem;
|
|
6549
6524
|
}
|
|
6550
6525
|
`;
|
|
6551
|
-
var ObjectListItemHeadingGroup =
|
|
6526
|
+
var ObjectListItemHeadingGroup = import_react66.css`
|
|
6552
6527
|
align-items: center;
|
|
6553
6528
|
display: grid;
|
|
6554
6529
|
`;
|
|
6555
|
-
var ObjectListItemThumbnail =
|
|
6530
|
+
var ObjectListItemThumbnail = import_react66.css`
|
|
6556
6531
|
width: 30px;
|
|
6557
6532
|
object-fit: contain;
|
|
6558
6533
|
`;
|
|
6559
|
-
var ObjectListItemTitle =
|
|
6534
|
+
var ObjectListItemTitle = import_react66.css`
|
|
6560
6535
|
color: var(--typography-base);
|
|
6561
6536
|
display: block;
|
|
6562
6537
|
font-size: var(--fs-sm);
|
|
6563
6538
|
`;
|
|
6564
|
-
var ObjectListItemSubtitle =
|
|
6539
|
+
var ObjectListItemSubtitle = import_react66.css`
|
|
6565
6540
|
color: var(--gray-500);
|
|
6566
6541
|
display: block;
|
|
6567
6542
|
font-size: var(--fs-xs);
|
|
6568
6543
|
line-height: 1;
|
|
6569
6544
|
`;
|
|
6570
|
-
var ObjectListItemInfoContainer =
|
|
6545
|
+
var ObjectListItemInfoContainer = import_react66.css`
|
|
6571
6546
|
align-items: center;
|
|
6572
6547
|
display: flex;
|
|
6573
6548
|
gap: var(--spacing-sm);
|
|
6574
6549
|
justify-content: center;
|
|
6575
6550
|
`;
|
|
6576
|
-
var ObjectListItemControlledContent =
|
|
6551
|
+
var ObjectListItemControlledContent = import_react66.css`
|
|
6577
6552
|
display: flex;
|
|
6578
6553
|
gap: var(--spacing-sm);
|
|
6579
6554
|
`;
|
|
6580
|
-
var ObjectListItemUnControlledContent =
|
|
6555
|
+
var ObjectListItemUnControlledContent = import_react66.css`
|
|
6581
6556
|
margin-top: var(--spacing-sm);
|
|
6582
6557
|
grid-column: 1 / -1;
|
|
6583
6558
|
`;
|
|
@@ -6664,7 +6639,7 @@ var ObjectSearchContainer = ({
|
|
|
6664
6639
|
import_design_system35.ScrollableList,
|
|
6665
6640
|
{
|
|
6666
6641
|
role: "list",
|
|
6667
|
-
css:
|
|
6642
|
+
css: import_react67.css`
|
|
6668
6643
|
> div {
|
|
6669
6644
|
transition: max-height var(--duration-slow) var(--timing-ease-out);
|
|
6670
6645
|
max-height: ${selectedListItems.length === 0 ? "50vh" : "184px"};
|
|
@@ -6737,11 +6712,11 @@ var DefaultResultList = () => {
|
|
|
6737
6712
|
|
|
6738
6713
|
// src/components/ObjectSearch/ObjectSearchFilter.tsx
|
|
6739
6714
|
var import_design_system36 = require("@uniformdev/design-system");
|
|
6740
|
-
var
|
|
6715
|
+
var import_react69 = require("react");
|
|
6741
6716
|
|
|
6742
6717
|
// src/components/ObjectSearch/styles/ObjectSearchFilterContainer.styles.ts
|
|
6743
|
-
var
|
|
6744
|
-
var ObjectSearchFilterContainerLabel =
|
|
6718
|
+
var import_react68 = require("@emotion/react");
|
|
6719
|
+
var ObjectSearchFilterContainerLabel = import_react68.css`
|
|
6745
6720
|
align-items: center;
|
|
6746
6721
|
display: flex;
|
|
6747
6722
|
font-size: var(--fs-sm);
|
|
@@ -6749,11 +6724,11 @@ var ObjectSearchFilterContainerLabel = import_react69.css`
|
|
|
6749
6724
|
line-height: 1rem;
|
|
6750
6725
|
margin-bottom: var(--spacing-sm);
|
|
6751
6726
|
`;
|
|
6752
|
-
var ObjectSearchFilterContainer =
|
|
6727
|
+
var ObjectSearchFilterContainer = import_react68.css`
|
|
6753
6728
|
display: grid;
|
|
6754
6729
|
gap: var(--spacing-base);
|
|
6755
6730
|
`;
|
|
6756
|
-
var ObjectSearchFilterGrid = (gridColumns) =>
|
|
6731
|
+
var ObjectSearchFilterGrid = (gridColumns) => import_react68.css`
|
|
6757
6732
|
display: grid;
|
|
6758
6733
|
grid-template-columns: ${gridColumns};
|
|
6759
6734
|
gap: var(--spacing-base);
|
|
@@ -6771,7 +6746,7 @@ var ObjectSearchFilter = ({
|
|
|
6771
6746
|
}) => {
|
|
6772
6747
|
var _a, _b;
|
|
6773
6748
|
const { query, onSetQuery } = useObjectSearchContext();
|
|
6774
|
-
const [searchState, setSearchState] = (0,
|
|
6749
|
+
const [searchState, setSearchState] = (0, import_react69.useState)({
|
|
6775
6750
|
contentType: (_a = query.contentType) != null ? _a : "",
|
|
6776
6751
|
keyword: (_b = query.keyword) != null ? _b : ""
|
|
6777
6752
|
});
|
|
@@ -6781,7 +6756,7 @@ var ObjectSearchFilter = ({
|
|
|
6781
6756
|
});
|
|
6782
6757
|
onSetQuery({ ...query, ...value });
|
|
6783
6758
|
};
|
|
6784
|
-
const memoizedSelectOptions = (0,
|
|
6759
|
+
const memoizedSelectOptions = (0, import_react69.useMemo)(() => {
|
|
6785
6760
|
if (!requireContentType && !(selectOptions == null ? void 0 : selectOptions.length)) {
|
|
6786
6761
|
return [];
|
|
6787
6762
|
}
|
|
@@ -6839,9 +6814,9 @@ var import_design_system38 = require("@uniformdev/design-system");
|
|
|
6839
6814
|
var import_timeago3 = require("timeago.js");
|
|
6840
6815
|
|
|
6841
6816
|
// src/components/ObjectSearch/styles/ObjectSearchResultItemButton.styles.ts
|
|
6842
|
-
var
|
|
6817
|
+
var import_react70 = require("@emotion/react");
|
|
6843
6818
|
var import_design_system37 = require("@uniformdev/design-system");
|
|
6844
|
-
var ButtonStyles =
|
|
6819
|
+
var ButtonStyles = import_react70.css`
|
|
6845
6820
|
${import_design_system37.button}
|
|
6846
6821
|
background: transparent;
|
|
6847
6822
|
border: 1px solid var(--typography-base);
|
|
@@ -6868,7 +6843,7 @@ var ButtonStyles = import_react71.css`
|
|
|
6868
6843
|
text-decoration: none;
|
|
6869
6844
|
}
|
|
6870
6845
|
`;
|
|
6871
|
-
var ButtonIcon =
|
|
6846
|
+
var ButtonIcon = import_react70.css`
|
|
6872
6847
|
width: 1rem;
|
|
6873
6848
|
height: 1rem;
|
|
6874
6849
|
`;
|
|
@@ -6897,8 +6872,8 @@ var LinkButton = ({
|
|
|
6897
6872
|
};
|
|
6898
6873
|
|
|
6899
6874
|
// src/components/ObjectSearch/styles/ObjectSearchResultItem.styles.ts
|
|
6900
|
-
var
|
|
6901
|
-
var ObjectSearchResultItemContainer =
|
|
6875
|
+
var import_react71 = require("@emotion/react");
|
|
6876
|
+
var ObjectSearchResultItemContainer = import_react71.css`
|
|
6902
6877
|
align-items: center;
|
|
6903
6878
|
border: 1px solid var(--gray-300);
|
|
6904
6879
|
border-radius: var(--rounded-base);
|
|
@@ -6914,7 +6889,7 @@ var ObjectSearchResultItemContainer = import_react72.css`
|
|
|
6914
6889
|
}
|
|
6915
6890
|
}
|
|
6916
6891
|
`;
|
|
6917
|
-
var ObjectSearchDragHandle =
|
|
6892
|
+
var ObjectSearchDragHandle = import_react71.css`
|
|
6918
6893
|
border-left: 2px dotted var(--gray-300);
|
|
6919
6894
|
border-right: 2px dotted var(--gray-300);
|
|
6920
6895
|
position: absolute;
|
|
@@ -6923,35 +6898,35 @@ var ObjectSearchDragHandle = import_react72.css`
|
|
|
6923
6898
|
transition: opacity var(--duration-fast) var(--timing-ease-out);
|
|
6924
6899
|
opacity: 0;
|
|
6925
6900
|
`;
|
|
6926
|
-
var ObjectSearchResultItemSubtitle =
|
|
6901
|
+
var ObjectSearchResultItemSubtitle = import_react71.css`
|
|
6927
6902
|
color: var(--gray-500);
|
|
6928
6903
|
display: block;
|
|
6929
6904
|
font-size: var(--fs-xs);
|
|
6930
6905
|
line-height: 1;
|
|
6931
6906
|
`;
|
|
6932
|
-
var ObjectSearchResultItemTitle =
|
|
6907
|
+
var ObjectSearchResultItemTitle = import_react71.css`
|
|
6933
6908
|
align-items: center;
|
|
6934
6909
|
color: var(--typography-base);
|
|
6935
6910
|
display: flex;
|
|
6936
6911
|
gap: var(--spacing-xs);
|
|
6937
6912
|
`;
|
|
6938
|
-
var ObjectSearchResultItemTimeStamp =
|
|
6913
|
+
var ObjectSearchResultItemTimeStamp = import_react71.css`
|
|
6939
6914
|
color: var(--gray-500);
|
|
6940
6915
|
font-size: var(--fs-xs);
|
|
6941
6916
|
`;
|
|
6942
|
-
var ObjectSearchAuthorStateGroup =
|
|
6917
|
+
var ObjectSearchAuthorStateGroup = import_react71.css`
|
|
6943
6918
|
align-items: center;
|
|
6944
6919
|
display: flex;
|
|
6945
6920
|
gap: var(--spacing-sm);
|
|
6946
6921
|
`;
|
|
6947
|
-
var ObjectSearchUpdateGroup =
|
|
6922
|
+
var ObjectSearchUpdateGroup = import_react71.css`
|
|
6948
6923
|
display: grid;
|
|
6949
6924
|
`;
|
|
6950
|
-
var ObjectSearchContentContainer =
|
|
6925
|
+
var ObjectSearchContentContainer = import_react71.css`
|
|
6951
6926
|
display: flex;
|
|
6952
6927
|
gap: var(--spacing-base);
|
|
6953
6928
|
`;
|
|
6954
|
-
var ObjectSearchImage =
|
|
6929
|
+
var ObjectSearchImage = import_react71.css`
|
|
6955
6930
|
width: 56px;
|
|
6956
6931
|
object-fit: contain;
|
|
6957
6932
|
`;
|
|
@@ -7019,26 +6994,26 @@ var import_design_system39 = require("@uniformdev/design-system");
|
|
|
7019
6994
|
var import_react_beautiful_dnd4 = require("react-beautiful-dnd");
|
|
7020
6995
|
|
|
7021
6996
|
// src/components/ObjectSearch/styles/ObjectSearchResultList.styles.ts
|
|
7022
|
-
var
|
|
7023
|
-
var ObjectSearchResultListContainer =
|
|
6997
|
+
var import_react72 = require("@emotion/react");
|
|
6998
|
+
var ObjectSearchResultListContainer = import_react72.css`
|
|
7024
6999
|
align-items: center;
|
|
7025
7000
|
display: flex;
|
|
7026
7001
|
gap: var(--spacing-sm);
|
|
7027
7002
|
justify-content: space-between;
|
|
7028
7003
|
`;
|
|
7029
|
-
var ObjectSearchDragContainer =
|
|
7004
|
+
var ObjectSearchDragContainer = import_react72.css`
|
|
7030
7005
|
margin: 0 0 var(--spacing-sm);
|
|
7031
7006
|
`;
|
|
7032
|
-
var ObjectSearchContainerDragging =
|
|
7007
|
+
var ObjectSearchContainerDragging = import_react72.css`
|
|
7033
7008
|
box-shadow: var(--shadow-base);
|
|
7034
7009
|
opacity: var(--opacity-50);
|
|
7035
7010
|
`;
|
|
7036
|
-
var ObjectSearchResultListCounterContainer =
|
|
7011
|
+
var ObjectSearchResultListCounterContainer = import_react72.css`
|
|
7037
7012
|
align-items: center;
|
|
7038
7013
|
display: flex;
|
|
7039
7014
|
gap: var(--spacing-sm);
|
|
7040
7015
|
`;
|
|
7041
|
-
var ObjectSearchResultListTitle =
|
|
7016
|
+
var ObjectSearchResultListTitle = import_react72.css`
|
|
7042
7017
|
font-weight: var(--fw-bold);
|
|
7043
7018
|
line-height: 1;
|
|
7044
7019
|
`;
|
|
@@ -7143,7 +7118,7 @@ function ObjectSearchResultList({
|
|
|
7143
7118
|
|
|
7144
7119
|
// src/components/ObjectSearch/QueryFilter.tsx
|
|
7145
7120
|
var import_design_system40 = require("@uniformdev/design-system");
|
|
7146
|
-
var
|
|
7121
|
+
var import_react73 = require("react");
|
|
7147
7122
|
var import_jsx_runtime67 = require("@emotion/react/jsx-runtime");
|
|
7148
7123
|
var QueryFilter = ({
|
|
7149
7124
|
requireContentType,
|
|
@@ -7173,7 +7148,7 @@ var QueryFilter = ({
|
|
|
7173
7148
|
}) => {
|
|
7174
7149
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
7175
7150
|
const { query, onSetQuery } = useObjectSearchContext();
|
|
7176
|
-
const [queryState, setQueryState] = (0,
|
|
7151
|
+
const [queryState, setQueryState] = (0, import_react73.useState)({
|
|
7177
7152
|
contentType: (_a = query.contentType) != null ? _a : "",
|
|
7178
7153
|
keyword: (_b = query.keyword) != null ? _b : "",
|
|
7179
7154
|
count: (_c = query.count) != null ? _c : countValue,
|
|
@@ -7184,7 +7159,7 @@ var QueryFilter = ({
|
|
|
7184
7159
|
setQueryState((prev) => ({ ...prev, ...value }));
|
|
7185
7160
|
onSetQuery({ ...query, ...value });
|
|
7186
7161
|
};
|
|
7187
|
-
(0,
|
|
7162
|
+
(0, import_react73.useEffect)(() => {
|
|
7188
7163
|
onSetQuery(queryState);
|
|
7189
7164
|
}, []);
|
|
7190
7165
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("fieldset", { children: [
|
|
@@ -7310,7 +7285,7 @@ var QueryFilter = ({
|
|
|
7310
7285
|
};
|
|
7311
7286
|
|
|
7312
7287
|
// src/components/ParamTypeDynamicDataProvider.tsx
|
|
7313
|
-
var
|
|
7288
|
+
var import_react74 = require("react");
|
|
7314
7289
|
var import_jsx_runtime68 = require("@emotion/react/jsx-runtime");
|
|
7315
7290
|
function ParamTypeDynamicDataProvider(props) {
|
|
7316
7291
|
const { children } = props;
|
|
@@ -7319,7 +7294,7 @@ function ParamTypeDynamicDataProvider(props) {
|
|
|
7319
7294
|
} = useMeshLocation("paramType");
|
|
7320
7295
|
const dynamicInputsAsVariables = useDynamicInputsAsVariables(dynamicInputs);
|
|
7321
7296
|
const connectedDataAsVariables = useConnectedDataAsVariables(connectedData);
|
|
7322
|
-
const variables = (0,
|
|
7297
|
+
const variables = (0, import_react74.useMemo)(
|
|
7323
7298
|
() => ({ ...connectedDataAsVariables, ...dynamicInputsAsVariables }),
|
|
7324
7299
|
[dynamicInputsAsVariables, connectedDataAsVariables]
|
|
7325
7300
|
);
|
|
@@ -7332,9 +7307,9 @@ var JsonMeshVariableEditor = ({
|
|
|
7332
7307
|
variable,
|
|
7333
7308
|
context
|
|
7334
7309
|
}) => {
|
|
7335
|
-
const sillyRef = (0,
|
|
7310
|
+
const sillyRef = (0, import_react74.useRef)(false);
|
|
7336
7311
|
const { editConnectedData } = useMeshLocation("paramType");
|
|
7337
|
-
(0,
|
|
7312
|
+
(0, import_react74.useEffect)(() => {
|
|
7338
7313
|
if (sillyRef.current) {
|
|
7339
7314
|
return;
|
|
7340
7315
|
}
|
|
@@ -7362,57 +7337,6 @@ var JsonMeshVariableEditor = ({
|
|
|
7362
7337
|
return null;
|
|
7363
7338
|
};
|
|
7364
7339
|
|
|
7365
|
-
// src/components/SearchAndFilter/filtersMapper.tsx
|
|
7366
|
-
var import_design_system41 = require("@uniformdev/design-system");
|
|
7367
|
-
var import_design_system42 = require("@uniformdev/design-system");
|
|
7368
|
-
var import_jsx_runtime69 = require("@emotion/react/jsx-runtime");
|
|
7369
|
-
function withInputVariables(WrappedComponent) {
|
|
7370
|
-
const WithInputVariables = (props) => {
|
|
7371
|
-
if (Array.isArray(props.value) || !props.bindable) {
|
|
7372
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(WrappedComponent, { ...props });
|
|
7373
|
-
}
|
|
7374
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
7375
|
-
InputVariables,
|
|
7376
|
-
{
|
|
7377
|
-
disableInlineMenu: true,
|
|
7378
|
-
showMenuPosition: "inline-right",
|
|
7379
|
-
onChange: (newValue) => props.onChange(newValue != null ? newValue : ""),
|
|
7380
|
-
value: props.value,
|
|
7381
|
-
disabled: props.disabled,
|
|
7382
|
-
inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(WrappedComponent, { ...props })
|
|
7383
|
-
}
|
|
7384
|
-
);
|
|
7385
|
-
};
|
|
7386
|
-
return WithInputVariables;
|
|
7387
|
-
}
|
|
7388
|
-
function withInputVariablesForMultiValue(WrappedComponent) {
|
|
7389
|
-
const WithInputVariables = (props) => {
|
|
7390
|
-
var _a;
|
|
7391
|
-
if (!props.bindable || props.disabled || props.readOnly) {
|
|
7392
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(WrappedComponent, { ...props });
|
|
7393
|
-
}
|
|
7394
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
7395
|
-
InputVariables,
|
|
7396
|
-
{
|
|
7397
|
-
disableInlineMenu: true,
|
|
7398
|
-
showMenuPosition: "inline-right",
|
|
7399
|
-
onChange: (newValue) => props.onChange(newValue ? [newValue] : []),
|
|
7400
|
-
value: (_a = props.value) == null ? void 0 : _a[0],
|
|
7401
|
-
inputWhenNoVariables: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(WrappedComponent, { ...props })
|
|
7402
|
-
}
|
|
7403
|
-
);
|
|
7404
|
-
};
|
|
7405
|
-
return WithInputVariables;
|
|
7406
|
-
}
|
|
7407
|
-
var bindableFiltersMapper = {
|
|
7408
|
-
...import_design_system41.filterMapper,
|
|
7409
|
-
multiChoice: withInputVariablesForMultiValue(import_design_system41.FilterMultiChoiceEditor),
|
|
7410
|
-
singleChoice: withInputVariables(import_design_system42.FilterSingleChoiceEditor),
|
|
7411
|
-
date: withInputVariables(import_design_system42.DateEditor),
|
|
7412
|
-
text: withInputVariables(import_design_system42.TextEditor),
|
|
7413
|
-
number: withInputVariables(import_design_system42.NumberEditor)
|
|
7414
|
-
};
|
|
7415
|
-
|
|
7416
7340
|
// src/utils/createLocationValidator.ts
|
|
7417
7341
|
function createLocationValidator(setValue, validate) {
|
|
7418
7342
|
return (dispatch) => setValue((previous) => {
|
|
@@ -7423,19 +7347,19 @@ function createLocationValidator(setValue, validate) {
|
|
|
7423
7347
|
|
|
7424
7348
|
// src/utils/useContentDataResourceLocaleInfo.ts
|
|
7425
7349
|
var import_canvas10 = require("@uniformdev/canvas");
|
|
7426
|
-
var
|
|
7350
|
+
var import_react75 = require("react");
|
|
7427
7351
|
function useContentDataResourceLocaleInfo({
|
|
7428
7352
|
locale,
|
|
7429
7353
|
setLocale,
|
|
7430
7354
|
dynamicInputs
|
|
7431
7355
|
}) {
|
|
7432
7356
|
var _a;
|
|
7433
|
-
const setLocaleRef = (0,
|
|
7357
|
+
const setLocaleRef = (0, import_react75.useRef)(setLocale);
|
|
7434
7358
|
setLocaleRef.current = setLocale;
|
|
7435
7359
|
const { flatVariables } = useVariables();
|
|
7436
7360
|
const effectiveLocale = locale != null ? locale : dynamicInputs[import_canvas10.LOCALE_DYNAMIC_INPUT_NAME] ? (0, import_canvas10.createVariableReference)(import_canvas10.LOCALE_DYNAMIC_INPUT_NAME) : "";
|
|
7437
7361
|
const boundLocale = (_a = (0, import_canvas10.bindVariables)({ variables: flatVariables, value: effectiveLocale }).result) != null ? _a : effectiveLocale;
|
|
7438
|
-
(0,
|
|
7362
|
+
(0, import_react75.useEffect)(() => {
|
|
7439
7363
|
if (locale === void 0 && effectiveLocale && setLocaleRef.current) {
|
|
7440
7364
|
setLocaleRef.current((0, import_canvas10.createVariableReference)(import_canvas10.LOCALE_DYNAMIC_INPUT_NAME));
|
|
7441
7365
|
}
|
|
@@ -7444,7 +7368,7 @@ function useContentDataResourceLocaleInfo({
|
|
|
7444
7368
|
}
|
|
7445
7369
|
|
|
7446
7370
|
// src/index.ts
|
|
7447
|
-
var
|
|
7371
|
+
var import_design_system41 = require("@uniformdev/design-system");
|
|
7448
7372
|
__reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
|
|
7449
7373
|
// Annotate the CommonJS export names for ESM import in node:
|
|
7450
7374
|
0 && (module.exports = {
|
|
@@ -7542,7 +7466,6 @@ __reExport(src_exports, require("@uniformdev/mesh-sdk"), module.exports);
|
|
|
7542
7466
|
VariablesPlugin,
|
|
7543
7467
|
VariablesProvider,
|
|
7544
7468
|
badgeIcon,
|
|
7545
|
-
bindableFiltersMapper,
|
|
7546
7469
|
convertConnectedDataToVariable,
|
|
7547
7470
|
createLocationValidator,
|
|
7548
7471
|
damSelectItemImage,
|