@process.co/ui 0.0.7 → 0.0.9
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/css/ui.css +444 -0
- package/dist/components/fields/index.cjs +270 -20
- package/dist/components/fields/index.cjs.map +1 -1
- package/dist/components/fields/index.d.cts +1 -1
- package/dist/components/fields/index.d.ts +1 -1
- package/dist/components/fields/index.js +259 -21
- package/dist/components/fields/index.js.map +1 -1
- package/dist/{index-_mVyhd0I.d.cts → index-nu_JyZnb.d.cts} +193 -13
- package/dist/{index-_mVyhd0I.d.ts → index-nu_JyZnb.d.ts} +193 -13
- package/dist/index.cjs +519 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -2
- package/dist/index.d.ts +31 -2
- package/dist/index.js +499 -52
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -23,6 +23,20 @@ function _define_property(obj, key, value) {
|
|
|
23
23
|
}
|
|
24
24
|
return obj;
|
|
25
25
|
}
|
|
26
|
+
function _extends() {
|
|
27
|
+
_extends = Object.assign || function(target) {
|
|
28
|
+
for(var i = 1; i < arguments.length; i++){
|
|
29
|
+
var source = arguments[i];
|
|
30
|
+
for(var key in source){
|
|
31
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
32
|
+
target[key] = source[key];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return target;
|
|
37
|
+
};
|
|
38
|
+
return _extends.apply(this, arguments);
|
|
39
|
+
}
|
|
26
40
|
function _iterable_to_array(iter) {
|
|
27
41
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
28
42
|
}
|
|
@@ -56,6 +70,10 @@ function _non_iterable_rest() {
|
|
|
56
70
|
function _non_iterable_spread() {
|
|
57
71
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
58
72
|
}
|
|
73
|
+
function _object_destructuring_empty(o) {
|
|
74
|
+
if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
|
|
75
|
+
return o;
|
|
76
|
+
}
|
|
59
77
|
function _object_spread(target) {
|
|
60
78
|
for(var i = 1; i < arguments.length; i++){
|
|
61
79
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -71,6 +89,33 @@ function _object_spread(target) {
|
|
|
71
89
|
}
|
|
72
90
|
return target;
|
|
73
91
|
}
|
|
92
|
+
function _object_without_properties(source, excluded) {
|
|
93
|
+
if (source == null) return {};
|
|
94
|
+
var target = _object_without_properties_loose(source, excluded);
|
|
95
|
+
var key, i;
|
|
96
|
+
if (Object.getOwnPropertySymbols) {
|
|
97
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
98
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
99
|
+
key = sourceSymbolKeys[i];
|
|
100
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
101
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
102
|
+
target[key] = source[key];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return target;
|
|
106
|
+
}
|
|
107
|
+
function _object_without_properties_loose(source, excluded) {
|
|
108
|
+
if (source == null) return {};
|
|
109
|
+
var target = {};
|
|
110
|
+
var sourceKeys = Object.keys(source);
|
|
111
|
+
var key, i;
|
|
112
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
113
|
+
key = sourceKeys[i];
|
|
114
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
115
|
+
target[key] = source[key];
|
|
116
|
+
}
|
|
117
|
+
return target;
|
|
118
|
+
}
|
|
74
119
|
function _sliced_to_array(arr, i) {
|
|
75
120
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
76
121
|
}
|
|
@@ -90,6 +135,8 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
90
135
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
91
136
|
}
|
|
92
137
|
var React3 = require('react');
|
|
138
|
+
var SelectPrimitive = require('@radix-ui/react-select');
|
|
139
|
+
var lucideReact = require('lucide-react');
|
|
93
140
|
function _interopNamespace(e) {
|
|
94
141
|
if (e && e.__esModule) return e;
|
|
95
142
|
var n = Object.create(null);
|
|
@@ -110,6 +157,7 @@ function _interopNamespace(e) {
|
|
|
110
157
|
return Object.freeze(n);
|
|
111
158
|
}
|
|
112
159
|
var React3__namespace = /*#__PURE__*/ _interopNamespace(React3);
|
|
160
|
+
var SelectPrimitive__namespace = /*#__PURE__*/ _interopNamespace(SelectPrimitive);
|
|
113
161
|
// src/components/fields/index.tsx
|
|
114
162
|
// ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
115
163
|
function r(e) {
|
|
@@ -4811,7 +4859,89 @@ function Input(param) {
|
|
|
4811
4859
|
className: cn("uii:w-full uii:h-9 uii:px-3 uii:rounded-sm uii:border uii:bg-background uii:text-sm", "uii:outline-none uii:transition-all", "focus:uii:border-ring focus:uii:ring-ring/50 focus:uii:ring-[3px]", showError ? "uii:border-red-500 hover:uii:border-red-600" : "uii:border-input hover:uii:border-ring/50", isExpression && "uii:font-mono uii:text-amber-600", disabled && "uii:opacity-50 uii:cursor-not-allowed", editorClassName)
|
|
4812
4860
|
})));
|
|
4813
4861
|
}
|
|
4814
|
-
function Select(
|
|
4862
|
+
function Select(_param) {
|
|
4863
|
+
var props = _extends({}, _object_destructuring_empty(_param));
|
|
4864
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Root, _object_spread({
|
|
4865
|
+
"data-slot": "select"
|
|
4866
|
+
}, props));
|
|
4867
|
+
}
|
|
4868
|
+
function SelectValue(_param) {
|
|
4869
|
+
var props = _extends({}, _object_destructuring_empty(_param));
|
|
4870
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Value, _object_spread({
|
|
4871
|
+
"data-slot": "select-value"
|
|
4872
|
+
}, props));
|
|
4873
|
+
}
|
|
4874
|
+
function SelectTrigger(_param) {
|
|
4875
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
4876
|
+
"className",
|
|
4877
|
+
"children"
|
|
4878
|
+
]);
|
|
4879
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Trigger, _object_spread({
|
|
4880
|
+
"data-slot": "select-trigger",
|
|
4881
|
+
className: cn("uii:border-input uii:data-[placeholder]:text-muted-foreground uii:[&_svg:not([class*=text-])]:text-muted-foreground uii:focus-visible:border-ring uii:focus-visible:ring-ring/50 uii:aria-invalid:ring-destructive/20 uii:dark:aria-invalid:ring-destructive/40 uii:aria-invalid:border-destructive uii:flex uii:h-9 uii:w-full uii:items-center uii:justify-between uii:gap-2 uii:rounded-md uii:border uii:bg-transparent uii:px-3 uii:py-2 uii:text-sm uii:whitespace-nowrap uii:shadow-xs uii:transition-[color,box-shadow] uii:outline-none uii:focus-visible:ring-[3px] uii:disabled:cursor-not-allowed uii:disabled:opacity-50 uii:*:data-[slot=select-value]:line-clamp-1 uii:*:data-[slot=select-value]:flex uii:*:data-[slot=select-value]:items-center uii:*:data-[slot=select-value]:gap-2 uii:[&_svg]:pointer-events-none uii:[&_svg]:shrink-0 uii:[&_svg:not([class*=size-])]:size-4", className)
|
|
4882
|
+
}, props), children, /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Icon, {
|
|
4883
|
+
asChild: true
|
|
4884
|
+
}, /* @__PURE__ */ React3__namespace.createElement(lucideReact.ChevronDownIcon, {
|
|
4885
|
+
className: "uii:size-4 uii:opacity-50"
|
|
4886
|
+
})));
|
|
4887
|
+
}
|
|
4888
|
+
function SelectContent(_param) {
|
|
4889
|
+
var className = _param.className, children = _param.children, _param_position = _param.position, position = _param_position === void 0 ? "popper" : _param_position, footer = _param.footer, _param_hideScrollUpButton = _param.hideScrollUpButton, hideScrollUpButton = _param_hideScrollUpButton === void 0 ? false : _param_hideScrollUpButton, _param_hideScrollDownButton = _param.hideScrollDownButton, hideScrollDownButton = _param_hideScrollDownButton === void 0 ? false : _param_hideScrollDownButton, props = _object_without_properties(_param, [
|
|
4890
|
+
"className",
|
|
4891
|
+
"children",
|
|
4892
|
+
"position",
|
|
4893
|
+
"footer",
|
|
4894
|
+
"hideScrollUpButton",
|
|
4895
|
+
"hideScrollDownButton"
|
|
4896
|
+
]);
|
|
4897
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Portal, null, /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Content, _object_spread({
|
|
4898
|
+
"data-slot": "select-content",
|
|
4899
|
+
className: cn("uii:bg-popover uii:text-popover-foreground uii:data-[state=open]:animate-in uii:data-[state=closed]:animate-out uii:data-[state=closed]:fade-out-0 uii:data-[state=open]:fade-in-0 uii:data-[state=closed]:zoom-out-95 uii:data-[state=open]:zoom-in-95 uii:data-[side=bottom]:slide-in-from-top-2 uii:data-[side=left]:slide-in-from-right-2 uii:data-[side=right]:slide-in-from-left-2 uii:data-[side=top]:slide-in-from-bottom-2 uii:relative uii:z-50 uii:max-h-96 uii:min-w-[8rem] uii:overflow-hidden uii:rounded-md uii:border uii:shadow-md", position === "popper" && "uii:data-[side=bottom]:translate-y-1 uii:data-[side=left]:-translate-x-1 uii:data-[side=right]:translate-x-1 uii:data-[side=top]:-translate-y-1", "uii:slide-in-from-right-6", className),
|
|
4900
|
+
position: position
|
|
4901
|
+
}, props), !hideScrollUpButton && /* @__PURE__ */ React3__namespace.createElement(SelectScrollUpButton, null), /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Viewport, {
|
|
4902
|
+
className: cn("uii:p-1", position === "popper" && "uii:h-[var(--radix-select-trigger-height)] uii:w-full uii:min-w-[var(--radix-select-trigger-width)] uii:scroll-my-1")
|
|
4903
|
+
}, children), footer ? /* @__PURE__ */ React3__namespace.createElement("div", {
|
|
4904
|
+
className: "uii:border-t uii:p-2 uii:bg-popover"
|
|
4905
|
+
}, footer) : null, !hideScrollDownButton && /* @__PURE__ */ React3__namespace.createElement(SelectScrollDownButton, null)));
|
|
4906
|
+
}
|
|
4907
|
+
function SelectItem(_param) {
|
|
4908
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
4909
|
+
"className",
|
|
4910
|
+
"children"
|
|
4911
|
+
]);
|
|
4912
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.Item, _object_spread({
|
|
4913
|
+
"data-slot": "select-item",
|
|
4914
|
+
className: cn("uii:focus:bg-accent uii:focus:text-accent-foreground uii:[&_svg:not([class*=text-])]:text-muted-foreground uii:relative uii:flex uii:w-full uii:cursor-default uii:items-center uii:gap-2 uii:rounded-sm uii:py-1.5 uii:pr-8 uii:pl-2 uii:text-sm uii:outline-hidden uii:select-none uii:data-[disabled]:pointer-events-none uii:data-[disabled]:opacity-50 uii:[&_svg]:pointer-events-none uii:[&_svg]:shrink-0 uii:[&_svg:not([class*=size-])]:size-4 uii:*:[span]:last:flex uii:*:[span]:last:items-center uii:*:[span]:last:gap-2", className)
|
|
4915
|
+
}, props), /* @__PURE__ */ React3__namespace.createElement("span", {
|
|
4916
|
+
className: "uii:absolute uii:right-2 uii:flex uii:size-3.5 uii:items-center uii:justify-center"
|
|
4917
|
+
}, /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.ItemIndicator, null, /* @__PURE__ */ React3__namespace.createElement(lucideReact.CheckIcon, {
|
|
4918
|
+
className: "uii:size-4"
|
|
4919
|
+
}))), /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.ItemText, null, children));
|
|
4920
|
+
}
|
|
4921
|
+
function SelectScrollUpButton(_param) {
|
|
4922
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
4923
|
+
"className"
|
|
4924
|
+
]);
|
|
4925
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.ScrollUpButton, _object_spread({
|
|
4926
|
+
"data-slot": "select-scroll-up-button",
|
|
4927
|
+
className: cn("uii:flex uii:cursor-default uii:items-center uii:justify-center uii:py-1", className)
|
|
4928
|
+
}, props), /* @__PURE__ */ React3__namespace.createElement(lucideReact.ChevronUpIcon, {
|
|
4929
|
+
className: "uii:size-4"
|
|
4930
|
+
}));
|
|
4931
|
+
}
|
|
4932
|
+
function SelectScrollDownButton(_param) {
|
|
4933
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
4934
|
+
"className"
|
|
4935
|
+
]);
|
|
4936
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectPrimitive__namespace.ScrollDownButton, _object_spread({
|
|
4937
|
+
"data-slot": "select-scroll-down-button",
|
|
4938
|
+
className: cn("uii:flex uii:cursor-default uii:items-center uii:justify-center uii:py-1", className)
|
|
4939
|
+
}, props), /* @__PURE__ */ React3__namespace.createElement(lucideReact.ChevronDownIcon, {
|
|
4940
|
+
className: "uii:size-4"
|
|
4941
|
+
}));
|
|
4942
|
+
}
|
|
4943
|
+
// src/components/fields/Select.tsx
|
|
4944
|
+
function Select2(param) {
|
|
4815
4945
|
var fieldName = param.fieldName, label = param.label, value = param.value, onChange = param.onChange, rawOptions = param.options, _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, placeholder = param.placeholder, _param_expectedType = param.expectedType, expectedType = _param_expectedType === void 0 ? "string" : _param_expectedType, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, _param_hasRequiredError = param.hasRequiredError, hasRequiredError = _param_hasRequiredError === void 0 ? false : _param_hasRequiredError, className = param.className, children = param.children;
|
|
4816
4946
|
var _React3__namespace_useState = _sliced_to_array(React3__namespace.useState(false), 2), isExpressionMode = _React3__namespace_useState[0], setIsExpressionMode = _React3__namespace_useState[1];
|
|
4817
4947
|
var _React3__namespace_useState1 = _sliced_to_array(React3__namespace.useState(""), 2), expressionValue = _React3__namespace_useState1[0], setExpressionValue = _React3__namespace_useState1[1];
|
|
@@ -4933,26 +5063,52 @@ function Select(param) {
|
|
|
4933
5063
|
className: "uii:flex uii:items-center uii:justify-center uii:h-full uii:px-2 uii:text-amber-600 hover:uii:text-red-600 uii:border-l uii:border-amber-500/30",
|
|
4934
5064
|
title: "Clear and return to value mode"
|
|
4935
5065
|
}, "\xD7")) : // Value mode - show select
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
5066
|
+
// <select
|
|
5067
|
+
// id={fieldName}
|
|
5068
|
+
// name={fieldName}
|
|
5069
|
+
// value={displayValue}
|
|
5070
|
+
// onChange={(e) => handleSelectChange(e.target.value)}
|
|
5071
|
+
// disabled={disabled}
|
|
5072
|
+
// className={cn(
|
|
5073
|
+
// 'uii:w-full uii:h-9 uii:px-3 uii:rounded-sm uii:border uii:bg-background uii:text-sm',
|
|
5074
|
+
// 'uii:outline-none uii:transition-all uii:cursor-pointer',
|
|
5075
|
+
// 'focus:uii:border-ring focus:uii:ring-ring/50 focus:uii:ring-[3px]',
|
|
5076
|
+
// showError
|
|
5077
|
+
// ? 'uii:border-red-500 hover:uii:border-red-600'
|
|
5078
|
+
// : 'uii:border-input hover:uii:border-ring/50',
|
|
5079
|
+
// disabled && 'uii:opacity-50 uii:cursor-not-allowed'
|
|
5080
|
+
// )}
|
|
5081
|
+
// >
|
|
5082
|
+
// {placeholder && (
|
|
5083
|
+
// <option value="" disabled>
|
|
5084
|
+
// {placeholder}
|
|
5085
|
+
// </option>
|
|
5086
|
+
// )}
|
|
5087
|
+
// {options.map(opt => (
|
|
5088
|
+
// <option key={opt.value} value={opt.value}>
|
|
5089
|
+
// {opt.label}
|
|
5090
|
+
// </option>
|
|
5091
|
+
// ))}
|
|
5092
|
+
// <option value="__expression__">
|
|
5093
|
+
// 📝 Custom Expression
|
|
5094
|
+
// </option>
|
|
5095
|
+
// </select>
|
|
5096
|
+
/* @__PURE__ */ React3__namespace.createElement(Select, {
|
|
4939
5097
|
value: displayValue,
|
|
4940
|
-
|
|
4941
|
-
return handleSelectChange(e
|
|
5098
|
+
onValueChange: function(e) {
|
|
5099
|
+
return handleSelectChange(e);
|
|
4942
5100
|
},
|
|
4943
|
-
disabled: disabled
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
},
|
|
4949
|
-
return /* @__PURE__ */ React3__namespace.createElement(
|
|
5101
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : disabled
|
|
5102
|
+
}, /* @__PURE__ */ React3__namespace.createElement(SelectTrigger, {
|
|
5103
|
+
className: "ui:w-full ui:h-9 ui:px-3 ui:border ui:border-input ui:rounded-sm ui:bg-background"
|
|
5104
|
+
}, /* @__PURE__ */ React3__namespace.createElement(SelectValue, {
|
|
5105
|
+
placeholder: placeholder
|
|
5106
|
+
})), /* @__PURE__ */ React3__namespace.createElement(SelectContent, null, options.map(function(opt) {
|
|
5107
|
+
return /* @__PURE__ */ React3__namespace.createElement(SelectItem, {
|
|
4950
5108
|
key: opt.value,
|
|
4951
5109
|
value: opt.value
|
|
4952
|
-
}, opt.label);
|
|
4953
|
-
})
|
|
4954
|
-
value: "__expression__"
|
|
4955
|
-
}, "\uD83D\uDCDD Custom Expression"))));
|
|
5110
|
+
}, opt.node ? opt.node : /* @__PURE__ */ React3__namespace.createElement(React3__namespace.Fragment, null, opt.label));
|
|
5111
|
+
})))));
|
|
4956
5112
|
}
|
|
4957
5113
|
// src/components/fields/index.tsx
|
|
4958
5114
|
function useTemplateFieldContext() {
|
|
@@ -4981,16 +5137,28 @@ function useFieldPath(fieldName) {
|
|
|
4981
5137
|
}
|
|
4982
5138
|
function TemplateFieldProvider(param) {
|
|
4983
5139
|
var children = param.children;
|
|
4984
|
-
return /* @__PURE__ */
|
|
5140
|
+
return /* @__PURE__ */ React3__namespace.default.createElement(React3__namespace.default.Fragment, null, children);
|
|
4985
5141
|
}
|
|
4986
5142
|
function NestedFieldProvider(param) {
|
|
4987
5143
|
var children = param.children;
|
|
4988
|
-
return /* @__PURE__ */
|
|
5144
|
+
return /* @__PURE__ */ React3__namespace.default.createElement(React3__namespace.default.Fragment, null, children);
|
|
4989
5145
|
}
|
|
4990
5146
|
var InferredTypesContext = React3.createContext(null);
|
|
4991
5147
|
function useInferredTypes() {
|
|
4992
5148
|
return React3.useContext(InferredTypesContext);
|
|
4993
5149
|
}
|
|
5150
|
+
function InferredTypesProvider(param) {
|
|
5151
|
+
var children = param.children;
|
|
5152
|
+
return /* @__PURE__ */ React3__namespace.default.createElement(React3__namespace.default.Fragment, null, children);
|
|
5153
|
+
}
|
|
5154
|
+
function intersectTypes(types) {
|
|
5155
|
+
var validTypes = types.filter(function(t) {
|
|
5156
|
+
return !!t && t.length > 0;
|
|
5157
|
+
});
|
|
5158
|
+
if (validTypes.length === 0) return "any";
|
|
5159
|
+
if (validTypes.length === 1) return validTypes[0];
|
|
5160
|
+
return validTypes[0];
|
|
5161
|
+
}
|
|
4994
5162
|
function parseInferSyntax(expectedType) {
|
|
4995
5163
|
var _match_;
|
|
4996
5164
|
if (!expectedType || !expectedType.startsWith("$infer<")) {
|
|
@@ -5102,16 +5270,98 @@ function getOperatorsForType(type) {
|
|
|
5102
5270
|
}
|
|
5103
5271
|
];
|
|
5104
5272
|
}
|
|
5273
|
+
function NodePropertyProvider(param) {
|
|
5274
|
+
var children = param.children;
|
|
5275
|
+
return /* @__PURE__ */ React3__namespace.default.createElement(React3__namespace.default.Fragment, null, children);
|
|
5276
|
+
}
|
|
5277
|
+
function useIsInNodePropertyProvider() {
|
|
5278
|
+
return false;
|
|
5279
|
+
}
|
|
5280
|
+
function useNodeProperty(key) {
|
|
5281
|
+
var noopSetter = React3.useCallback(function() {
|
|
5282
|
+
console.warn('[useNodeProperty] Mock mode - cannot set "'.concat(key, '"'));
|
|
5283
|
+
}, [
|
|
5284
|
+
key
|
|
5285
|
+
]);
|
|
5286
|
+
return [
|
|
5287
|
+
void 0,
|
|
5288
|
+
noopSetter
|
|
5289
|
+
];
|
|
5290
|
+
}
|
|
5291
|
+
function useNodeProperties() {
|
|
5292
|
+
var noopSetter = React3.useCallback(function() {
|
|
5293
|
+
console.warn("[useNodeProperties] Mock mode - cannot set properties");
|
|
5294
|
+
}, []);
|
|
5295
|
+
return [
|
|
5296
|
+
{},
|
|
5297
|
+
noopSetter
|
|
5298
|
+
];
|
|
5299
|
+
}
|
|
5300
|
+
function useInferredType(fieldName) {
|
|
5301
|
+
return void 0;
|
|
5302
|
+
}
|
|
5303
|
+
function useSetInferredType() {
|
|
5304
|
+
return React3.useCallback(function(fieldName, type) {
|
|
5305
|
+
console.warn('[useSetInferredType] Mock mode - cannot set "'.concat(fieldName, '" to "').concat(type, '"'));
|
|
5306
|
+
}, []);
|
|
5307
|
+
}
|
|
5308
|
+
function useAllInferredTypes() {
|
|
5309
|
+
return {};
|
|
5310
|
+
}
|
|
5311
|
+
function useSetProperty() {
|
|
5312
|
+
return React3.useCallback(function(key, value) {
|
|
5313
|
+
console.warn('[useSetProperty] Mock mode - cannot set "'.concat(key, '"'));
|
|
5314
|
+
}, []);
|
|
5315
|
+
}
|
|
5316
|
+
function useFieldValidation() {
|
|
5317
|
+
var setFieldRequired = React3.useCallback(function(fieldName, required) {
|
|
5318
|
+
console.warn('[useFieldValidation] Mock mode - cannot set required for "'.concat(fieldName, '"'));
|
|
5319
|
+
}, []);
|
|
5320
|
+
var setFieldRequiredIf = React3.useCallback(function(fieldName, requiredIf) {
|
|
5321
|
+
console.warn('[useFieldValidation] Mock mode - cannot set requiredIf for "'.concat(fieldName, '"'));
|
|
5322
|
+
}, []);
|
|
5323
|
+
var setFieldValidation = React3.useCallback(function(fieldName, customValidation) {
|
|
5324
|
+
console.warn('[useFieldValidation] Mock mode - cannot set validation for "'.concat(fieldName, '"'));
|
|
5325
|
+
}, []);
|
|
5326
|
+
var clearFieldValidation = React3.useCallback(function(fieldName) {
|
|
5327
|
+
console.warn('[useFieldValidation] Mock mode - cannot clear validation for "'.concat(fieldName, '"'));
|
|
5328
|
+
}, []);
|
|
5329
|
+
var isFieldRequired = React3.useCallback(function(fieldName) {
|
|
5330
|
+
return false;
|
|
5331
|
+
}, []);
|
|
5332
|
+
var validateField = React3.useCallback(function(fieldName) {
|
|
5333
|
+
return null;
|
|
5334
|
+
}, []);
|
|
5335
|
+
return {
|
|
5336
|
+
setFieldRequired: setFieldRequired,
|
|
5337
|
+
setFieldRequiredIf: setFieldRequiredIf,
|
|
5338
|
+
setFieldValidation: setFieldValidation,
|
|
5339
|
+
clearFieldValidation: clearFieldValidation,
|
|
5340
|
+
isFieldRequired: isFieldRequired,
|
|
5341
|
+
validateField: validateField
|
|
5342
|
+
};
|
|
5343
|
+
}
|
|
5105
5344
|
exports.InferredTypesContext = InferredTypesContext;
|
|
5345
|
+
exports.InferredTypesProvider = InferredTypesProvider;
|
|
5106
5346
|
exports.Input = Input;
|
|
5107
5347
|
exports.NestedFieldProvider = NestedFieldProvider;
|
|
5348
|
+
exports.NodePropertyProvider = NodePropertyProvider;
|
|
5108
5349
|
exports.OPERATORS_BY_TYPE = OPERATORS_BY_TYPE;
|
|
5109
|
-
exports.Select =
|
|
5350
|
+
exports.Select = Select2;
|
|
5110
5351
|
exports.TemplateFieldProvider = TemplateFieldProvider;
|
|
5111
5352
|
exports.getOperatorsForType = getOperatorsForType;
|
|
5353
|
+
exports.intersectTypes = intersectTypes;
|
|
5112
5354
|
exports.parseInferSyntax = parseInferSyntax;
|
|
5355
|
+
exports.useAllInferredTypes = useAllInferredTypes;
|
|
5113
5356
|
exports.useFieldPath = useFieldPath;
|
|
5357
|
+
exports.useFieldValidation = useFieldValidation;
|
|
5358
|
+
exports.useInferredType = useInferredType;
|
|
5114
5359
|
exports.useInferredTypes = useInferredTypes;
|
|
5360
|
+
exports.useIsInNodePropertyProvider = useIsInNodePropertyProvider;
|
|
5115
5361
|
exports.useIsInTemplateFieldProvider = useIsInTemplateFieldProvider;
|
|
5362
|
+
exports.useNodeProperties = useNodeProperties;
|
|
5363
|
+
exports.useNodeProperty = useNodeProperty;
|
|
5364
|
+
exports.useSetInferredType = useSetInferredType;
|
|
5365
|
+
exports.useSetProperty = useSetProperty;
|
|
5116
5366
|
exports.useTemplateFieldContext = useTemplateFieldContext; //# sourceMappingURL=index.cjs.map
|
|
5117
5367
|
//# sourceMappingURL=index.cjs.map
|