@solidxai/core-ui 0.1.14-beta.0 → 0.1.14-beta.10
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/components/auth/AuthLayout.js +1 -1
- package/dist/components/auth/AuthLayout.js.map +1 -1
- package/dist/components/auth/AuthLayout.tsx +2 -2
- package/dist/components/common/SettingsComponent.module.css +4 -1
- package/dist/components/common/SolidFieldTooltip.d.ts.map +1 -1
- package/dist/components/common/SolidFieldTooltip.js +1 -1
- package/dist/components/common/SolidFieldTooltip.js.map +1 -1
- package/dist/components/common/SolidFieldTooltip.tsx +1 -0
- package/dist/components/common/SolidFormStepper.d.ts.map +1 -1
- package/dist/components/common/SolidFormStepper.js +7 -6
- package/dist/components/common/SolidFormStepper.js.map +1 -1
- package/dist/components/common/SolidFormStepper.tsx +7 -1
- package/dist/components/common/SolidThemeProvider.d.ts.map +1 -1
- package/dist/components/common/SolidThemeProvider.js +127 -11
- package/dist/components/common/SolidThemeProvider.js.map +1 -1
- package/dist/components/common/SolidThemeProvider.tsx +104 -22
- package/dist/components/core/card/CardGrid.d.ts +1 -1
- package/dist/components/core/card/CardGrid.d.ts.map +1 -1
- package/dist/components/core/card/CardGrid.js +2 -2
- package/dist/components/core/card/CardGrid.js.map +1 -1
- package/dist/components/core/card/CardGrid.tsx +6 -0
- package/dist/components/core/card/CardItem.d.ts +3 -0
- package/dist/components/core/card/CardItem.d.ts.map +1 -1
- package/dist/components/core/card/CardItem.js +5 -4
- package/dist/components/core/card/CardItem.js.map +1 -1
- package/dist/components/core/card/CardItem.tsx +18 -1
- package/dist/components/core/card/SolidCardView.d.ts +28 -1
- package/dist/components/core/card/SolidCardView.d.ts.map +1 -1
- package/dist/components/core/card/SolidCardView.js +117 -46
- package/dist/components/core/card/SolidCardView.js.map +1 -1
- package/dist/components/core/card/SolidCardView.tsx +141 -27
- package/dist/components/core/card/SolidCardViewConfigure.d.ts +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.d.ts.map +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.js +15 -6
- package/dist/components/core/card/SolidCardViewConfigure.js.map +1 -1
- package/dist/components/core/card/SolidCardViewConfigure.tsx +34 -0
- package/dist/components/core/card/cardViewRegistry.d.ts +7 -0
- package/dist/components/core/card/cardViewRegistry.d.ts.map +1 -0
- package/dist/components/core/card/cardViewRegistry.js +17 -0
- package/dist/components/core/card/cardViewRegistry.js.map +1 -0
- package/dist/components/core/card/cardViewRegistry.ts +23 -0
- package/dist/components/core/chatter/useChatterMentions.js +11 -12
- package/dist/components/core/chatter/useChatterMentions.js.map +1 -1
- package/dist/components/core/chatter/useChatterMentions.ts +6 -6
- package/dist/components/core/common/PDFViewer.d.ts +19 -3
- package/dist/components/core/common/PDFViewer.d.ts.map +1 -1
- package/dist/components/core/common/PDFViewer.js +16 -92
- package/dist/components/core/common/PDFViewer.js.map +1 -1
- package/dist/components/core/common/PDFViewer.tsx +43 -106
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.d.ts.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.js +27 -7
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidAccountSettings.tsx +19 -4
- package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.d.ts.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.js +14 -11
- package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.js.map +1 -1
- package/dist/components/core/common/SolidAccountSettings/SolidVersionInfo.tsx +5 -1
- package/dist/components/core/common/SolidCollectionRowActionMenuItems.d.ts +12 -0
- package/dist/components/core/common/SolidCollectionRowActionMenuItems.d.ts.map +1 -0
- package/dist/components/core/common/SolidCollectionRowActionMenuItems.js +50 -0
- package/dist/components/core/common/SolidCollectionRowActionMenuItems.js.map +1 -0
- package/dist/components/core/common/SolidCollectionRowActionMenuItems.tsx +91 -0
- package/dist/components/core/common/SolidCreateButton.d.ts.map +1 -1
- package/dist/components/core/common/SolidCreateButton.js +2 -2
- package/dist/components/core/common/SolidCreateButton.js.map +1 -1
- package/dist/components/core/common/SolidCreateButton.tsx +22 -2
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +247 -170
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.tsx +255 -117
- package/dist/components/core/common/globalSearchPersistence.d.ts +0 -1
- package/dist/components/core/common/globalSearchPersistence.d.ts.map +1 -1
- package/dist/components/core/common/globalSearchPersistence.js +4 -6
- package/dist/components/core/common/globalSearchPersistence.js.map +1 -1
- package/dist/components/core/common/globalSearchPersistence.ts +4 -4
- package/dist/components/core/extension/solid-core/media/card/MediaCardWidget.d.ts.map +1 -1
- package/dist/components/core/extension/solid-core/media/card/MediaCardWidget.js +2 -13
- package/dist/components/core/extension/solid-core/media/card/MediaCardWidget.js.map +1 -1
- package/dist/components/core/extension/solid-core/media/card/MediaCardWidget.tsx +2 -10
- package/dist/components/core/extension/solid-core/media/fileSize/MediaFileSizeWidget.d.ts +5 -0
- package/dist/components/core/extension/solid-core/media/fileSize/MediaFileSizeWidget.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/media/fileSize/MediaFileSizeWidget.js +34 -0
- package/dist/components/core/extension/solid-core/media/fileSize/MediaFileSizeWidget.js.map +1 -0
- package/dist/components/core/extension/solid-core/media/fileSize/MediaFileSizeWidget.tsx +47 -0
- package/dist/components/core/extension/solid-core/media/relativeUri/MediaRelativeUriPreview.d.ts +4 -0
- package/dist/components/core/extension/solid-core/media/relativeUri/MediaRelativeUriPreview.d.ts.map +1 -0
- package/dist/components/core/extension/solid-core/media/relativeUri/MediaRelativeUriPreview.js +109 -0
- package/dist/components/core/extension/solid-core/media/relativeUri/MediaRelativeUriPreview.js.map +1 -0
- package/dist/components/core/extension/solid-core/media/relativeUri/MediaRelativeUriPreview.tsx +228 -0
- package/dist/components/core/form/SolidDraftPublishWorkflow.d.ts +32 -0
- package/dist/components/core/form/SolidDraftPublishWorkflow.d.ts.map +1 -0
- package/dist/components/core/form/SolidDraftPublishWorkflow.js +228 -0
- package/dist/components/core/form/SolidDraftPublishWorkflow.js.map +1 -0
- package/dist/components/core/form/SolidDraftPublishWorkflow.tsx +234 -0
- package/dist/components/core/form/SolidFormActionHeader.d.ts +1 -1
- package/dist/components/core/form/SolidFormActionHeader.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.js +68 -41
- package/dist/components/core/form/SolidFormActionHeader.js.map +1 -1
- package/dist/components/core/form/SolidFormActionHeader.tsx +170 -79
- package/dist/components/core/form/SolidFormView.d.ts +2 -0
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +129 -125
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/SolidFormView.tsx +111 -95
- package/dist/components/core/form/SolidVersionHistory.d.ts +12 -0
- package/dist/components/core/form/SolidVersionHistory.d.ts.map +1 -0
- package/dist/components/core/form/SolidVersionHistory.js +125 -0
- package/dist/components/core/form/SolidVersionHistory.js.map +1 -0
- package/dist/components/core/form/SolidVersionHistory.tsx +159 -0
- package/dist/components/core/form/fields/ISolidField.d.ts +2 -0
- package/dist/components/core/form/fields/ISolidField.d.ts.map +1 -1
- package/dist/components/core/form/fields/ISolidField.js.map +1 -1
- package/dist/components/core/form/fields/ISolidField.tsx +2 -0
- package/dist/components/core/form/fields/SolidDateField.d.ts +1 -2
- package/dist/components/core/form/fields/SolidDateField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.js +0 -7
- package/dist/components/core/form/fields/SolidDateField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.tsx +1 -13
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js +17 -7
- package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.tsx +10 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js +28 -11
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.tsx +17 -2
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts +1 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +13 -9
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +17 -6
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts +1 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +1 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +2 -0
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts +1 -0
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js +13 -13
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +16 -11
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.js +2 -1
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.js.map +1 -1
- package/dist/components/core/form/fields/relations/widgets/helpers/InlineRelationEntityDialog.tsx +2 -1
- package/dist/components/core/kanban/KanbanBoard.d.ts +1 -1
- package/dist/components/core/kanban/KanbanBoard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.js +2 -2
- package/dist/components/core/kanban/KanbanBoard.js.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.tsx +4 -1
- package/dist/components/core/kanban/KanbanCard.d.ts +3 -0
- package/dist/components/core/kanban/KanbanCard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanCard.js +5 -3
- package/dist/components/core/kanban/KanbanCard.js.map +1 -1
- package/dist/components/core/kanban/KanbanCard.tsx +16 -2
- package/dist/components/core/kanban/KanbanColumn.d.ts +4 -1
- package/dist/components/core/kanban/KanbanColumn.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanColumn.js +2 -2
- package/dist/components/core/kanban/KanbanColumn.js.map +1 -1
- package/dist/components/core/kanban/KanbanColumn.tsx +5 -2
- package/dist/components/core/kanban/SolidKanbanView.d.ts +25 -1
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +114 -55
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.tsx +112 -24
- package/dist/components/core/kanban/kanbanViewRegistry.d.ts +7 -0
- package/dist/components/core/kanban/kanbanViewRegistry.d.ts.map +1 -0
- package/dist/components/core/kanban/kanbanViewRegistry.js +17 -0
- package/dist/components/core/kanban/kanbanViewRegistry.js.map +1 -0
- package/dist/components/core/kanban/kanbanViewRegistry.ts +23 -0
- package/dist/components/core/list/PLAN.md +1 -1
- package/dist/components/core/list/SolidListView.d.ts +11 -0
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +160 -104
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidListView.tsx +156 -84
- package/dist/components/core/list/SolidListViewConfigure.js +1 -1
- package/dist/components/core/list/SolidListViewConfigure.js.map +1 -1
- package/dist/components/core/list/SolidListViewConfigure.tsx +1 -1
- package/dist/components/core/list/SolidTableRowCell.js +1 -1
- package/dist/components/core/list/SolidTableRowCell.js.map +1 -1
- package/dist/components/core/list/SolidTableRowCell.tsx +1 -1
- package/dist/components/core/list/columns/PublishStatusColumnDefaults.d.ts +3 -0
- package/dist/components/core/list/columns/PublishStatusColumnDefaults.d.ts.map +1 -0
- package/dist/components/core/list/columns/PublishStatusColumnDefaults.js +23 -0
- package/dist/components/core/list/columns/PublishStatusColumnDefaults.js.map +1 -0
- package/dist/components/core/list/columns/PublishStatusColumnDefaults.ts +26 -0
- package/dist/components/core/list/columns/SolidBooleanColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidBooleanColumn.js +3 -1
- package/dist/components/core/list/columns/SolidBooleanColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidBooleanColumn.tsx +2 -1
- package/dist/components/core/list/columns/SolidDateColumn.d.ts +1 -1
- package/dist/components/core/list/columns/SolidDateColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidDateColumn.js +7 -6
- package/dist/components/core/list/columns/SolidDateColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidDateColumn.tsx +8 -4
- package/dist/components/core/list/columns/SolidDatetimeColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidDatetimeColumn.js +6 -4
- package/dist/components/core/list/columns/SolidDatetimeColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidDatetimeColumn.tsx +3 -3
- package/dist/components/core/list/columns/SolidIntColumn.js +3 -3
- package/dist/components/core/list/columns/SolidIntColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidIntColumn.tsx +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.js +5 -5
- package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.tsx +2 -2
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js +2 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.js.map +1 -1
- package/dist/components/core/list/columns/relations/SolidRelationManyToOneColumn.tsx +2 -1
- package/dist/components/core/list/widgets/PublishedStatusListViewWidget.d.ts +3 -0
- package/dist/components/core/list/widgets/PublishedStatusListViewWidget.d.ts.map +1 -0
- package/dist/components/core/list/widgets/PublishedStatusListViewWidget.js +12 -0
- package/dist/components/core/list/widgets/PublishedStatusListViewWidget.js.map +1 -0
- package/dist/components/core/list/widgets/PublishedStatusListViewWidget.module.css +37 -0
- package/dist/components/core/list/widgets/PublishedStatusListViewWidget.tsx +22 -0
- package/dist/components/core/locales/SolidChatterLocaleTabView.d.ts +1 -0
- package/dist/components/core/locales/SolidChatterLocaleTabView.d.ts.map +1 -1
- package/dist/components/core/locales/SolidChatterLocaleTabView.js +2 -2
- package/dist/components/core/locales/SolidChatterLocaleTabView.js.map +1 -1
- package/dist/components/core/locales/SolidChatterLocaleTabView.tsx +3 -0
- package/dist/components/core/locales/SolidLocale.d.ts +2 -1
- package/dist/components/core/locales/SolidLocale.d.ts.map +1 -1
- package/dist/components/core/locales/SolidLocale.js +83 -11
- package/dist/components/core/locales/SolidLocale.js.map +1 -1
- package/dist/components/core/locales/SolidLocale.tsx +141 -52
- package/dist/components/core/locales/solid-locale.css +153 -44
- package/dist/components/core/model/CreateModel.d.ts.map +1 -1
- package/dist/components/core/model/CreateModel.js +2 -1
- package/dist/components/core/model/CreateModel.js.map +1 -1
- package/dist/components/core/model/CreateModel.tsx +2 -0
- package/dist/components/core/model/FieldMetaData.d.ts +1 -1
- package/dist/components/core/model/FieldMetaData.d.ts.map +1 -1
- package/dist/components/core/model/FieldMetaData.js +8 -8
- package/dist/components/core/model/FieldMetaData.js.map +1 -1
- package/dist/components/core/model/FieldMetaData.tsx +2 -2
- package/dist/components/core/model/FieldMetaDataForm.css +119 -0
- package/dist/components/core/model/FieldMetaDataForm.js +1 -1
- package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.tsx +1 -1
- package/dist/components/core/module/ModuleMetadataExplorer.css +64 -0
- package/dist/components/core/module/ModulePackageDialog.css +117 -12
- package/dist/components/core/tree/SolidTreeView.d.ts.map +1 -1
- package/dist/components/core/tree/SolidTreeView.js +94 -72
- package/dist/components/core/tree/SolidTreeView.js.map +1 -1
- package/dist/components/core/tree/SolidTreeView.tsx +82 -57
- package/dist/components/layout/AdminHeaderActions.d.ts.map +1 -1
- package/dist/components/layout/AdminHeaderActions.js +15 -10
- package/dist/components/layout/AdminHeaderActions.js.map +1 -1
- package/dist/components/layout/AdminHeaderActions.tsx +15 -8
- package/dist/components/layout/AdminTopHeader.d.ts.map +1 -1
- package/dist/components/layout/AdminTopHeader.js +1 -18
- package/dist/components/layout/AdminTopHeader.js.map +1 -1
- package/dist/components/layout/AdminTopHeader.tsx +3 -21
- package/dist/components/layout/AppSidebar.d.ts.map +1 -1
- package/dist/components/layout/AppSidebar.js +9 -0
- package/dist/components/layout/AppSidebar.js.map +1 -1
- package/dist/components/layout/AppSidebar.tsx +14 -0
- package/dist/components/shad-cn-ui/SolidCodeEditor.d.ts +2 -1
- package/dist/components/shad-cn-ui/SolidCodeEditor.d.ts.map +1 -1
- package/dist/components/shad-cn-ui/SolidCodeEditor.js +2 -2
- package/dist/components/shad-cn-ui/SolidCodeEditor.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidCodeEditor.tsx +3 -0
- package/dist/components/shad-cn-ui/SolidDropdownMenu.js +1 -1
- package/dist/components/shad-cn-ui/SolidDropdownMenu.js.map +1 -1
- package/dist/components/shad-cn-ui/SolidDropdownMenu.tsx +1 -1
- package/dist/components/workflow/WorkflowFlowCanvas.css +16 -0
- package/dist/components/workflow/WorkflowFlowCanvas.d.ts +3 -1
- package/dist/components/workflow/WorkflowFlowCanvas.d.ts.map +1 -1
- package/dist/components/workflow/WorkflowFlowCanvas.js +68 -6
- package/dist/components/workflow/WorkflowFlowCanvas.js.map +1 -1
- package/dist/components/workflow/WorkflowFlowCanvas.tsx +126 -8
- package/dist/components/workflow/WorkflowNodeSchemaEditor.css +204 -7
- package/dist/components/workflow/WorkflowNodeSchemaEditor.d.ts +3 -1
- package/dist/components/workflow/WorkflowNodeSchemaEditor.d.ts.map +1 -1
- package/dist/components/workflow/WorkflowNodeSchemaEditor.js +685 -47
- package/dist/components/workflow/WorkflowNodeSchemaEditor.js.map +1 -1
- package/dist/components/workflow/WorkflowNodeSchemaEditor.tsx +1108 -92
- package/dist/helpers/registry.d.ts.map +1 -1
- package/dist/helpers/registry.js +8 -5
- package/dist/helpers/registry.js.map +1 -1
- package/dist/helpers/registry.ts +8 -5
- package/dist/helpers/resolveActiveUserId.d.ts +13 -0
- package/dist/helpers/resolveActiveUserId.d.ts.map +1 -0
- package/dist/helpers/resolveActiveUserId.js +86 -0
- package/dist/helpers/resolveActiveUserId.js.map +1 -0
- package/dist/helpers/resolveActiveUserId.ts +90 -0
- package/dist/helpers/settingsPayload.d.ts +3 -0
- package/dist/helpers/settingsPayload.d.ts.map +1 -1
- package/dist/helpers/settingsPayload.js +9 -0
- package/dist/helpers/settingsPayload.js.map +1 -1
- package/dist/helpers/settingsPayload.ts +13 -0
- package/dist/hooks/useSession.d.ts.map +1 -1
- package/dist/hooks/useSession.js +12 -6
- package/dist/hooks/useSession.js.map +1 -1
- package/dist/hooks/useSession.ts +8 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/index.ts +8 -1
- package/dist/redux/api/mediaApi.d.ts +2 -1
- package/dist/redux/api/mediaApi.d.ts.map +1 -1
- package/dist/redux/api/mediaApi.js +8 -1
- package/dist/redux/api/mediaApi.js.map +1 -1
- package/dist/redux/api/mediaApi.ts +8 -1
- package/dist/redux/api/solidChatterMessageApi.d.ts +2 -1
- package/dist/redux/api/solidChatterMessageApi.d.ts.map +1 -1
- package/dist/redux/api/solidChatterMessageApi.js +6 -1
- package/dist/redux/api/solidChatterMessageApi.js.map +1 -1
- package/dist/redux/api/solidChatterMessageApi.ts +6 -1
- package/dist/redux/store/defaultStoreConfig.d.ts +2 -0
- package/dist/redux/store/defaultStoreConfig.d.ts.map +1 -1
- package/dist/redux/store/solidEntityApiPool.js +1 -1
- package/dist/redux/store/solidEntityApiPool.js.map +1 -1
- package/dist/redux/store/solidEntityApiPool.ts +1 -1
- package/dist/resources/globals.css +257 -1
- package/dist/resources/solid-custom.css +185 -18
- package/dist/resources/solid-tailwind-generated.css +1 -1
- package/dist/resources/themes/solid-dark-enterprise/theme-variables.css +28 -0
- package/dist/resources/themes/solid-dark-enterprise/theme.css +926 -0
- package/dist/resources/themes/solid-dark-modern/theme-variables.css +27 -0
- package/dist/resources/themes/solid-dark-modern/theme.css +600 -0
- package/dist/resources/themes/solid-light-enterprise/theme-variables.css +28 -0
- package/dist/resources/themes/solid-light-enterprise/theme.css +930 -0
- package/dist/resources/themes/solid-light-modern/theme-variables.css +31 -0
- package/dist/resources/themes/solid-light-modern/theme.css +1041 -0
- package/dist/routes/pages/admin/core/CardPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/CardPage.js +15 -2
- package/dist/routes/pages/admin/core/CardPage.js.map +1 -1
- package/dist/routes/pages/admin/core/CardPage.tsx +17 -2
- package/dist/routes/pages/admin/core/DashboardPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/DashboardPage.js +31 -3
- package/dist/routes/pages/admin/core/DashboardPage.js.map +1 -1
- package/dist/routes/pages/admin/core/DashboardPage.tsx +39 -11
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js +4 -0
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.js.map +1 -1
- package/dist/routes/pages/admin/core/DatasourceIntrospectionPage.tsx +4 -0
- package/dist/routes/pages/admin/core/KanbanPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/KanbanPage.js +15 -2
- package/dist/routes/pages/admin/core/KanbanPage.js.map +1 -1
- package/dist/routes/pages/admin/core/KanbanPage.tsx +17 -2
- package/dist/routes/pages/admin/core/ListPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/ListPage.js +5 -13
- package/dist/routes/pages/admin/core/ListPage.js.map +1 -1
- package/dist/routes/pages/admin/core/ListPage.tsx +5 -15
- package/dist/routes/pages/admin/core/MediaUploadPage.d.ts +2 -0
- package/dist/routes/pages/admin/core/MediaUploadPage.d.ts.map +1 -0
- package/dist/routes/pages/admin/core/MediaUploadPage.js +267 -0
- package/dist/routes/pages/admin/core/MediaUploadPage.js.map +1 -0
- package/dist/routes/pages/admin/core/MediaUploadPage.tsx +363 -0
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.d.ts.map +1 -1
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.js +88 -31
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.js.map +1 -1
- package/dist/routes/pages/admin/core/WorkflowDefinitionEditorPage.tsx +126 -19
- package/dist/routes/solidRoutes.js +2 -2
- package/dist/routes/solidRoutes.js.map +1 -1
- package/dist/routes/solidRoutes.tsx +2 -2
- package/dist/theme/theme-registry.d.ts +6 -0
- package/dist/theme/theme-registry.d.ts.map +1 -0
- package/dist/theme/theme-registry.js +65 -0
- package/dist/theme/theme-registry.js.map +1 -0
- package/dist/theme/theme-registry.ts +78 -0
- package/dist/types/index.d.ts +4 -2
- package/dist/types/solid-core.d.ts +25 -0
- package/dist/types/workflow-node.d.ts +1 -0
- package/dist/types/workflow-node.d.ts.map +1 -1
- package/dist/types/workflow-node.js.map +1 -1
- package/dist/types/workflow-node.ts +1 -0
- package/package.json +1 -2
|
@@ -28,11 +28,13 @@ import { SolidListViewHeaderButton } from "./SolidListViewHeaderButton";
|
|
|
28
28
|
import { resolveButtonPresentation } from "../../../helpers/buttonPresentation";
|
|
29
29
|
import { useDispatch, useSelector } from "react-redux";
|
|
30
30
|
import styles from "./SolidListViewWrapper.module.css";
|
|
31
|
-
import {
|
|
31
|
+
import { isArchivedListRow } from "./columns/PublishStatusColumnDefaults";
|
|
32
|
+
import { SolidBeforeListDataLoad, SolidListUiEventResponse, SolidLoadList, SolidDefinedFilter } from "../../../types/solid-core";
|
|
32
33
|
import { getExtensionFunction } from "../../../helpers/registry";
|
|
33
34
|
import { useSession } from "../../../hooks/useSession";
|
|
35
|
+
import { resolveActiveUserId } from "../../../helpers/resolveActiveUserId";
|
|
34
36
|
import { ERROR_MESSAGES } from "../../../constants/error-messages";
|
|
35
|
-
import { getSettingsMap } from "../../../helpers/settingsPayload";
|
|
37
|
+
import { getSettingsMap, resolveRecordClickAction } from "../../../helpers/settingsPayload";
|
|
36
38
|
import { useGetSolidSettingsQuery } from "../../../redux/api/solidSettingsApi";
|
|
37
39
|
// import { SolidAiMainWrapper } from "../solid-ai/SolidAiMainWrapper"; // moved to SolidX Studio panel
|
|
38
40
|
import { showNavbar, toggleNavbar } from "../../../redux/features/navbarSlice";
|
|
@@ -44,7 +46,6 @@ import { SolidHeaderRequestStatus } from "../../common/SolidHeaderRequestStatus"
|
|
|
44
46
|
import {
|
|
45
47
|
getFilterObjectFromLocalStorage,
|
|
46
48
|
hasStoredFilterPredicates,
|
|
47
|
-
hasStoredSearchUiState,
|
|
48
49
|
setFilterObjectToLocalStorage,
|
|
49
50
|
} from "../common/globalSearchPersistence";
|
|
50
51
|
import {
|
|
@@ -106,6 +107,17 @@ export type SolidListViewHandle = {
|
|
|
106
107
|
saved_filter_predicate?: any;
|
|
107
108
|
predefined_search_predicate?: any;
|
|
108
109
|
}) => void;
|
|
110
|
+
/**
|
|
111
|
+
* Returns the saved filters currently available in the list view, including
|
|
112
|
+
* any seeded/system filters supplied by the view.
|
|
113
|
+
*/
|
|
114
|
+
getSavedFilters: () => any[];
|
|
115
|
+
/**
|
|
116
|
+
* Applies the currently available saved filter with the given name using the
|
|
117
|
+
* same selection path as clicking that filter in the search UI.
|
|
118
|
+
* Returns false when no saved filter with that name is available.
|
|
119
|
+
*/
|
|
120
|
+
applySavedFilter: (name: string, variables?: Record<string, any>) => boolean;
|
|
109
121
|
/**
|
|
110
122
|
* Updates pagination state directly.
|
|
111
123
|
* Use this when a caller needs to jump to a specific page window
|
|
@@ -197,6 +209,12 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
197
209
|
const [showGlobalSearchElement, setShowGlobalSearchElement] = useState(false);
|
|
198
210
|
const suppressNextFilterPaginationResetRef = useRef(false);
|
|
199
211
|
|
|
212
|
+
// Filters offered by an onBeforeListDataLoad handler (event.definedFilters).
|
|
213
|
+
// Each stays independently removable via the search bar's pill UI rather
|
|
214
|
+
// than being baked directly into the outgoing query filter.
|
|
215
|
+
const [definedFilters, setDefinedFilters] = useState<SolidDefinedFilter[]>([]);
|
|
216
|
+
const definedFilterOverridesRef = useRef<Record<string, boolean>>({});
|
|
217
|
+
|
|
200
218
|
const [triggerCheckIfPermissionExists] = useLazyCheckIfPermissionExistsQuery();
|
|
201
219
|
|
|
202
220
|
const handleCustomButtonClick = useHandleListCustomButtonClick();
|
|
@@ -220,7 +238,7 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
220
238
|
return "view";
|
|
221
239
|
}
|
|
222
240
|
|
|
223
|
-
return solidSettingsMap
|
|
241
|
+
return resolveRecordClickAction(solidSettingsMap, { isSystemModule });
|
|
224
242
|
}, [solidListViewMetaData, solidSettingsMap]);
|
|
225
243
|
|
|
226
244
|
const resolveLocaleFromFilter = (filterNode: any): string | null => {
|
|
@@ -849,10 +867,48 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
849
867
|
if (updatedListData && updatedListData?.filterApplied && updatedListData?.newFilter) {
|
|
850
868
|
queryData = updatedListData?.newFilter;
|
|
851
869
|
}
|
|
870
|
+
|
|
871
|
+
// Reconcile handler-offered filters against any user removals from
|
|
872
|
+
// this mount (definedFilterOverridesRef), then merge the ones still
|
|
873
|
+
// applied into the outgoing query. Stale keys (no longer offered by
|
|
874
|
+
// the handler) are dropped from the override map.
|
|
875
|
+
const nextDefinedFilters = updatedListData?.definedFilters ?? [];
|
|
876
|
+
const reconciledDefinedFilters: SolidDefinedFilter[] = nextDefinedFilters.map((def) => {
|
|
877
|
+
const hasOverride = Object.prototype.hasOwnProperty.call(definedFilterOverridesRef.current, def.key);
|
|
878
|
+
const applied = hasOverride ? definedFilterOverridesRef.current[def.key] : def.applied;
|
|
879
|
+
definedFilterOverridesRef.current[def.key] = applied;
|
|
880
|
+
return { ...def, applied };
|
|
881
|
+
});
|
|
882
|
+
Object.keys(definedFilterOverridesRef.current).forEach((key) => {
|
|
883
|
+
if (!reconciledDefinedFilters.some((def) => def.key === key)) {
|
|
884
|
+
delete definedFilterOverridesRef.current[key];
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
setDefinedFilters(reconciledDefinedFilters);
|
|
888
|
+
|
|
889
|
+
const activeDefinedFilterPredicates = reconciledDefinedFilters
|
|
890
|
+
.filter((def) => def.applied)
|
|
891
|
+
.map((def) => def.predicate);
|
|
892
|
+
if (activeDefinedFilterPredicates.length > 0) {
|
|
893
|
+
// queryData.filters may be the same object reference as
|
|
894
|
+
// latestFiltersRef.current (see assignment above) when the
|
|
895
|
+
// handler didn't return a newFilter. Clone before mutating so we
|
|
896
|
+
// never permanently bake handler predicates into that ref -
|
|
897
|
+
// otherwise they'd accumulate/duplicate on every subsequent
|
|
898
|
+
// fetch (pagination, sort, removal, ...) instead of being
|
|
899
|
+
// recomputed fresh each time.
|
|
900
|
+
const mergedFilters = queryData.filters ? structuredClone(queryData.filters) : {};
|
|
901
|
+
mergedFilters.$and = Array.isArray(mergedFilters.$and) ? mergedFilters.$and : [];
|
|
902
|
+
mergedFilters.$and.push(...activeDefinedFilterPredicates);
|
|
903
|
+
queryData.filters = mergedFilters;
|
|
904
|
+
}
|
|
852
905
|
} catch (err) {
|
|
853
906
|
console.error("Error executing onBeforeListDataLoad extension:", err);
|
|
854
907
|
}
|
|
855
908
|
}
|
|
909
|
+
} else if (Object.keys(definedFilterOverridesRef.current).length > 0) {
|
|
910
|
+
definedFilterOverridesRef.current = {};
|
|
911
|
+
setDefinedFilters([]);
|
|
856
912
|
}
|
|
857
913
|
|
|
858
914
|
const queryString = qs.stringify(queryData, { encodeValuesOnly: true });
|
|
@@ -864,6 +920,10 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
864
920
|
fileterTobeStored.custom_filter_predicate = latestFilterPredicatesRef.current.custom_filter_predicate || null;
|
|
865
921
|
fileterTobeStored.search_predicate = latestFilterPredicatesRef.current.search_predicate || null;
|
|
866
922
|
fileterTobeStored.saved_filter_predicate = latestFilterPredicatesRef.current.saved_filter_predicate || null;
|
|
923
|
+
fileterTobeStored.saved_filter_variables = latestFilterPredicatesRef.current.saved_filter_variables || {};
|
|
924
|
+
fileterTobeStored.saved_filter_id = latestFilterPredicatesRef.current.saved_filter_id || null;
|
|
925
|
+
fileterTobeStored.saved_filter_system_key = latestFilterPredicatesRef.current.saved_filter_system_key || null;
|
|
926
|
+
fileterTobeStored.saved_filter_name = latestFilterPredicatesRef.current.saved_filter_name || null;
|
|
867
927
|
fileterTobeStored.predefined_search_predicate = latestFilterPredicatesRef.current.predefined_search_predicate || null;
|
|
868
928
|
fileterTobeStored.predefined_search_chip = latestFilterPredicatesRef.current.predefined_search_chip || null;
|
|
869
929
|
setFilterObjectToLocalStorage(fileterTobeStored);
|
|
@@ -883,7 +943,8 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
883
943
|
queryfilter.$and.push(filterPredicates.search_predicate);
|
|
884
944
|
}
|
|
885
945
|
if (filterPredicates.saved_filter_predicate) {
|
|
886
|
-
queryfilter.$and.push(filterPredicates.
|
|
946
|
+
queryfilter.$and.push(filterPredicates.resolved_saved_filter_predicate ||
|
|
947
|
+
resolveActiveUserId(filterPredicates.saved_filter_predicate, user?.id));
|
|
887
948
|
}
|
|
888
949
|
if (filterPredicates.predefined_search_predicate) {
|
|
889
950
|
queryfilter.$and.push(filterPredicates.predefined_search_predicate);
|
|
@@ -965,6 +1026,26 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
965
1026
|
// Force synchronous state updates
|
|
966
1027
|
};
|
|
967
1028
|
|
|
1029
|
+
// Removes a single handler-offered filter pill. The override persists for
|
|
1030
|
+
// the rest of this mount (setQueryString reconciliation keeps it applied:false
|
|
1031
|
+
// on subsequent fetches) but is not persisted beyond it.
|
|
1032
|
+
const removeDefinedFilter = (key: string) => {
|
|
1033
|
+
definedFilterOverridesRef.current[key] = false;
|
|
1034
|
+
setDefinedFilters((prev) => prev.map((def) => (def.key === key ? { ...def, applied: false } : def)));
|
|
1035
|
+
setFirst(0);
|
|
1036
|
+
void setQueryString();
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
// Applies a handler-offered filter the user picked from the "defined
|
|
1040
|
+
// filters" list (one the handler returned with applied:false by default).
|
|
1041
|
+
// Mirrors removeDefinedFilter in the other direction.
|
|
1042
|
+
const applyDefinedFilter = (key: string) => {
|
|
1043
|
+
definedFilterOverridesRef.current[key] = true;
|
|
1044
|
+
setDefinedFilters((prev) => prev.map((def) => (def.key === key ? { ...def, applied: true } : def)));
|
|
1045
|
+
setFirst(0);
|
|
1046
|
+
void setQueryString();
|
|
1047
|
+
};
|
|
1048
|
+
|
|
968
1049
|
// clear Filter
|
|
969
1050
|
const clearFilter = () => {
|
|
970
1051
|
if (solidListViewMetaData) {
|
|
@@ -1002,6 +1083,8 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
1002
1083
|
applyFilter: (filter) => {
|
|
1003
1084
|
handleApplyCustomFilter(filter);
|
|
1004
1085
|
},
|
|
1086
|
+
getSavedFilters: () => solidGlobalSearchElementRef.current?.getSavedFilters?.() ?? [],
|
|
1087
|
+
applySavedFilter: (name, variables) => solidGlobalSearchElementRef.current?.applySavedFilterByName?.(name, variables) ?? false,
|
|
1005
1088
|
setPagination: (nextFirst, nextRows) => {
|
|
1006
1089
|
setFirst(nextFirst);
|
|
1007
1090
|
setRows(nextRows);
|
|
@@ -1040,7 +1123,6 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
1040
1123
|
]);
|
|
1041
1124
|
|
|
1042
1125
|
const [selectedSolidViewData, setSelectedSolidViewData] = useState<any>();
|
|
1043
|
-
const selectedDataRef = useRef<any>();
|
|
1044
1126
|
const [deleteEntity, setDeleteEntity] = useState(false);
|
|
1045
1127
|
|
|
1046
1128
|
// Recover functions
|
|
@@ -1228,12 +1310,13 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
1228
1310
|
|
|
1229
1311
|
const hasAppliedFilterValues = hasAppliedFilters(filters);
|
|
1230
1312
|
const hasAnyActiveFilters = hasAppliedFilterValues || hasFilterPredicatesApplied;
|
|
1313
|
+
const hasStoredFilterState = hasStoredFilterPredicates(getFilterObjectFromLocalStorage());
|
|
1231
1314
|
|
|
1232
1315
|
useEffect(() => {
|
|
1233
|
-
if (params.embeded === false
|
|
1234
|
-
setShowGlobalSearchElement(
|
|
1316
|
+
if (params.embeded === false) {
|
|
1317
|
+
setShowGlobalSearchElement(hasAnyActiveFilters || hasStoredFilterState);
|
|
1235
1318
|
}
|
|
1236
|
-
}, [hasAnyActiveFilters, params.embeded]);
|
|
1319
|
+
}, [hasAnyActiveFilters, hasStoredFilterState, params.embeded]);
|
|
1237
1320
|
|
|
1238
1321
|
const isListViewEmptyWithoutFilters =
|
|
1239
1322
|
!loading &&
|
|
@@ -1348,13 +1431,11 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
1348
1431
|
const hasEditInContextMenu = actionsAllowed.includes(`${permissionExpression(params.modelName, 'update')}`) &&
|
|
1349
1432
|
solidListViewLayout?.attrs?.edit !== false &&
|
|
1350
1433
|
solidListViewLayout?.attrs?.showDefaultEditButton !== false &&
|
|
1351
|
-
showRowEditInContextMenu !== false
|
|
1352
|
-
!(isDraftPublishWorkflowEnabled && selectedDataRef.current?.publishedAt);
|
|
1434
|
+
showRowEditInContextMenu !== false;
|
|
1353
1435
|
|
|
1354
1436
|
const hasDeleteInContextMenu = actionsAllowed.includes(`${permissionExpression(params.modelName, 'delete')}`) &&
|
|
1355
1437
|
solidListViewLayout?.attrs?.delete !== false &&
|
|
1356
|
-
showRowDeleteInContextMenu !== false
|
|
1357
|
-
!(isDraftPublishWorkflowEnabled && selectedDataRef.current?.publishedAt);
|
|
1438
|
+
showRowDeleteInContextMenu !== false;
|
|
1358
1439
|
|
|
1359
1440
|
const hasCustomContextMenuButtons =
|
|
1360
1441
|
solidListViewLayout?.attrs?.rowButtons?.some(
|
|
@@ -1369,11 +1450,6 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
1369
1450
|
showRowActionsAsIconOnly || solidListViewLayout?.attrs?.showRowEditAsIconOnly === true;
|
|
1370
1451
|
const showRowDeleteAsIconOnly =
|
|
1371
1452
|
showRowActionsAsIconOnly || solidListViewLayout?.attrs?.showRowDeleteAsIconOnly === true;
|
|
1372
|
-
const shouldShowMobileSearchElement =
|
|
1373
|
-
showGlobalSearchElement ||
|
|
1374
|
-
hasStoredSearchUiState(filterPredicates) ||
|
|
1375
|
-
hasStoredSearchUiState(getFilterObjectFromLocalStorage());
|
|
1376
|
-
|
|
1377
1453
|
// const toggleBothSidebars = () => {
|
|
1378
1454
|
// if (visibleNavbar) {
|
|
1379
1455
|
// dispatch(toggleNavbar()); // close both
|
|
@@ -1388,8 +1464,8 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
1388
1464
|
{solidListViewInitialMetaData &&
|
|
1389
1465
|
<div className="page-header solid-list-toolbar flex-col lg:flex-row">
|
|
1390
1466
|
{/* <div> */}
|
|
1391
|
-
<div className="flex
|
|
1392
|
-
<div className="solid-list-toolbar-left flex w-full items-center gap-3">
|
|
1467
|
+
<div className="flex w-full flex-col-reverse lg:flex-row lg:items-center items-end">
|
|
1468
|
+
<div className="solid-list-toolbar-left flex w-full items-center gap-3 lg:min-w-0 lg:flex-1">
|
|
1393
1469
|
{/* Here only hide the Solid list view title, LayoutGrid already commented */}
|
|
1394
1470
|
{/* <div className='flex items-center gap-2'>
|
|
1395
1471
|
{params.embeded !== true &&
|
|
@@ -1402,27 +1478,37 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
1402
1478
|
</p>
|
|
1403
1479
|
</div> */}
|
|
1404
1480
|
{params.embeded === false && (
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1481
|
+
<>
|
|
1482
|
+
|
|
1483
|
+
{/* Global search element: always visible on desktop (lg+), toggled via search button below lg */}
|
|
1484
|
+
{/* Base `hidden` must be avoided here: the consuming app's Tailwind CSS loads after this
|
|
1485
|
+
library's generated CSS, so the app's base `.hidden` would override our media-scoped
|
|
1486
|
+
`lg:flex`. Only media-scoped visibility classes are safe on this element. */}
|
|
1487
|
+
<div className={`${showGlobalSearchElement ? "flex" : "max-lg:hidden lg:flex"} w-full mt-3 lg:mt-0 lg:min-w-0`}>
|
|
1488
|
+
{/* Keep global search mounted for now because list bootstrap/filter hydration still flows through this element. */}
|
|
1489
|
+
<SolidGlobalSearchElement
|
|
1490
|
+
key={params.modelName}
|
|
1491
|
+
viewType="list"
|
|
1492
|
+
showSaveFilterPopup={showSaveFilterPopup}
|
|
1493
|
+
setShowSaveFilterPopup={setShowSaveFilterPopup}
|
|
1494
|
+
ref={solidGlobalSearchElementRef}
|
|
1495
|
+
viewData={solidListViewMetaData}
|
|
1496
|
+
handleApplyCustomFilter={handleApplyCustomFilter}
|
|
1497
|
+
filterPredicates={filterPredicates}
|
|
1498
|
+
definedFilters={definedFilters}
|
|
1499
|
+
onRemoveDefinedFilter={removeDefinedFilter}
|
|
1500
|
+
onApplyDefinedFilter={applyDefinedFilter}
|
|
1501
|
+
>
|
|
1502
|
+
</SolidGlobalSearchElement>
|
|
1503
|
+
</div>
|
|
1504
|
+
</>
|
|
1419
1505
|
)}
|
|
1420
1506
|
|
|
1421
1507
|
</div>
|
|
1422
|
-
<div className="flex items-center solid-header-buttons-wrapper solid-list-toolbar-actions">
|
|
1508
|
+
<div className="flex items-center solid-header-buttons-wrapper solid-list-toolbar-actions lg:ml-auto">
|
|
1423
1509
|
<SolidHeaderRequestStatus label={headerRequestStatusLabel} />
|
|
1424
1510
|
{params.embeded === false && (
|
|
1425
|
-
<div className="
|
|
1511
|
+
<div className="solid-list-search-toggle">
|
|
1426
1512
|
<SolidButton
|
|
1427
1513
|
type="button"
|
|
1428
1514
|
size="small"
|
|
@@ -1529,23 +1615,6 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
1529
1615
|
)}
|
|
1530
1616
|
</div>
|
|
1531
1617
|
</div>
|
|
1532
|
-
{/* </div> */}
|
|
1533
|
-
{shouldShowMobileSearchElement && params.embeded === false && (
|
|
1534
|
-
<div className="flex lg:hidden">
|
|
1535
|
-
<SolidGlobalSearchElement
|
|
1536
|
-
viewType="list"
|
|
1537
|
-
showSaveFilterPopup={showSaveFilterPopup}
|
|
1538
|
-
setShowSaveFilterPopup={setShowSaveFilterPopup}
|
|
1539
|
-
ref={solidGlobalSearchElementRef}
|
|
1540
|
-
viewData={solidListViewMetaData}
|
|
1541
|
-
handleApplyCustomFilter={handleApplyCustomFilter}
|
|
1542
|
-
filterPredicates={filterPredicates}
|
|
1543
|
-
>
|
|
1544
|
-
|
|
1545
|
-
</SolidGlobalSearchElement>
|
|
1546
|
-
</div>
|
|
1547
|
-
|
|
1548
|
-
)}
|
|
1549
1618
|
</div>
|
|
1550
1619
|
}
|
|
1551
1620
|
|
|
@@ -1670,30 +1739,30 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
1670
1739
|
const presentation = resolveButtonPresentation(button?.attrs);
|
|
1671
1740
|
if (!presentation.showIcon && !presentation.showLabel) return null;
|
|
1672
1741
|
return (
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1742
|
+
<SolidButton
|
|
1743
|
+
type="button"
|
|
1744
|
+
icon={presentation.icon}
|
|
1745
|
+
iconPos={presentation.iconPos}
|
|
1746
|
+
label={presentation.label}
|
|
1747
|
+
tooltip={presentation.tooltip}
|
|
1748
|
+
aria-label={presentation.isIconOnly ? (presentation.tooltip ?? button?.attrs?.action ?? "Action") : undefined}
|
|
1749
|
+
className={[
|
|
1750
|
+
"solid-inline-row-button w-full text-left gap-2",
|
|
1751
|
+
presentation.isIconOnly ? "solid-icon-button" : "",
|
|
1752
|
+
presentation.buttonClassName ? presentation.buttonClassName : ""
|
|
1753
|
+
].filter(Boolean).join(" ")}
|
|
1754
|
+
size="small"
|
|
1755
|
+
variant="ghost"
|
|
1756
|
+
onClick={() => {
|
|
1757
|
+
const event = {
|
|
1758
|
+
params,
|
|
1759
|
+
rowData: rowData,
|
|
1760
|
+
solidListViewMetaData:
|
|
1761
|
+
solidListViewMetaData?.data,
|
|
1762
|
+
};
|
|
1763
|
+
handleCustomButtonClick(button.attrs, event);
|
|
1764
|
+
}}
|
|
1765
|
+
/>
|
|
1697
1766
|
);
|
|
1698
1767
|
})()
|
|
1699
1768
|
);
|
|
@@ -1710,7 +1779,7 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
1710
1779
|
<Column
|
|
1711
1780
|
header={showRowEditAsIconOnly ? "" : "Edit"}
|
|
1712
1781
|
body={(rowData) => {
|
|
1713
|
-
const shouldHideEditOrDeleteButton = isDraftPublishWorkflowEnabled
|
|
1782
|
+
const shouldHideEditOrDeleteButton = isArchivedListRow(isDraftPublishWorkflowEnabled, rowData);
|
|
1714
1783
|
return (
|
|
1715
1784
|
<>
|
|
1716
1785
|
{!shouldHideEditOrDeleteButton && (
|
|
@@ -1753,7 +1822,7 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
1753
1822
|
<Column
|
|
1754
1823
|
header={showRowDeleteAsIconOnly ? "" : "Delete"}
|
|
1755
1824
|
body={(rowData) => {
|
|
1756
|
-
const shouldHideEditOrDeleteButton = isDraftPublishWorkflowEnabled
|
|
1825
|
+
const shouldHideEditOrDeleteButton = isArchivedListRow(isDraftPublishWorkflowEnabled, rowData);
|
|
1757
1826
|
return (
|
|
1758
1827
|
<>
|
|
1759
1828
|
{(!shouldHideEditOrDeleteButton) && (
|
|
@@ -1785,23 +1854,27 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
1785
1854
|
<Column
|
|
1786
1855
|
frozen
|
|
1787
1856
|
alignFrozen="right"
|
|
1857
|
+
className="solid-data-table-row-action-cell"
|
|
1788
1858
|
body={(rowData) =>
|
|
1789
1859
|
rowData?.deletedAt ? (
|
|
1790
1860
|
<div className="flex justify-content-center align-items-center" data-no-row-click="true">
|
|
1791
|
-
<
|
|
1861
|
+
<button
|
|
1862
|
+
type="button"
|
|
1792
1863
|
onClick={(event) => {
|
|
1793
1864
|
event.stopPropagation();
|
|
1794
1865
|
recoverById(rowData.id);
|
|
1795
1866
|
}}
|
|
1796
1867
|
className="retrieve-button solid-row-menu-trigger"
|
|
1868
|
+
aria-label="Recover record"
|
|
1869
|
+
title="Recover"
|
|
1797
1870
|
>
|
|
1798
1871
|
<RotateCcw size={14} className={styles.retrieveIcon} />
|
|
1799
|
-
</
|
|
1872
|
+
</button>
|
|
1800
1873
|
</div>
|
|
1801
1874
|
) : (
|
|
1802
1875
|
<>
|
|
1803
|
-
{solidListViewLayout?.attrs?.showRowContextMenu !==
|
|
1804
|
-
|
|
1876
|
+
{solidListViewLayout?.attrs?.showRowContextMenu !== false &&
|
|
1877
|
+
!isArchivedListRow(isDraftPublishWorkflowEnabled, rowData) && (
|
|
1805
1878
|
<div className="flex justify-end" data-no-row-click="true">
|
|
1806
1879
|
<SolidListViewRowActionsMenu
|
|
1807
1880
|
rowData={rowData}
|
|
@@ -1814,7 +1887,6 @@ export const SolidListView = forwardRef<SolidListViewHandle, SolidListViewParams
|
|
|
1814
1887
|
handleCustomButtonClick={handleCustomButtonClick}
|
|
1815
1888
|
contentClassName={styles.rowActionsOverlay}
|
|
1816
1889
|
onSelectRow={(selectedRow: any) => {
|
|
1817
|
-
selectedDataRef.current = selectedRow;
|
|
1818
1890
|
setSelectedSolidViewData(selectedRow);
|
|
1819
1891
|
}}
|
|
1820
1892
|
onEdit={(selectedRow: any) => {
|
|
@@ -158,7 +158,7 @@ export var SolidListViewConfigure = function (_a) {
|
|
|
158
158
|
true) && _jsx(SolidDropdownMenuSeparator, {}), isHeaderActionEnabled('customizeLayout') && actionsAllowed.includes("".concat(permissionExpression('userViewMetadata', 'create'))) && (_jsxs(SolidDropdownMenuSub, { children: [_jsxs(SolidDropdownMenuSubTrigger, { className: "solid-header-dropdown-item", children: [_jsx(SlidersHorizontal, { size: 14, className: "solid-header-action-button-icon" }), _jsx("span", { className: "solid-header-action-button-label", children: "Layout" })] }), _jsxs(SolidDropdownMenuSubContent, { className: "customize-layout-panel", children: [showSwitchType && (_jsxs(_Fragment, { children: [_jsx(SolidDropdownMenuLabel, { children: "Switch Type" }), _jsx(SolidDropdownMenuRadioGroup, { value: view, onValueChange: handleViewTypeChange, children: visibleViewModes.map(function (option) { return (_jsx(SolidDropdownMenuRadioItem, { value: option.type, children: capitalize(option.type) }, option.type)); }) }), _jsx(SolidDropdownMenuSeparator, {})] })), _jsx(SolidDropdownMenuLabel, { children: "Row Spacing" }), _jsx(SolidDropdownMenuRadioGroup, { value: size, onValueChange: function (value) { return setSize(value); }, children: sizeOptions.map(function (option) { return (_jsx(SolidDropdownMenuRadioItem, { value: option.value, children: option.label }, option.value)); }) }), _jsx(SolidDropdownMenuSeparator, {}), _jsxs(SolidDropdownMenuItem, { onSelect: function () {
|
|
159
159
|
setShowColumnSelectorDialog(true);
|
|
160
160
|
setIsCogMenuOpen(false);
|
|
161
|
-
}, children: [_jsx(Table, { size: 14, className: "solid-header-action-button-icon" }), _jsx("span", { className: "solid-header-action-button-label", children: "
|
|
161
|
+
}, children: [_jsx(Table, { size: 14, className: "solid-header-action-button-icon" }), _jsx("span", { className: "solid-header-action-button-label", children: "Columns" })] })] })] })), isHeaderActionEnabled('savedFilters') && actionsAllowed.includes("".concat(permissionExpression('savedFilters', 'create'))) && (_jsxs(SolidDropdownMenuItem, { className: "solid-header-dropdown-item", onSelect: function () {
|
|
162
162
|
setShowSaveFilterPopup(true);
|
|
163
163
|
setIsCogMenuOpen(false);
|
|
164
164
|
}, children: [_jsx(Save, { size: 14, className: "solid-header-action-button-icon" }), _jsx("span", { className: "solid-header-action-button-label", children: "Save Custom Filter" })] })), _jsxs(SolidDropdownMenuItem, { className: "solid-header-dropdown-item", onSelect: function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolidListViewConfigure.js","sourceRoot":"","sources":["../../../../src/components/core/list/SolidListViewConfigure.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACxG,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC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I,EAAE,wBAAwB,EAC9B,YAAY,EAAE,2BAA2B,EACzC,SAAS,EAAC,8BAA8B,EACxC,KAAK,EAAE,EAAE,KAAK,EAAE,gCAAgC,EAAE,aAElD,MAAC,iBAAiB,IAAC,SAAS,EAAC,0BAA0B,aACnD,0BACI,KAAC,gBAAgB,IAAC,SAAS,EAAC,+BAA+B,gCAAmC,EAC9F,KAAC,sBAAsB,IAAC,SAAS,EAAC,kCAAkC,4EAE3C,IACvB,EACN,KAAC,gBAAgB,IAAC,SAAS,EAAC,2BAA2B,GAAG,IAC1C,EACpB,KAAC,oBAAoB,IAAC,SAAS,EAAC,yBAAyB,GAAG,EAC5D,KAAC,eAAe,IAAC,SAAS,EAAC,0BAA0B,YACjD,KAAC,uBAAuB,IACpB,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,cAAM,OAAA,2BAA2B,CAAC,KAAK,CAAC,EAAlC,CAAkC,GACnD,GACY,IACR,EACb,gBAAgB;gBACb,KAAC,kBAAkB,IACf,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAmB,EACxC,gBAAgB,EAAE,gBAAgB,EAClC,yBAAyB,EAAE,yBAAyB,GACtD,IAEJ,CACT,CAAA;AACL,CAAC,CAAA","sourcesContent":["import { useSession } from \"../../../hooks/useSession\";\nimport { canExportRecords, canImportRecords, permissionExpression } from \"../../../helpers/permissions\";\nimport { usePathname } from \"../../../hooks/usePathname\";\nimport { useRouter } from \"../../../hooks/useRouter\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { SolidListColumnSelector } from \"./SolidColumnSelector/SolidListColumnSelector\";\nimport { SolidExport } from \"../../../components/common/SolidExport\";\nimport { useHandleListCustomButtonClick } from \"../../../components/common/useHandleListCustomButtonClick\";\nimport { SolidListViewHeaderContextMenuButton } from \"./SolidListViewHeaderContextMenuButton\";\nimport { isButtonVisibleInCurrentEnv } from \"../../../helpers/buttonEnvironment\";\nimport \"../../common/solid-export.css\";\nimport { SolidGenericImport } from \"../common/SolidGenericImport/SolidGenericImport\";\nimport { hasAnyRole } from \"../../../helpers/rolesHelper\";\nimport { SolidListViewHeaderButton } from \"./SolidListViewHeaderButton\";\nimport { capitalize } from \"lodash\";\nimport { Archive, Cog, Download, RefreshCw, Save, SlidersHorizontal, Table, Trash2, Upload } from \"lucide-react\";\nimport { storeCurrentModelViewContext } from \"../../../helpers/modelViewPersistence\";\nimport {\n SolidDialog,\n SolidDialogBody,\n SolidDialogClose,\n SolidDialogDescription,\n SolidDialogHeader,\n SolidDialogSeparator,\n SolidDialogTitle,\n SolidDropdownMenu,\n SolidDropdownMenuCheckboxItem,\n SolidDropdownMenuContent,\n SolidDropdownMenuItem,\n SolidDropdownMenuLabel,\n SolidDropdownMenuRadioGroup,\n SolidDropdownMenuRadioItem,\n SolidDropdownMenuSeparator,\n SolidDropdownMenuSub,\n SolidDropdownMenuSubContent,\n SolidDropdownMenuSubTrigger,\n SolidDropdownMenuTrigger,\n} from \"../../shad-cn-ui\";\n\nexport type ViewMode = {\n actionId: string;\n actionName: string;\n menuItemId: string;\n menuItemName: string;\n type: string;\n}\n\nexport const SolidListViewConfigure = (\n { listViewMetaData,\n solidListViewLayout,\n setShowArchived,\n showArchived,\n viewData,\n sizeOptions,\n setSize,\n size,\n viewModes,\n params,\n actionsAllowed,\n selectedRecords,\n setDialogVisible,\n setShowSaveFilterPopup,\n filters,\n handleFetchUpdatedRecords,\n setRecoverDialogVisible,\n\n }:\n any) => {\n // const [visible, setVisible] = useState<boolean>(false);\n const handleCustomButtonClick = useHandleListCustomButtonClick();\n const [openImportDialog, setOpenImportDialog] = useState<boolean>(false);\n const pathname = usePathname();\n const router = useRouter();\n const [view, setView] = useState<string>(\"\");\n const [exportView, setExportView] = useState<boolean>(false);\n const [isCogMenuOpen, setIsCogMenuOpen] = useState(false);\n const [showColumnSelectorDialog, setShowColumnSelectorDialog] = useState(false);\n\n const handleViewChange = (newView: ViewMode) => {\n if (view === newView.type) return; // Prevent unnecessary updates\n const pathSegments = pathname.split('/').filter(Boolean);\n pathSegments[pathSegments.length - 1] = newView.type; // Replace the last part with new view\n const newPath = '/' + pathSegments.join('/') + `?menuItemId=${newView.menuItemId}&menuItemName=${newView.menuItemName}&actionId=${newView.actionId}&actionName=${newView.actionName}`;\n storeCurrentModelViewContext(newPath);\n router.push(newPath);\n };\n\n useEffect(() => {\n if (typeof pathname === 'string') {\n const pathSegments = pathname.split('/').filter(Boolean);\n if (pathSegments.length > 0) {\n setView(pathSegments[pathSegments.length - 1]);\n }\n }\n }, [pathname])\n\n //Build a map of actionKey → boolean at the top level\n const headerActions = solidListViewLayout?.attrs ?? {};\n\n const normalizeAction = (value: boolean | string[]) => {\n if (value === true) return { enabled: true, roles: [] };\n if (value === false) return { enabled: false, roles: [] };\n if (Array.isArray(value)) return { enabled: true, roles: value };\n return { enabled: true, roles: [] }; // default\n };\n const normalized = {\n import: normalizeAction(headerActions.import),\n export: normalizeAction(headerActions.export),\n customizeLayout: normalizeAction(headerActions.customizeLayout),\n savedFilters: normalizeAction(headerActions.savedFilters),\n };\n\n // Role checks\n const { data: session, status } = useSession();\n const user = session?.user;\n const useRoleCheck = (roles: string[]) => hasAnyRole(user?.roles, roles);\n\n // Map of action → roleCheck\n const roleCheckMap = {\n import: useRoleCheck(normalized.import.roles),\n export: useRoleCheck(normalized.export.roles),\n customizeLayout: useRoleCheck(normalized.customizeLayout.roles),\n savedFilters: useRoleCheck(normalized.savedFilters.roles),\n };\n\n const isHeaderActionEnabled = (action: keyof typeof normalized) => {\n const { enabled, roles } = normalized[action];\n\n // 1. If explicitly disabled\n if (!enabled) return false;\n\n // 2. If roles list exists → must have at least one\n if (roles.length > 0) {\n return roleCheckMap[action] === true;\n }\n // 3. No restrictions → enabled\n return true;\n };\n const canImport = isHeaderActionEnabled(\"import\") && canImportRecords(actionsAllowed, params.modelName);\n const canExport = isHeaderActionEnabled(\"export\") && canExportRecords(actionsAllowed, params.modelName);\n\n const clearLocalstorageCache = () => {\n const currentPageUrl = window.location.pathname; // Get the current page URL\n localStorage.removeItem(currentPageUrl); // Remove from local storage with the URL as the key\n window.location.reload();\n };\n\n const visibleViewModes = (() => {\n if (!Array.isArray(viewModes)) return [];\n\n const uniqueByType = new Map<string, ViewMode>();\n const currentActionId = String(params?.actionId ?? \"\");\n const currentMenuItemId = String(params?.menuItemId ?? \"\");\n\n for (const mode of viewModes) {\n if (!mode || typeof mode.type !== \"string\") continue;\n\n const existing = uniqueByType.get(mode.type);\n if (!existing) {\n uniqueByType.set(mode.type, mode);\n continue;\n }\n\n const modeActionId = String(mode.actionId ?? \"\");\n const modeMenuItemId = String(mode.menuItemId ?? \"\");\n const existingActionId = String(existing.actionId ?? \"\");\n const existingMenuItemId = String(existing.menuItemId ?? \"\");\n\n const modeIsCurrent = (currentActionId && modeActionId === currentActionId) ||\n (currentMenuItemId && modeMenuItemId === currentMenuItemId);\n const existingIsCurrent = (currentActionId && existingActionId === currentActionId) ||\n (currentMenuItemId && existingMenuItemId === currentMenuItemId);\n\n if (modeIsCurrent && !existingIsCurrent) {\n uniqueByType.set(mode.type, mode);\n }\n }\n\n return Array.from(uniqueByType.values());\n })();\n const showSwitchType = visibleViewModes.length > 0;\n const visibleHeaderButtons = (solidListViewLayout?.attrs?.headerButtons ?? []).filter((rb: any) => isButtonVisibleInCurrentEnv(rb?.attrs));\n const contextMenuHeaderButtons = visibleHeaderButtons.filter((rb: any) => rb?.attrs?.actionInContextMenu === true);\n const mobileOnlyHeaderButtons = visibleHeaderButtons.filter((rb: any) => rb?.attrs?.actionInContextMenu !== true);\n\n const handleViewTypeChange = (nextType: string) => {\n const nextView = visibleViewModes.find((option: ViewMode) => option.type === nextType);\n if (nextView) {\n handleViewChange(nextView);\n }\n };\n\n return (\n <div className=\"position-relative\">\n <SolidDropdownMenu open={isCogMenuOpen} onOpenChange={setIsCogMenuOpen}>\n <SolidDropdownMenuTrigger asChild>\n <button\n type=\"button\"\n className=\"solid-icon-button solid-header-cog-trigger\"\n aria-label=\"Open list options\"\n >\n <Cog size={16} />\n </button>\n </SolidDropdownMenuTrigger>\n <SolidDropdownMenuContent className=\"listview-cogwheel-panel\">\n {(\n (actionsAllowed.includes(`${permissionExpression(params.modelName, 'deleteMany')}`) &&\n viewData?.data?.solidView?.layout?.attrs?.delete !== false &&\n selectedRecords.length > 0) ||\n canImport ||\n canExport ||\n isHeaderActionEnabled('customizeLayout') && actionsAllowed.includes(`${permissionExpression('userViewMetadata', 'create')}`) ||\n isHeaderActionEnabled('savedFilters') && actionsAllowed.includes(`${permissionExpression('savedFilters', 'create')}`) ||\n contextMenuHeaderButtons.length > 0 ||\n mobileOnlyHeaderButtons.length > 0 ||\n viewData?.data?.solidView?.model?.enableSoftDelete\n ) && (\n <>\n {actionsAllowed.includes(`${permissionExpression(params.modelName, 'deleteMany')}`) && viewData?.data?.solidView?.layout?.attrs?.delete !== false && selectedRecords.length > 0 && (\n <SolidDropdownMenuItem\n className=\"solid-header-dropdown-item solid-header-dropdown-item-danger\"\n onSelect={() => {\n setDialogVisible(true);\n setIsCogMenuOpen(false);\n }}\n >\n <Trash2 size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Delete</span>\n </SolidDropdownMenuItem>\n )}\n {canImport && (\n <SolidDropdownMenuItem\n className=\"solid-header-dropdown-item\"\n onSelect={() => {\n setOpenImportDialog(true);\n setIsCogMenuOpen(false);\n }}\n >\n <Download size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Import</span>\n </SolidDropdownMenuItem>\n )}\n {canExport && (\n <SolidDropdownMenuItem\n className=\"solid-header-dropdown-item\"\n onSelect={() => {\n setExportView((current) => !current);\n setIsCogMenuOpen(false);\n }}\n >\n <Upload size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Export</span>\n </SolidDropdownMenuItem>\n )}\n {contextMenuHeaderButtons\n ?.map((button: any, index: number) => (\n <SolidListViewHeaderContextMenuButton\n key={index}\n button={button}\n params={params}\n solidListViewMetaData={listViewMetaData}\n handleCustomButtonClick={handleCustomButtonClick}\n selectedRecords={selectedRecords}\n filters={filters}\n onActionComplete={() => setIsCogMenuOpen(false)}\n />\n ))}\n <div className=\"lg:hidden flex flex-col gap-1\">\n {mobileOnlyHeaderButtons\n ?.map((button: any, index: number) => (\n <SolidListViewHeaderContextMenuButton\n key={`mobile-${index}`}\n button={button}\n params={params}\n solidListViewMetaData={listViewMetaData}\n handleCustomButtonClick={handleCustomButtonClick}\n selectedRecords={selectedRecords}\n filters={filters}\n onActionComplete={() => setIsCogMenuOpen(false)}\n />\n ))}\n </div>\n {viewData?.data?.solidView?.model?.enableSoftDelete && (\n <SolidDropdownMenuCheckboxItem\n className={showArchived ? \"solid-archive-toggle-item-active\" : undefined}\n checked={showArchived}\n icon={<Archive size={14} className=\"solid-header-action-button-icon solid-archive-toggle-icon\" />}\n onCheckedChange={() => setShowArchived(!showArchived)}\n >\n Show Archived Rows\n </SolidDropdownMenuCheckboxItem>\n )}\n {showArchived && (\n <SolidDropdownMenuItem\n className=\"solid-header-dropdown-item lg:hidden\"\n onSelect={() => {\n setRecoverDialogVisible(true);\n setIsCogMenuOpen(false);\n }}\n >\n <RefreshCw size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Recover</span>\n </SolidDropdownMenuItem>\n )}\n\n {(\n isHeaderActionEnabled('customizeLayout') && actionsAllowed.includes(`${permissionExpression('userViewMetadata', 'create')}`) ||\n isHeaderActionEnabled('savedFilters') && actionsAllowed.includes(`${permissionExpression('savedFilters', 'create')}`) ||\n true\n ) && <SolidDropdownMenuSeparator />}\n\n {isHeaderActionEnabled('customizeLayout') && actionsAllowed.includes(`${permissionExpression('userViewMetadata', 'create')}`) && (\n <SolidDropdownMenuSub>\n <SolidDropdownMenuSubTrigger className=\"solid-header-dropdown-item\">\n <SlidersHorizontal size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Layout</span>\n </SolidDropdownMenuSubTrigger>\n <SolidDropdownMenuSubContent className=\"customize-layout-panel\">\n {showSwitchType && (\n <>\n <SolidDropdownMenuLabel>Switch Type</SolidDropdownMenuLabel>\n <SolidDropdownMenuRadioGroup value={view} onValueChange={handleViewTypeChange}>\n {visibleViewModes.map((option: ViewMode) => (\n <SolidDropdownMenuRadioItem key={option.type} value={option.type}>\n {capitalize(option.type)}\n </SolidDropdownMenuRadioItem>\n ))}\n </SolidDropdownMenuRadioGroup>\n <SolidDropdownMenuSeparator />\n </>\n )}\n <SolidDropdownMenuLabel>Row Spacing</SolidDropdownMenuLabel>\n <SolidDropdownMenuRadioGroup value={size} onValueChange={(value: string) => setSize(value)}>\n {sizeOptions.map((option: any) => (\n <SolidDropdownMenuRadioItem key={option.value} value={option.value}>\n {option.label}\n </SolidDropdownMenuRadioItem>\n ))}\n </SolidDropdownMenuRadioGroup>\n <SolidDropdownMenuSeparator />\n <SolidDropdownMenuItem\n onSelect={() => {\n setShowColumnSelectorDialog(true);\n setIsCogMenuOpen(false);\n }}\n >\n <Table size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Column Selector</span>\n </SolidDropdownMenuItem>\n </SolidDropdownMenuSubContent>\n </SolidDropdownMenuSub>\n )}\n {isHeaderActionEnabled('savedFilters') && actionsAllowed.includes(`${permissionExpression('savedFilters', 'create')}`) && (\n <SolidDropdownMenuItem\n className=\"solid-header-dropdown-item\"\n onSelect={() => {\n setShowSaveFilterPopup(true);\n setIsCogMenuOpen(false);\n }}\n >\n <Save size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Save Custom Filter</span>\n </SolidDropdownMenuItem>\n )}\n <SolidDropdownMenuItem\n className=\"solid-header-dropdown-item\"\n onSelect={() => {\n clearLocalstorageCache();\n setIsCogMenuOpen(false);\n }}\n >\n <Trash2 size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Reset View</span>\n </SolidDropdownMenuItem>\n </>\n )}\n </SolidDropdownMenuContent>\n </SolidDropdownMenu>\n <SolidDialog\n open={exportView}\n onOpenChange={setExportView}\n className=\"solid-kanban-export-dialog solid-list-export-dialog\"\n style={{ width: \"min(980px, calc(100vw - 32px))\" }}\n >\n <SolidDialogHeader className=\"solid-export-dialog-header\">\n <div>\n <SolidDialogTitle>Export</SolidDialogTitle>\n <SolidDialogDescription className=\"solid-filter-dialog-subtitle m-0\">\n Choose the file format, refine the field set, and save reusable export templates.\n </SolidDialogDescription>\n </div>\n <SolidDialogClose />\n </SolidDialogHeader>\n <SolidDialogSeparator />\n <SolidDialogBody className=\"solid-kanban-export-dialog-body\">\n <SolidExport\n listViewMetaData={listViewMetaData}\n filters={filters}\n onExportComplete={() => setExportView(false)}\n />\n </SolidDialogBody>\n </SolidDialog>\n <SolidDialog\n open={showColumnSelectorDialog}\n onOpenChange={setShowColumnSelectorDialog}\n className=\"solid-column-selector-dialog\"\n style={{ width: \"min(388px, calc(100vw - 2rem))\" }}\n >\n <SolidDialogHeader className=\"solid-filter-dialog-head\">\n <div>\n <SolidDialogTitle className=\"solid-filter-dialog-title m-0\">Column Selector</SolidDialogTitle>\n <SolidDialogDescription className=\"solid-filter-dialog-subtitle m-0\">\n Choose visible columns and reorder them for this list view.\n </SolidDialogDescription>\n </div>\n <SolidDialogClose className=\"solid-filter-dialog-close\" />\n </SolidDialogHeader>\n <SolidDialogSeparator className=\"solid-filter-dialog-sep\" />\n <SolidDialogBody className=\"solid-filter-dialog-body\">\n <SolidListColumnSelector\n listViewMetaData={listViewMetaData}\n onClose={() => setShowColumnSelectorDialog(false)}\n />\n </SolidDialogBody>\n </SolidDialog>\n {openImportDialog &&\n <SolidGenericImport\n openImportDialog={openImportDialog}\n setOpenImportDialog={setOpenImportDialog}\n listViewMetaData={listViewMetaData}\n handleFetchUpdatedRecords={handleFetchUpdatedRecords}\n />\n }\n </div>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SolidListViewConfigure.js","sourceRoot":"","sources":["../../../../src/components/core/list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,eAAe,IAAC,SAAS,EAAC,iCAAiC,YACxD,KAAC,WAAW,IACR,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,cAAM,OAAA,aAAa,CAAC,KAAK,CAAC,EAApB,CAAoB,GAC9C,GACY,IACR,EACd,MAAC,WAAW,IACR,IAAI,EAAE,wBAAwB,EAC9B,YAAY,EAAE,2BAA2B,EACzC,SAAS,EAAC,8BAA8B,EACxC,KAAK,EAAE,EAAE,KAAK,EAAE,gCAAgC,EAAE,aAElD,MAAC,iBAAiB,IAAC,SAAS,EAAC,0BAA0B,aACnD,0BACI,KAAC,gBAAgB,IAAC,SAAS,EAAC,+BAA+B,gCAAmC,EAC9F,KAAC,sBAAsB,IAAC,SAAS,EAAC,kCAAkC,4EAE3C,IACvB,EACN,KAAC,gBAAgB,IAAC,SAAS,EAAC,2BAA2B,GAAG,IAC1C,EACpB,KAAC,oBAAoB,IAAC,SAAS,EAAC,yBAAyB,GAAG,EAC5D,KAAC,eAAe,IAAC,SAAS,EAAC,0BAA0B,YACjD,KAAC,uBAAuB,IACpB,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,cAAM,OAAA,2BAA2B,CAAC,KAAK,CAAC,EAAlC,CAAkC,GACnD,GACY,IACR,EACb,gBAAgB;gBACb,KAAC,kBAAkB,IACf,gBAAgB,EAAE,gBAAgB,EAClC,mBAAmB,EAAE,mBAAmB,EACxC,gBAAgB,EAAE,gBAAgB,EAClC,yBAAyB,EAAE,yBAAyB,GACtD,IAEJ,CACT,CAAA;AACL,CAAC,CAAA","sourcesContent":["import { useSession } from \"../../../hooks/useSession\";\nimport { canExportRecords, canImportRecords, permissionExpression } from \"../../../helpers/permissions\";\nimport { usePathname } from \"../../../hooks/usePathname\";\nimport { useRouter } from \"../../../hooks/useRouter\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { SolidListColumnSelector } from \"./SolidColumnSelector/SolidListColumnSelector\";\nimport { SolidExport } from \"../../../components/common/SolidExport\";\nimport { useHandleListCustomButtonClick } from \"../../../components/common/useHandleListCustomButtonClick\";\nimport { SolidListViewHeaderContextMenuButton } from \"./SolidListViewHeaderContextMenuButton\";\nimport { isButtonVisibleInCurrentEnv } from \"../../../helpers/buttonEnvironment\";\nimport \"../../common/solid-export.css\";\nimport { SolidGenericImport } from \"../common/SolidGenericImport/SolidGenericImport\";\nimport { hasAnyRole } from \"../../../helpers/rolesHelper\";\nimport { SolidListViewHeaderButton } from \"./SolidListViewHeaderButton\";\nimport { capitalize } from \"lodash\";\nimport { Archive, Cog, Download, RefreshCw, Save, SlidersHorizontal, Table, Trash2, Upload } from \"lucide-react\";\nimport { storeCurrentModelViewContext } from \"../../../helpers/modelViewPersistence\";\nimport {\n SolidDialog,\n SolidDialogBody,\n SolidDialogClose,\n SolidDialogDescription,\n SolidDialogHeader,\n SolidDialogSeparator,\n SolidDialogTitle,\n SolidDropdownMenu,\n SolidDropdownMenuCheckboxItem,\n SolidDropdownMenuContent,\n SolidDropdownMenuItem,\n SolidDropdownMenuLabel,\n SolidDropdownMenuRadioGroup,\n SolidDropdownMenuRadioItem,\n SolidDropdownMenuSeparator,\n SolidDropdownMenuSub,\n SolidDropdownMenuSubContent,\n SolidDropdownMenuSubTrigger,\n SolidDropdownMenuTrigger,\n} from \"../../shad-cn-ui\";\n\nexport type ViewMode = {\n actionId: string;\n actionName: string;\n menuItemId: string;\n menuItemName: string;\n type: string;\n}\n\nexport const SolidListViewConfigure = (\n { listViewMetaData,\n solidListViewLayout,\n setShowArchived,\n showArchived,\n viewData,\n sizeOptions,\n setSize,\n size,\n viewModes,\n params,\n actionsAllowed,\n selectedRecords,\n setDialogVisible,\n setShowSaveFilterPopup,\n filters,\n handleFetchUpdatedRecords,\n setRecoverDialogVisible,\n\n }:\n any) => {\n // const [visible, setVisible] = useState<boolean>(false);\n const handleCustomButtonClick = useHandleListCustomButtonClick();\n const [openImportDialog, setOpenImportDialog] = useState<boolean>(false);\n const pathname = usePathname();\n const router = useRouter();\n const [view, setView] = useState<string>(\"\");\n const [exportView, setExportView] = useState<boolean>(false);\n const [isCogMenuOpen, setIsCogMenuOpen] = useState(false);\n const [showColumnSelectorDialog, setShowColumnSelectorDialog] = useState(false);\n\n const handleViewChange = (newView: ViewMode) => {\n if (view === newView.type) return; // Prevent unnecessary updates\n const pathSegments = pathname.split('/').filter(Boolean);\n pathSegments[pathSegments.length - 1] = newView.type; // Replace the last part with new view\n const newPath = '/' + pathSegments.join('/') + `?menuItemId=${newView.menuItemId}&menuItemName=${newView.menuItemName}&actionId=${newView.actionId}&actionName=${newView.actionName}`;\n storeCurrentModelViewContext(newPath);\n router.push(newPath);\n };\n\n useEffect(() => {\n if (typeof pathname === 'string') {\n const pathSegments = pathname.split('/').filter(Boolean);\n if (pathSegments.length > 0) {\n setView(pathSegments[pathSegments.length - 1]);\n }\n }\n }, [pathname])\n\n //Build a map of actionKey → boolean at the top level\n const headerActions = solidListViewLayout?.attrs ?? {};\n\n const normalizeAction = (value: boolean | string[]) => {\n if (value === true) return { enabled: true, roles: [] };\n if (value === false) return { enabled: false, roles: [] };\n if (Array.isArray(value)) return { enabled: true, roles: value };\n return { enabled: true, roles: [] }; // default\n };\n const normalized = {\n import: normalizeAction(headerActions.import),\n export: normalizeAction(headerActions.export),\n customizeLayout: normalizeAction(headerActions.customizeLayout),\n savedFilters: normalizeAction(headerActions.savedFilters),\n };\n\n // Role checks\n const { data: session, status } = useSession();\n const user = session?.user;\n const useRoleCheck = (roles: string[]) => hasAnyRole(user?.roles, roles);\n\n // Map of action → roleCheck\n const roleCheckMap = {\n import: useRoleCheck(normalized.import.roles),\n export: useRoleCheck(normalized.export.roles),\n customizeLayout: useRoleCheck(normalized.customizeLayout.roles),\n savedFilters: useRoleCheck(normalized.savedFilters.roles),\n };\n\n const isHeaderActionEnabled = (action: keyof typeof normalized) => {\n const { enabled, roles } = normalized[action];\n\n // 1. If explicitly disabled\n if (!enabled) return false;\n\n // 2. If roles list exists → must have at least one\n if (roles.length > 0) {\n return roleCheckMap[action] === true;\n }\n // 3. No restrictions → enabled\n return true;\n };\n const canImport = isHeaderActionEnabled(\"import\") && canImportRecords(actionsAllowed, params.modelName);\n const canExport = isHeaderActionEnabled(\"export\") && canExportRecords(actionsAllowed, params.modelName);\n\n const clearLocalstorageCache = () => {\n const currentPageUrl = window.location.pathname; // Get the current page URL\n localStorage.removeItem(currentPageUrl); // Remove from local storage with the URL as the key\n window.location.reload();\n };\n\n const visibleViewModes = (() => {\n if (!Array.isArray(viewModes)) return [];\n\n const uniqueByType = new Map<string, ViewMode>();\n const currentActionId = String(params?.actionId ?? \"\");\n const currentMenuItemId = String(params?.menuItemId ?? \"\");\n\n for (const mode of viewModes) {\n if (!mode || typeof mode.type !== \"string\") continue;\n\n const existing = uniqueByType.get(mode.type);\n if (!existing) {\n uniqueByType.set(mode.type, mode);\n continue;\n }\n\n const modeActionId = String(mode.actionId ?? \"\");\n const modeMenuItemId = String(mode.menuItemId ?? \"\");\n const existingActionId = String(existing.actionId ?? \"\");\n const existingMenuItemId = String(existing.menuItemId ?? \"\");\n\n const modeIsCurrent = (currentActionId && modeActionId === currentActionId) ||\n (currentMenuItemId && modeMenuItemId === currentMenuItemId);\n const existingIsCurrent = (currentActionId && existingActionId === currentActionId) ||\n (currentMenuItemId && existingMenuItemId === currentMenuItemId);\n\n if (modeIsCurrent && !existingIsCurrent) {\n uniqueByType.set(mode.type, mode);\n }\n }\n\n return Array.from(uniqueByType.values());\n })();\n const showSwitchType = visibleViewModes.length > 0;\n const visibleHeaderButtons = (solidListViewLayout?.attrs?.headerButtons ?? []).filter((rb: any) => isButtonVisibleInCurrentEnv(rb?.attrs));\n const contextMenuHeaderButtons = visibleHeaderButtons.filter((rb: any) => rb?.attrs?.actionInContextMenu === true);\n const mobileOnlyHeaderButtons = visibleHeaderButtons.filter((rb: any) => rb?.attrs?.actionInContextMenu !== true);\n\n const handleViewTypeChange = (nextType: string) => {\n const nextView = visibleViewModes.find((option: ViewMode) => option.type === nextType);\n if (nextView) {\n handleViewChange(nextView);\n }\n };\n\n return (\n <div className=\"position-relative\">\n <SolidDropdownMenu open={isCogMenuOpen} onOpenChange={setIsCogMenuOpen}>\n <SolidDropdownMenuTrigger asChild>\n <button\n type=\"button\"\n className=\"solid-icon-button solid-header-cog-trigger\"\n aria-label=\"Open list options\"\n >\n <Cog size={16} />\n </button>\n </SolidDropdownMenuTrigger>\n <SolidDropdownMenuContent className=\"listview-cogwheel-panel\">\n {(\n (actionsAllowed.includes(`${permissionExpression(params.modelName, 'deleteMany')}`) &&\n viewData?.data?.solidView?.layout?.attrs?.delete !== false &&\n selectedRecords.length > 0) ||\n canImport ||\n canExport ||\n isHeaderActionEnabled('customizeLayout') && actionsAllowed.includes(`${permissionExpression('userViewMetadata', 'create')}`) ||\n isHeaderActionEnabled('savedFilters') && actionsAllowed.includes(`${permissionExpression('savedFilters', 'create')}`) ||\n contextMenuHeaderButtons.length > 0 ||\n mobileOnlyHeaderButtons.length > 0 ||\n viewData?.data?.solidView?.model?.enableSoftDelete\n ) && (\n <>\n {actionsAllowed.includes(`${permissionExpression(params.modelName, 'deleteMany')}`) && viewData?.data?.solidView?.layout?.attrs?.delete !== false && selectedRecords.length > 0 && (\n <SolidDropdownMenuItem\n className=\"solid-header-dropdown-item solid-header-dropdown-item-danger\"\n onSelect={() => {\n setDialogVisible(true);\n setIsCogMenuOpen(false);\n }}\n >\n <Trash2 size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Delete</span>\n </SolidDropdownMenuItem>\n )}\n {canImport && (\n <SolidDropdownMenuItem\n className=\"solid-header-dropdown-item\"\n onSelect={() => {\n setOpenImportDialog(true);\n setIsCogMenuOpen(false);\n }}\n >\n <Download size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Import</span>\n </SolidDropdownMenuItem>\n )}\n {canExport && (\n <SolidDropdownMenuItem\n className=\"solid-header-dropdown-item\"\n onSelect={() => {\n setExportView((current) => !current);\n setIsCogMenuOpen(false);\n }}\n >\n <Upload size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Export</span>\n </SolidDropdownMenuItem>\n )}\n {contextMenuHeaderButtons\n ?.map((button: any, index: number) => (\n <SolidListViewHeaderContextMenuButton\n key={index}\n button={button}\n params={params}\n solidListViewMetaData={listViewMetaData}\n handleCustomButtonClick={handleCustomButtonClick}\n selectedRecords={selectedRecords}\n filters={filters}\n onActionComplete={() => setIsCogMenuOpen(false)}\n />\n ))}\n <div className=\"lg:hidden flex flex-col gap-1\">\n {mobileOnlyHeaderButtons\n ?.map((button: any, index: number) => (\n <SolidListViewHeaderContextMenuButton\n key={`mobile-${index}`}\n button={button}\n params={params}\n solidListViewMetaData={listViewMetaData}\n handleCustomButtonClick={handleCustomButtonClick}\n selectedRecords={selectedRecords}\n filters={filters}\n onActionComplete={() => setIsCogMenuOpen(false)}\n />\n ))}\n </div>\n {viewData?.data?.solidView?.model?.enableSoftDelete && (\n <SolidDropdownMenuCheckboxItem\n className={showArchived ? \"solid-archive-toggle-item-active\" : undefined}\n checked={showArchived}\n icon={<Archive size={14} className=\"solid-header-action-button-icon solid-archive-toggle-icon\" />}\n onCheckedChange={() => setShowArchived(!showArchived)}\n >\n Show Archived Rows\n </SolidDropdownMenuCheckboxItem>\n )}\n {showArchived && (\n <SolidDropdownMenuItem\n className=\"solid-header-dropdown-item lg:hidden\"\n onSelect={() => {\n setRecoverDialogVisible(true);\n setIsCogMenuOpen(false);\n }}\n >\n <RefreshCw size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Recover</span>\n </SolidDropdownMenuItem>\n )}\n\n {(\n isHeaderActionEnabled('customizeLayout') && actionsAllowed.includes(`${permissionExpression('userViewMetadata', 'create')}`) ||\n isHeaderActionEnabled('savedFilters') && actionsAllowed.includes(`${permissionExpression('savedFilters', 'create')}`) ||\n true\n ) && <SolidDropdownMenuSeparator />}\n\n {isHeaderActionEnabled('customizeLayout') && actionsAllowed.includes(`${permissionExpression('userViewMetadata', 'create')}`) && (\n <SolidDropdownMenuSub>\n <SolidDropdownMenuSubTrigger className=\"solid-header-dropdown-item\">\n <SlidersHorizontal size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Layout</span>\n </SolidDropdownMenuSubTrigger>\n <SolidDropdownMenuSubContent className=\"customize-layout-panel\">\n {showSwitchType && (\n <>\n <SolidDropdownMenuLabel>Switch Type</SolidDropdownMenuLabel>\n <SolidDropdownMenuRadioGroup value={view} onValueChange={handleViewTypeChange}>\n {visibleViewModes.map((option: ViewMode) => (\n <SolidDropdownMenuRadioItem key={option.type} value={option.type}>\n {capitalize(option.type)}\n </SolidDropdownMenuRadioItem>\n ))}\n </SolidDropdownMenuRadioGroup>\n <SolidDropdownMenuSeparator />\n </>\n )}\n <SolidDropdownMenuLabel>Row Spacing</SolidDropdownMenuLabel>\n <SolidDropdownMenuRadioGroup value={size} onValueChange={(value: string) => setSize(value)}>\n {sizeOptions.map((option: any) => (\n <SolidDropdownMenuRadioItem key={option.value} value={option.value}>\n {option.label}\n </SolidDropdownMenuRadioItem>\n ))}\n </SolidDropdownMenuRadioGroup>\n <SolidDropdownMenuSeparator />\n <SolidDropdownMenuItem\n onSelect={() => {\n setShowColumnSelectorDialog(true);\n setIsCogMenuOpen(false);\n }}\n >\n <Table size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Columns</span>\n </SolidDropdownMenuItem>\n </SolidDropdownMenuSubContent>\n </SolidDropdownMenuSub>\n )}\n {isHeaderActionEnabled('savedFilters') && actionsAllowed.includes(`${permissionExpression('savedFilters', 'create')}`) && (\n <SolidDropdownMenuItem\n className=\"solid-header-dropdown-item\"\n onSelect={() => {\n setShowSaveFilterPopup(true);\n setIsCogMenuOpen(false);\n }}\n >\n <Save size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Save Custom Filter</span>\n </SolidDropdownMenuItem>\n )}\n <SolidDropdownMenuItem\n className=\"solid-header-dropdown-item\"\n onSelect={() => {\n clearLocalstorageCache();\n setIsCogMenuOpen(false);\n }}\n >\n <Trash2 size={14} className=\"solid-header-action-button-icon\" />\n <span className=\"solid-header-action-button-label\">Reset View</span>\n </SolidDropdownMenuItem>\n </>\n )}\n </SolidDropdownMenuContent>\n </SolidDropdownMenu>\n <SolidDialog\n open={exportView}\n onOpenChange={setExportView}\n className=\"solid-kanban-export-dialog solid-list-export-dialog\"\n style={{ width: \"min(980px, calc(100vw - 32px))\" }}\n >\n <SolidDialogHeader className=\"solid-export-dialog-header\">\n <div>\n <SolidDialogTitle>Export</SolidDialogTitle>\n <SolidDialogDescription className=\"solid-filter-dialog-subtitle m-0\">\n Choose the file format, refine the field set, and save reusable export templates.\n </SolidDialogDescription>\n </div>\n <SolidDialogClose />\n </SolidDialogHeader>\n <SolidDialogSeparator />\n <SolidDialogBody className=\"solid-kanban-export-dialog-body\">\n <SolidExport\n listViewMetaData={listViewMetaData}\n filters={filters}\n onExportComplete={() => setExportView(false)}\n />\n </SolidDialogBody>\n </SolidDialog>\n <SolidDialog\n open={showColumnSelectorDialog}\n onOpenChange={setShowColumnSelectorDialog}\n className=\"solid-column-selector-dialog\"\n style={{ width: \"min(388px, calc(100vw - 2rem))\" }}\n >\n <SolidDialogHeader className=\"solid-filter-dialog-head\">\n <div>\n <SolidDialogTitle className=\"solid-filter-dialog-title m-0\">Column Selector</SolidDialogTitle>\n <SolidDialogDescription className=\"solid-filter-dialog-subtitle m-0\">\n Choose visible columns and reorder them for this list view.\n </SolidDialogDescription>\n </div>\n <SolidDialogClose className=\"solid-filter-dialog-close\" />\n </SolidDialogHeader>\n <SolidDialogSeparator className=\"solid-filter-dialog-sep\" />\n <SolidDialogBody className=\"solid-filter-dialog-body\">\n <SolidListColumnSelector\n listViewMetaData={listViewMetaData}\n onClose={() => setShowColumnSelectorDialog(false)}\n />\n </SolidDialogBody>\n </SolidDialog>\n {openImportDialog &&\n <SolidGenericImport\n openImportDialog={openImportDialog}\n setOpenImportDialog={setOpenImportDialog}\n listViewMetaData={listViewMetaData}\n handleFetchUpdatedRecords={handleFetchUpdatedRecords}\n />\n }\n </div>\n )\n}\n"]}
|