@webiny/app-admin 6.3.0-beta.2 → 6.3.0-beta.3
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/base/Base/DefaultFieldRenderers.js +69 -5
- package/base/Base/DefaultFieldRenderers.js.map +1 -1
- package/base/Base/DefaultLayoutRenderers.js +5 -1
- package/base/Base/DefaultLayoutRenderers.js.map +1 -1
- package/base/Base/FieldRenderers/CheckboxesRenderer.d.ts +13 -0
- package/base/Base/FieldRenderers/CheckboxesRenderer.js +28 -0
- package/base/Base/FieldRenderers/CheckboxesRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/CodeEditorRenderer.d.ts +15 -0
- package/base/Base/FieldRenderers/CodeEditorRenderer.js +17 -0
- package/base/Base/FieldRenderers/CodeEditorRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/DateTimeInputsRenderer.d.ts +17 -0
- package/base/Base/FieldRenderers/DateTimeInputsRenderer.js +66 -0
- package/base/Base/FieldRenderers/DateTimeInputsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/DateTimeRenderer.d.ts +21 -0
- package/base/Base/FieldRenderers/DateTimeRenderer.js +46 -0
- package/base/Base/FieldRenderers/DateTimeRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/FilePickerRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/FilePickerRenderer.js +47 -0
- package/base/Base/FieldRenderers/FilePickerRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/FileUrlPickerRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/FileUrlPickerRenderer.js +25 -0
- package/base/Base/FieldRenderers/FileUrlPickerRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/HiddenRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/HiddenRenderer.js +5 -0
- package/base/Base/FieldRenderers/HiddenRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/HorizontalTabsRenderer.d.ts +5 -0
- package/base/Base/FieldRenderers/HorizontalTabsRenderer.js +27 -0
- package/base/Base/FieldRenderers/HorizontalTabsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/InputRenderer.d.ts +4 -7
- package/base/Base/FieldRenderers/InputRenderer.js +2 -2
- package/base/Base/FieldRenderers/InputRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/NumberInputRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/NumberInputRenderer.js +23 -0
- package/base/Base/FieldRenderers/NumberInputRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/NumberInputsRenderer.d.ts +14 -0
- package/base/Base/FieldRenderers/NumberInputsRenderer.js +49 -0
- package/base/Base/FieldRenderers/NumberInputsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.d.ts +14 -0
- package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.js +20 -0
- package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/KeyValueTagsRenderer.d.ts +14 -0
- package/base/Base/FieldRenderers/ObjectRenderer/KeyValueTagsRenderer.js +65 -0
- package/base/Base/FieldRenderers/ObjectRenderer/KeyValueTagsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.d.ts +10 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.js +109 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.d.ts +17 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js +55 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.d.ts +7 -3
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js +15 -19
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.d.ts +5 -8
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js +7 -50
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.d.ts +10 -0
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js +64 -0
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.d.ts +10 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js +85 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js.map +1 -0
- package/base/Base/FieldRenderers/PassthroughRenderer.d.ts +3 -6
- package/base/Base/FieldRenderers/PassthroughRenderer.js +9 -23
- package/base/Base/FieldRenderers/PassthroughRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/RadioButtonsRenderer.d.ts +13 -0
- package/base/Base/FieldRenderers/RadioButtonsRenderer.js +27 -0
- package/base/Base/FieldRenderers/RadioButtonsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/SelectRenderer.d.ts +6 -8
- package/base/Base/FieldRenderers/SelectRenderer.js +8 -5
- package/base/Base/FieldRenderers/SelectRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/SwitchRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/SwitchRenderer.js +19 -0
- package/base/Base/FieldRenderers/SwitchRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/TagsRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/TagsRenderer.js +21 -0
- package/base/Base/FieldRenderers/TagsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/TextInputsRenderer.d.ts +14 -0
- package/base/Base/FieldRenderers/TextInputsRenderer.js +48 -0
- package/base/Base/FieldRenderers/TextInputsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/TextareaRenderer.d.ts +3 -6
- package/base/Base/FieldRenderers/TextareaRenderer.js +3 -4
- package/base/Base/FieldRenderers/TextareaRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/TextareasRenderer.d.ts +14 -0
- package/base/Base/FieldRenderers/TextareasRenderer.js +51 -0
- package/base/Base/FieldRenderers/TextareasRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/VerticalTabsRenderer.js +2 -2
- package/base/Base/FieldRenderers/VerticalTabsRenderer.js.map +1 -1
- package/base/Base/Menus.js +5 -64
- package/base/Base/Menus.js.map +1 -1
- package/base/Base/RoutesConfig.js +6 -0
- package/base/Base/RoutesConfig.js.map +1 -1
- package/exports/admin/build-params.d.ts +2 -0
- package/exports/admin/build-params.js +3 -0
- package/exports/admin/build-params.js.map +1 -1
- package/exports/admin/form.d.ts +5 -0
- package/exports/admin/form.js +8 -0
- package/exports/admin/form.js.map +1 -1
- package/exports/admin/ui.d.ts +1 -0
- package/exports/admin/ui.js +1 -0
- package/exports/admin/ui.js.map +1 -1
- package/exports/admin.d.ts +3 -1
- package/exports/admin.js +3 -1
- package/exports/admin.js.map +1 -1
- package/features/formModel/ConditionRuleEvaluator.d.ts +9 -0
- package/features/formModel/ConditionRuleEvaluator.js +56 -0
- package/features/formModel/ConditionRuleEvaluator.js.map +1 -0
- package/features/formModel/Field.d.ts +50 -4
- package/features/formModel/Field.js +254 -35
- package/features/formModel/Field.js.map +1 -1
- package/features/formModel/FieldBuilder.d.ts +17 -35
- package/features/formModel/FieldBuilder.js +63 -100
- package/features/formModel/FieldBuilder.js.map +1 -1
- package/features/formModel/FieldBuilder.test.js +127 -13
- package/features/formModel/FieldBuilder.test.js.map +1 -1
- package/features/formModel/FieldBuilderRegistry.d.ts +4 -0
- package/features/formModel/FieldBuilderRegistry.js +31 -0
- package/features/formModel/FieldBuilderRegistry.js.map +1 -0
- package/features/formModel/FocusManager.d.ts +14 -0
- package/features/formModel/FocusManager.js +109 -0
- package/features/formModel/FocusManager.js.map +1 -0
- package/features/formModel/FormModel.d.ts +27 -31
- package/features/formModel/FormModel.js +210 -403
- package/features/formModel/FormModel.js.map +1 -1
- package/features/formModel/FormModel.test.js +2044 -193
- package/features/formModel/FormModel.test.js.map +1 -1
- package/features/formModel/FormModelFactory.d.ts +4 -2
- package/features/formModel/FormModelFactory.js +13 -3
- package/features/formModel/FormModelFactory.js.map +1 -1
- package/features/formModel/FormView.d.ts +2 -0
- package/features/formModel/FormView.js +44 -37
- package/features/formModel/FormView.js.map +1 -1
- package/features/formModel/LayoutBuilderFactory.d.ts +61 -0
- package/features/formModel/LayoutBuilderFactory.js +386 -0
- package/features/formModel/LayoutBuilderFactory.js.map +1 -0
- package/features/formModel/LayoutMutator.d.ts +11 -0
- package/features/formModel/LayoutMutator.js +136 -0
- package/features/formModel/LayoutMutator.js.map +1 -0
- package/features/formModel/LayoutResolver.d.ts +26 -0
- package/features/formModel/LayoutResolver.js +239 -0
- package/features/formModel/LayoutResolver.js.map +1 -0
- package/features/formModel/ObjectField.d.ts +55 -4
- package/features/formModel/ObjectField.js +499 -82
- package/features/formModel/ObjectField.js.map +1 -1
- package/features/formModel/Rules.test.d.ts +1 -0
- package/features/formModel/Rules.test.js +289 -0
- package/features/formModel/Rules.test.js.map +1 -0
- package/features/formModel/abstractions.d.ts +402 -52
- package/features/formModel/abstractions.js +55 -0
- package/features/formModel/abstractions.js.map +1 -1
- package/features/formModel/createFieldRenderer.d.ts +20 -0
- package/features/formModel/createFieldRenderer.js +15 -0
- package/features/formModel/createFieldRenderer.js.map +1 -0
- package/features/formModel/demo/FieldRenderersDemoPresenter.d.ts +18 -0
- package/features/formModel/demo/FieldRenderersDemoPresenter.js +225 -0
- package/features/formModel/demo/FieldRenderersDemoPresenter.js.map +1 -0
- package/features/formModel/demo/FormModelDemo.d.ts +4 -0
- package/features/formModel/demo/FormModelDemo.js +230 -0
- package/features/formModel/demo/FormModelDemo.js.map +1 -0
- package/features/formModel/demo/FormModelDemoPresenter.d.ts +22 -0
- package/features/formModel/demo/FormModelDemoPresenter.js +121 -0
- package/features/formModel/demo/FormModelDemoPresenter.js.map +1 -0
- package/features/formModel/demo/FormModelPhase11Presenter.d.ts +25 -0
- package/features/formModel/demo/FormModelPhase11Presenter.js +104 -0
- package/features/formModel/demo/FormModelPhase11Presenter.js.map +1 -0
- package/features/formModel/demo/FormModelPhase8c1Presenter.d.ts +23 -0
- package/features/formModel/demo/FormModelPhase8c1Presenter.js +62 -0
- package/features/formModel/demo/FormModelPhase8c1Presenter.js.map +1 -0
- package/features/formModel/feature.js +12 -0
- package/features/formModel/feature.js.map +1 -1
- package/features/formModel/fieldTypes/BooleanFieldType.d.ts +19 -0
- package/features/formModel/fieldTypes/BooleanFieldType.js +23 -0
- package/features/formModel/fieldTypes/BooleanFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/DateTimeFieldType.d.ts +173 -0
- package/features/formModel/fieldTypes/DateTimeFieldType.js +369 -0
- package/features/formModel/fieldTypes/DateTimeFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/FileFieldType.d.ts +18 -0
- package/features/formModel/fieldTypes/FileFieldType.js +20 -0
- package/features/formModel/fieldTypes/FileFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/FileUrlFieldType.d.ts +18 -0
- package/features/formModel/fieldTypes/FileUrlFieldType.js +20 -0
- package/features/formModel/fieldTypes/FileUrlFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/NumberFieldType.d.ts +19 -0
- package/features/formModel/fieldTypes/NumberFieldType.js +27 -0
- package/features/formModel/fieldTypes/NumberFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/ObjectFieldType.d.ts +34 -0
- package/features/formModel/fieldTypes/ObjectFieldType.js +109 -0
- package/features/formModel/fieldTypes/ObjectFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/TextFieldType.d.ts +18 -0
- package/features/formModel/fieldTypes/TextFieldType.js +20 -0
- package/features/formModel/fieldTypes/TextFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/index.d.ts +7 -0
- package/features/formModel/fieldTypes/index.js +9 -0
- package/features/formModel/fieldTypes/index.js.map +1 -0
- package/features/formModel/index.d.ts +13 -4
- package/features/formModel/index.js +21 -2
- package/features/formModel/index.js.map +1 -1
- package/features/formModel/renderers.d.ts +15 -1
- package/features/formModel/renderers.js +15 -1
- package/features/formModel/renderers.js.map +1 -1
- package/features/tools/LexicalContext/LexicalContext.d.ts +14 -0
- package/features/tools/LexicalContext/LexicalContext.js +22 -0
- package/features/tools/LexicalContext/LexicalContext.js.map +1 -0
- package/features/tools/LexicalContext/abstractions.d.ts +11 -0
- package/features/tools/LexicalContext/abstractions.js +4 -0
- package/features/tools/LexicalContext/abstractions.js.map +1 -0
- package/features/tools/LexicalContext/index.d.ts +2 -0
- package/features/tools/LexicalContext/index.js +3 -0
- package/features/tools/LexicalContext/index.js.map +1 -0
- package/features/tools/feature.js +2 -0
- package/features/tools/feature.js.map +1 -1
- package/features/tools/index.d.ts +1 -0
- package/features/tools/index.js +1 -0
- package/features/tools/index.js.map +1 -1
- package/index.d.ts +8 -1
- package/index.js +7 -0
- package/index.js.map +1 -1
- package/package.json +30 -24
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js +1 -1
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js.map +1 -1
- package/presentation/lexicalContext/useLexicalContext.d.ts +3 -0
- package/presentation/lexicalContext/useLexicalContext.js +14 -0
- package/presentation/lexicalContext/useLexicalContext.js.map +1 -0
- package/presentation/textToLexicalTool/TextToLexicalTool.d.ts +3 -0
- package/presentation/textToLexicalTool/TextToLexicalTool.js +6 -2
- package/presentation/textToLexicalTool/TextToLexicalTool.js.map +1 -1
- package/presentation/textToLexicalTool/textToLexicalState.d.ts +2 -1
- package/presentation/textToLexicalTool/textToLexicalState.js +15 -3
- package/presentation/textToLexicalTool/textToLexicalState.js.map +1 -1
- package/routes.d.ts +1 -0
- package/routes.js +4 -0
- package/routes.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectListFlatRenderer.d.ts +0 -21
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectListFlatRenderer.js +0 -28
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectListFlatRenderer.js.map +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createFieldRenderer } from "../../../features/formModel/createFieldRenderer.js";
|
|
3
|
+
import { Tags } from "@webiny/admin-ui";
|
|
4
|
+
export const TagsRenderer = createFieldRenderer(({
|
|
5
|
+
field
|
|
6
|
+
}) => {
|
|
7
|
+
const value = field.value ?? [];
|
|
8
|
+
return /*#__PURE__*/React.createElement(Tags, {
|
|
9
|
+
label: field.label,
|
|
10
|
+
placeholder: field.placeholder || "Add values",
|
|
11
|
+
description: field.description,
|
|
12
|
+
note: field.note,
|
|
13
|
+
required: field.required,
|
|
14
|
+
disabled: field.disabled,
|
|
15
|
+
validation: field.validation,
|
|
16
|
+
value: value,
|
|
17
|
+
onChange: value => field.onChange(value)
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=TagsRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","createFieldRenderer","Tags","TagsRenderer","field","value","createElement","label","placeholder","description","note","required","disabled","validation","onChange"],"sources":["TagsRenderer.tsx"],"sourcesContent":["import React from \"react\";\nimport { createFieldRenderer } from \"~/features/formModel/createFieldRenderer.js\";\nimport { Tags } from \"@webiny/admin-ui\";\n\ndeclare module \"../../../features/formModel/abstractions.js\" {\n interface IFieldRendererRegistry {\n tags: { fieldType: \"text\"; settings: undefined };\n }\n}\n\nexport const TagsRenderer = createFieldRenderer(({ field }) => {\n const value = (field.value as string[]) ?? [];\n\n return (\n <Tags\n label={field.label}\n placeholder={field.placeholder || \"Add values\"}\n description={field.description}\n note={field.note}\n required={field.required}\n disabled={field.disabled}\n validation={field.validation}\n value={value}\n onChange={value => field.onChange(value)}\n />\n );\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,mBAAmB;AAC5B,SAASC,IAAI,QAAQ,kBAAkB;AAQvC,OAAO,MAAMC,YAAY,GAAGF,mBAAmB,CAAC,CAAC;EAAEG;AAAM,CAAC,KAAK;EAC3D,MAAMC,KAAK,GAAID,KAAK,CAACC,KAAK,IAAiB,EAAE;EAE7C,oBACIL,KAAA,CAAAM,aAAA,CAACJ,IAAI;IACDK,KAAK,EAAEH,KAAK,CAACG,KAAM;IACnBC,WAAW,EAAEJ,KAAK,CAACI,WAAW,IAAI,YAAa;IAC/CC,WAAW,EAAEL,KAAK,CAACK,WAAY;IAC/BC,IAAI,EAAEN,KAAK,CAACM,IAAK;IACjBC,QAAQ,EAAEP,KAAK,CAACO,QAAS;IACzBC,QAAQ,EAAER,KAAK,CAACQ,QAAS;IACzBC,UAAU,EAAET,KAAK,CAACS,UAAW;IAC7BR,KAAK,EAAEA,KAAM;IACbS,QAAQ,EAAET,KAAK,IAAID,KAAK,CAACU,QAAQ,CAACT,KAAK;EAAE,CAC5C,CAAC;AAEV,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare module "../../../features/formModel/abstractions.js" {
|
|
3
|
+
interface IFieldRendererRegistry {
|
|
4
|
+
textInputs: {
|
|
5
|
+
fieldType: "text";
|
|
6
|
+
settings?: {
|
|
7
|
+
addItemLabel?: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export declare const TextInputsRenderer: React.ComponentType<{
|
|
13
|
+
field: import("../../..").IFieldVM;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createFieldRenderer } from "../../../features/formModel/createFieldRenderer.js";
|
|
3
|
+
import { ReactComponent as DeleteIcon } from "@webiny/icons/delete.svg";
|
|
4
|
+
import { ReactComponent as AddIcon } from "@webiny/icons/add.svg";
|
|
5
|
+
import { Button, DelayedOnChange, FormComponentDescription, Icon, Input, Separator } from "@webiny/admin-ui";
|
|
6
|
+
export const TextInputsRenderer = createFieldRenderer(({
|
|
7
|
+
field
|
|
8
|
+
}) => {
|
|
9
|
+
const values = field.value ?? [];
|
|
10
|
+
const updateAt = (index, val) => {
|
|
11
|
+
const next = [...values];
|
|
12
|
+
next[index] = val;
|
|
13
|
+
field.onChange(next);
|
|
14
|
+
};
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: "flex flex-col gap-sm"
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Separator, {
|
|
18
|
+
labelPosition: "start",
|
|
19
|
+
variant: "accent"
|
|
20
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
21
|
+
className: "text-accent-primary text-lg font-semibold"
|
|
22
|
+
}, `${field.label ?? ""} ${values.length ? `(${values.length})` : ""}`)), field.description && /*#__PURE__*/React.createElement(FormComponentDescription, {
|
|
23
|
+
text: field.description
|
|
24
|
+
}), values.map((val, index) => /*#__PURE__*/React.createElement(DelayedOnChange, {
|
|
25
|
+
key: index,
|
|
26
|
+
value: val,
|
|
27
|
+
onChange: value => updateAt(index, value)
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
29
|
+
disabled: field.disabled,
|
|
30
|
+
label: `Value ${index + 1}`,
|
|
31
|
+
placeholder: field.placeholder,
|
|
32
|
+
onEnter: () => field.addItem(""),
|
|
33
|
+
endIcon: /*#__PURE__*/React.createElement(Icon, {
|
|
34
|
+
icon: /*#__PURE__*/React.createElement(DeleteIcon, null),
|
|
35
|
+
label: "Delete",
|
|
36
|
+
onClick: () => field.removeItem(index),
|
|
37
|
+
className: "cursor-pointer"
|
|
38
|
+
})
|
|
39
|
+
}))), /*#__PURE__*/React.createElement(Button, {
|
|
40
|
+
disabled: field.disabled,
|
|
41
|
+
variant: "tertiary",
|
|
42
|
+
icon: /*#__PURE__*/React.createElement(AddIcon, null),
|
|
43
|
+
text: field.rendererSettings?.addItemLabel ?? "Add Value",
|
|
44
|
+
onClick: () => field.addItem("")
|
|
45
|
+
}));
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=TextInputsRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","createFieldRenderer","ReactComponent","DeleteIcon","AddIcon","Button","DelayedOnChange","FormComponentDescription","Icon","Input","Separator","TextInputsRenderer","field","values","value","updateAt","index","val","next","onChange","createElement","className","labelPosition","variant","label","length","description","text","map","key","disabled","placeholder","onEnter","addItem","endIcon","icon","onClick","removeItem","rendererSettings","addItemLabel"],"sources":["TextInputsRenderer.tsx"],"sourcesContent":["import React from \"react\";\nimport { createFieldRenderer } from \"~/features/formModel/createFieldRenderer.js\";\nimport { ReactComponent as DeleteIcon } from \"@webiny/icons/delete.svg\";\nimport { ReactComponent as AddIcon } from \"@webiny/icons/add.svg\";\nimport {\n Button,\n DelayedOnChange,\n FormComponentDescription,\n Icon,\n Input,\n Separator\n} from \"@webiny/admin-ui\";\n\ndeclare module \"../../../features/formModel/abstractions.js\" {\n interface IFieldRendererRegistry {\n textInputs: { fieldType: \"text\"; settings?: { addItemLabel?: string } };\n }\n}\n\nexport const TextInputsRenderer = createFieldRenderer<\"textInputs\">(({ field }) => {\n const values = (field.value as string[]) ?? [];\n\n const updateAt = (index: number, val: string) => {\n const next = [...values];\n next[index] = val;\n field.onChange(next);\n };\n\n return (\n <div className={\"flex flex-col gap-sm\"}>\n <Separator labelPosition={\"start\"} variant={\"accent\"}>\n <span className={\"text-accent-primary text-lg font-semibold\"}>\n {`${field.label ?? \"\"} ${values.length ? `(${values.length})` : \"\"}`}\n </span>\n </Separator>\n {field.description && <FormComponentDescription text={field.description} />}\n {values.map((val, index) => (\n <DelayedOnChange\n key={index}\n value={val}\n onChange={value => updateAt(index, value as string)}\n >\n <Input\n disabled={field.disabled}\n label={`Value ${index + 1}`}\n placeholder={field.placeholder}\n onEnter={() => field.addItem(\"\")}\n endIcon={\n <Icon\n icon={<DeleteIcon />}\n label={\"Delete\"}\n onClick={() => field.removeItem(index)}\n className={\"cursor-pointer\"}\n />\n }\n />\n </DelayedOnChange>\n ))}\n <Button\n disabled={field.disabled}\n variant={\"tertiary\"}\n icon={<AddIcon />}\n text={field.rendererSettings?.addItemLabel ?? \"Add Value\"}\n onClick={() => field.addItem(\"\")}\n />\n </div>\n );\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,mBAAmB;AAC5B,SAASC,cAAc,IAAIC,UAAU,QAAQ,0BAA0B;AACvE,SAASD,cAAc,IAAIE,OAAO,QAAQ,uBAAuB;AACjE,SACIC,MAAM,EACNC,eAAe,EACfC,wBAAwB,EACxBC,IAAI,EACJC,KAAK,EACLC,SAAS,QACN,kBAAkB;AAQzB,OAAO,MAAMC,kBAAkB,GAAGV,mBAAmB,CAAe,CAAC;EAAEW;AAAM,CAAC,KAAK;EAC/E,MAAMC,MAAM,GAAID,KAAK,CAACE,KAAK,IAAiB,EAAE;EAE9C,MAAMC,QAAQ,GAAGA,CAACC,KAAa,EAAEC,GAAW,KAAK;IAC7C,MAAMC,IAAI,GAAG,CAAC,GAAGL,MAAM,CAAC;IACxBK,IAAI,CAACF,KAAK,CAAC,GAAGC,GAAG;IACjBL,KAAK,CAACO,QAAQ,CAACD,IAAI,CAAC;EACxB,CAAC;EAED,oBACIlB,KAAA,CAAAoB,aAAA;IAAKC,SAAS,EAAE;EAAuB,gBACnCrB,KAAA,CAAAoB,aAAA,CAACV,SAAS;IAACY,aAAa,EAAE,OAAQ;IAACC,OAAO,EAAE;EAAS,gBACjDvB,KAAA,CAAAoB,aAAA;IAAMC,SAAS,EAAE;EAA4C,GACxD,GAAGT,KAAK,CAACY,KAAK,IAAI,EAAE,IAAIX,MAAM,C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KAAK,CAACqB,OAAO,CAAC,EAAE;EAAE,CACpC,CACA,CAAC;AAEd,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { IFieldVM } from "../../../features/formModel/index.js";
|
|
3
2
|
declare module "../../../features/formModel/abstractions.js" {
|
|
4
3
|
interface IFieldRendererRegistry {
|
|
5
4
|
textarea: {
|
|
@@ -10,8 +9,6 @@ declare module "../../../features/formModel/abstractions.js" {
|
|
|
10
9
|
};
|
|
11
10
|
}
|
|
12
11
|
}
|
|
13
|
-
export declare const TextareaRenderer:
|
|
14
|
-
field: IFieldVM;
|
|
15
|
-
}
|
|
16
|
-
displayName: string;
|
|
17
|
-
};
|
|
12
|
+
export declare const TextareaRenderer: React.ComponentType<{
|
|
13
|
+
field: import("../../..").IFieldVM;
|
|
14
|
+
}>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { createFieldRenderer } from "../../../features/formModel/createFieldRenderer.js";
|
|
3
3
|
import { DelayedOnChange } from "@webiny/admin-ui";
|
|
4
4
|
import { Textarea } from "@webiny/admin-ui";
|
|
5
|
-
export const TextareaRenderer =
|
|
5
|
+
export const TextareaRenderer = createFieldRenderer(({
|
|
6
6
|
field
|
|
7
7
|
}) => {
|
|
8
|
-
const settings = field.rendererSettings;
|
|
9
8
|
return /*#__PURE__*/React.createElement(DelayedOnChange, {
|
|
10
9
|
value: field.value,
|
|
11
10
|
onChange: value => field.onChange(value)
|
|
@@ -18,7 +17,7 @@ export const TextareaRenderer = observer(({
|
|
|
18
17
|
disabled: field.disabled,
|
|
19
18
|
validation: field.validation,
|
|
20
19
|
onBlur: () => field.onBlur(),
|
|
21
|
-
rows:
|
|
20
|
+
rows: field.rendererSettings?.rows ?? 5
|
|
22
21
|
}));
|
|
23
22
|
});
|
|
24
23
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","createFieldRenderer","DelayedOnChange","Textarea","TextareaRenderer","field","createElement","value","onChange","label","placeholder","description","note","required","disabled","validation","onBlur","rows","rendererSettings"],"sources":["TextareaRenderer.tsx"],"sourcesContent":["import React from \"react\";\nimport { createFieldRenderer } from \"~/features/formModel/createFieldRenderer.js\";\nimport { DelayedOnChange } from \"@webiny/admin-ui\";\nimport { Textarea } from \"@webiny/admin-ui\";\n\ndeclare module \"../../../features/formModel/abstractions.js\" {\n interface IFieldRendererRegistry {\n textarea: { fieldType: \"text\"; settings?: { rows?: number } };\n }\n}\n\nexport const TextareaRenderer = createFieldRenderer<\"textarea\">(({ field }) => {\n return (\n <DelayedOnChange value={field.value} onChange={value => field.onChange(value)}>\n <Textarea\n label={field.label}\n placeholder={field.placeholder}\n description={field.description}\n note={field.note}\n required={field.required}\n disabled={field.disabled}\n validation={field.validation}\n onBlur={() => field.onBlur()}\n rows={field.rendererSettings?.rows ?? 5}\n />\n </DelayedOnChange>\n );\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,mBAAmB;AAC5B,SAASC,eAAe,QAAQ,kBAAkB;AAClD,SAASC,QAAQ,QAAQ,kBAAkB;AAQ3C,OAAO,MAAMC,gBAAgB,GAAGH,mBAAmB,CAAa,CAAC;EAAEI;AAAM,CAAC,KAAK;EAC3E,oBACIL,KAAA,CAAAM,aAAA,CAACJ,eAAe;IAACK,KAAK,EAAEF,KAAK,CAACE,KAAM;IAACC,QAAQ,EAAED,KAAK,IAAIF,KAAK,CAACG,QAAQ,CAACD,KAAK;EAAE,gBAC1EP,KAAA,CAAAM,aAAA,CAACH,QAAQ;IACLM,KAAK,EAAEJ,KAAK,CAACI,KAAM;IACnBC,WAAW,EAAEL,KAAK,CAACK,WAAY;IAC/BC,WAAW,EAAEN,KAAK,CAACM,WAAY;IAC/BC,IAAI,EAAEP,KAAK,CAACO,IAAK;IACjBC,QAAQ,EAAER,KAAK,CAACQ,QAAS;IACzBC,QAAQ,EAAET,KAAK,CAACS,QAAS;IACzBC,UAAU,EAAEV,KAAK,CAACU,UAAW;IAC7BC,MAAM,EAAEA,CAAA,KAAMX,KAAK,CAACW,MAAM,CAAC,CAAE;IAC7BC,IAAI,EAAEZ,KAAK,CAACa,gBAAgB,EAAED,IAAI,IAAI;EAAE,CAC3C,CACY,CAAC;AAE1B,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare module "../../../features/formModel/abstractions.js" {
|
|
3
|
+
interface IFieldRendererRegistry {
|
|
4
|
+
textareas: {
|
|
5
|
+
fieldType: "text";
|
|
6
|
+
settings?: {
|
|
7
|
+
addItemLabel?: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export declare const TextareasRenderer: React.ComponentType<{
|
|
13
|
+
field: import("../../..").IFieldVM;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createFieldRenderer } from "../../../features/formModel/createFieldRenderer.js";
|
|
3
|
+
import { ReactComponent as DeleteIcon } from "@webiny/icons/delete_outline.svg";
|
|
4
|
+
import { ReactComponent as AddIcon } from "@webiny/icons/add.svg";
|
|
5
|
+
import { Button, DelayedOnChange, FormComponentDescription, IconButton, Separator, Textarea } from "@webiny/admin-ui";
|
|
6
|
+
export const TextareasRenderer = createFieldRenderer(({
|
|
7
|
+
field
|
|
8
|
+
}) => {
|
|
9
|
+
const values = field.value ?? [];
|
|
10
|
+
const updateAt = (index, val) => {
|
|
11
|
+
const next = [...values];
|
|
12
|
+
next[index] = val;
|
|
13
|
+
field.onChange(next);
|
|
14
|
+
};
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: "flex flex-col gap-sm"
|
|
17
|
+
}, /*#__PURE__*/React.createElement(Separator, {
|
|
18
|
+
labelPosition: "start",
|
|
19
|
+
variant: "accent"
|
|
20
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
21
|
+
className: "text-accent-primary text-lg font-semibold"
|
|
22
|
+
}, `${field.label ?? ""} ${values.length ? `(${values.length})` : ""}`)), field.description && /*#__PURE__*/React.createElement(FormComponentDescription, {
|
|
23
|
+
text: field.description
|
|
24
|
+
}), values.map((val, index) => /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
key: index,
|
|
26
|
+
className: "relative"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(DelayedOnChange, {
|
|
28
|
+
value: val,
|
|
29
|
+
onChange: value => updateAt(index, value)
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Textarea, {
|
|
31
|
+
disabled: field.disabled,
|
|
32
|
+
rows: 5,
|
|
33
|
+
label: `Value ${index + 1}`,
|
|
34
|
+
placeholder: field.placeholder
|
|
35
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: "absolute top-xl right-sm z-10"
|
|
37
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
38
|
+
variant: "ghost",
|
|
39
|
+
size: "md",
|
|
40
|
+
icon: /*#__PURE__*/React.createElement(DeleteIcon, null),
|
|
41
|
+
onClick: () => field.removeItem(index)
|
|
42
|
+
})))), /*#__PURE__*/React.createElement(Button, {
|
|
43
|
+
disabled: field.disabled,
|
|
44
|
+
variant: "tertiary",
|
|
45
|
+
icon: /*#__PURE__*/React.createElement(AddIcon, null),
|
|
46
|
+
text: field.rendererSettings?.addItemLabel ?? "Add Value",
|
|
47
|
+
onClick: () => field.addItem("")
|
|
48
|
+
}));
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=TextareasRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","createFieldRenderer","ReactComponent","DeleteIcon","AddIcon","Button","DelayedOnChange","FormComponentDescription","IconButton","Separator","Textarea","TextareasRenderer","field","values","value","updateAt","index","val","next","onChange","createElement","className","labelPosition","variant","label","length","description","text","map","key","disabled","rows","placeholder","size","icon","onClick","removeItem","rendererSettings","addItemLabel","addItem"],"sources":["TextareasRenderer.tsx"],"sourcesContent":["import React from \"react\";\nimport { createFieldRenderer } from \"~/features/formModel/createFieldRenderer.js\";\nimport { ReactComponent as DeleteIcon } from \"@webiny/icons/delete_outline.svg\";\nimport { ReactComponent as AddIcon } from \"@webiny/icons/add.svg\";\nimport {\n Button,\n DelayedOnChange,\n FormComponentDescription,\n IconButton,\n Separator,\n Textarea\n} from \"@webiny/admin-ui\";\n\ndeclare module \"../../../features/formModel/abstractions.js\" {\n interface IFieldRendererRegistry {\n textareas: { fieldType: \"text\"; settings?: { addItemLabel?: string } };\n }\n}\n\nexport const TextareasRenderer = createFieldRenderer<\"textareas\">(({ field }) => {\n const values = (field.value as string[]) ?? [];\n\n const updateAt = (index: number, val: string) => {\n const next = [...values];\n next[index] = val;\n field.onChange(next);\n };\n\n return (\n <div className={\"flex flex-col gap-sm\"}>\n <Separator labelPosition={\"start\"} variant={\"accent\"}>\n <span className={\"text-accent-primary text-lg font-semibold\"}>\n {`${field.label ?? \"\"} ${values.length ? `(${values.length})` : \"\"}`}\n </span>\n </Separator>\n {field.description && <FormComponentDescription text={field.description} />}\n {values.map((val, index) => (\n <div key={index} className={\"relative\"}>\n <DelayedOnChange\n value={val}\n onChange={value => updateAt(index, value as string)}\n >\n <Textarea\n disabled={field.disabled}\n rows={5}\n label={`Value ${index + 1}`}\n placeholder={field.placeholder}\n />\n </DelayedOnChange>\n <div className={\"absolute top-xl right-sm z-10\"}>\n <IconButton\n variant={\"ghost\"}\n size={\"md\"}\n icon={<DeleteIcon />}\n onClick={() => field.removeItem(index)}\n />\n </div>\n </div>\n ))}\n <Button\n disabled={field.disabled}\n variant={\"tertiary\"}\n icon={<AddIcon />}\n text={field.rendererSettings?.addItemLabel ?? \"Add Value\"}\n onClick={() => field.addItem(\"\")}\n />\n </div>\n );\n});\n"],"mappings":"AAAA,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e;IACZQ,KAAK,EAAEG,GAAI;IACXE,QAAQ,EAAEL,KAAK,IAAIC,QAAQ,CAACC,KAAK,EAAEF,KAAe;EAAE,gBAEpDd,KAAA,CAAAoB,aAAA,CAACV,QAAQ;IACLoB,QAAQ,EAAElB,KAAK,CAACkB,QAAS;IACzBC,IAAI,EAAE,CAAE;IACRP,KAAK,EAAE,SAASR,KAAK,GAAG,CAAC,EAAG;IAC5BgB,WAAW,EAAEpB,KAAK,CAACoB;EAAY,CAClC,CACY,CAAC,eAClBhC,KAAA,CAAAoB,aAAA;IAAKC,SAAS,EAAE;EAAgC,gBAC5CrB,KAAA,CAAAoB,aAAA,CAACZ,UAAU;IACPe,OAAO,EAAE,OAAQ;IACjBU,IAAI,EAAE,IAAK;IACXC,IAAI,eAAElC,KAAA,CAAAoB,aAAA,CAACjB,UAAU,MAAE,CAAE;IACrBgC,OAAO,EAAEA,CAAA,KAAMvB,KAAK,CAACwB,UAAU,CAACpB,KAAK;EAAE,CAC1C,CACA,CACJ,CACR,CAAC,eACFhB,KAAA,CAAAoB,aAAA,CAACf,MAAM;IACHyB,QAAQ,EAAElB,KAAK,CAACkB,QAAS;IACzBP,OAAO,EAAE,UAAW;IACpBW,IAAI,eAAElC,KAAA,CAAAoB,aAAA,CAAChB,OAAO,MAAE,CAAE;IAClBuB,IAAI,EAAEf,KAAK,CAACyB,gBAAgB,EAAEC,YAAY,IAAI,WAAY;IAC1DH,OAAO,EAAEA,CAAA,KAAMvB,KAAK,CAAC2B,OAAO,CAAC,EAAE;EAAE,CACpC,CACA,CAAC;AAEd,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { observer } from "mobx-react-lite";
|
|
3
3
|
import { List, Heading, Text } from "@webiny/admin-ui";
|
|
4
|
-
import { LayoutNodeRenderer } from "../../../features/formModel/FormView.js";
|
|
4
|
+
import { LayoutNodeRenderer, renderTabIcon } from "../../../features/formModel/FormView.js";
|
|
5
5
|
export const VerticalTabsRenderer = observer(function VerticalTabsRenderer({
|
|
6
6
|
node
|
|
7
7
|
}) {
|
|
@@ -16,7 +16,7 @@ export const VerticalTabsRenderer = observer(function VerticalTabsRenderer({
|
|
|
16
16
|
}, /*#__PURE__*/React.createElement(List, null, node.tabs.map(tab => /*#__PURE__*/React.createElement(List.Item, {
|
|
17
17
|
key: tab.id,
|
|
18
18
|
className: "fill-neutral-strong",
|
|
19
|
-
icon: tab.icon,
|
|
19
|
+
icon: renderTabIcon(tab.icon),
|
|
20
20
|
title: tab.label,
|
|
21
21
|
description: tab.description,
|
|
22
22
|
activated: tab.id === node.activeTabId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","observer","List","Heading","Text","LayoutNodeRenderer","VerticalTabsRenderer","node","activeTab","tabs","find","t","id","activeTabId","createElement","className","style","width","map","tab","Item","key","icon","title","label","description","activated","onClick","setActiveTab","Fragment","level","size","layout","childNode","index"],"sources":["VerticalTabsRenderer.tsx"],"sourcesContent":["import React from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { List, Heading, Text } from \"@webiny/admin-ui\";\nimport { LayoutNodeRenderer } from \"~/features/formModel/FormView.js\";\nimport type { TabsNodeRendererProps } from \"~/features/formModel/FormView.js\";\n\nexport const VerticalTabsRenderer = observer(function VerticalTabsRenderer({\n node\n}: TabsNodeRendererProps) {\n const activeTab = node.tabs.find(t => t.id === node.activeTabId);\n\n return (\n <div className={\"flex flex-row flex-1 min-h-full shrink-0\"}>\n <div className={\"flex flex-col\"} style={{ width: 300 }}>\n <List>\n {node.tabs.map(tab => (\n <List.Item\n key={tab.id}\n className={\"fill-neutral-strong\"}\n icon={tab.icon}\n title={tab.label}\n description={tab.description}\n activated={tab.id === node.activeTabId}\n onClick={() => node.setActiveTab(tab.id)}\n />\n ))}\n </List>\n </div>\n <div className={\"flex flex-col flex-1 px-md border-l border-neutral-dimmed\"}>\n {activeTab && (\n <>\n <div className={\"p-md\"}>\n <Heading level={4} className={\"text-neutral-primary\"}>\n {activeTab.label}\n </Heading>\n {activeTab.description && (\n <Text size={\"sm\"}>{activeTab.description}</Text>\n )}\n </div>\n <div className={\"p-md flex flex-col gap-4\"}>\n {activeTab.layout.map((childNode, index) => (\n <LayoutNodeRenderer key={index} node={childNode} />\n ))}\n </div>\n </>\n )}\n </div>\n </div>\n );\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,IAAI,EAAEC,OAAO,EAAEC,IAAI,QAAQ,kBAAkB;AACtD,SAASC,kBAAkB;
|
|
1
|
+
{"version":3,"names":["React","observer","List","Heading","Text","LayoutNodeRenderer","renderTabIcon","VerticalTabsRenderer","node","activeTab","tabs","find","t","id","activeTabId","createElement","className","style","width","map","tab","Item","key","icon","title","label","description","activated","onClick","setActiveTab","Fragment","level","size","layout","childNode","index"],"sources":["VerticalTabsRenderer.tsx"],"sourcesContent":["import React from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { List, Heading, Text } from \"@webiny/admin-ui\";\nimport { LayoutNodeRenderer, renderTabIcon } from \"~/features/formModel/FormView.js\";\nimport type { TabsNodeRendererProps } from \"~/features/formModel/FormView.js\";\n\nexport const VerticalTabsRenderer = observer(function VerticalTabsRenderer({\n node\n}: TabsNodeRendererProps) {\n const activeTab = node.tabs.find(t => t.id === node.activeTabId);\n\n return (\n <div className={\"flex flex-row flex-1 min-h-full shrink-0\"}>\n <div className={\"flex flex-col\"} style={{ width: 300 }}>\n <List>\n {node.tabs.map(tab => (\n <List.Item\n key={tab.id}\n className={\"fill-neutral-strong\"}\n icon={renderTabIcon(tab.icon)}\n title={tab.label}\n description={tab.description}\n activated={tab.id === node.activeTabId}\n onClick={() => node.setActiveTab(tab.id)}\n />\n ))}\n </List>\n </div>\n <div className={\"flex flex-col flex-1 px-md border-l border-neutral-dimmed\"}>\n {activeTab && (\n <>\n <div className={\"p-md\"}>\n <Heading level={4} className={\"text-neutral-primary\"}>\n {activeTab.label}\n </Heading>\n {activeTab.description && (\n <Text size={\"sm\"}>{activeTab.description}</Text>\n )}\n </div>\n <div className={\"p-md flex flex-col gap-4\"}>\n {activeTab.layout.map((childNode, index) => (\n <LayoutNodeRenderer key={index} node={childNode} />\n ))}\n </div>\n </>\n )}\n </div>\n </div>\n );\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,IAAI,EAAEC,OAAO,EAAEC,IAAI,QAAQ,kBAAkB;AACtD,SAASC,kBAAkB,EAAEC,aAAa;AAG1C,OAAO,MAAMC,oBAAoB,GAAGN,QAAQ,CAAC,SAASM,oBAAoBA,CAAC;EACvEC;AACmB,CAAC,EAAE;EACtB,MAAMC,SAAS,GAAGD,IAAI,CAACE,IAAI,CAACC,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,EAAE,KAAKL,IAAI,CAACM,WAAW,CAAC;EAEhE,oBACId,KAAA,CAAAe,aAAA;IAAKC,SAAS,EAAE;EAA2C,gBACvDhB,KAAA,CAAAe,aAAA;IAAKC,SAAS,EAAE,eAAgB;IAACC,KAAK,EAAE;MAAEC,KAAK,EAAE;IAAI;EAAE,gBACnDlB,KAAA,CAAAe,aAAA,CAACb,IAAI,QACAM,IAAI,CAACE,IAAI,CAACS,GAAG,CAACC,GAAG,iBACdpB,KAAA,CAAAe,aAAA,CAACb,IAAI,CAACmB,IAAI;IACNC,GAAG,EAAEF,GAAG,CAACP,EAAG;IACZG,SAAS,EAAE,qBAAsB;IACjCO,IAAI,EAAEjB,aAAa,CAACc,GAAG,CAACG,IAAI,CAAE;IAC9BC,KAAK,EAAEJ,GAAG,CAACK,KAAM;IACjBC,WAAW,EAAEN,GAAG,CAACM,WAAY;IAC7BC,SAAS,EAAEP,GAAG,CAACP,EAAE,KAAKL,IAAI,CAACM,WAAY;IACvCc,OAAO,EAAEA,CAAA,KAAMpB,IAAI,CAACqB,YAAY,CAACT,GAAG,CAACP,EAAE;EAAE,CAC5C,CACJ,CACC,CACL,CAAC,eACNb,KAAA,CAAAe,aAAA;IAAKC,SAAS,EAAE;EAA4D,GACvEP,SAAS,iBACNT,KAAA,CAAAe,aAAA,CAAAf,KAAA,CAAA8B,QAAA,qBACI9B,KAAA,CAAAe,aAAA;IAAKC,SAAS,EAAE;EAAO,gBACnBhB,KAAA,CAAAe,aAAA,CAACZ,OAAO;IAAC4B,KAAK,EAAE,CAAE;IAACf,SAAS,EAAE;EAAuB,GAChDP,SAAS,CAACgB,KACN,CAAC,EACThB,SAAS,CAACiB,WAAW,iBAClB1B,KAAA,CAAAe,aAAA,CAACX,IAAI;IAAC4B,IAAI,EAAE;EAAK,GAAEvB,SAAS,CAACiB,WAAkB,CAElD,CAAC,eACN1B,KAAA,CAAAe,aAAA;IAAKC,SAAS,EAAE;EAA2B,GACtCP,SAAS,CAACwB,MAAM,CAACd,GAAG,CAAC,CAACe,SAAS,EAAEC,KAAK,kBACnCnC,KAAA,CAAAe,aAAA,CAACV,kBAAkB;IAACiB,GAAG,EAAEa,KAAM;IAAC3B,IAAI,EAAE0B;EAAU,CAAE,CACrD,CACA,CACP,CAEL,CACJ,CAAC;AAEd,CAAC,CAAC","ignoreList":[]}
|
package/base/Base/Menus.js
CHANGED
|
@@ -2,14 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { ReactComponent as DashboardIcon } from "@webiny/icons/space_dashboard.svg";
|
|
3
3
|
import { ReactComponent as SettingsIcon } from "@webiny/icons/settings.svg";
|
|
4
4
|
import { ReactComponent as FileManagerIcon } from "@webiny/icons/folder_open.svg";
|
|
5
|
-
import { ReactComponent as InfoIcon } from "@webiny/icons/info.svg";
|
|
6
|
-
import { ReactComponent as SlackIcon } from "@webiny/icons/numbers.svg";
|
|
7
|
-
import { ReactComponent as DocsIcon } from "@webiny/icons/summarize.svg";
|
|
8
|
-
import { ReactComponent as GithubIcon } from "@webiny/icons/route.svg";
|
|
9
|
-
import { ReactComponent as MoreIcon } from "@webiny/icons/more_vert.svg";
|
|
10
5
|
import { ReactComponent as UpgradeIcon } from "@webiny/icons/electric_bolt.svg";
|
|
11
|
-
import { DropdownMenu } from "@webiny/admin-ui";
|
|
12
|
-
import { SupportMenuItems } from "./Menus/SupportMenuItems.js";
|
|
13
6
|
import { AdminConfig } from "../../config/AdminConfig.js";
|
|
14
7
|
import { HasPermission } from "../../presentation/security/components/HasPermission.js";
|
|
15
8
|
import { Menu } from "../../config/AdminConfig/Menu.js";
|
|
@@ -59,48 +52,11 @@ export const Menus = /*#__PURE__*/React.memo(() => {
|
|
|
59
52
|
text: "System",
|
|
60
53
|
collapsible: false
|
|
61
54
|
})
|
|
62
|
-
}), /*#__PURE__*/React.createElement(Menu.
|
|
63
|
-
name: "
|
|
64
|
-
element: /*#__PURE__*/React.createElement(Menu.
|
|
65
|
-
text: "Documentation",
|
|
66
|
-
icon: /*#__PURE__*/React.createElement(Menu.Support.Link.Icon, {
|
|
67
|
-
label: "Docs",
|
|
68
|
-
element: /*#__PURE__*/React.createElement(DocsIcon, null)
|
|
69
|
-
}),
|
|
70
|
-
to: "https://www.webiny.com/docs",
|
|
71
|
-
rel: "noopener noreferrer",
|
|
72
|
-
target: "_blank"
|
|
73
|
-
})
|
|
74
|
-
}), /*#__PURE__*/React.createElement(Menu.Support, {
|
|
75
|
-
name: "github",
|
|
76
|
-
element: /*#__PURE__*/React.createElement(Menu.Support.Link, {
|
|
77
|
-
text: "GitHub",
|
|
78
|
-
icon: /*#__PURE__*/React.createElement(Menu.Support.Link.Icon, {
|
|
79
|
-
label: "GitHub",
|
|
80
|
-
element: /*#__PURE__*/React.createElement(GithubIcon, null)
|
|
81
|
-
}),
|
|
82
|
-
to: "https://github.com/webiny/webiny-js",
|
|
83
|
-
rel: "noopener noreferrer",
|
|
84
|
-
target: "_blank"
|
|
85
|
-
})
|
|
86
|
-
}), /*#__PURE__*/React.createElement(Menu.Support, {
|
|
87
|
-
name: "slack",
|
|
88
|
-
element: /*#__PURE__*/React.createElement(Menu.Support.Link, {
|
|
89
|
-
text: "Slack",
|
|
90
|
-
icon: /*#__PURE__*/React.createElement(Menu.Support.Link.Icon, {
|
|
91
|
-
label: "Slack",
|
|
92
|
-
element: /*#__PURE__*/React.createElement(SlackIcon, null)
|
|
93
|
-
}),
|
|
94
|
-
to: "https://www.webiny.com/slack",
|
|
95
|
-
rel: "noopener noreferrer",
|
|
96
|
-
target: "_blank"
|
|
97
|
-
})
|
|
98
|
-
}), !hasWcpLicense && /*#__PURE__*/React.createElement(Menu.Support, {
|
|
99
|
-
name: "upgrade-webiny",
|
|
100
|
-
pin: "end",
|
|
101
|
-
element: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DropdownMenu.Separator, null), /*#__PURE__*/React.createElement(Menu.Support.Link, {
|
|
55
|
+
}), !hasWcpLicense && /*#__PURE__*/React.createElement(Menu.Footer, {
|
|
56
|
+
name: "upgrade",
|
|
57
|
+
element: /*#__PURE__*/React.createElement(Menu.Link, {
|
|
102
58
|
text: "Upgrade",
|
|
103
|
-
icon: /*#__PURE__*/React.createElement(Menu.
|
|
59
|
+
icon: /*#__PURE__*/React.createElement(Menu.Link.Icon, {
|
|
104
60
|
label: "Upgrade",
|
|
105
61
|
element: /*#__PURE__*/React.createElement(UpgradeIcon, null)
|
|
106
62
|
}),
|
|
@@ -108,22 +64,7 @@ export const Menus = /*#__PURE__*/React.memo(() => {
|
|
|
108
64
|
rel: "noopener noreferrer",
|
|
109
65
|
target: "_blank",
|
|
110
66
|
className: "[&_a]:text-accent-primary! [&_svg]:fill-accent-default! font-semibold"
|
|
111
|
-
})
|
|
112
|
-
}), /*#__PURE__*/React.createElement(Menu.Footer, {
|
|
113
|
-
name: "support",
|
|
114
|
-
element: /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
115
|
-
className: "w-[225px]",
|
|
116
|
-
trigger: /*#__PURE__*/React.createElement(Menu.Item, {
|
|
117
|
-
text: "Support",
|
|
118
|
-
icon: /*#__PURE__*/React.createElement(Menu.Item.Icon, {
|
|
119
|
-
label: "Support",
|
|
120
|
-
element: /*#__PURE__*/React.createElement(InfoIcon, null)
|
|
121
|
-
}),
|
|
122
|
-
action: /*#__PURE__*/React.createElement(Menu.Item.Action, {
|
|
123
|
-
element: /*#__PURE__*/React.createElement(MoreIcon, null)
|
|
124
|
-
})
|
|
125
|
-
})
|
|
126
|
-
}, /*#__PURE__*/React.createElement(SupportMenuItems, null))
|
|
67
|
+
})
|
|
127
68
|
}));
|
|
128
69
|
});
|
|
129
70
|
Menus.displayName = "Menus";
|
package/base/Base/Menus.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","ReactComponent","DashboardIcon","SettingsIcon","FileManagerIcon","InfoIcon","SlackIcon","DocsIcon","GithubIcon","MoreIcon","UpgradeIcon","DropdownMenu","SupportMenuItems","AdminConfig","HasPermission","Menu","useWcp","Menus","memo","wcp","hasWcpLicense","Boolean","getProject","createElement","name","pin","element","Link","to","text","icon","Icon","label","Item","hideIfEmpty","parent","Group","collapsible","Support","rel","target","Fragment","Separator","className","Footer","trigger","action","Action","displayName"],"sources":["Menus.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as DashboardIcon } from \"@webiny/icons/space_dashboard.svg\";\nimport { ReactComponent as SettingsIcon } from \"@webiny/icons/settings.svg\";\nimport { ReactComponent as FileManagerIcon } from \"@webiny/icons/folder_open.svg\";\nimport { ReactComponent as InfoIcon } from \"@webiny/icons/info.svg\";\nimport { ReactComponent as SlackIcon } from \"@webiny/icons/numbers.svg\";\nimport { ReactComponent as DocsIcon } from \"@webiny/icons/summarize.svg\";\nimport { ReactComponent as GithubIcon } from \"@webiny/icons/route.svg\";\nimport { ReactComponent as MoreIcon } from \"@webiny/icons/more_vert.svg\";\nimport { ReactComponent as UpgradeIcon } from \"@webiny/icons/electric_bolt.svg\";\nimport { DropdownMenu } from \"@webiny/admin-ui\";\nimport { SupportMenuItems } from \"./Menus/SupportMenuItems.js\";\nimport { AdminConfig } from \"~/config/AdminConfig.js\";\nimport { HasPermission } from \"~/presentation/security/components/HasPermission.js\";\nimport { Menu } from \"~/config/AdminConfig/Menu.js\";\nimport { useWcp } from \"~/index.js\";\n\nexport const Menus = React.memo(() => {\n const wcp = useWcp();\n const hasWcpLicense = Boolean(wcp.getProject());\n\n return (\n <AdminConfig>\n <Menu\n name={\"home\"}\n pin={\"start\"}\n element={\n <Menu.Link\n to={\"/\"}\n text={\"Home\"}\n icon={<Menu.Link.Icon label=\"Home\" element={<DashboardIcon />} />}\n />\n }\n />\n <HasPermission name={\"fm.file\"}>\n <Menu\n name={\"fileManager\"}\n pin={\"start\"}\n element={\n <Menu.Link\n text={\"File Manager\"}\n icon={\n <Menu.Item.Icon\n label=\"File Manager\"\n element={<FileManagerIcon />}\n />\n }\n to={\"/file-manager\"}\n />\n }\n />\n </HasPermission>\n <Menu\n name={\"settings\"}\n hideIfEmpty={true}\n pin={\"end\"}\n element={\n <Menu.Item\n text={\"Settings\"}\n icon={<Menu.Link.Icon label=\"Settings\" element={<SettingsIcon />} />}\n />\n }\n />\n\n <Menu\n parent={\"settings\"}\n name=\"settings.system\"\n element={<Menu.Group text=\"System\" collapsible={false} />}\n />\n\n <Menu.Support\n name={\"docs\"}\n element={\n <Menu.Support.Link\n text={\"Documentation\"}\n icon={<Menu.Support.Link.Icon label=\"Docs\" element={<DocsIcon />} />}\n to={\"https://www.webiny.com/docs\"}\n rel={\"noopener noreferrer\"}\n target={\"_blank\"}\n />\n }\n />\n\n <Menu.Support\n name={\"github\"}\n element={\n <Menu.Support.Link\n text={\"GitHub\"}\n icon={<Menu.Support.Link.Icon label=\"GitHub\" element={<GithubIcon />} />}\n to={\"https://github.com/webiny/webiny-js\"}\n rel={\"noopener noreferrer\"}\n target={\"_blank\"}\n />\n }\n />\n\n <Menu.Support\n name={\"slack\"}\n element={\n <Menu.Support.Link\n text={\"Slack\"}\n icon={<Menu.Support.Link.Icon label=\"Slack\" element={<SlackIcon />} />}\n to={\"https://www.webiny.com/slack\"}\n rel={\"noopener noreferrer\"}\n target={\"_blank\"}\n />\n }\n />\n\n {!hasWcpLicense && (\n <Menu.Support\n name={\"upgrade-webiny\"}\n pin={\"end\"}\n element={\n <>\n <DropdownMenu.Separator />\n <Menu.Support.Link\n text={\"Upgrade\"}\n icon={\n <Menu.Support.Link.Icon\n label=\"Upgrade\"\n element={<UpgradeIcon />}\n />\n }\n to={\"https://www.webiny.com/pricing\"}\n rel={\"noopener noreferrer\"}\n target={\"_blank\"}\n className={\n \"[&_a]:text-accent-primary! [&_svg]:fill-accent-default! font-semibold\"\n }\n />\n </>\n }\n />\n )}\n\n <Menu.Footer\n name={\"support\"}\n element={\n <DropdownMenu\n className={\"w-[225px]\"}\n trigger={\n <Menu.Item\n text={\"Support\"}\n icon={<Menu.Item.Icon label=\"Support\" element={<InfoIcon />} />}\n action={<Menu.Item.Action element={<MoreIcon />} />}\n />\n }\n >\n <SupportMenuItems />\n </DropdownMenu>\n }\n />\n </AdminConfig>\n );\n});\n\nMenus.displayName = \"Menus\";\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,IAAIC,aAAa,QAAQ,mCAAmC;AACnF,SAASD,cAAc,IAAIE,YAAY,QAAQ,4BAA4B;AAC3E,SAASF,cAAc,IAAIG,eAAe,QAAQ,+BAA+B;AACjF,SAASH,cAAc,IAAII,QAAQ,QAAQ,wBAAwB;AACnE,SAASJ,cAAc,IAAIK,SAAS,QAAQ,2BAA2B;AACvE,SAASL,cAAc,IAAIM,QAAQ,QAAQ,6BAA6B;AACxE,SAASN,cAAc,IAAIO,UAAU,QAAQ,yBAAyB;AACtE,SAASP,cAAc,IAAIQ,QAAQ,QAAQ,6BAA6B;AACxE,SAASR,cAAc,IAAIS,WAAW,QAAQ,iCAAiC;AAC/E,SAASC,YAAY,QAAQ,kBAAkB;AAC/C,SAASC,gBAAgB;AACzB,SAAS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AI,CAACI,IAAI;QACnBC,KAAK,EAAC,SAAS;QACfN,OAAO,eAAE1B,KAAA,CAAAuB,aAAA,CAACb,WAAW,MAAE;MAAE,CAC5B,CACJ;MACDkB,EAAE,EAAE,gCAAiC;MACrCW,GAAG,EAAE,qBAAsB;MAC3BC,MAAM,EAAE,QAAS;MACjBG,SAAS,EACL;IACH,CACJ,CACH;EACL,CACJ,CACJ,eAED3C,KAAA,CAAAuB,aAAA,CAACR,IAAI,CAAC6B,MAAM;IACRpB,IAAI,EAAE,SAAU;IAChBE,OAAO,eACH1B,KAAA,CAAAuB,aAAA,CAACZ,YAAY;MACTgC,SAAS,EAAE,WAAY;MACvBE,OAAO,eACH7C,KAAA,CAAAuB,aAAA,CAACR,IAAI,CAACkB,IAAI;QACNJ,IAAI,EAAE,SAAU;QAChBC,IAAI,eAAE9B,KAAA,CAAAuB,aAAA,CAACR,IAAI,CAACkB,IAAI,CAACF,IAAI;UAACC,KAAK,EAAC,SAAS;UAACN,OAAO,eAAE1B,KAAA,CAAAuB,aAAA,CAAClB,QAAQ,MAAE;QAAE,CAAE,CAAE;QAChEyC,MAAM,eAAE9C,KAAA,CAAAuB,aAAA,CAACR,IAAI,CAACkB,IAAI,CAACc,MAAM;UAACrB,OAAO,eAAE1B,KAAA,CAAAuB,aAAA,CAACd,QAAQ,MAAE;QAAE,CAAE;MAAE,CACvD;IACJ,gBAEDT,KAAA,CAAAuB,aAAA,CAACX,gBAAgB,MAAE,CACT;EACjB,CACJ,CACQ,CAAC;AAEtB,CAAC,CAAC;AAEFK,KAAK,CAAC+B,WAAW,GAAG,OAAO","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","ReactComponent","DashboardIcon","SettingsIcon","FileManagerIcon","UpgradeIcon","AdminConfig","HasPermission","Menu","useWcp","Menus","memo","wcp","hasWcpLicense","Boolean","getProject","createElement","name","pin","element","Link","to","text","icon","Icon","label","Item","hideIfEmpty","parent","Group","collapsible","Footer","rel","target","className","displayName"],"sources":["Menus.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as DashboardIcon } from \"@webiny/icons/space_dashboard.svg\";\nimport { ReactComponent as SettingsIcon } from \"@webiny/icons/settings.svg\";\nimport { ReactComponent as FileManagerIcon } from \"@webiny/icons/folder_open.svg\";\nimport { ReactComponent as UpgradeIcon } from \"@webiny/icons/electric_bolt.svg\";\nimport { AdminConfig } from \"~/config/AdminConfig.js\";\nimport { HasPermission } from \"~/presentation/security/components/HasPermission.js\";\nimport { Menu } from \"~/config/AdminConfig/Menu.js\";\nimport { useWcp } from \"~/index.js\";\n\nexport const Menus = React.memo(() => {\n const wcp = useWcp();\n const hasWcpLicense = Boolean(wcp.getProject());\n\n return (\n <AdminConfig>\n <Menu\n name={\"home\"}\n pin={\"start\"}\n element={\n <Menu.Link\n to={\"/\"}\n text={\"Home\"}\n icon={<Menu.Link.Icon label=\"Home\" element={<DashboardIcon />} />}\n />\n }\n />\n <HasPermission name={\"fm.file\"}>\n <Menu\n name={\"fileManager\"}\n pin={\"start\"}\n element={\n <Menu.Link\n text={\"File Manager\"}\n icon={\n <Menu.Item.Icon\n label=\"File Manager\"\n element={<FileManagerIcon />}\n />\n }\n to={\"/file-manager\"}\n />\n }\n />\n </HasPermission>\n <Menu\n name={\"settings\"}\n hideIfEmpty={true}\n pin={\"end\"}\n element={\n <Menu.Item\n text={\"Settings\"}\n icon={<Menu.Link.Icon label=\"Settings\" element={<SettingsIcon />} />}\n />\n }\n />\n\n <Menu\n parent={\"settings\"}\n name=\"settings.system\"\n element={<Menu.Group text=\"System\" collapsible={false} />}\n />\n\n {!hasWcpLicense && (\n <Menu.Footer\n name={\"upgrade\"}\n element={\n <Menu.Link\n text={\"Upgrade\"}\n icon={<Menu.Link.Icon label=\"Upgrade\" element={<UpgradeIcon />} />}\n to={\"https://www.webiny.com/pricing\"}\n rel={\"noopener noreferrer\"}\n target={\"_blank\"}\n className={\n \"[&_a]:text-accent-primary! [&_svg]:fill-accent-default! font-semibold\"\n }\n />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AE,CAAE,CAAE;MACnEgB,EAAE,EAAE,gCAAiC;MACrCW,GAAG,EAAE,qBAAsB;MAC3BC,MAAM,EAAE,QAAS;MACjBC,SAAS,EACL;IACH,CACJ;EACJ,CACJ,CAEI,CAAC;AAEtB,CAAC,CAAC;AAEFxB,KAAK,CAACyB,WAAW,GAAG,OAAO","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ import { AdminConfig } from "../../config/AdminConfig.js";
|
|
|
4
4
|
import { Routes } from "../../routes.js";
|
|
5
5
|
import { FileManager } from "../../index.js";
|
|
6
6
|
import { Route } from "../../config/AdminConfig/Route.js";
|
|
7
|
+
import { FormModelDemo } from "../../features/formModel/demo/FormModelDemo.js";
|
|
7
8
|
export const RoutesConfig = /*#__PURE__*/React.memo(() => {
|
|
8
9
|
return /*#__PURE__*/React.createElement(AdminConfig, null, /*#__PURE__*/React.createElement(Route, {
|
|
9
10
|
route: Routes.Dashboard,
|
|
@@ -18,6 +19,11 @@ export const RoutesConfig = /*#__PURE__*/React.memo(() => {
|
|
|
18
19
|
overlay: false,
|
|
19
20
|
show: true
|
|
20
21
|
}))
|
|
22
|
+
}), /*#__PURE__*/React.createElement(Route, {
|
|
23
|
+
route: Routes.FormModelDemo,
|
|
24
|
+
element: /*#__PURE__*/React.createElement(AdminLayout, {
|
|
25
|
+
title: "FormModel Demo"
|
|
26
|
+
}, /*#__PURE__*/React.createElement(FormModelDemo, null))
|
|
21
27
|
}), /*#__PURE__*/React.createElement(Route, {
|
|
22
28
|
route: Routes.CatchAll,
|
|
23
29
|
element: /*#__PURE__*/React.createElement(AdminLayout, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Dashboard","AdminLayout","NotFound","AdminConfig","Routes","FileManager","Route","RoutesConfig","memo","createElement","route","element","title","overlay","show","CatchAll","displayName"],"sources":["RoutesConfig.tsx"],"sourcesContent":["import React from \"react\";\nimport { Dashboard, AdminLayout, NotFound } from \"~/index.js\";\nimport { AdminConfig } from \"~/config/AdminConfig.js\";\nimport { Routes } from \"~/routes.js\";\nimport { FileManager } from \"~/index.js\";\nimport { Route } from \"~/config/AdminConfig/Route.js\";\n\nexport const RoutesConfig = React.memo(() => {\n return (\n <AdminConfig>\n <Route\n route={Routes.Dashboard}\n element={\n <AdminLayout title={\"Welcome!\"}>\n <Dashboard />\n </AdminLayout>\n }\n />\n\n <Route\n route={Routes.FileManager}\n element={\n <AdminLayout title={\"File Manager\"}>\n <FileManager overlay={false} show={true} />\n </AdminLayout>\n }\n />\n\n <Route\n route={Routes.CatchAll}\n element={\n <AdminLayout title={\"Not Accessible\"}>\n <NotFound />\n </AdminLayout>\n }\n />\n </AdminConfig>\n );\n});\n\nRoutesConfig.displayName = \"Routes\";\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAEC,WAAW,EAAEC,QAAQ;AACzC,SAASC,WAAW;AACpB,SAASC,MAAM;AACf,SAASC,WAAW;AACpB,SAASC,KAAK;
|
|
1
|
+
{"version":3,"names":["React","Dashboard","AdminLayout","NotFound","AdminConfig","Routes","FileManager","Route","FormModelDemo","RoutesConfig","memo","createElement","route","element","title","overlay","show","CatchAll","displayName"],"sources":["RoutesConfig.tsx"],"sourcesContent":["import React from \"react\";\nimport { Dashboard, AdminLayout, NotFound } from \"~/index.js\";\nimport { AdminConfig } from \"~/config/AdminConfig.js\";\nimport { Routes } from \"~/routes.js\";\nimport { FileManager } from \"~/index.js\";\nimport { Route } from \"~/config/AdminConfig/Route.js\";\nimport { FormModelDemo } from \"~/features/formModel/demo/FormModelDemo.js\";\n\nexport const RoutesConfig = React.memo(() => {\n return (\n <AdminConfig>\n <Route\n route={Routes.Dashboard}\n element={\n <AdminLayout title={\"Welcome!\"}>\n <Dashboard />\n </AdminLayout>\n }\n />\n\n <Route\n route={Routes.FileManager}\n element={\n <AdminLayout title={\"File Manager\"}>\n <FileManager overlay={false} show={true} />\n </AdminLayout>\n }\n />\n\n <Route\n route={Routes.FormModelDemo}\n element={\n <AdminLayout title={\"FormModel Demo\"}>\n <FormModelDemo />\n </AdminLayout>\n }\n />\n\n <Route\n route={Routes.CatchAll}\n element={\n <AdminLayout title={\"Not Accessible\"}>\n <NotFound />\n </AdminLayout>\n }\n />\n </AdminConfig>\n );\n});\n\nRoutesConfig.displayName = \"Routes\";\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAEC,WAAW,EAAEC,QAAQ;AACzC,SAASC,WAAW;AACpB,SAASC,MAAM;AACf,SAASC,WAAW;AACpB,SAASC,KAAK;AACd,SAASC,aAAa;AAEtB,OAAO,MAAMC,YAAY,gBAAGT,KAAK,CAACU,IAAI,CAAC,MAAM;EACzC,oBACIV,KAAA,CAAAW,aAAA,CAACP,WAAW,qBACRJ,KAAA,CAAAW,aAAA,CAACJ,KAAK;IACFK,KAAK,EAAEP,MAAM,CAACJ,SAAU;IACxBY,OAAO,eACHb,KAAA,CAAAW,aAAA,CAACT,WAAW;MAACY,KAAK,EAAE;IAAW,gBAC3Bd,KAAA,CAAAW,aAAA,CAACV,SAAS,MAAE,CACH;EAChB,CACJ,CAAC,eAEFD,KAAA,CAAAW,aAAA,CAACJ,KAAK;IACFK,KAAK,EAAEP,MAAM,CAACC,WAAY;IAC1BO,OAAO,eACHb,KAAA,CAAAW,aAAA,CAACT,WAAW;MAACY,KAAK,EAAE;IAAe,gBAC/Bd,KAAA,CAAAW,aAAA,CAACL,WAAW;MAACS,OAAO,EAAE,KAAM;MAACC,IAAI,EAAE;IAAK,CAAE,CACjC;EAChB,CACJ,CAAC,eAEFhB,KAAA,CAAAW,aAAA,CAACJ,KAAK;IACFK,KAAK,EAAEP,MAAM,CAACG,aAAc;IAC5BK,OAAO,eACHb,KAAA,CAAAW,aAAA,CAACT,WAAW;MAACY,KAAK,EAAE;IAAiB,gBACjCd,KAAA,CAAAW,aAAA,CAACH,aAAa,MAAE,CACP;EAChB,CACJ,CAAC,eAEFR,KAAA,CAAAW,aAAA,CAACJ,KAAK;IACFK,KAAK,EAAEP,MAAM,CAACY,QAAS;IACvBJ,OAAO,eACHb,KAAA,CAAAW,aAAA,CAACT,WAAW;MAACY,KAAK,EAAE;IAAiB,gBACjCd,KAAA,CAAAW,aAAA,CAACR,QAAQ,MAAE,CACF;EAChB,CACJ,CACQ,CAAC;AAEtB,CAAC,CAAC;AAEFM,YAAY,CAACS,WAAW,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
/** @deprecated Import from "webiny/admin" instead. */
|
|
1
2
|
export { useBuildParams } from "../../presentation/buildParams/useBuildParams.js";
|
|
3
|
+
/** @deprecated Import from "webiny/admin" instead. */
|
|
2
4
|
export { BuildParam, BuildParams } from "../../features/buildParams/index.js";
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
/** @deprecated Import from "webiny/admin" instead. */
|
|
1
2
|
export { useBuildParams } from "../../presentation/buildParams/useBuildParams.js";
|
|
3
|
+
|
|
4
|
+
/** @deprecated Import from "webiny/admin" instead. */
|
|
2
5
|
export { BuildParam, BuildParams } from "../../features/buildParams/index.js";
|
|
3
6
|
|
|
4
7
|
//# sourceMappingURL=build-params.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useBuildParams","BuildParam","BuildParams"],"sources":["build-params.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"names":["useBuildParams","BuildParam","BuildParams"],"sources":["build-params.ts"],"sourcesContent":["/** @deprecated Import from \"webiny/admin\" instead. */\nexport { useBuildParams } from \"~/presentation/buildParams/useBuildParams.js\";\n\n/** @deprecated Import from \"webiny/admin\" instead. */\nexport { BuildParam, BuildParams } from \"~/features/buildParams/index.js\";\n"],"mappings":"AAAA;AACA,SAASA,cAAc;;AAEvB;AACA,SAASC,UAAU,EAAEC,WAAW","ignoreList":[]}
|
package/exports/admin/form.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export type { IFieldRendererRegistry, IFieldBuilderRegistry, IFieldVM, IObjectFieldVM, IObjectFieldItemVM } from "../../features/formModel/abstractions.js";
|
|
2
|
+
export { FieldType } from "../../features/formModel/abstractions.js";
|
|
3
|
+
export { FormModelFactory } from "../../features/formModel/abstractions.js";
|
|
4
|
+
export { FieldBuilder } from "../../features/formModel/FieldBuilder.js";
|
|
5
|
+
export { createFieldRenderer, createObjectFieldRenderer } from "../../features/formModel/createFieldRenderer.js";
|
|
1
6
|
export { Bind } from "@webiny/form";
|
|
2
7
|
export { Form } from "@webiny/form";
|
|
3
8
|
export { UnsetOnUnmount } from "@webiny/form";
|
package/exports/admin/form.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
// New Form Model
|
|
2
|
+
|
|
3
|
+
export { FieldType } from "../../features/formModel/abstractions.js";
|
|
4
|
+
export { FormModelFactory } from "../../features/formModel/abstractions.js";
|
|
5
|
+
export { FieldBuilder } from "../../features/formModel/FieldBuilder.js";
|
|
6
|
+
export { createFieldRenderer, createObjectFieldRenderer } from "../../features/formModel/createFieldRenderer.js";
|
|
7
|
+
|
|
8
|
+
// Old React-based form
|
|
1
9
|
export { Bind } from "@webiny/form";
|
|
2
10
|
export { Form } from "@webiny/form";
|
|
3
11
|
export { UnsetOnUnmount } from "@webiny/form";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Bind","Form","UnsetOnUnmount","useBind","useBindPrefix","useGenerateSlug","useForm","validation","Validation","ValidationError"],"sources":["form.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"names":["FieldType","FormModelFactory","FieldBuilder","createFieldRenderer","createObjectFieldRenderer","Bind","Form","UnsetOnUnmount","useBind","useBindPrefix","useGenerateSlug","useForm","validation","Validation","ValidationError"],"sources":["form.ts"],"sourcesContent":["// New Form Model\nexport type {\n IFieldRendererRegistry,\n IFieldBuilderRegistry,\n IFieldVM,\n IObjectFieldVM,\n IObjectFieldItemVM\n} from \"~/features/formModel/abstractions.js\";\nexport { FieldType } from \"~/features/formModel/abstractions.js\";\nexport { FormModelFactory } from \"~/features/formModel/abstractions.js\";\nexport { FieldBuilder } from \"~/features/formModel/FieldBuilder.js\";\nexport {\n createFieldRenderer,\n createObjectFieldRenderer\n} from \"~/features/formModel/createFieldRenderer.js\";\n\n// Old React-based form\nexport { Bind } from \"@webiny/form\";\nexport { Form } from \"@webiny/form\";\nexport { UnsetOnUnmount } from \"@webiny/form\";\nexport { useBind } from \"@webiny/form\";\nexport { useBindPrefix } from \"@webiny/form\";\nexport { useGenerateSlug } from \"@webiny/form\";\nexport { useForm } from \"@webiny/form\";\nexport type { FormAPI as FormApi, FormOnSubmit, GenericFormData } from \"@webiny/form\";\nexport { validation } from \"@webiny/validation\";\nexport { Validation } from \"@webiny/validation\";\nexport { ValidationError } from \"@webiny/validation\";\n"],"mappings":"AAAA;;AAQA,SAASA,SAAS;AAClB,SAASC,gBAAgB;AACzB,SAASC,YAAY;AACrB,SACIC,mBAAmB,EACnBC,yBAAyB;;AAG7B;AACA,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,cAAc,QAAQ,cAAc;AAC7C,SAASC,OAAO,QAAQ,cAAc;AACtC,SAASC,aAAa,QAAQ,cAAc;AAC5C,SAASC,eAAe,QAAQ,cAAc;AAC9C,SAASC,OAAO,QAAQ,cAAc;AAEtC,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,eAAe,QAAQ,oBAAoB","ignoreList":[]}
|
package/exports/admin/ui.d.ts
CHANGED
|
@@ -5,3 +5,4 @@ export { useDialogs } from "../../components/Dialogs/useDialogs.js";
|
|
|
5
5
|
export { Logo } from "../../base/ui/Logo.js";
|
|
6
6
|
export { TenantSelector } from "../../base/ui/TenantSelector.js";
|
|
7
7
|
export { LexicalEditor } from "../../components/LexicalEditor/LexicalEditor.js";
|
|
8
|
+
export { AdminLayout } from "../../components/AdminLayout.js";
|
package/exports/admin/ui.js
CHANGED
|
@@ -5,5 +5,6 @@ export { useDialogs } from "../../components/Dialogs/useDialogs.js";
|
|
|
5
5
|
export { Logo } from "../../base/ui/Logo.js";
|
|
6
6
|
export { TenantSelector } from "../../base/ui/TenantSelector.js";
|
|
7
7
|
export { LexicalEditor } from "../../components/LexicalEditor/LexicalEditor.js";
|
|
8
|
+
export { AdminLayout } from "../../components/AdminLayout.js";
|
|
8
9
|
|
|
9
10
|
//# sourceMappingURL=ui.js.map
|
package/exports/admin/ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useDialog","useOpenDialog","useHotkeys","useDialogs","Logo","TenantSelector","LexicalEditor"],"sources":["ui.ts"],"sourcesContent":["export { useDialog } from \"~/hooks/index.js\";\nexport { useOpenDialog } from \"~/hooks/index.js\";\nexport { useHotkeys } from \"~/hooks/useHotkeys.js\";\nexport { useDialogs } from \"~/components/Dialogs/useDialogs.js\";\nexport { Logo } from \"~/base/ui/Logo.js\";\nexport { TenantSelector } from \"~/base/ui/TenantSelector.js\";\nexport { LexicalEditor } from \"~/components/LexicalEditor/LexicalEditor.js\";\n"],"mappings":"AAAA,SAASA,SAAS;AAClB,SAASC,aAAa;AACtB,SAASC,UAAU;AACnB,SAASC,UAAU;AACnB,SAASC,IAAI;AACb,SAASC,cAAc;AACvB,SAASC,aAAa","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["useDialog","useOpenDialog","useHotkeys","useDialogs","Logo","TenantSelector","LexicalEditor","AdminLayout"],"sources":["ui.ts"],"sourcesContent":["export { useDialog } from \"~/hooks/index.js\";\nexport { useOpenDialog } from \"~/hooks/index.js\";\nexport { useHotkeys } from \"~/hooks/useHotkeys.js\";\nexport { useDialogs } from \"~/components/Dialogs/useDialogs.js\";\nexport { Logo } from \"~/base/ui/Logo.js\";\nexport { TenantSelector } from \"~/base/ui/TenantSelector.js\";\nexport { LexicalEditor } from \"~/components/LexicalEditor/LexicalEditor.js\";\nexport { AdminLayout } from \"~/components/AdminLayout.js\";\n"],"mappings":"AAAA,SAASA,SAAS;AAClB,SAASC,aAAa;AACtB,SAASC,UAAU;AACnB,SAASC,UAAU;AACnB,SAASC,IAAI;AACb,SAASC,cAAc;AACvB,SAASC,aAAa;AACtB,SAASC,WAAW","ignoreList":[]}
|
package/exports/admin.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
export { FormModelFactory } from "../features/formModel/abstractions.js";
|
|
1
2
|
export { DevToolsSection } from "../components/index.js";
|
|
2
3
|
export { RegisterFeature } from "../components/RegisterFeature.js";
|
|
3
4
|
export { BuildParam, BuildParams } from "../features/buildParams/index.js";
|
|
4
|
-
export {
|
|
5
|
+
export { useBuildParams } from "../presentation/buildParams/useBuildParams.js";
|
|
6
|
+
export { Tool, ToolPipelineRunner, LexicalContext } from "../features/tools/index.js";
|
|
5
7
|
export { ToolsFeature } from "../features/tools/index.js";
|
|
6
8
|
export { AdminConfig } from "../config/AdminConfig.js";
|
|
7
9
|
export { Routes } from "../routes.js";
|
package/exports/admin.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
export { FormModelFactory } from "../features/formModel/abstractions.js";
|
|
1
2
|
export { DevToolsSection } from "../components/index.js";
|
|
2
3
|
export { RegisterFeature } from "../components/RegisterFeature.js";
|
|
3
4
|
export { BuildParam, BuildParams } from "../features/buildParams/index.js";
|
|
4
|
-
export {
|
|
5
|
+
export { useBuildParams } from "../presentation/buildParams/useBuildParams.js";
|
|
6
|
+
export { Tool, ToolPipelineRunner, LexicalContext } from "../features/tools/index.js";
|
|
5
7
|
export { ToolsFeature } from "../features/tools/index.js";
|
|
6
8
|
export { AdminConfig } from "../config/AdminConfig.js";
|
|
7
9
|
export { Routes } from "../routes.js";
|
package/exports/admin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DevToolsSection","RegisterFeature","BuildParam","BuildParams","Tool","ToolPipelineRunner","ToolsFeature","AdminConfig","Routes"],"sources":["admin.ts"],"sourcesContent":["export { DevToolsSection } from \"~/components/index.js\";\nexport { RegisterFeature } from \"~/components/RegisterFeature.js\";\nexport { BuildParam, BuildParams } from \"~/features/buildParams/index.js\";\nexport { Tool, ToolPipelineRunner } from \"~/features/tools/index.js\";\nexport { ToolsFeature } from \"~/features/tools/index.js\";\nexport { AdminConfig } from \"~/config/AdminConfig.js\";\nexport { Routes } from \"~/routes.js\";\n"],"mappings":"AAAA,SAASA,eAAe;AACxB,SAASC,eAAe;AACxB,SAASC,UAAU,EAAEC,WAAW;AAChC,SAASC,IAAI,EAAEC,kBAAkB;
|
|
1
|
+
{"version":3,"names":["FormModelFactory","DevToolsSection","RegisterFeature","BuildParam","BuildParams","useBuildParams","Tool","ToolPipelineRunner","LexicalContext","ToolsFeature","AdminConfig","Routes"],"sources":["admin.ts"],"sourcesContent":["export { FormModelFactory } from \"~/features/formModel/abstractions.js\";\nexport { DevToolsSection } from \"~/components/index.js\";\nexport { RegisterFeature } from \"~/components/RegisterFeature.js\";\nexport { BuildParam, BuildParams } from \"~/features/buildParams/index.js\";\nexport { useBuildParams } from \"~/presentation/buildParams/useBuildParams.js\";\nexport { Tool, ToolPipelineRunner, LexicalContext } from \"~/features/tools/index.js\";\nexport { ToolsFeature } from \"~/features/tools/index.js\";\nexport { AdminConfig } from \"~/config/AdminConfig.js\";\nexport { Routes } from \"~/routes.js\";\n"],"mappings":"AAAA,SAASA,gBAAgB;AACzB,SAASC,eAAe;AACxB,SAASC,eAAe;AACxB,SAASC,UAAU,EAAEC,WAAW;AAChC,SAASC,cAAc;AACvB,SAASC,IAAI,EAAEC,kBAAkB,EAAEC,cAAc;AACjD,SAASC,YAAY;AACrB,SAASC,WAAW;AACpB,SAASC,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IFormModel } from "./abstractions.js";
|
|
2
|
+
import { RuleEvaluator } from "./abstractions.js";
|
|
3
|
+
export declare class ConditionRuleEvaluatorImpl implements RuleEvaluator.Interface {
|
|
4
|
+
canEvaluate(rule: RuleEvaluator.Rule): boolean;
|
|
5
|
+
evaluate(rule: RuleEvaluator.Rule, form: IFormModel): boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const ConditionRuleEvaluator: typeof ConditionRuleEvaluatorImpl & {
|
|
8
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IRuleEvaluator>;
|
|
9
|
+
};
|