@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,284 @@
|
|
|
1
|
+
.ArchbaseImagePickerEditor {
|
|
2
|
+
p {
|
|
3
|
+
margin: 0px !important;
|
|
4
|
+
padding: 0px !important;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.curtain {
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 0;
|
|
10
|
+
display: grid;
|
|
11
|
+
place-items: center;
|
|
12
|
+
left: 0;
|
|
13
|
+
height: 100%;
|
|
14
|
+
width: 100%;
|
|
15
|
+
background-color: transparent;
|
|
16
|
+
transition: background-color ease .5s;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
|
|
19
|
+
button {
|
|
20
|
+
background: transparent;
|
|
21
|
+
border: none;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
|
|
24
|
+
.material-icons {
|
|
25
|
+
font-size: 30px;
|
|
26
|
+
color: #fff;
|
|
27
|
+
opacity: 0;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
background-color: rgba(0, 0, 0, .4);
|
|
33
|
+
transition: background-color ease .5s;
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
button {
|
|
37
|
+
.material-icons {
|
|
38
|
+
color: #fff;
|
|
39
|
+
opacity: 0.9;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
.place-image {
|
|
48
|
+
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
display: flex;
|
|
52
|
+
place-content: flex-start;
|
|
53
|
+
align-items: flex-start;
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
.image-holder {
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
display: flex;
|
|
60
|
+
place-content: center;
|
|
61
|
+
align-items: center;
|
|
62
|
+
position: relative;
|
|
63
|
+
border-radius: 16px;
|
|
64
|
+
max-width: 100% !important;
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
border: 2px rgba(0, 0, 0, .30) solid;
|
|
67
|
+
background-color: #fcfcfc;
|
|
68
|
+
|
|
69
|
+
@media (max-width:599px) {
|
|
70
|
+
max-width: 100% !important;
|
|
71
|
+
max-height: 250px !important;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.image-upload-btn {
|
|
75
|
+
transition: all .5s ease;
|
|
76
|
+
position: relative;
|
|
77
|
+
opacity: 0.85;
|
|
78
|
+
width: 50px;
|
|
79
|
+
height: 50px;
|
|
80
|
+
color: #424242;
|
|
81
|
+
|
|
82
|
+
.material-icons {
|
|
83
|
+
font-size: 50px;
|
|
84
|
+
width: 50px;
|
|
85
|
+
height: 50px;
|
|
86
|
+
line-height: 50px;
|
|
87
|
+
color: #424242;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@media (max-width:599px) {
|
|
91
|
+
opacity: 1.0;
|
|
92
|
+
width: 30px;
|
|
93
|
+
height: 30px;
|
|
94
|
+
|
|
95
|
+
.material-icons {
|
|
96
|
+
font-size: 30px;
|
|
97
|
+
width: 30px;
|
|
98
|
+
height: 30px;
|
|
99
|
+
line-height: 30px;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:hover {
|
|
105
|
+
.image-upload-btn {
|
|
106
|
+
opacity: 1.0;
|
|
107
|
+
transition: all .5s ease;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.image-holder-loaded {
|
|
114
|
+
flex-direction: column;
|
|
115
|
+
box-sizing: border-box;
|
|
116
|
+
display: flex;
|
|
117
|
+
place-content: center;
|
|
118
|
+
align-items: center;
|
|
119
|
+
position: relative;
|
|
120
|
+
max-width: 100% !important;
|
|
121
|
+
border-radius: 4px;
|
|
122
|
+
box-sizing: border-box;
|
|
123
|
+
padding: 2px;
|
|
124
|
+
|
|
125
|
+
.image-caption {
|
|
126
|
+
position: absolute;
|
|
127
|
+
right: 0;
|
|
128
|
+
bottom: -22px;
|
|
129
|
+
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
img {
|
|
133
|
+
height: 100%;
|
|
134
|
+
max-height: 100%;
|
|
135
|
+
width: 100%;
|
|
136
|
+
max-width: 100%;
|
|
137
|
+
object-position: center;
|
|
138
|
+
background: black;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@media (max-width:599px) {
|
|
142
|
+
max-height: 195px !important;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.image-upload-btn {
|
|
146
|
+
transition: all .5s ease;
|
|
147
|
+
position: relative;
|
|
148
|
+
opacity: 0.85;
|
|
149
|
+
width: 50px;
|
|
150
|
+
height: 50px;
|
|
151
|
+
color: #424242;
|
|
152
|
+
|
|
153
|
+
.material-icons {
|
|
154
|
+
font-size: 50px;
|
|
155
|
+
width: 50px;
|
|
156
|
+
height: 50px;
|
|
157
|
+
line-height: 50px;
|
|
158
|
+
color: #424242;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@media (max-width:599px) {
|
|
162
|
+
opacity: 1.0;
|
|
163
|
+
width: 30px;
|
|
164
|
+
height: 30px;
|
|
165
|
+
|
|
166
|
+
.material-icons {
|
|
167
|
+
font-size: 30px;
|
|
168
|
+
width: 30px;
|
|
169
|
+
height: 30px;
|
|
170
|
+
line-height: 30px;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&:hover {
|
|
176
|
+
.image-upload-btn {
|
|
177
|
+
opacity: 1.0;
|
|
178
|
+
transition: all .5s ease;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.editing-bar-btn {
|
|
185
|
+
margin-top: 2px;
|
|
186
|
+
|
|
187
|
+
.material-icons-button {
|
|
188
|
+
height: 20px;
|
|
189
|
+
line-height: 20px;
|
|
190
|
+
width: 24px;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.material-icons {
|
|
194
|
+
line-height: 20px !important;
|
|
195
|
+
font-size: 20px !important;
|
|
196
|
+
width: 20px !important;
|
|
197
|
+
height: 20px !important;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
button {
|
|
202
|
+
margin: 4px 4px;
|
|
203
|
+
color: #424242;
|
|
204
|
+
transition: all .5s ease;
|
|
205
|
+
|
|
206
|
+
&:hover {
|
|
207
|
+
// transform: scale(1.25);
|
|
208
|
+
// margin: 4px 8px;
|
|
209
|
+
transition: all .25s ease-in;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
a {
|
|
215
|
+
margin: 4px 4px;
|
|
216
|
+
color: #424242;
|
|
217
|
+
transition: all .5s ease;
|
|
218
|
+
|
|
219
|
+
&:hover {
|
|
220
|
+
// transform: scale(1.25);
|
|
221
|
+
// margin: 4px 8px;
|
|
222
|
+
transition: all .25s ease-in;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@keyframes show {
|
|
231
|
+
0% {
|
|
232
|
+
top: -100vh;
|
|
233
|
+
opacity: 0;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
100% {
|
|
237
|
+
top: 0;
|
|
238
|
+
opacity: 1;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.btn {
|
|
243
|
+
padding: 4px 8px;
|
|
244
|
+
border-radius: 4px;
|
|
245
|
+
cursor: pointer;
|
|
246
|
+
|
|
247
|
+
.material-icons {
|
|
248
|
+
color: rgba(0, 0, 0, 0.82);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.icon-btn {
|
|
253
|
+
display: flex;
|
|
254
|
+
justify-content: center;
|
|
255
|
+
align-items: center;
|
|
256
|
+
border: none;
|
|
257
|
+
border-radius: 50%;
|
|
258
|
+
cursor: pointer;
|
|
259
|
+
|
|
260
|
+
:active {
|
|
261
|
+
transform: scale(.95);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
.caption {
|
|
268
|
+
font-size: 11px;
|
|
269
|
+
margin-top: 2px !important;
|
|
270
|
+
margin-bottom: 0px !important;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
button[disabled] {
|
|
274
|
+
filter: brightness(.5);
|
|
275
|
+
cursor: not-allowed;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
button:active {
|
|
279
|
+
transform: scale(.95);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,iBAAiB,EAA6C,MAAM,eAAe,CAAC;AAWzG,OAAO,KAA+D,MAAM,OAAO,CAAC;AAIpF,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAU,MAAM,uBAAuB,CAAC;AAExE,cAAc,uBAAuB,CAAC;AAwBtC,eAAO,MAAM,yBAAyB,sFAOlC;IACF,MAAM,EAAE,uBAAuB,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,OAAO,CAAC,EAAE,iBAAiB,CAAA;CAC3B,6CA2XD,CAAC"}
|
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2
|
+
import { ActionIcon, ActionIconVariant, rem, Text, Tooltip, useMantineColorScheme } from '@mantine/core';
|
|
3
|
+
import {
|
|
4
|
+
IconCloudDownload,
|
|
5
|
+
IconCloudUpload,
|
|
6
|
+
IconPhotoDown,
|
|
7
|
+
IconPhotoEdit,
|
|
8
|
+
IconPhotoUp,
|
|
9
|
+
IconPhotoX,
|
|
10
|
+
IconTrash,
|
|
11
|
+
} from '@tabler/icons-react';
|
|
12
|
+
import { useArchbaseTranslation } from '@archbase/core';
|
|
13
|
+
import React, { Fragment, memo, useEffect, useMemo, useRef, useState } from 'react';
|
|
14
|
+
import { useArchbaseTheme } from '@archbase/core';
|
|
15
|
+
import ArchbaseEditImage from './components/EditImage/ArchbaseEditImage';
|
|
16
|
+
import { convertImageUsingCanvas } from './functions/image-processing';
|
|
17
|
+
import './image_editor_styles.scss';
|
|
18
|
+
import { ArchbaseImagePickerConf, IState } from './models/index.models';
|
|
19
|
+
|
|
20
|
+
export * from './models/index.models';
|
|
21
|
+
|
|
22
|
+
const initialConfig: ArchbaseImagePickerConf = {
|
|
23
|
+
objectFit: 'cover',
|
|
24
|
+
hideDeleteBtn: false,
|
|
25
|
+
hideDownloadBtn: false,
|
|
26
|
+
hideEditBtn: false,
|
|
27
|
+
hideAddBtn: false,
|
|
28
|
+
compressInitial: null,
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const initialState: IState = {
|
|
32
|
+
maxHeight: 3000,
|
|
33
|
+
maxWidth: 3000,
|
|
34
|
+
cropHeight: 150,
|
|
35
|
+
cropWidth: 150,
|
|
36
|
+
maintainAspectRatio: true,
|
|
37
|
+
format: 'png',
|
|
38
|
+
arrayCopiedImages: [],
|
|
39
|
+
originImageSrc: '',
|
|
40
|
+
basicFilters: undefined,
|
|
41
|
+
quality: 100,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const ArchbaseImagePickerEditor = memo(
|
|
45
|
+
({
|
|
46
|
+
config = {},
|
|
47
|
+
imageSrcProp = '',
|
|
48
|
+
color = '#1e88e5',
|
|
49
|
+
imageChanged = () => {},
|
|
50
|
+
variant = 'transparent',
|
|
51
|
+
}: {
|
|
52
|
+
config: ArchbaseImagePickerConf;
|
|
53
|
+
imageSrcProp?: string;
|
|
54
|
+
color?: string;
|
|
55
|
+
imageChanged?: Function;
|
|
56
|
+
variant?: ActionIconVariant
|
|
57
|
+
}) => {
|
|
58
|
+
const theme = useArchbaseTheme();
|
|
59
|
+
const { colorScheme } = useMantineColorScheme();
|
|
60
|
+
const { t } = useArchbaseTranslation();
|
|
61
|
+
const [state, setState] = useState<IState>({
|
|
62
|
+
...initialState,
|
|
63
|
+
});
|
|
64
|
+
const [imageSrc, setImageSrc] = useState<string | null>('');
|
|
65
|
+
const [loadImage, setLoadImage] = useState<boolean>(false);
|
|
66
|
+
const [showEditPanel, setShowEditPanel] = useState<boolean>(false);
|
|
67
|
+
const [configuration, setConfiguration] = useState<ArchbaseImagePickerConf>(initialConfig);
|
|
68
|
+
const imagePicker = useRef<any>(null);
|
|
69
|
+
const fileType = useRef('');
|
|
70
|
+
const urlImage = useRef('');
|
|
71
|
+
const uuidFilePicker = Date.now().toString(20);
|
|
72
|
+
const imageName = useRef('download');
|
|
73
|
+
const mounted = useRef(false);
|
|
74
|
+
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
processConfig();
|
|
77
|
+
}, [config]);
|
|
78
|
+
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
loadImageFromProps();
|
|
81
|
+
}, [imageSrcProp]);
|
|
82
|
+
|
|
83
|
+
async function loadImageFromProps() {
|
|
84
|
+
if (imageSrcProp) {
|
|
85
|
+
const result = await parseToBase64(imageSrcProp);
|
|
86
|
+
const newState: IState = result.state;
|
|
87
|
+
newState.originImageSrc = imageSrcProp;
|
|
88
|
+
newState.arrayCopiedImages = [
|
|
89
|
+
{
|
|
90
|
+
lastImage: result.imageUri,
|
|
91
|
+
width: newState.maxWidth,
|
|
92
|
+
height: newState.maxHeight,
|
|
93
|
+
quality: newState.quality,
|
|
94
|
+
format: newState.format,
|
|
95
|
+
originImageSrc: imageSrcProp,
|
|
96
|
+
},
|
|
97
|
+
];
|
|
98
|
+
setImageSrc(result.imageUri);
|
|
99
|
+
setState(newState);
|
|
100
|
+
setLoadImage(true);
|
|
101
|
+
} else {
|
|
102
|
+
const newState = { ...state };
|
|
103
|
+
newState.originImageSrc = null;
|
|
104
|
+
newState.arrayCopiedImages = [];
|
|
105
|
+
setLoadImage(false);
|
|
106
|
+
setImageSrc(null);
|
|
107
|
+
setState(newState);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
useEffect(() => {
|
|
112
|
+
imageChanged(imageSrc);
|
|
113
|
+
}, [imageSrc]);
|
|
114
|
+
|
|
115
|
+
function processConfig() {
|
|
116
|
+
const dataConf = { ...configuration, ...config };
|
|
117
|
+
setConfiguration(dataConf);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function onUpload(event: any) {
|
|
121
|
+
event.preventDefault();
|
|
122
|
+
imagePicker?.current?.click();
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function handleFileSelect(this: typeof handleFileSelect, event: any) {
|
|
126
|
+
const files = event.target?.files;
|
|
127
|
+
if (files) {
|
|
128
|
+
const file = files[0];
|
|
129
|
+
imageName.current = file.name.split('.')[0];
|
|
130
|
+
fileType.current = file.type;
|
|
131
|
+
if (!fileType.current.includes('image')) return;
|
|
132
|
+
urlImage.current = `data:${file.type};base64,`;
|
|
133
|
+
if (file) {
|
|
134
|
+
const reader = new FileReader();
|
|
135
|
+
reader.onload = handleReaderLoaded.bind(this);
|
|
136
|
+
reader.readAsBinaryString(file);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
async function handleReaderLoaded(readerEvt: any) {
|
|
142
|
+
const binaryString = readerEvt.target.result;
|
|
143
|
+
const base64textString = btoa(binaryString);
|
|
144
|
+
let newState = { ...state };
|
|
145
|
+
const newImageSrc = urlImage.current + base64textString;
|
|
146
|
+
newState.originImageSrc = urlImage.current + base64textString;
|
|
147
|
+
newState.format = fileType.current.split('image/')[1];
|
|
148
|
+
if (configuration.compressInitial) {
|
|
149
|
+
newState = {
|
|
150
|
+
...newState,
|
|
151
|
+
quality: Math.min(configuration.compressInitial || 92, 100),
|
|
152
|
+
maintainAspectRatio: true,
|
|
153
|
+
format: newState.format ? newState.format : 'png',
|
|
154
|
+
};
|
|
155
|
+
const result = await convertImageUsingCanvas(newState.originImageSrc as string, false, newState, {
|
|
156
|
+
getDimFromImage: true,
|
|
157
|
+
});
|
|
158
|
+
setState(result.state);
|
|
159
|
+
setImageSrc(result.imageUri);
|
|
160
|
+
setLoadImage(true);
|
|
161
|
+
if (configuration.onChangeImage) {
|
|
162
|
+
configuration.onChangeImage(result.imageUri);
|
|
163
|
+
}
|
|
164
|
+
} else {
|
|
165
|
+
const img = document.createElement('img');
|
|
166
|
+
img.src = newImageSrc;
|
|
167
|
+
img.onload = () => {
|
|
168
|
+
newState.arrayCopiedImages = [];
|
|
169
|
+
newState.maxHeight = img.height;
|
|
170
|
+
newState.maxWidth = img.width;
|
|
171
|
+
newState.format = fileType.current.split('image/')[1];
|
|
172
|
+
newState.arrayCopiedImages.push({
|
|
173
|
+
lastImage: newImageSrc,
|
|
174
|
+
width: img.width,
|
|
175
|
+
height: img.height,
|
|
176
|
+
quality: newState.quality,
|
|
177
|
+
format: fileType.current.split('image/')[1],
|
|
178
|
+
originImageSrc: newState.originImageSrc as string,
|
|
179
|
+
});
|
|
180
|
+
setState(newState);
|
|
181
|
+
setImageSrc(newImageSrc);
|
|
182
|
+
setLoadImage(true);
|
|
183
|
+
if (configuration.onChangeImage) {
|
|
184
|
+
configuration.onChangeImage(newImageSrc);
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const sizeImage = useMemo(() => {
|
|
191
|
+
if (imageSrc && imageSrc.length) {
|
|
192
|
+
return Math.ceil(((3 / 4) * imageSrc.length) / 1024);
|
|
193
|
+
} else {
|
|
194
|
+
return '';
|
|
195
|
+
}
|
|
196
|
+
}, [imageSrc]);
|
|
197
|
+
|
|
198
|
+
function parseToBase64(imageUrl: string): Promise<{ imageUri: string; state: IState }> {
|
|
199
|
+
let newState = { ...state };
|
|
200
|
+
let type: string;
|
|
201
|
+
|
|
202
|
+
// Verifica se a URL é base64
|
|
203
|
+
if (imageUrl.startsWith('data:image/')) {
|
|
204
|
+
// Extrai o tipo do formato 'data:image/png;base64,'
|
|
205
|
+
const matches = imageUrl.match(/data:image\/([a-zA-Z]+);base64,/);
|
|
206
|
+
if (matches && matches[1]) {
|
|
207
|
+
type = matches[1];
|
|
208
|
+
} else {
|
|
209
|
+
// Se não houver correspondência, define um tipo padrão
|
|
210
|
+
type = 'png'; // ou qualquer tipo padrão que você preferir
|
|
211
|
+
}
|
|
212
|
+
} else {
|
|
213
|
+
// Trata a URL como um caminho de arquivo
|
|
214
|
+
const types = imageUrl.split('.');
|
|
215
|
+
type = types[types.length - 1];
|
|
216
|
+
if (!['png', 'jpeg', 'webp'].includes(type)) {
|
|
217
|
+
type = 'png'; // ou qualquer tipo padrão que você preferir
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
newState.format = type;
|
|
222
|
+
if (config.compressInitial != null) {
|
|
223
|
+
let quality = 1;
|
|
224
|
+
if (config.compressInitial >= 0 && config.compressInitial <= 100) {
|
|
225
|
+
quality = config.compressInitial;
|
|
226
|
+
}
|
|
227
|
+
newState.quality = quality;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
return new Promise((resolve, reject) => {
|
|
231
|
+
const img = document.createElement('img');
|
|
232
|
+
img.crossOrigin = 'Anonymous';
|
|
233
|
+
newState.maxHeight = img.height;
|
|
234
|
+
newState.maxWidth = img.width;
|
|
235
|
+
|
|
236
|
+
img.onload = () => {
|
|
237
|
+
const canvas = document.createElement('canvas');
|
|
238
|
+
const ctx: any = canvas.getContext('2d');
|
|
239
|
+
const ratio = 1.0;
|
|
240
|
+
canvas.width = img.width * ratio;
|
|
241
|
+
canvas.height = img.height * ratio;
|
|
242
|
+
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
|
|
243
|
+
const dataURI = canvas.toDataURL(`image/${type}`, newState.quality / 100);
|
|
244
|
+
return resolve({
|
|
245
|
+
dataUri: dataURI,
|
|
246
|
+
width: canvas.width,
|
|
247
|
+
height: canvas.height,
|
|
248
|
+
});
|
|
249
|
+
};
|
|
250
|
+
img.onerror = (e: any) => {
|
|
251
|
+
return reject(e.message || `Error loading the src = ${imageUrl}`);
|
|
252
|
+
};
|
|
253
|
+
img.src = imageUrl;
|
|
254
|
+
}).then((data: any) => {
|
|
255
|
+
newState = {
|
|
256
|
+
...newState,
|
|
257
|
+
maxHeight: data.height,
|
|
258
|
+
maxWidth: data.width,
|
|
259
|
+
};
|
|
260
|
+
return { imageUri: data.dataUri, state: newState };
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
function onOpenEditPanel() {
|
|
265
|
+
setShowEditPanel(true);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
function onCloseEditPanel(data: any) {
|
|
269
|
+
setShowEditPanel(false);
|
|
270
|
+
if (data) {
|
|
271
|
+
setState(data.state);
|
|
272
|
+
setImageSrc(data.imageSrc);
|
|
273
|
+
if (configuration.onChangeImage) {
|
|
274
|
+
configuration.onChangeImage(data.imageSrc);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
function onRemove() {
|
|
280
|
+
setImageSrc(null);
|
|
281
|
+
setLoadImage(false);
|
|
282
|
+
const newState: IState = {
|
|
283
|
+
...state,
|
|
284
|
+
...initialState,
|
|
285
|
+
};
|
|
286
|
+
setState(newState);
|
|
287
|
+
setShowEditPanel(false);
|
|
288
|
+
if (configuration.onChangeImage) {
|
|
289
|
+
configuration.onChangeImage(undefined);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return (
|
|
294
|
+
<div className="ArchbaseImagePickerEditor">
|
|
295
|
+
{!loadImage && (
|
|
296
|
+
<div className="place-image">
|
|
297
|
+
<div
|
|
298
|
+
className="image-holder"
|
|
299
|
+
style={{
|
|
300
|
+
width: configuration.width,
|
|
301
|
+
height: configuration.height,
|
|
302
|
+
borderRadius: configuration.borderRadius,
|
|
303
|
+
aspectRatio: configuration.aspectRatio + '',
|
|
304
|
+
backgroundColor: config.imageBackgroundColor ?? (colorScheme === 'dark' ? theme.colors.dark[7] : theme.white),
|
|
305
|
+
border: `${rem(1)} solid ${colorScheme === 'dark' ? theme.colors.dark[4] : theme.colors.gray[3]}`,
|
|
306
|
+
}}
|
|
307
|
+
>
|
|
308
|
+
<Tooltip withinPortal withArrow label={`${t('archbase:Upload a image')}`}>
|
|
309
|
+
<ActionIcon component="button" color="blue" variant={variant} className="icon-btn image-upload-btn" onClick={onUpload}>
|
|
310
|
+
<IconCloudUpload color="purple" />
|
|
311
|
+
</ActionIcon>
|
|
312
|
+
</Tooltip>
|
|
313
|
+
<input
|
|
314
|
+
ref={imagePicker}
|
|
315
|
+
type="file"
|
|
316
|
+
style={{ display: 'none' }}
|
|
317
|
+
id={'filePicker-' + uuidFilePicker}
|
|
318
|
+
onChange={handleFileSelect}
|
|
319
|
+
/>
|
|
320
|
+
</div>
|
|
321
|
+
</div>
|
|
322
|
+
)}
|
|
323
|
+
{loadImage && (
|
|
324
|
+
<div className="place-image">
|
|
325
|
+
<div
|
|
326
|
+
className="image-holder-loaded"
|
|
327
|
+
style={{
|
|
328
|
+
width: configuration.width,
|
|
329
|
+
height: configuration.height,
|
|
330
|
+
borderRadius: configuration.borderRadius,
|
|
331
|
+
aspectRatio: configuration.aspectRatio + '',
|
|
332
|
+
background: colorScheme === 'dark' ? theme.colors.dark[7] : theme.white,
|
|
333
|
+
border: `${rem(1)} solid ${colorScheme === 'dark' ? theme.colors.dark[4] : theme.colors.gray[3]}`,
|
|
334
|
+
}}
|
|
335
|
+
>
|
|
336
|
+
<img
|
|
337
|
+
src={imageSrc as string}
|
|
338
|
+
alt="image-loaded"
|
|
339
|
+
style={{
|
|
340
|
+
height: configuration.height,
|
|
341
|
+
borderRadius: configuration.borderRadius,
|
|
342
|
+
objectFit: configuration.objectFit,
|
|
343
|
+
backgroundColor: config.imageBackgroundColor ?? (colorScheme === 'dark' ? theme.colors.dark[7] : theme.white),
|
|
344
|
+
}}
|
|
345
|
+
/>
|
|
346
|
+
{!configuration.hideEditBtn && (
|
|
347
|
+
<Fragment>
|
|
348
|
+
<div className="curtain" onClick={onUpload}>
|
|
349
|
+
<Tooltip withinPortal withArrow label={`${t('archbase:Upload a image')}`}>
|
|
350
|
+
<ActionIcon component="button" color="blue" variant={variant}>
|
|
351
|
+
<IconCloudUpload color="white" />
|
|
352
|
+
</ActionIcon>
|
|
353
|
+
</Tooltip>
|
|
354
|
+
</div>
|
|
355
|
+
<input
|
|
356
|
+
ref={imagePicker}
|
|
357
|
+
type="file"
|
|
358
|
+
style={{ display: 'none' }}
|
|
359
|
+
id={'filePicker-' + uuidFilePicker}
|
|
360
|
+
onChange={handleFileSelect}
|
|
361
|
+
/>
|
|
362
|
+
</Fragment>
|
|
363
|
+
)}
|
|
364
|
+
</div>
|
|
365
|
+
{sizeImage && configuration.showImageSize && (
|
|
366
|
+
<div
|
|
367
|
+
className="caption image-caption"
|
|
368
|
+
style={{
|
|
369
|
+
color: sizeImage > 120 ? '#f44336' : 'unset',
|
|
370
|
+
fontWeight: sizeImage > 120 ? '500' : 'unset',
|
|
371
|
+
}}
|
|
372
|
+
>
|
|
373
|
+
<Text>{`${t('archbase:size')}: ${sizeImage}Kb ${state.format}`}</Text>
|
|
374
|
+
</div>
|
|
375
|
+
)}
|
|
376
|
+
|
|
377
|
+
<div
|
|
378
|
+
style={{
|
|
379
|
+
flexDirection: 'row',
|
|
380
|
+
boxSizing: 'border-box',
|
|
381
|
+
display: 'flex',
|
|
382
|
+
placeContent: 'flex-start',
|
|
383
|
+
alignItems: 'flex-start',
|
|
384
|
+
}}
|
|
385
|
+
className="editing-bar-btn"
|
|
386
|
+
>
|
|
387
|
+
{!configuration.hideAddBtn && (
|
|
388
|
+
<Tooltip withinPortal withArrow label={`${t('archbase:Upload a image')}`}>
|
|
389
|
+
<ActionIcon id="upload-img" color="blue" variant={variant} onClick={onUpload}>
|
|
390
|
+
<IconCloudUpload color="purple" />
|
|
391
|
+
</ActionIcon>
|
|
392
|
+
</Tooltip>
|
|
393
|
+
)}
|
|
394
|
+
|
|
395
|
+
{!configuration.hideEditBtn && (
|
|
396
|
+
<Tooltip withinPortal withArrow label={`${t('archbase:Open the editor panel')}`}>
|
|
397
|
+
<ActionIcon id="edit-img" color="blue" variant={variant} onClick={onOpenEditPanel}>
|
|
398
|
+
<IconPhotoEdit color="teal" />
|
|
399
|
+
</ActionIcon>
|
|
400
|
+
</Tooltip>
|
|
401
|
+
)}
|
|
402
|
+
{!configuration.hideDownloadBtn && (
|
|
403
|
+
<Tooltip withinPortal withArrow label={`${t('archbase:Download the image')}`}>
|
|
404
|
+
<ActionIcon
|
|
405
|
+
component="a"
|
|
406
|
+
id="download-img"
|
|
407
|
+
href={imageSrc as string}
|
|
408
|
+
color="green"
|
|
409
|
+
download={imageName.current}
|
|
410
|
+
variant={variant}
|
|
411
|
+
>
|
|
412
|
+
<IconCloudDownload color="green" />
|
|
413
|
+
</ActionIcon>
|
|
414
|
+
</Tooltip>
|
|
415
|
+
)}
|
|
416
|
+
{!configuration.hideDeleteBtn && (
|
|
417
|
+
<Tooltip withinPortal withArrow label={`${t('archbase:Remove')}`}>
|
|
418
|
+
<ActionIcon id="delete-img" color="red" variant={variant} onClick={() => onRemove()}>
|
|
419
|
+
<IconTrash color="#C91A25" />
|
|
420
|
+
</ActionIcon>
|
|
421
|
+
</Tooltip>
|
|
422
|
+
)}
|
|
423
|
+
</div>
|
|
424
|
+
</div>
|
|
425
|
+
)}
|
|
426
|
+
{showEditPanel && (
|
|
427
|
+
<ArchbaseEditImage
|
|
428
|
+
saveUpdates={onCloseEditPanel}
|
|
429
|
+
color={color}
|
|
430
|
+
image={imageSrc}
|
|
431
|
+
initialState={state}
|
|
432
|
+
></ArchbaseEditImage>
|
|
433
|
+
)}
|
|
434
|
+
</div>
|
|
435
|
+
);
|
|
436
|
+
},
|
|
437
|
+
);
|