@archbase/components 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/types.d.ts +65 -0
- package/dist/archbase-components-3.0.0.tgz +0 -0
- package/dist/buttons/ActionsDemo.d.ts +2 -0
- package/dist/buttons/ArchbaseActionButtons.d.ts +61 -0
- package/dist/buttons/index.d.ts +2 -0
- package/dist/charts/ArchbaseTimeline.d.ts +24 -0
- package/dist/charts/index.d.ts +3 -0
- package/dist/charts/vis-timeline/ArchbaseVisTimeline.d.ts +9 -0
- package/dist/charts/vis-timeline/ArchbaseVisTimeline.types.d.ts +284 -0
- package/dist/charts/vis-timeline/index.d.ts +9 -0
- package/dist/charts/vis-timeline/utils/timelineOptions.d.ts +68 -0
- package/dist/datagrid/components/index.d.ts +6 -0
- package/dist/datagrid/components/pagination/grid-pagination.d.ts +7 -0
- package/dist/datagrid/components/render/archbase-data-grid-item-renderer.d.ts +10 -0
- package/dist/datagrid/components/toolbar/global-search-input.d.ts +16 -0
- package/dist/datagrid/components/toolbar/grid-toolbar.d.ts +19 -0
- package/dist/datagrid/hooks/index.d.ts +3 -0
- package/dist/datagrid/hooks/use-grid-data-stable-rendering.d.ts +15 -0
- package/dist/datagrid/hooks/use-grid-data.d.ts +32 -0
- package/dist/datagrid/hooks/use-grid-details-panel.d.ts +51 -0
- package/dist/datagrid/index.d.ts +6 -0
- package/dist/datagrid/main/archbase-data-grid-column.d.ts +26 -0
- package/dist/datagrid/main/archbase-data-grid-formatters.d.ts +57 -0
- package/dist/datagrid/main/archbase-data-grid-pagination.d.ts +8 -0
- package/dist/datagrid/main/archbase-data-grid-toolbar.d.ts +7 -0
- package/dist/datagrid/main/archbase-data-grid-types.d.ts +252 -0
- package/dist/datagrid/main/archbase-data-grid-utils.d.ts +45 -0
- package/dist/datagrid/main/archbase-data-grid.d.ts +9 -0
- package/dist/datagrid/main/archbase-detail-panel-component.d.ts +52 -0
- package/dist/datagrid/main/archbase-expand-button.d.ts +22 -0
- package/dist/datagrid/main/archbase-grid-popover.d.ts +37 -0
- package/dist/datagrid/main/grid-row-actions.d.ts +15 -0
- package/dist/datagrid/main/index.d.ts +21 -0
- package/dist/datagrid/modals/export-data.d.ts +13 -0
- package/dist/datagrid/modals/export-modal.d.ts +9 -0
- package/dist/datagrid/modals/index.d.ts +6 -0
- package/dist/datagrid/modals/print-data.d.ts +16 -0
- package/dist/datagrid/modals/print-modal.d.ts +9 -0
- package/dist/datagrid/types/grid-props.d.ts +48 -0
- package/dist/datagrid/types/index.d.ts +1 -0
- package/dist/datagrid/utils/formatter.d.ts +39 -0
- package/dist/datagrid/utils/index.d.ts +1 -0
- package/dist/debug/index.d.ts +4 -0
- package/dist/debug/jsonpathpicker/ArchbaseJsonPathPicker.d.ts +37 -0
- package/dist/debug/jsonpathpicker/index.d.ts +1 -0
- package/dist/debug/jsonview/ArchbaseJsonViewDataRenderer.d.ts +34 -0
- package/dist/debug/jsonview/ArchbaseJsonViewDataTypeDetection.d.ts +8 -0
- package/dist/debug/jsonview/index.d.ts +11 -0
- package/dist/debug/objectinspector/ArchbaseDebugInspector.d.ts +23 -0
- package/dist/debug/objectinspector/ArchbaseFloatingWindow.d.ts +24 -0
- package/dist/debug/objectinspector/ArchbaseObjectInspector.d.ts +6 -0
- package/dist/debug/objectinspector/index.d.ts +3 -0
- package/dist/display/index.d.ts +4 -0
- package/dist/editors/ArchbaseAsyncMultiSelect.d.ts +112 -0
- package/dist/editors/ArchbaseAsyncSelect.context.d.ts +8 -0
- package/dist/editors/ArchbaseAsyncSelect.d.ts +102 -0
- package/dist/editors/ArchbaseAvatarEdit.d.ts +49 -0
- package/dist/editors/ArchbaseCheckbox.d.ts +45 -0
- package/dist/editors/ArchbaseChip.d.ts +43 -0
- package/dist/editors/ArchbaseChipGroup.d.ts +42 -0
- package/dist/editors/ArchbaseChipItem.d.ts +18 -0
- package/dist/editors/ArchbaseColorPicker.d.ts +3 -0
- package/dist/editors/ArchbaseCountdownProgress.d.ts +5 -0
- package/dist/editors/ArchbaseCronExpressionEdit.d.ts +16 -0
- package/dist/editors/ArchbaseCronExpressionEditor.d.ts +8 -0
- package/dist/editors/ArchbaseDatePicker.d.ts +2 -0
- package/dist/editors/ArchbaseDatePickerEdit.d.ts +85 -0
- package/dist/editors/ArchbaseDatePickerRange.d.ts +47 -0
- package/dist/editors/ArchbaseDateTimePickerEdit.d.ts +43 -0
- package/dist/editors/ArchbaseDateTimePickerRange.d.ts +58 -0
- package/dist/editors/ArchbaseEdit.d.ts +56 -0
- package/dist/editors/ArchbaseEdit.example.d.ts +8 -0
- package/dist/editors/ArchbaseFileAttachment.d.ts +17 -0
- package/dist/editors/ArchbaseImageEdit.d.ts +50 -0
- package/dist/editors/ArchbaseJsonEdit.d.ts +49 -0
- package/dist/editors/ArchbaseKeyValueEditor.d.ts +22 -0
- package/dist/editors/ArchbaseLookupEdit.d.ts +57 -0
- package/dist/editors/ArchbaseLookupNumber.d.ts +69 -0
- package/dist/editors/ArchbaseLookupSelect.d.ts +9 -0
- package/dist/editors/ArchbaseMarkdownEdit.d.ts +52 -0
- package/dist/editors/ArchbaseMaskEdit.d.ts +79 -0
- package/dist/editors/ArchbaseNumberEdit.d.ts +51 -0
- package/dist/editors/ArchbaseNumberInput.d.ts +2 -0
- package/dist/editors/ArchbaseOperationHoursEditor.d.ts +8 -0
- package/dist/editors/ArchbasePasswordEdit.d.ts +44 -0
- package/dist/editors/ArchbasePasswordInput.d.ts +2 -0
- package/dist/editors/ArchbaseRadio.d.ts +2 -0
- package/dist/editors/ArchbaseRadioGroup.d.ts +45 -0
- package/dist/editors/ArchbaseRadioItem.d.ts +12 -0
- package/dist/editors/ArchbaseRating.d.ts +52 -0
- package/dist/editors/ArchbaseRichTextEdit.d.ts +80 -0
- package/dist/editors/ArchbaseSelect.context.d.ts +8 -0
- package/dist/editors/ArchbaseSelect.d.ts +107 -0
- package/dist/editors/ArchbaseSelectItem.d.ts +15 -0
- package/dist/editors/ArchbaseSwitch.d.ts +53 -0
- package/dist/editors/ArchbaseTextArea.d.ts +47 -0
- package/dist/editors/ArchbaseTimeEdit.d.ts +52 -0
- package/dist/editors/ArchbaseTimeRangeSelector.d.ts +40 -0
- package/dist/editors/ArchbaseTreeSelect.d.ts +65 -0
- package/dist/editors/index.d.ts +81 -0
- package/dist/feedback/index.d.ts +4 -0
- package/dist/filters/ArchbaseCompositeFilters.d.ts +23 -0
- package/dist/filters/ArchbaseCompositeFilters.types.d.ts +303 -0
- package/dist/filters/ArchbaseCompositeFilters.utils.d.ts +69 -0
- package/dist/filters/components/FilterPill.d.ts +5 -0
- package/dist/filters/hooks/index.d.ts +4 -0
- package/dist/filters/hooks/useArchbaseFilterHistory.d.ts +24 -0
- package/dist/filters/hooks/useArchbaseFilterPresets.d.ts +23 -0
- package/dist/filters/hooks/useArchbaseFilters.d.ts +32 -0
- package/dist/filters/hooks/useArchbaseQuickFilters.d.ts +26 -0
- package/dist/filters/index.d.ts +8 -0
- package/dist/forms/index.d.ts +3 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/useArchbaseContainerDimensions.d.ts +4 -0
- package/dist/hooks/useArchbaseElementSizeArea.d.ts +6 -0
- package/dist/hooks/useArchbaseListContext.d.ts +2 -0
- package/dist/hooks/useArchbaseNavigateParams.d.ts +3 -0
- package/dist/hooks/useArchbaseVisible.d.ts +2 -0
- package/dist/image/ArchbaseImage.d.ts +33 -0
- package/dist/image/ArchbaseMicrosoftAvatar.d.ts +7 -0
- package/dist/image/editor/components/BasicFilters/BasicFilter.d.ts +9 -0
- package/dist/image/editor/components/CropprWrapper/ArchbaseCropperWrapper.d.ts +12 -0
- package/dist/image/editor/components/EditImage/ArchbaseEditImage.d.ts +11 -0
- package/dist/image/editor/components/Input/Input.d.ts +9 -0
- package/dist/image/editor/components/Tab/Tab.d.ts +23 -0
- package/dist/image/editor/functions/croppr/box.d.ts +95 -0
- package/dist/image/editor/functions/croppr/core.d.ts +121 -0
- package/dist/image/editor/functions/croppr/croppr.d.ts +68 -0
- package/dist/image/editor/functions/croppr/handle.d.ts +23 -0
- package/dist/image/editor/functions/croppr/index.d.ts +2 -0
- package/dist/image/editor/functions/croppr/touch.d.ts +10 -0
- package/dist/image/editor/functions/image-processing.d.ts +11 -0
- package/dist/image/editor/index.d.ts +12 -0
- package/dist/image/editor/models/index.models.d.ts +45 -0
- package/dist/image/index.d.ts +7 -0
- package/dist/image/languages.d.ts +299 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +18368 -0
- package/dist/jsonschema/ArchbaseJsonSchemaEditor.types.d.ts +131 -0
- package/dist/jsonschema/JsonSchemaEditor/ArchbaseJsonSchemaEditor.context.d.ts +7 -0
- package/dist/jsonschema/JsonSchemaEditor/ArchbaseJsonSchemaEditor.d.ts +9 -0
- package/dist/jsonschema/JsonSchemaEditor/advanced-boolean/index.d.ts +2 -0
- package/dist/jsonschema/JsonSchemaEditor/advanced-number/index.d.ts +2 -0
- package/dist/jsonschema/JsonSchemaEditor/advanced-string/index.d.ts +2 -0
- package/dist/jsonschema/JsonSchemaEditor/drop-plus/index.d.ts +10 -0
- package/dist/jsonschema/JsonSchemaEditor/index.d.ts +2 -0
- package/dist/jsonschema/JsonSchemaEditor/schema-advanced/index.d.ts +6 -0
- package/dist/jsonschema/JsonSchemaEditor/schema-array/index.d.ts +8 -0
- package/dist/jsonschema/JsonSchemaEditor/schema-item/index.d.ts +11 -0
- package/dist/jsonschema/JsonSchemaEditor/schema-object/index.d.ts +7 -0
- package/dist/jsonschema/JsonSchemaEditor/schema-root/index.d.ts +8 -0
- package/dist/jsonschema/JsonSchemaEditor/utils.d.ts +25 -0
- package/dist/jsonschema/JsonSchemaEditor/whoops.d.ts +2 -0
- package/dist/jsonschema/index.d.ts +2 -0
- package/dist/list/ArchbaseList.context.d.ts +27 -0
- package/dist/list/ArchbaseList.d.ts +104 -0
- package/dist/list/ArchbaseListItem.d.ts +59 -0
- package/dist/list/index.d.ts +8 -0
- package/dist/list/treeview/ArchbaseTreeView.d.ts +44 -0
- package/dist/list/treeview/ArchbaseTreeView.types.d.ts +40 -0
- package/dist/list/treeview/ArchbaseTreeViewItem.d.ts +19 -0
- package/dist/list/treeview/index.d.ts +5 -0
- package/dist/list-view/ArchbaseListViewTable.d.ts +111 -0
- package/dist/list-view/index.d.ts +2 -0
- package/dist/markdown/ArchbaseMarkdown.d.ts +23 -0
- package/dist/markdown/ArchbaseMarkdown.types.d.ts +181 -0
- package/dist/markdown/components/CodeBlock.d.ts +23 -0
- package/dist/markdown/components/LinkRenderer.d.ts +16 -0
- package/dist/markdown/index.d.ts +11 -0
- package/dist/masonry/ArchbaseMasonry.context.d.ts +21 -0
- package/dist/masonry/ArchbaseMasonry.d.ts +35 -0
- package/dist/masonry/index.d.ts +5 -0
- package/dist/navigation/index.d.ts +3 -0
- package/dist/notification/ArchbaseAlert.d.ts +22 -0
- package/dist/notification/ArchbaseDialog.d.ts +16 -0
- package/dist/notification/ArchbaseNotifications.d.ts +5 -0
- package/dist/notification/index.d.ts +4 -0
- package/dist/onboarding/ArchbaseOnboardingTour.d.ts +99 -0
- package/dist/onboarding/index.d.ts +2 -0
- package/dist/printer/ArchbaseThermalPrinter.d.ts +27 -0
- package/dist/printer/ArchbaseThermalPrinter.types.d.ts +199 -0
- package/dist/printer/index.d.ts +9 -0
- package/dist/printer/utils/escpos.d.ts +127 -0
- package/dist/spreadsheet/ArchbaseSpreadsheetImport.d.ts +4 -0
- package/dist/spreadsheet/ArchbaseSpreadsheetImport.types.d.ts +65 -0
- package/dist/spreadsheet/index.d.ts +2 -0
- package/dist/theme-editor/ArchbaseThemeEditor.d.ts +17 -0
- package/dist/theme-editor/ArchbaseThemeEditor.types.d.ts +187 -0
- package/dist/theme-editor/index.d.ts +9 -0
- package/dist/theme-editor/utils/themeExport.d.ts +198 -0
- package/dist/themes/ArchbaseThemeEditor.d.ts +49 -0
- package/dist/types/index.d.ts +106 -0
- package/dist/video/ArchbaseVideoPlayer.d.ts +18 -0
- package/dist/video/ArchbaseVideoPlayer.types.d.ts +200 -0
- package/dist/video/hooks/useVideoPlayer.d.ts +58 -0
- package/dist/video/index.d.ts +10 -0
- package/dist/viewers/ArchbasePDFViewer.annotations.d.ts +20 -0
- package/dist/viewers/ArchbasePDFViewer.d.ts +2 -0
- package/dist/viewers/ArchbasePDFViewer.toolbar.d.ts +20 -0
- package/dist/viewers/ArchbasePDFViewer.types.d.ts +68 -0
- package/dist/viewers/file-preview/ArchbaseFilePreviewer.d.ts +19 -0
- package/dist/viewers/file-preview/ArchbaseFilePreviewer.types.d.ts +153 -0
- package/dist/viewers/file-preview/index.d.ts +13 -0
- package/dist/viewers/file-preview/utils/fileTypeDetector.d.ts +33 -0
- package/dist/viewers/index.d.ts +5 -0
- package/package.json +154 -0
- package/src/admin/types.ts +73 -0
- package/src/arco.css +6 -0
- package/src/buttons/ActionsDemo.tsx +107 -0
- package/src/buttons/ArchbaseActionButtons.d.ts.map +1 -0
- package/src/buttons/ArchbaseActionButtons.tsx +387 -0
- package/src/buttons/index.d.ts.map +1 -0
- package/src/buttons/index.ts +7 -0
- package/src/charts/ArchbaseTimeline.d.ts.map +1 -0
- package/src/charts/ArchbaseTimeline.tsx +332 -0
- package/src/charts/index.d.ts.map +1 -0
- package/src/charts/index.ts +5 -0
- package/src/charts/vis-timeline/ArchbaseVisTimeline.tsx +401 -0
- package/src/charts/vis-timeline/ArchbaseVisTimeline.types.ts +294 -0
- package/src/charts/vis-timeline/index.ts +36 -0
- package/src/charts/vis-timeline/utils/timelineOptions.ts +213 -0
- package/src/datagrid/components/index.d.ts.map +1 -0
- package/src/datagrid/components/index.tsx +14 -0
- package/src/datagrid/components/pagination/grid-pagination.d.ts.map +1 -0
- package/src/datagrid/components/pagination/grid-pagination.tsx +150 -0
- package/src/datagrid/components/render/archbase-data-grid-item-renderer.tsx +26 -0
- package/src/datagrid/components/toolbar/global-search-input.d.ts.map +1 -0
- package/src/datagrid/components/toolbar/global-search-input.tsx +118 -0
- package/src/datagrid/components/toolbar/grid-toolbar.d.ts.map +1 -0
- package/src/datagrid/components/toolbar/grid-toolbar.tsx +106 -0
- package/src/datagrid/hooks/index.d.ts.map +1 -0
- package/src/datagrid/hooks/index.tsx +18 -0
- package/src/datagrid/hooks/use-grid-data-stable-rendering.d.ts.map +1 -0
- package/src/datagrid/hooks/use-grid-data-stable-rendering.ts +168 -0
- package/src/datagrid/hooks/use-grid-data.d.ts.map +1 -0
- package/src/datagrid/hooks/use-grid-data.tsx +598 -0
- package/src/datagrid/hooks/use-grid-details-panel.d.ts.map +1 -0
- package/src/datagrid/hooks/use-grid-details-panel.ts +316 -0
- package/src/datagrid/index.d.ts.map +1 -0
- package/src/datagrid/index.tsx +12 -0
- package/src/datagrid/main/archbase-data-grid-column.d.ts.map +1 -0
- package/src/datagrid/main/archbase-data-grid-column.ts +46 -0
- package/src/datagrid/main/archbase-data-grid-formatters.d.ts.map +1 -0
- package/src/datagrid/main/archbase-data-grid-formatters.tsx +384 -0
- package/src/datagrid/main/archbase-data-grid-pagination.d.ts.map +1 -0
- package/src/datagrid/main/archbase-data-grid-pagination.tsx +63 -0
- package/src/datagrid/main/archbase-data-grid-toolbar.d.ts.map +1 -0
- package/src/datagrid/main/archbase-data-grid-toolbar.tsx +160 -0
- package/src/datagrid/main/archbase-data-grid-types.d.ts.map +1 -0
- package/src/datagrid/main/archbase-data-grid-types.tsx +327 -0
- package/src/datagrid/main/archbase-data-grid-utils.d.ts.map +1 -0
- package/src/datagrid/main/archbase-data-grid-utils.ts +494 -0
- package/src/datagrid/main/archbase-data-grid.d.ts.map +1 -0
- package/src/datagrid/main/archbase-data-grid.tsx +1462 -0
- package/src/datagrid/main/archbase-detail-panel-component.d.ts.map +1 -0
- package/src/datagrid/main/archbase-detail-panel-component.tsx +186 -0
- package/src/datagrid/main/archbase-expand-button.d.ts.map +1 -0
- package/src/datagrid/main/archbase-expand-button.tsx +83 -0
- package/src/datagrid/main/archbase-grid-popover.d.ts.map +1 -0
- package/src/datagrid/main/archbase-grid-popover.tsx +188 -0
- package/src/datagrid/main/grid-row-actions.d.ts.map +1 -0
- package/src/datagrid/main/grid-row-actions.tsx +97 -0
- package/src/datagrid/main/index.d.ts.map +1 -0
- package/src/datagrid/main/index.tsx +75 -0
- package/src/datagrid/modals/export-data.d.ts.map +1 -0
- package/src/datagrid/modals/export-data.tsx +183 -0
- package/src/datagrid/modals/export-modal.d.ts.map +1 -0
- package/src/datagrid/modals/export-modal.tsx +168 -0
- package/src/datagrid/modals/index.d.ts.map +1 -0
- package/src/datagrid/modals/index.tsx +6 -0
- package/src/datagrid/modals/print-data.d.ts.map +1 -0
- package/src/datagrid/modals/print-data.tsx +267 -0
- package/src/datagrid/modals/print-modal.d.ts.map +1 -0
- package/src/datagrid/modals/print-modal.tsx +200 -0
- package/src/datagrid/types/grid-props.d.ts.map +1 -0
- package/src/datagrid/types/grid-props.tsx +53 -0
- package/src/datagrid/types/index.d.ts.map +1 -0
- package/src/datagrid/types/index.tsx +1 -0
- package/src/datagrid/utils/formatter.d.ts.map +1 -0
- package/src/datagrid/utils/formatter.tsx +308 -0
- package/src/datagrid/utils/index.d.ts.map +1 -0
- package/src/datagrid/utils/index.tsx +1 -0
- package/src/debug/index.d.ts.map +1 -0
- package/src/debug/index.ts +4 -0
- package/src/debug/jsonpathpicker/ArchbaseJsonPathPicker.css +46 -0
- package/src/debug/jsonpathpicker/ArchbaseJsonPathPicker.d.ts.map +1 -0
- package/src/debug/jsonpathpicker/ArchbaseJsonPathPicker.tsx +341 -0
- package/src/debug/jsonpathpicker/index.d.ts.map +1 -0
- package/src/debug/jsonpathpicker/index.ts +1 -0
- package/src/debug/jsonview/.eslintrc +5 -0
- package/src/debug/jsonview/ArchbaseJsonViewDataRenderer.d.ts.map +1 -0
- package/src/debug/jsonview/ArchbaseJsonViewDataRenderer.tsx +206 -0
- package/src/debug/jsonview/ArchbaseJsonViewDataTypeDetection.d.ts.map +1 -0
- package/src/debug/jsonview/ArchbaseJsonViewDataTypeDetection.ts +31 -0
- package/src/debug/jsonview/index.d.ts.map +1 -0
- package/src/debug/jsonview/index.tsx +60 -0
- package/src/debug/jsonview/styles.module.css +118 -0
- package/src/debug/jsonview/styles.module.css.d.ts +4 -0
- package/src/debug/objectinspector/ArchbaseDebugInspector.d.ts.map +1 -0
- package/src/debug/objectinspector/ArchbaseDebugInspector.tsx +79 -0
- package/src/debug/objectinspector/ArchbaseFloatingWindow.css +70 -0
- package/src/debug/objectinspector/ArchbaseFloatingWindow.d.ts.map +1 -0
- package/src/debug/objectinspector/ArchbaseFloatingWindow.tsx +266 -0
- package/src/debug/objectinspector/ArchbaseObjectInspector.d.ts.map +1 -0
- package/src/debug/objectinspector/ArchbaseObjectInspector.tsx +21 -0
- package/src/debug/objectinspector/index.d.ts.map +1 -0
- package/src/debug/objectinspector/index.ts +3 -0
- package/src/display/index.d.ts.map +1 -0
- package/src/display/index.ts +5 -0
- package/src/editors/ArchbaseAsyncMultiSelect.d.ts.map +1 -0
- package/src/editors/ArchbaseAsyncMultiSelect.tsx +667 -0
- package/src/editors/ArchbaseAsyncSelect.context.d.ts.map +1 -0
- package/src/editors/ArchbaseAsyncSelect.context.ts +9 -0
- package/src/editors/ArchbaseAsyncSelect.d.ts.map +1 -0
- package/src/editors/ArchbaseAsyncSelect.tsx +581 -0
- package/src/editors/ArchbaseAvatarEdit.d.ts.map +1 -0
- package/src/editors/ArchbaseAvatarEdit.tsx +625 -0
- package/src/editors/ArchbaseCheckbox.d.ts.map +1 -0
- package/src/editors/ArchbaseCheckbox.tsx +250 -0
- package/src/editors/ArchbaseChip.d.ts.map +1 -0
- package/src/editors/ArchbaseChip.tsx +233 -0
- package/src/editors/ArchbaseChipGroup.d.ts.map +1 -0
- package/src/editors/ArchbaseChipGroup.tsx +282 -0
- package/src/editors/ArchbaseChipItem.d.ts.map +1 -0
- package/src/editors/ArchbaseChipItem.tsx +21 -0
- package/src/editors/ArchbaseColorPicker.d.ts.map +1 -0
- package/src/editors/ArchbaseColorPicker.tsx +7 -0
- package/src/editors/ArchbaseCountdownProgress.d.ts.map +1 -0
- package/src/editors/ArchbaseCountdownProgress.tsx +57 -0
- package/src/editors/ArchbaseCronExpressionEdit.d.ts.map +1 -0
- package/src/editors/ArchbaseCronExpressionEdit.tsx +86 -0
- package/src/editors/ArchbaseCronExpressionEditor.d.ts.map +1 -0
- package/src/editors/ArchbaseCronExpressionEditor.tsx +133 -0
- package/src/editors/ArchbaseDatePicker.tsx +3 -0
- package/src/editors/ArchbaseDatePickerEdit.d.ts.map +1 -0
- package/src/editors/ArchbaseDatePickerEdit.tsx +785 -0
- package/src/editors/ArchbaseDatePickerRange.d.ts.map +1 -0
- package/src/editors/ArchbaseDatePickerRange.tsx +142 -0
- package/src/editors/ArchbaseDateTimePickerEdit.d.ts.map +1 -0
- package/src/editors/ArchbaseDateTimePickerEdit.tsx +259 -0
- package/src/editors/ArchbaseDateTimePickerRange.d.ts.map +1 -0
- package/src/editors/ArchbaseDateTimePickerRange.tsx +220 -0
- package/src/editors/ArchbaseEdit.d.ts.map +1 -0
- package/src/editors/ArchbaseEdit.example.tsx +240 -0
- package/src/editors/ArchbaseEdit.tsx +325 -0
- package/src/editors/ArchbaseFileAttachment.d.ts.map +1 -0
- package/src/editors/ArchbaseFileAttachment.tsx +259 -0
- package/src/editors/ArchbaseImageEdit.d.ts.map +1 -0
- package/src/editors/ArchbaseImageEdit.tsx +255 -0
- package/src/editors/ArchbaseJsonEdit.d.ts.map +1 -0
- package/src/editors/ArchbaseJsonEdit.tsx +257 -0
- package/src/editors/ArchbaseKeyValueEditor.d.ts.map +1 -0
- package/src/editors/ArchbaseKeyValueEditor.tsx +180 -0
- package/src/editors/ArchbaseLookupEdit.d.ts.map +1 -0
- package/src/editors/ArchbaseLookupEdit.tsx +368 -0
- package/src/editors/ArchbaseLookupNumber.d.ts.map +1 -0
- package/src/editors/ArchbaseLookupNumber.tsx +390 -0
- package/src/editors/ArchbaseLookupSelect.d.ts.map +1 -0
- package/src/editors/ArchbaseLookupSelect.tsx +225 -0
- package/src/editors/ArchbaseMarkdownEdit.tsx +367 -0
- package/src/editors/ArchbaseMaskEdit.d.ts.map +1 -0
- package/src/editors/ArchbaseMaskEdit.tsx +346 -0
- package/src/editors/ArchbaseNumberEdit.d.ts.map +1 -0
- package/src/editors/ArchbaseNumberEdit.tsx +626 -0
- package/src/editors/ArchbaseNumberInput.tsx +3 -0
- package/src/editors/ArchbaseOperationHoursEditor.d.ts.map +1 -0
- package/src/editors/ArchbaseOperationHoursEditor.tsx +206 -0
- package/src/editors/ArchbasePasswordEdit.d.ts.map +1 -0
- package/src/editors/ArchbasePasswordEdit.tsx +265 -0
- package/src/editors/ArchbasePasswordInput.tsx +3 -0
- package/src/editors/ArchbaseRadio.tsx +3 -0
- package/src/editors/ArchbaseRadioGroup.d.ts.map +1 -0
- package/src/editors/ArchbaseRadioGroup.tsx +293 -0
- package/src/editors/ArchbaseRadioItem.d.ts.map +1 -0
- package/src/editors/ArchbaseRadioItem.tsx +14 -0
- package/src/editors/ArchbaseRating.d.ts.map +1 -0
- package/src/editors/ArchbaseRating.tsx +236 -0
- package/src/editors/ArchbaseRichTextEdit.d.ts.map +1 -0
- package/src/editors/ArchbaseRichTextEdit.tsx +435 -0
- package/src/editors/ArchbaseSelect.context.d.ts.map +1 -0
- package/src/editors/ArchbaseSelect.context.ts +9 -0
- package/src/editors/ArchbaseSelect.d.ts.map +1 -0
- package/src/editors/ArchbaseSelect.tsx +550 -0
- package/src/editors/ArchbaseSelectItem.d.ts.map +1 -0
- package/src/editors/ArchbaseSelectItem.tsx +18 -0
- package/src/editors/ArchbaseSwitch.d.ts.map +1 -0
- package/src/editors/ArchbaseSwitch.tsx +266 -0
- package/src/editors/ArchbaseTextArea.d.ts.map +1 -0
- package/src/editors/ArchbaseTextArea.tsx +263 -0
- package/src/editors/ArchbaseTimeEdit.d.ts.map +1 -0
- package/src/editors/ArchbaseTimeEdit.tsx +319 -0
- package/src/editors/ArchbaseTimeRangeSelector.d.ts.map +1 -0
- package/src/editors/ArchbaseTimeRangeSelector.tsx +397 -0
- package/src/editors/ArchbaseTreeSelect.d.ts.map +1 -0
- package/src/editors/ArchbaseTreeSelect.tsx +434 -0
- package/src/editors/index.d.ts.map +1 -0
- package/src/editors/index.tsx +121 -0
- package/src/editors/intro.mdx +4 -0
- package/src/feedback/index.d.ts.map +1 -0
- package/src/feedback/index.ts +5 -0
- package/src/filters/ArchbaseCompositeFilters.tsx +696 -0
- package/src/filters/ArchbaseCompositeFilters.types.ts +402 -0
- package/src/filters/ArchbaseCompositeFilters.utils.ts +378 -0
- package/src/filters/components/FilterPill.tsx +100 -0
- package/src/filters/hooks/index.ts +4 -0
- package/src/filters/hooks/useArchbaseFilterHistory.ts +111 -0
- package/src/filters/hooks/useArchbaseFilterPresets.ts +157 -0
- package/src/filters/hooks/useArchbaseFilters.ts +279 -0
- package/src/filters/hooks/useArchbaseQuickFilters.ts +80 -0
- package/src/filters/index.ts +55 -0
- package/src/forms/index.d.ts.map +1 -0
- package/src/forms/index.ts +4 -0
- package/src/hooks/index.d.ts.map +1 -0
- package/src/hooks/index.ts +5 -0
- package/src/hooks/useArchbaseContainerDimensions.d.ts.map +1 -0
- package/src/hooks/useArchbaseContainerDimensions.ts +28 -0
- package/src/hooks/useArchbaseElementSizeArea.d.ts.map +1 -0
- package/src/hooks/useArchbaseElementSizeArea.ts +39 -0
- package/src/hooks/useArchbaseListContext.d.ts.map +1 -0
- package/src/hooks/useArchbaseListContext.ts +10 -0
- package/src/hooks/useArchbaseNavigateParams.d.ts.map +1 -0
- package/src/hooks/useArchbaseNavigateParams.ts +17 -0
- package/src/hooks/useArchbaseVisible.d.ts.map +1 -0
- package/src/hooks/useArchbaseVisible.ts +35 -0
- package/src/image/.placeholder +0 -0
- package/src/image/ArchbaseImage.d.ts.map +1 -0
- package/src/image/ArchbaseImage.tsx +56 -0
- package/src/image/ArchbaseMicrosoftAvatar.d.ts.map +1 -0
- package/src/image/ArchbaseMicrosoftAvatar.tsx +50 -0
- package/src/image/editor/components/BasicFilters/BasicFilter.d.ts.map +1 -0
- package/src/image/editor/components/BasicFilters/BasicFilter.tsx +179 -0
- package/src/image/editor/components/CropprWrapper/ArchbaseCropper.scss +73 -0
- package/src/image/editor/components/CropprWrapper/ArchbaseCropperWrapper.d.ts.map +1 -0
- package/src/image/editor/components/CropprWrapper/ArchbaseCropperWrapper.tsx +50 -0
- package/src/image/editor/components/EditImage/ArchbaseEditImage.d.ts.map +1 -0
- package/src/image/editor/components/EditImage/ArchbaseEditImage.scss +221 -0
- package/src/image/editor/components/EditImage/ArchbaseEditImage.tsx +469 -0
- package/src/image/editor/components/Input/Input.d.ts.map +1 -0
- package/src/image/editor/components/Input/Input.tsx +70 -0
- package/src/image/editor/components/Tab/Tab.d.ts.map +1 -0
- package/src/image/editor/components/Tab/Tab.tsx +150 -0
- package/src/image/editor/components/Tab/TabsStyles.scss +72 -0
- package/src/image/editor/functions/croppr/box.d.ts.map +1 -0
- package/src/image/editor/functions/croppr/box.ts +272 -0
- package/src/image/editor/functions/croppr/core.d.ts.map +1 -0
- package/src/image/editor/functions/croppr/core.ts +820 -0
- package/src/image/editor/functions/croppr/croppr.d.ts.map +1 -0
- package/src/image/editor/functions/croppr/croppr.ts +136 -0
- package/src/image/editor/functions/croppr/handle.d.ts.map +1 -0
- package/src/image/editor/functions/croppr/handle.ts +75 -0
- package/src/image/editor/functions/croppr/index.d.ts.map +1 -0
- package/src/image/editor/functions/croppr/index.ts +4 -0
- package/src/image/editor/functions/croppr/touch.d.ts.map +1 -0
- package/src/image/editor/functions/croppr/touch.ts +41 -0
- package/src/image/editor/functions/image-processing.d.ts.map +1 -0
- package/src/image/editor/functions/image-processing.ts +202 -0
- package/src/image/editor/image_editor_styles.scss +284 -0
- package/src/image/editor/index.d.ts.map +1 -0
- package/src/image/editor/index.tsx +437 -0
- package/src/image/editor/models/index.models.d.ts.map +1 -0
- package/src/image/editor/models/index.models.ts +48 -0
- package/src/image/index.d.ts.map +1 -0
- package/src/image/index.ts +7 -0
- package/src/image/intro.mdx +4 -0
- package/src/image/languages.d.ts.map +1 -0
- package/src/image/languages.ts +302 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.ts +50 -0
- package/src/jsonschema/ArchbaseJsonSchemaEditor.types.d.ts.map +1 -0
- package/src/jsonschema/ArchbaseJsonSchemaEditor.types.ts +171 -0
- package/src/jsonschema/JsonSchemaEditor/ArchbaseJsonSchemaEditor.context.d.ts.map +1 -0
- package/src/jsonschema/JsonSchemaEditor/ArchbaseJsonSchemaEditor.context.tsx +8 -0
- package/src/jsonschema/JsonSchemaEditor/ArchbaseJsonSchemaEditor.d.ts.map +1 -0
- package/src/jsonschema/JsonSchemaEditor/ArchbaseJsonSchemaEditor.tsx +99 -0
- package/src/jsonschema/JsonSchemaEditor/JsonSchemaEditor.scss +19 -0
- package/src/jsonschema/JsonSchemaEditor/advanced-boolean/index.d.ts.map +1 -0
- package/src/jsonschema/JsonSchemaEditor/advanced-boolean/index.tsx +33 -0
- package/src/jsonschema/JsonSchemaEditor/advanced-number/index.d.ts.map +1 -0
- package/src/jsonschema/JsonSchemaEditor/advanced-number/index.tsx +119 -0
- package/src/jsonschema/JsonSchemaEditor/advanced-string/index.d.ts.map +1 -0
- package/src/jsonschema/JsonSchemaEditor/advanced-string/index.tsx +146 -0
- package/src/jsonschema/JsonSchemaEditor/drop-plus/index.d.ts.map +1 -0
- package/src/jsonschema/JsonSchemaEditor/drop-plus/index.tsx +80 -0
- package/src/jsonschema/JsonSchemaEditor/index.ts +2 -0
- package/src/jsonschema/JsonSchemaEditor/schema-advanced/index.d.ts.map +1 -0
- package/src/jsonschema/JsonSchemaEditor/schema-advanced/index.tsx +32 -0
- package/src/jsonschema/JsonSchemaEditor/schema-array/index.d.ts.map +1 -0
- package/src/jsonschema/JsonSchemaEditor/schema-array/index.tsx +164 -0
- package/src/jsonschema/JsonSchemaEditor/schema-item/index.d.ts.map +1 -0
- package/src/jsonschema/JsonSchemaEditor/schema-item/index.tsx +213 -0
- package/src/jsonschema/JsonSchemaEditor/schema-object/index.d.ts.map +1 -0
- package/src/jsonschema/JsonSchemaEditor/schema-object/index.tsx +68 -0
- package/src/jsonschema/JsonSchemaEditor/schema-root/index.d.ts.map +1 -0
- package/src/jsonschema/JsonSchemaEditor/schema-root/index.tsx +103 -0
- package/src/jsonschema/JsonSchemaEditor/utils.d.ts.map +1 -0
- package/src/jsonschema/JsonSchemaEditor/utils.ts +195 -0
- package/src/jsonschema/JsonSchemaEditor/whoops.tsx +79 -0
- package/src/jsonschema/index.d.ts.map +1 -0
- package/src/jsonschema/index.ts +2 -0
- package/src/list/ArchbaseList.context.d.ts.map +1 -0
- package/src/list/ArchbaseList.context.ts +28 -0
- package/src/list/ArchbaseList.d.ts.map +1 -0
- package/src/list/ArchbaseList.tsx +533 -0
- package/src/list/ArchbaseListItem.d.ts.map +1 -0
- package/src/list/ArchbaseListItem.tsx +161 -0
- package/src/list/index.d.ts.map +1 -0
- package/src/list/index.ts +9 -0
- package/src/list/treeview/ArchbaseTreeView.d.ts.map +1 -0
- package/src/list/treeview/ArchbaseTreeView.module.css +66 -0
- package/src/list/treeview/ArchbaseTreeView.tsx +657 -0
- package/src/list/treeview/ArchbaseTreeView.types.d.ts.map +1 -0
- package/src/list/treeview/ArchbaseTreeView.types.tsx +42 -0
- package/src/list/treeview/ArchbaseTreeViewItem.d.ts.map +1 -0
- package/src/list/treeview/ArchbaseTreeViewItem.tsx +210 -0
- package/src/list/treeview/index.d.ts.map +1 -0
- package/src/list/treeview/index.ts +5 -0
- package/src/list-view/ArchbaseListViewTable.tsx +150 -0
- package/src/list-view/index.ts +2 -0
- package/src/markdown/ArchbaseMarkdown.tsx +463 -0
- package/src/markdown/ArchbaseMarkdown.types.ts +213 -0
- package/src/markdown/components/CodeBlock.tsx +197 -0
- package/src/markdown/components/LinkRenderer.tsx +98 -0
- package/src/markdown/index.ts +29 -0
- package/src/masonry/ArchbaseMasonry.context.d.ts.map +1 -0
- package/src/masonry/ArchbaseMasonry.context.ts +24 -0
- package/src/masonry/ArchbaseMasonry.d.ts.map +1 -0
- package/src/masonry/ArchbaseMasonry.tsx +156 -0
- package/src/masonry/index.d.ts.map +1 -0
- package/src/masonry/index.ts +5 -0
- package/src/navigation/index.d.ts.map +1 -0
- package/src/navigation/index.ts +4 -0
- package/src/notification/ArchbaseAlert.d.ts.map +1 -0
- package/src/notification/ArchbaseAlert.tsx +77 -0
- package/src/notification/ArchbaseDialog.d.ts.map +1 -0
- package/src/notification/ArchbaseDialog.tsx +212 -0
- package/src/notification/ArchbaseNotifications.d.ts.map +1 -0
- package/src/notification/ArchbaseNotifications.tsx +64 -0
- package/src/notification/index.d.ts.map +1 -0
- package/src/notification/index.ts +4 -0
- package/src/notification/intro.mdx +4 -0
- package/src/onboarding/ArchbaseOnboardingTour.tsx +147 -0
- package/src/onboarding/index.ts +2 -0
- package/src/printer/ArchbaseThermalPrinter.tsx +465 -0
- package/src/printer/ArchbaseThermalPrinter.types.ts +221 -0
- package/src/printer/index.ts +54 -0
- package/src/printer/utils/escpos.ts +531 -0
- package/src/spreadsheet/ArchbaseSpreadsheetImport.tsx +223 -0
- package/src/spreadsheet/ArchbaseSpreadsheetImport.types.ts +66 -0
- package/src/spreadsheet/index.ts +10 -0
- package/src/theme-editor/ArchbaseThemeEditor.tsx +728 -0
- package/src/theme-editor/ArchbaseThemeEditor.types.ts +207 -0
- package/src/theme-editor/index.ts +45 -0
- package/src/theme-editor/utils/themeExport.ts +351 -0
- package/src/themes/.placeholder +0 -0
- package/src/themes/ArchbaseThemeEditor.d.ts.map +1 -0
- package/src/themes/ArchbaseThemeEditor.tsx +110 -0
- package/src/treeviews.scss +80 -0
- package/src/types/index.d.ts.map +1 -0
- package/src/types/index.ts +115 -0
- package/src/video/ArchbaseVideoPlayer.tsx +706 -0
- package/src/video/ArchbaseVideoPlayer.types.ts +221 -0
- package/src/video/hooks/useVideoPlayer.ts +362 -0
- package/src/video/index.ts +28 -0
- package/src/viewers/ArchbasePDFViewer.annotations.tsx +423 -0
- package/src/viewers/ArchbasePDFViewer.toolbar.tsx +218 -0
- package/src/viewers/ArchbasePDFViewer.tsx +317 -0
- package/src/viewers/ArchbasePDFViewer.types.ts +85 -0
- package/src/viewers/file-preview/ArchbaseFilePreviewer.tsx +756 -0
- package/src/viewers/file-preview/ArchbaseFilePreviewer.types.ts +186 -0
- package/src/viewers/file-preview/index.ts +43 -0
- package/src/viewers/file-preview/utils/fileTypeDetector.ts +317 -0
- package/src/viewers/index.ts +17 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ArchbaseJsonSchemaEditor — editor visual de JSON Schema (objetos/arrays/avançado).
|
|
3
|
+
* @status experimental
|
|
4
|
+
*/
|
|
5
|
+
import { setNestedObjectValue, SetNestedObjectValueOperation } from '@archbase/core';
|
|
6
|
+
import { Flex } from '@mantine/core';
|
|
7
|
+
import { useUncontrolled } from '@mantine/hooks';
|
|
8
|
+
import { produce } from 'immer';
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { JSONSchema7, Schema2 } from '../ArchbaseJsonSchemaEditor.types';
|
|
11
|
+
import { ArchbaseJsonSchemaEditorProvider } from './ArchbaseJsonSchemaEditor.context';
|
|
12
|
+
import { SchemaArray } from './schema-array';
|
|
13
|
+
import { SchemaObject } from './schema-object';
|
|
14
|
+
import { SchemaRoot } from './schema-root';
|
|
15
|
+
import { isValidSchemaValidator } from './utils';
|
|
16
|
+
import { useArchbaseTranslation } from '@archbase/core';
|
|
17
|
+
|
|
18
|
+
export * from '../ArchbaseJsonSchemaEditor.types';
|
|
19
|
+
|
|
20
|
+
export interface ArchbaseJsonSchemaEditorProps {
|
|
21
|
+
rootSchema?: JSONSchema7 | undefined;
|
|
22
|
+
defaultRootSchema?: JSONSchema7 | undefined;
|
|
23
|
+
onRootSchemaChange?: (schema: JSONSchema7, isValid: boolean) => void;
|
|
24
|
+
readOnly?: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const initialSchema: JSONSchema7 = {
|
|
28
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
29
|
+
type: 'object',
|
|
30
|
+
title: 'title',
|
|
31
|
+
description: '',
|
|
32
|
+
properties: {},
|
|
33
|
+
required: [],
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const ArchbaseJsonSchemaEditor = ({
|
|
37
|
+
rootSchema,
|
|
38
|
+
defaultRootSchema,
|
|
39
|
+
onRootSchemaChange,
|
|
40
|
+
readOnly = false,
|
|
41
|
+
}: ArchbaseJsonSchemaEditorProps) => {
|
|
42
|
+
const [internalRootSchema, setInternalRootSchema] = useUncontrolled({
|
|
43
|
+
value: {
|
|
44
|
+
jsonSchema: rootSchema ?? initialSchema,
|
|
45
|
+
isReadOnly: readOnly,
|
|
46
|
+
fieldId: 0,
|
|
47
|
+
},
|
|
48
|
+
defaultValue: {
|
|
49
|
+
jsonSchema: defaultRootSchema ?? initialSchema,
|
|
50
|
+
isReadOnly: readOnly,
|
|
51
|
+
fieldId: 0,
|
|
52
|
+
},
|
|
53
|
+
finalValue: initialSchema as Schema2,
|
|
54
|
+
onChange: (value) => onRootSchemaChange(value.jsonSchema, isValidSchemaValidator(value.jsonSchema)),
|
|
55
|
+
});
|
|
56
|
+
const { ready } = useArchbaseTranslation();
|
|
57
|
+
|
|
58
|
+
const handleChange = (path: string, value: string, operation: SetNestedObjectValueOperation) => {
|
|
59
|
+
const newState = produce(internalRootSchema, (draft: any) => {
|
|
60
|
+
setNestedObjectValue(draft, path, value, operation);
|
|
61
|
+
});
|
|
62
|
+
if (rootSchema === undefined) {
|
|
63
|
+
setInternalRootSchema(newState);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (onRootSchemaChange) {
|
|
67
|
+
onRootSchemaChange(newState.jsonSchema, isValidSchemaValidator(internalRootSchema.jsonSchema));
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
if (ready) {
|
|
71
|
+
return (
|
|
72
|
+
<ArchbaseJsonSchemaEditorProvider value={{ handleChange }}>
|
|
73
|
+
<Flex m={2} direction="column">
|
|
74
|
+
<SchemaRoot
|
|
75
|
+
path="jsonSchema"
|
|
76
|
+
jsonSchema={internalRootSchema.jsonSchema}
|
|
77
|
+
isReadOnly={internalRootSchema.isReadOnly}
|
|
78
|
+
/>
|
|
79
|
+
|
|
80
|
+
{internalRootSchema?.jsonSchema?.type === 'object' && (
|
|
81
|
+
<SchemaObject
|
|
82
|
+
path="jsonSchema"
|
|
83
|
+
jsonSchema={internalRootSchema.jsonSchema}
|
|
84
|
+
isReadOnly={internalRootSchema.isReadOnly}
|
|
85
|
+
/>
|
|
86
|
+
)}
|
|
87
|
+
|
|
88
|
+
{internalRootSchema?.jsonSchema?.type === 'array' && (
|
|
89
|
+
<SchemaArray
|
|
90
|
+
path="jsonSchema"
|
|
91
|
+
jsonSchema={internalRootSchema.jsonSchema}
|
|
92
|
+
isReadOnly={internalRootSchema.isReadOnly}
|
|
93
|
+
/>
|
|
94
|
+
)}
|
|
95
|
+
</Flex>
|
|
96
|
+
</ArchbaseJsonSchemaEditorProvider>
|
|
97
|
+
);}
|
|
98
|
+
return undefined;
|
|
99
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@import "../variables.scss";
|
|
2
|
+
@import "../typography.scss";
|
|
3
|
+
|
|
4
|
+
.test-component {
|
|
5
|
+
background-color: $harvey-white;
|
|
6
|
+
border: 1px solid $harvey-black;
|
|
7
|
+
padding: 16px;
|
|
8
|
+
width: 360px;
|
|
9
|
+
text-align: center;
|
|
10
|
+
|
|
11
|
+
.heading {
|
|
12
|
+
@include heading;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&.test-component-secondary {
|
|
16
|
+
background-color: $harvey-black;
|
|
17
|
+
color: $harvey-white;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAG9E,eAAO,MAAM,eAAe,oBAGzB,sBAAsB,4CAsBxB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Flex, Select, Stack } from '@mantine/core';
|
|
2
|
+
import { useArchbaseTranslation } from '@archbase/core';
|
|
3
|
+
import React, { useContext } from 'react';
|
|
4
|
+
import { AdvancedItemStateProps } from '../../ArchbaseJsonSchemaEditor.types';
|
|
5
|
+
import { ArchbaseJsonSchemaEditorContext } from '../ArchbaseJsonSchemaEditor.context';
|
|
6
|
+
|
|
7
|
+
export const AdvancedBoolean = ({
|
|
8
|
+
path,
|
|
9
|
+
item,
|
|
10
|
+
}: AdvancedItemStateProps) => {
|
|
11
|
+
const { handleChange } = useContext(ArchbaseJsonSchemaEditorContext);
|
|
12
|
+
const { t } = useArchbaseTranslation();
|
|
13
|
+
return (
|
|
14
|
+
<Flex direction="column" w="100%" wrap="nowrap">
|
|
15
|
+
<Stack align="stretch" justify="center" m={1}>
|
|
16
|
+
<Select
|
|
17
|
+
label={`${t('archbase:Default value')}`}
|
|
18
|
+
value={(item.default as string) ?? ''}
|
|
19
|
+
size="sm"
|
|
20
|
+
m={2}
|
|
21
|
+
placeholder={`${t('archbase:Choose data type')}`}
|
|
22
|
+
onChange={(value: string) => {
|
|
23
|
+
handleChange(`${path}.default`, value, 'ASSIGN_VALUE');
|
|
24
|
+
}}
|
|
25
|
+
data={[
|
|
26
|
+
{ value: 'true', label: `${t('archbase:true')}` },
|
|
27
|
+
{ value: 'false', label: `${t('archbase:false')}` },
|
|
28
|
+
]}
|
|
29
|
+
/>
|
|
30
|
+
</Stack>
|
|
31
|
+
</Flex>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAI9E,eAAO,MAAM,cAAc,oBAGxB,sBAAsB,4CA2GxB,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Checkbox, Flex, Input, NumberInput, Stack, Text, Textarea } from '@mantine/core';
|
|
2
|
+
import { useArchbaseTranslation } from '@archbase/core';
|
|
3
|
+
import React, { useContext, useState } from 'react';
|
|
4
|
+
import { AdvancedItemStateProps } from '../../ArchbaseJsonSchemaEditor.types';
|
|
5
|
+
import { ArchbaseJsonSchemaEditorContext } from '../ArchbaseJsonSchemaEditor.context';
|
|
6
|
+
import { isValidEnum } from '../utils';
|
|
7
|
+
|
|
8
|
+
export const AdvancedNumber = ({
|
|
9
|
+
path,
|
|
10
|
+
item,
|
|
11
|
+
}: AdvancedItemStateProps) => {
|
|
12
|
+
const { handleChange } = useContext(ArchbaseJsonSchemaEditorContext);
|
|
13
|
+
const { t } = useArchbaseTranslation();
|
|
14
|
+
const [error, setError] = useState<string | undefined>();
|
|
15
|
+
|
|
16
|
+
const changeEnumOtherValue = (value: string): string[] | null => {
|
|
17
|
+
const array = value.split('\n');
|
|
18
|
+
if (array.length === 0 || (array.length === 1 && !array[0])) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return array;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const isEnumChecked = item.enum !== undefined;
|
|
26
|
+
const enumData = item.enum ? (item.enum as string[]) : [];
|
|
27
|
+
const enumValue = enumData?.join('\n');
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<Flex direction="column" w="100%" wrap="nowrap">
|
|
31
|
+
<Stack align="stretch" justify="center" m={1}>
|
|
32
|
+
<NumberInput
|
|
33
|
+
label={`${t('archbase:Default value')}`}
|
|
34
|
+
size="sm"
|
|
35
|
+
defaultValue={item.default !== undefined ? Number(item.default) : ''}
|
|
36
|
+
value={item.default !== undefined ? Number(item.default) : ''}
|
|
37
|
+
placeholder={`${t('archbase:Default value')}`}
|
|
38
|
+
onChange={(value: number | string) => {
|
|
39
|
+
if (value !== '') {
|
|
40
|
+
handleChange(`${path}.default`, Number(value), 'ASSIGN_VALUE');
|
|
41
|
+
} else {
|
|
42
|
+
handleChange(`${path}.default`, null, 'REMOVE');
|
|
43
|
+
}
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
</Stack>
|
|
47
|
+
|
|
48
|
+
<Stack align="stretch" justify="center" m={1}>
|
|
49
|
+
<Flex justify="space-between">
|
|
50
|
+
<NumberInput
|
|
51
|
+
label={`${t('archbase:Min Value')}`}
|
|
52
|
+
size="sm"
|
|
53
|
+
defaultValue={item.minimum !== undefined ? Number(item.minimum) : ''}
|
|
54
|
+
value={item.minimum !== undefined ? Number(item.minimum) : ''}
|
|
55
|
+
onChange={(value: number | string) => {
|
|
56
|
+
if (value !== '') {
|
|
57
|
+
handleChange(`${path}.minimum`, Number(value), 'ASSIGN_VALUE');
|
|
58
|
+
} else {
|
|
59
|
+
handleChange(`${path}.minimum`, null, 'REMOVE');
|
|
60
|
+
}
|
|
61
|
+
}}
|
|
62
|
+
/>
|
|
63
|
+
<NumberInput
|
|
64
|
+
label={`${t('archbase:Max Value')}`}
|
|
65
|
+
size="sm"
|
|
66
|
+
defaultValue={item.maximum !== undefined ? Number(item.maximum) : ''}
|
|
67
|
+
value={item.maximum !== undefined ? Number(item.maximum) : ''}
|
|
68
|
+
onChange={(value: number | string) => {
|
|
69
|
+
if (value !== '') {
|
|
70
|
+
handleChange(`${path}.maximum`, Number(value), 'ASSIGN_VALUE');
|
|
71
|
+
} else {
|
|
72
|
+
handleChange(`${path}.maximum`, null, 'REMOVE');
|
|
73
|
+
}
|
|
74
|
+
}}
|
|
75
|
+
/>
|
|
76
|
+
</Flex>
|
|
77
|
+
</Stack>
|
|
78
|
+
<Stack align="stretch" justify="center" mt={8}>
|
|
79
|
+
<Flex align="center" justify="space-between">
|
|
80
|
+
<Text>{`${t('archbase:Enum')}`}</Text>
|
|
81
|
+
<Checkbox
|
|
82
|
+
mx={16}
|
|
83
|
+
checked={isEnumChecked}
|
|
84
|
+
onChange={(evt: React.ChangeEvent<HTMLInputElement>) => {
|
|
85
|
+
if (!evt.target.checked) {
|
|
86
|
+
handleChange(`${path}.enum`, null, 'REMOVE');
|
|
87
|
+
} else {
|
|
88
|
+
handleChange(`${path}.enum`, [''], 'ASSIGN_VALUE');
|
|
89
|
+
}
|
|
90
|
+
}}
|
|
91
|
+
/>
|
|
92
|
+
<Input.Wrapper w="100%" error={error}>
|
|
93
|
+
<Textarea
|
|
94
|
+
value={enumValue}
|
|
95
|
+
disabled={!isEnumChecked}
|
|
96
|
+
placeholder={`${t('archbase:ENUM Values - One Entry Per Line')}`}
|
|
97
|
+
datatype="number"
|
|
98
|
+
onChange={(evt: React.ChangeEvent<HTMLTextAreaElement>) => {
|
|
99
|
+
const re = /^[0-9\n]+$/;
|
|
100
|
+
if (evt.target.value === '' || re.test(evt.target.value)) {
|
|
101
|
+
const update = changeEnumOtherValue(evt.target.value);
|
|
102
|
+
if (isValidEnum(update)) {
|
|
103
|
+
if (update === null) {
|
|
104
|
+
handleChange(`${path}.enum`, null, 'REMOVE');
|
|
105
|
+
} else {
|
|
106
|
+
handleChange(`${path}.enum`, update as string[], 'ASSIGN_VALUE');
|
|
107
|
+
}
|
|
108
|
+
} else {
|
|
109
|
+
setError(`${t('archbase:Enum must not have duplicate values')}`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}}
|
|
113
|
+
/>
|
|
114
|
+
</Input.Wrapper>
|
|
115
|
+
</Flex>
|
|
116
|
+
</Stack>
|
|
117
|
+
</Flex>
|
|
118
|
+
);
|
|
119
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAI9E,eAAO,MAAM,cAAc,oBAGxB,sBAAsB,4CAsIxB,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { Checkbox, Flex, Input, NumberInput, Select, Stack, Text, Textarea, TextInput } from '@mantine/core';
|
|
2
|
+
import { useArchbaseTranslation } from '@archbase/core';
|
|
3
|
+
import React, { useContext, useState } from 'react';
|
|
4
|
+
import { AdvancedItemStateProps } from '../../ArchbaseJsonSchemaEditor.types';
|
|
5
|
+
import { ArchbaseJsonSchemaEditorContext } from '../ArchbaseJsonSchemaEditor.context';
|
|
6
|
+
import { isValidEnum, StringFormat } from '../utils';
|
|
7
|
+
|
|
8
|
+
export const AdvancedString = ({
|
|
9
|
+
path,
|
|
10
|
+
item,
|
|
11
|
+
}: AdvancedItemStateProps) => {
|
|
12
|
+
const { handleChange } = useContext(ArchbaseJsonSchemaEditorContext);
|
|
13
|
+
const [error, setError] = useState<string | undefined>();
|
|
14
|
+
const { t } = useArchbaseTranslation();
|
|
15
|
+
|
|
16
|
+
const changeEnumOtherValue = (value: string): string[] | null => {
|
|
17
|
+
if (!value) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
value = value.trim();
|
|
21
|
+
const array = value.split('\n');
|
|
22
|
+
if (array.length === 0 || (array.length === 1 && !array[0])) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return array;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const isEnumChecked = item.enum !== undefined;
|
|
30
|
+
const enumData = item.enum ? (item.enum as string[]) : [];
|
|
31
|
+
let enumValue = enumData?.join('\n');
|
|
32
|
+
if (enumValue.length > 0) {
|
|
33
|
+
enumValue = enumValue.concat('\n');
|
|
34
|
+
}
|
|
35
|
+
return (
|
|
36
|
+
<Flex direction="column" w="100%" wrap="nowrap">
|
|
37
|
+
<Stack align="stretch" justify="center" m={1}>
|
|
38
|
+
<TextInput
|
|
39
|
+
id="default"
|
|
40
|
+
label={`${t('archbase:Default value')}`}
|
|
41
|
+
placeholder={`${t('archbase:Default value')}`}
|
|
42
|
+
value={(item.default as string) ?? ''}
|
|
43
|
+
onChange={(event: React.ChangeEvent<HTMLInputElement>) => {
|
|
44
|
+
handleChange(`${path}.default`, event.target.value, 'ASSIGN_VALUE');
|
|
45
|
+
}}
|
|
46
|
+
/>
|
|
47
|
+
</Stack>
|
|
48
|
+
|
|
49
|
+
<Stack align="stretch" justify="center" m={1}>
|
|
50
|
+
<Flex justify="space-between">
|
|
51
|
+
<NumberInput
|
|
52
|
+
label={`${t('archbase:Min Length')}`}
|
|
53
|
+
size="sm"
|
|
54
|
+
defaultValue={item.minLength !== undefined ? Number(item.minLength) : ''}
|
|
55
|
+
value={item.minLength !== undefined ? Number(item.minLength) : ''}
|
|
56
|
+
onChange={(value: number | string) => {
|
|
57
|
+
if (value !== '') {
|
|
58
|
+
handleChange(`${path}.minLength`, Number(value), 'ASSIGN_VALUE');
|
|
59
|
+
} else {
|
|
60
|
+
handleChange(`${path}.minLength`, null, 'REMOVE');
|
|
61
|
+
}
|
|
62
|
+
}}
|
|
63
|
+
/>
|
|
64
|
+
<NumberInput
|
|
65
|
+
label={`${t('archbase:Max Length')}`}
|
|
66
|
+
size="sm"
|
|
67
|
+
defaultValue={item.maxLength !== undefined ? Number(item.maxLength) : ''}
|
|
68
|
+
value={item.maxLength !== undefined ? Number(item.maxLength) : ''}
|
|
69
|
+
onChange={(value: number | string) => {
|
|
70
|
+
if (value !== '') {
|
|
71
|
+
handleChange(`${path}.maxLength`, Number(value), 'ASSIGN_VALUE');
|
|
72
|
+
} else {
|
|
73
|
+
handleChange(`${path}.maxLength`, null, 'REMOVE');
|
|
74
|
+
}
|
|
75
|
+
}}
|
|
76
|
+
/>
|
|
77
|
+
</Flex>
|
|
78
|
+
</Stack>
|
|
79
|
+
<Stack align="stretch" justify="center" m={1}>
|
|
80
|
+
<TextInput
|
|
81
|
+
id="pattern"
|
|
82
|
+
label={`${t('archbase:Pattern')}`}
|
|
83
|
+
placeholder={`${t('archbase:Must be a valid regular expression')}`}
|
|
84
|
+
value={item.pattern ?? ''}
|
|
85
|
+
onChange={(event: React.ChangeEvent<HTMLInputElement>) => {
|
|
86
|
+
handleChange(`${path}.pattern`, event.target.value, 'ASSIGN_VALUE');
|
|
87
|
+
}}
|
|
88
|
+
/>
|
|
89
|
+
</Stack>
|
|
90
|
+
|
|
91
|
+
<Stack align="stretch" justify="center" mt={8}>
|
|
92
|
+
<Flex align="center" justify="space-between">
|
|
93
|
+
<Text>{`${t('archbase:Enum')}`}</Text>
|
|
94
|
+
<Checkbox
|
|
95
|
+
mx={16}
|
|
96
|
+
checked={isEnumChecked}
|
|
97
|
+
onChange={(event: React.ChangeEvent<HTMLInputElement>) => {
|
|
98
|
+
if (!event.target.checked) {
|
|
99
|
+
handleChange(`${path}.enum`, null, 'REMOVE');
|
|
100
|
+
} else {
|
|
101
|
+
handleChange(`${path}.enum`, [''], 'ASSIGN_VALUE');
|
|
102
|
+
}
|
|
103
|
+
}}
|
|
104
|
+
/>
|
|
105
|
+
<Input.Wrapper w="100%" error={error}>
|
|
106
|
+
<Textarea
|
|
107
|
+
value={enumValue || ''}
|
|
108
|
+
disabled={!isEnumChecked}
|
|
109
|
+
placeholder={`${t('archbase:ENUM Values - One Entry Per Line')}`}
|
|
110
|
+
onChange={(event: React.ChangeEvent<HTMLTextAreaElement>) => {
|
|
111
|
+
const update = changeEnumOtherValue(event.target.value);
|
|
112
|
+
if (isValidEnum(update)) {
|
|
113
|
+
setError('');
|
|
114
|
+
if (update === null) {
|
|
115
|
+
handleChange(`${path}.enum`, null, 'REMOVE');
|
|
116
|
+
} else {
|
|
117
|
+
handleChange(`${path}.enum`, update as string[], 'ASSIGN_VALUE');
|
|
118
|
+
}
|
|
119
|
+
} else {
|
|
120
|
+
setError(`${t('archbase:Enum must not have duplicate values')}`);
|
|
121
|
+
}
|
|
122
|
+
}}
|
|
123
|
+
/>
|
|
124
|
+
</Input.Wrapper>
|
|
125
|
+
</Flex>
|
|
126
|
+
</Stack>
|
|
127
|
+
<Stack align="stretch" justify="center" m={1}>
|
|
128
|
+
<Select
|
|
129
|
+
label={`${t('archbase:Format1')}`}
|
|
130
|
+
value={item.format ?? ''}
|
|
131
|
+
size="sm"
|
|
132
|
+
m={2}
|
|
133
|
+
placeholder={`${t('archbase:Choose data type')}`}
|
|
134
|
+
onChange={(value: string) => {
|
|
135
|
+
if (value === '') {
|
|
136
|
+
handleChange(`${path}.format`, null, 'REMOVE');
|
|
137
|
+
} else {
|
|
138
|
+
handleChange(`${path}.format`, value, 'ASSIGN_VALUE');
|
|
139
|
+
}
|
|
140
|
+
}}
|
|
141
|
+
data={StringFormat.map((item) => ({ label: item.name, value: item.name }))}
|
|
142
|
+
/>
|
|
143
|
+
</Stack>
|
|
144
|
+
</Flex>
|
|
145
|
+
);
|
|
146
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,SAAS,EAAkB,MAAM,eAAe,CAAC;AAI9E,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAKnE,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;CACpB;AACD,eAAO,MAAM,QAAQ,wDAMnB,aAAa,4CAwDd,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ActionIcon, Button, FlexProps, Popover, Stack } from '@mantine/core';
|
|
2
|
+
import { IconCirclePlus } from '@tabler/icons-react';
|
|
3
|
+
import { useArchbaseTranslation } from '@archbase/core';
|
|
4
|
+
import React, { useContext } from 'react';
|
|
5
|
+
import { JSONSchema7 } from '../../ArchbaseJsonSchemaEditor.types';
|
|
6
|
+
import { ArchbaseJsonSchemaEditorContext } from '../ArchbaseJsonSchemaEditor.context';
|
|
7
|
+
import { DataType, getDefaultSchema } from '../utils';
|
|
8
|
+
import { random } from '../utils';
|
|
9
|
+
|
|
10
|
+
export interface DropPlusProps extends FlexProps {
|
|
11
|
+
itemPath: string;
|
|
12
|
+
parentPath: string;
|
|
13
|
+
parent: JSONSchema7;
|
|
14
|
+
item: JSONSchema7;
|
|
15
|
+
isReadOnly: boolean;
|
|
16
|
+
}
|
|
17
|
+
export const DropPlus = ({
|
|
18
|
+
itemPath,
|
|
19
|
+
parentPath,
|
|
20
|
+
parent,
|
|
21
|
+
item,
|
|
22
|
+
isReadOnly,
|
|
23
|
+
}:DropPlusProps) => {
|
|
24
|
+
const { handleChange } = useContext(ArchbaseJsonSchemaEditorContext);
|
|
25
|
+
const { t } = useArchbaseTranslation();
|
|
26
|
+
if (isReadOnly) {
|
|
27
|
+
return <div />;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (!parent) {
|
|
31
|
+
return <></>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Popover position="bottom" withArrow shadow="md" withinPortal={true}>
|
|
36
|
+
<Popover.Target>
|
|
37
|
+
<ActionIcon
|
|
38
|
+
size="sm"
|
|
39
|
+
mt={2}
|
|
40
|
+
mb={2}
|
|
41
|
+
mr={2}
|
|
42
|
+
variant="subtle"
|
|
43
|
+
color="green"
|
|
44
|
+
aria-label={`${t('archbase:Add Child Node')}`}
|
|
45
|
+
>
|
|
46
|
+
<IconCirclePlus />
|
|
47
|
+
</ActionIcon>
|
|
48
|
+
</Popover.Target>
|
|
49
|
+
|
|
50
|
+
<Popover.Dropdown w="120px" color="white">
|
|
51
|
+
<Stack>
|
|
52
|
+
<Button
|
|
53
|
+
color="blue"
|
|
54
|
+
variant="outline"
|
|
55
|
+
size="xs"
|
|
56
|
+
onClick={() => {
|
|
57
|
+
const fieldName = `field_${random()}`;
|
|
58
|
+
handleChange(`${parentPath}.properties.${fieldName}`, getDefaultSchema(DataType.string), 'ASSIGN_VALUE');
|
|
59
|
+
}}
|
|
60
|
+
>
|
|
61
|
+
{`${t('archbase:Sibling Node')}`}
|
|
62
|
+
</Button>
|
|
63
|
+
<Button
|
|
64
|
+
size="xs"
|
|
65
|
+
color="orange"
|
|
66
|
+
variant="outline"
|
|
67
|
+
onClick={() => {
|
|
68
|
+
if (item.properties) {
|
|
69
|
+
const fieldName = `field_${random()}`;
|
|
70
|
+
handleChange(`${itemPath}.properties.${fieldName}`, getDefaultSchema(DataType.string), 'ASSIGN_VALUE');
|
|
71
|
+
}
|
|
72
|
+
}}
|
|
73
|
+
>
|
|
74
|
+
{`${t('archbase:Child Node')}`}
|
|
75
|
+
</Button>
|
|
76
|
+
</Stack>
|
|
77
|
+
</Popover.Dropdown>
|
|
78
|
+
</Popover>
|
|
79
|
+
);
|
|
80
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAKnE,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;CAClB;AAED,eAAO,MAAM,gBAAgB,oBAG1B,qBAAqB,4CAgBvB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Flex } from '@mantine/core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { JSONSchema7 } from '../../ArchbaseJsonSchemaEditor.types';
|
|
4
|
+
import { AdvancedBoolean } from '../advanced-boolean';
|
|
5
|
+
import { AdvancedNumber } from '../advanced-number';
|
|
6
|
+
import { AdvancedString } from '../advanced-string';
|
|
7
|
+
|
|
8
|
+
export interface AdvancedSettingsProps {
|
|
9
|
+
path: string;
|
|
10
|
+
item: JSONSchema7;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const AdvancedSettings = ({
|
|
14
|
+
path,
|
|
15
|
+
item,
|
|
16
|
+
}: AdvancedSettingsProps) => {
|
|
17
|
+
const getAdvancedView = (path: string): React.JSX.Element | undefined => {
|
|
18
|
+
switch (item.type) {
|
|
19
|
+
case 'string':
|
|
20
|
+
return <AdvancedString path={path} item={item} />;
|
|
21
|
+
case 'number':
|
|
22
|
+
case 'integer':
|
|
23
|
+
return <AdvancedNumber path={path} item={item} />;
|
|
24
|
+
case 'boolean':
|
|
25
|
+
return <AdvancedBoolean path={path} item={item} />;
|
|
26
|
+
default:
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return <Flex>{getAdvancedView(path)}</Flex>;
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsC,SAAS,EAAiC,MAAM,eAAe,CAAC;AAI7G,OAAO,EAAE,WAAW,EAAuB,MAAM,sCAAsC,CAAC;AAMxF,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,WAAW,CAAC;IACxB,UAAU,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,sCAIrB,gBAAgB,4CA6IlB,CAAC"}
|