-
+
+
+ {{ localState ? checkedIcon :uncheckedIcon }}
+
@@ -8,10 +10,19 @@
export default {
name: 'BooleanCell',
props: {
+ column: Object,
value: [String, Number, Boolean],
- isForm: Boolean
+ isForm: Boolean,
+ readOnly: Boolean
},
computed: {
+
+ checkedIcon() {
+ return (this.checkboxMeta && this.checkboxMeta.icon && this.checkboxMeta.icon.checked) || 'mdi-check-bold'
+ },
+ uncheckedIcon() {
+ return (this.checkboxMeta && this.checkboxMeta.icon && this.checkboxMeta.icon.unchecked) || 'mdi-crop-square'
+ },
localState: {
get() {
return this.value
@@ -20,14 +31,27 @@ export default {
this.$emit('input', val)
}
},
-
parentListeners() {
const $listeners = {}
return $listeners
+ },
+ checkboxMeta() {
+ return {
+ icon: {
+ checked: 'mdi-check-circle-outline',
+ unchecked: 'mdi-checkbox-blank-circle-outline'
+ },
+ color: 'primary',
+ ...(this.column && this.column.meta
+ ? this.column.meta
+ : {})
+ }
}
},
- mounted() {
- this.$el.focus()
+ methods: {
+ toggle() {
+ this.localState = !this.localState
+ }
}
}
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/datePickerCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/DatePickerCell.vue
similarity index 100%
rename from packages/nc-gui/components/project/spreadsheet/components/editableCell/datePickerCell.vue
rename to packages/nc-gui/components/project/spreadsheet/components/editableCell/DatePickerCell.vue
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/dateTimePickerCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/DateTimePickerCell.vue
similarity index 100%
rename from packages/nc-gui/components/project/spreadsheet/components/editableCell/dateTimePickerCell.vue
rename to packages/nc-gui/components/project/spreadsheet/components/editableCell/DateTimePickerCell.vue
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/editableAttachmentCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/EditableAttachmentCell.vue
similarity index 100%
rename from packages/nc-gui/components/project/spreadsheet/components/editableCell/editableAttachmentCell.vue
rename to packages/nc-gui/components/project/spreadsheet/components/editableCell/EditableAttachmentCell.vue
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/editableUrlCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/EditableUrlCell.vue
similarity index 89%
rename from packages/nc-gui/components/project/spreadsheet/components/editableCell/editableUrlCell.vue
rename to packages/nc-gui/components/project/spreadsheet/components/editableCell/EditableUrlCell.vue
index c6bbfc18ae..78d1670b88 100644
--- a/packages/nc-gui/components/project/spreadsheet/components/editableCell/editableUrlCell.vue
+++ b/packages/nc-gui/components/project/spreadsheet/components/editableCell/EditableUrlCell.vue
@@ -8,7 +8,8 @@ import { isValidURL } from '@/helpers'
export default {
name: 'EditableUrlCell',
props: {
- value: String
+ value: String,
+ column: Object
},
computed: {
localState: {
@@ -16,7 +17,11 @@ export default {
return this.value
},
set(val) {
- if (isValidURL(val)) { this.$emit('input', val) }
+ if (!(
+ this.column &&
+ this.column.meta &&
+ this.column.meta.validate
+ ) || isValidURL(val)) { this.$emit('input', val) }
}
},
parentListeners() {
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/enumListEditableCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/EnumListEditableCell.vue
similarity index 100%
rename from packages/nc-gui/components/project/spreadsheet/components/editableCell/enumListEditableCell.vue
rename to packages/nc-gui/components/project/spreadsheet/components/editableCell/EnumListEditableCell.vue
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/enumRadioEditableCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/EnumRadioEditableCell.vue
similarity index 96%
rename from packages/nc-gui/components/project/spreadsheet/components/editableCell/enumRadioEditableCell.vue
rename to packages/nc-gui/components/project/spreadsheet/components/editableCell/EnumRadioEditableCell.vue
index 48339f2bd0..65c4b6f035 100644
--- a/packages/nc-gui/components/project/spreadsheet/components/editableCell/enumRadioEditableCell.vue
+++ b/packages/nc-gui/components/project/spreadsheet/components/editableCell/EnumRadioEditableCell.vue
@@ -26,7 +26,7 @@ export default {
},
computed: {
colors() {
- return this.$store.state.windows.darkTheme ? colors.dark : colors.light
+ return this.$store.state.settings.darkTheme ? colors.dark : colors.light
},
localState: {
get() {
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/floatCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/FloatCell.vue
similarity index 100%
rename from packages/nc-gui/components/project/spreadsheet/components/editableCell/floatCell.vue
rename to packages/nc-gui/components/project/spreadsheet/components/editableCell/FloatCell.vue
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/integerCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/IntegerCell.vue
similarity index 100%
rename from packages/nc-gui/components/project/spreadsheet/components/editableCell/integerCell.vue
rename to packages/nc-gui/components/project/spreadsheet/components/editableCell/IntegerCell.vue
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/jsonEditableCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/JsonEditableCell.vue
similarity index 100%
rename from packages/nc-gui/components/project/spreadsheet/components/editableCell/jsonEditableCell.vue
rename to packages/nc-gui/components/project/spreadsheet/components/editableCell/JsonEditableCell.vue
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/RatingCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/RatingCell.vue
new file mode 100644
index 0000000000..003c172d0d
--- /dev/null
+++ b/packages/nc-gui/components/project/spreadsheet/components/editableCell/RatingCell.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+ {{ fullIcon }}
+
+
+ {{ emptyIcon }}
+
+
+
+
+
+
+
+
+
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/setListCheckboxCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/SetListCheckboxCell.vue
similarity index 96%
rename from packages/nc-gui/components/project/spreadsheet/components/editableCell/setListCheckboxCell.vue
rename to packages/nc-gui/components/project/spreadsheet/components/editableCell/SetListCheckboxCell.vue
index 887391cbc6..7409c842e4 100644
--- a/packages/nc-gui/components/project/spreadsheet/components/editableCell/setListCheckboxCell.vue
+++ b/packages/nc-gui/components/project/spreadsheet/components/editableCell/SetListCheckboxCell.vue
@@ -29,7 +29,7 @@ export default {
},
computed: {
colors() {
- return this.$store.state.windows.darkTheme ? colors.dark : colors.light
+ return this.$store.state.settings.darkTheme ? colors.dark : colors.light
},
localState: {
get() {
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/setListEditableCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/SetListEditableCell.vue
similarity index 100%
rename from packages/nc-gui/components/project/spreadsheet/components/editableCell/setListEditableCell.vue
rename to packages/nc-gui/components/project/spreadsheet/components/editableCell/SetListEditableCell.vue
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/textAreaCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/TextAreaCell.vue
similarity index 100%
rename from packages/nc-gui/components/project/spreadsheet/components/editableCell/textAreaCell.vue
rename to packages/nc-gui/components/project/spreadsheet/components/editableCell/TextAreaCell.vue
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/textAreaCellOld.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/TextAreaCellOld.vue
similarity index 100%
rename from packages/nc-gui/components/project/spreadsheet/components/editableCell/textAreaCellOld.vue
rename to packages/nc-gui/components/project/spreadsheet/components/editableCell/TextAreaCellOld.vue
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/textCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/TextCell.vue
similarity index 100%
rename from packages/nc-gui/components/project/spreadsheet/components/editableCell/textCell.vue
rename to packages/nc-gui/components/project/spreadsheet/components/editableCell/TextCell.vue
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/timePickerCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/TimePickerCell.vue
similarity index 100%
rename from packages/nc-gui/components/project/spreadsheet/components/editableCell/timePickerCell.vue
rename to packages/nc-gui/components/project/spreadsheet/components/editableCell/TimePickerCell.vue
diff --git a/packages/nc-gui/components/project/spreadsheet/components/importExport/columnMappingModal.vue b/packages/nc-gui/components/project/spreadsheet/components/importExport/ColumnMappingModal.vue
similarity index 95%
rename from packages/nc-gui/components/project/spreadsheet/components/importExport/columnMappingModal.vue
rename to packages/nc-gui/components/project/spreadsheet/components/importExport/ColumnMappingModal.vue
index a2ff286336..c65faf4ed8 100644
--- a/packages/nc-gui/components/project/spreadsheet/components/importExport/columnMappingModal.vue
+++ b/packages/nc-gui/components/project/spreadsheet/components/importExport/ColumnMappingModal.vue
@@ -1,6 +1,7 @@
-
+
+
Table : {{ meta.title }}
@@ -99,12 +100,12 @@ export default {
meta: Object,
importDataColumns: Array,
value: Boolean,
- parsedCsv: Object
+ parsedCsv: Object,
},
data() {
return {
mappings: [],
- valid: false
+ valid: false,
}
},
computed: {
@@ -194,9 +195,11 @@ export default {
this.mappings = []
for (const col of this.importDataColumns) {
const o = { sourceCn: col, enabled: true }
- const tableColumn = this.meta.columns.find(c => c.title === col)
- if (tableColumn) {
- o.destCn = tableColumn.title
+ if (this.meta) {
+ const tableColumn = this.meta.columns.find(c => c.title === col)
+ if (tableColumn) {
+ o.destCn = tableColumn.title
+ }
}
this.mappings.push(o)
}
@@ -204,7 +207,7 @@ export default {
},
getIcon(uidt) {
return getUIDTIcon(uidt) || 'mdi-alpha-v-circle-outline'
- }
+ },
}
}
diff --git a/packages/nc-gui/components/project/spreadsheet/components/virtualCell/belongsToCell.vue b/packages/nc-gui/components/project/spreadsheet/components/virtualCell/BelongsToCell.vue
similarity index 97%
rename from packages/nc-gui/components/project/spreadsheet/components/virtualCell/belongsToCell.vue
rename to packages/nc-gui/components/project/spreadsheet/components/virtualCell/BelongsToCell.vue
index 1f4c7fcd74..f23161552f 100644
--- a/packages/nc-gui/components/project/spreadsheet/components/virtualCell/belongsToCell.vue
+++ b/packages/nc-gui/components/project/spreadsheet/components/virtualCell/BelongsToCell.vue
@@ -110,9 +110,9 @@
diff --git a/packages/nc-gui/components/project/spreadsheet/views/kanbanView.vue b/packages/nc-gui/components/project/spreadsheet/views/KanbanView.vue
similarity index 97%
rename from packages/nc-gui/components/project/spreadsheet/views/kanbanView.vue
rename to packages/nc-gui/components/project/spreadsheet/views/KanbanView.vue
index e427a8ee65..f517254556 100644
--- a/packages/nc-gui/components/project/spreadsheet/views/kanbanView.vue
+++ b/packages/nc-gui/components/project/spreadsheet/views/KanbanView.vue
@@ -102,11 +102,11 @@
+
+
diff --git a/packages/nc-gui/components/project/tableTabs/webhook/webhookModal.vue b/packages/nc-gui/components/project/tableTabs/webhook/WebhookModal.vue
similarity index 97%
rename from packages/nc-gui/components/project/tableTabs/webhook/webhookModal.vue
rename to packages/nc-gui/components/project/tableTabs/webhook/WebhookModal.vue
index c3750d2d03..33bfab8782 100644
--- a/packages/nc-gui/components/project/tableTabs/webhook/webhookModal.vue
+++ b/packages/nc-gui/components/project/tableTabs/webhook/WebhookModal.vue
@@ -14,8 +14,8 @@
+
+
diff --git a/packages/nc-gui/components/project/tableTabs/webhook/webhooksTest.vue b/packages/nc-gui/components/project/tableTabs/webhook/WebhooksTest.vue
similarity index 100%
rename from packages/nc-gui/components/project/tableTabs/webhook/webhooksTest.vue
rename to packages/nc-gui/components/project/tableTabs/webhook/WebhooksTest.vue
diff --git a/packages/nc-gui/components/project/tableTabs/webhook/webhookList.vue b/packages/nc-gui/components/project/tableTabs/webhook/webhookList.vue
deleted file mode 100644
index 9ca9634419..0000000000
--- a/packages/nc-gui/components/project/tableTabs/webhook/webhookList.vue
+++ /dev/null
@@ -1,186 +0,0 @@
-
-
-
- Webhooks
-
-
- Create webhook
-
-
-
-
-
-
-
-
- {{ hook.title }}
-
-
-
- {{ $t("general.event") }} : {{ hook.event }} {{
- hook.operation
- }}
-
-
- {{
- $t("labels.notifyVia")
- }} : {{ hook.notification && hook.notification.type }}
-
-
-
-
-
- mdi-delete-outline
-
-
-
-
- Webhooks list is empty, create new webhook by clicking 'Create webhook' button.
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/nc-gui/components/project/tableTabs/webhooks-old.vue b/packages/nc-gui/components/project/tableTabs/webhooks-old.vue
deleted file mode 100644
index 7e0c2abe8b..0000000000
--- a/packages/nc-gui/components/project/tableTabs/webhooks-old.vue
+++ /dev/null
@@ -1,253 +0,0 @@
-
-
-
-
-
-
-
- forward
-
-
-
-
-
-
-
-
- save
-
-
- {{ $t('general.save') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- |
- Operation |
- Event |
-
-
-
-
-
-
-
- |
-
- {{ e.text[1] }}
- |
-
- {{ e.text[0] }}
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Webhook
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/nc-gui/components/project/viewTabs/viewColumns.vue b/packages/nc-gui/components/project/viewTabs/ViewColumns.vue
similarity index 100%
rename from packages/nc-gui/components/project/viewTabs/viewColumns.vue
rename to packages/nc-gui/components/project/viewTabs/ViewColumns.vue
diff --git a/packages/nc-gui/components/project/viewTabs/viewQuery.vue b/packages/nc-gui/components/project/viewTabs/ViewQuery.vue
similarity index 99%
rename from packages/nc-gui/components/project/viewTabs/viewQuery.vue
rename to packages/nc-gui/components/project/viewTabs/ViewQuery.vue
index 0ffe5473fe..a77a465774 100644
--- a/packages/nc-gui/components/project/viewTabs/viewQuery.vue
+++ b/packages/nc-gui/components/project/viewTabs/ViewQuery.vue
@@ -84,7 +84,7 @@
import { mapActions } from 'vuex'
import MonacoEditor from '../../monaco/Monaco'
-import dlgLabelSubmitCancel from '../../utils/dlgLabelSubmitCancel'
+import dlgLabelSubmitCancel from '../../utils/DlgLabelSubmitCancel'
export default {
components: { MonacoEditor, dlgLabelSubmitCancel },
diff --git a/packages/nc-gui/components/project/viewTabs/viewSpreadsheet.vue b/packages/nc-gui/components/project/viewTabs/ViewSpreadsheet.vue
similarity index 94%
rename from packages/nc-gui/components/project/viewTabs/viewSpreadsheet.vue
rename to packages/nc-gui/components/project/viewTabs/ViewSpreadsheet.vue
index bdcbfcc64f..1afa17054d 100644
--- a/packages/nc-gui/components/project/viewTabs/viewSpreadsheet.vue
+++ b/packages/nc-gui/components/project/viewTabs/ViewSpreadsheet.vue
@@ -247,19 +247,19 @@
import debounce from 'debounce'
import { SqlUI } from '@/helpers/sqlUi/SqlUiFactory'
-import FieldsMenu from '@/components/project/spreadsheet/components/fieldsMenu'
-import SortListMenu from '@/components/project/spreadsheet/components/sortListMenu'
-import ColumnFilterMenu from '@/components/project/spreadsheet/components/columnFilterMenu'
-import XcGridView from '@/components/project/spreadsheet/views/xcGridView'
-import SpreadsheetNavDrawer from '@/components/project/spreadsheet/components/spreadsheetNavDrawer'
-import GalleryView from '@/components/project/spreadsheet/views/galleryView'
-import KanbanView from '@/components/project/spreadsheet/views/kanbanView'
-import CalendarView from '@/components/project/spreadsheet/views/calendarView'
-import AdditionalFeatures from '@/components/project/spreadsheet/overlay/additinalFeatures'
+import FieldsMenu from '~/components/project/spreadsheet/components/FieldsMenu'
+import SortListMenu from '~/components/project/spreadsheet/components/SortListMenu'
+import ColumnFilterMenu from '~/components/project/spreadsheet/components/ColumnFilterMenu'
+import XcGridView from '~/components/project/spreadsheet/views/GridView'
+import SpreadsheetNavDrawer from '~/components/project/spreadsheet/components/SpreadsheetNavDrawer'
+import GalleryView from '~/components/project/spreadsheet/views/GalleryView'
+import KanbanView from '~/components/project/spreadsheet/views/KanbanView'
+import CalendarView from '~/components/project/spreadsheet/views/CalendarView'
+import AdditionalFeatures from '~/components/project/spreadsheet/overlay/AdditinalFeatures'
import spreadsheet from '@/components/project/spreadsheet/mixins/spreadsheet'
-import MoreActions from '@/components/project/spreadsheet/components/moreActions'
-import ShareViewMenu from '@/components/project/spreadsheet/components/shareViewMenu'
-import LockMenu from '@/components/project/spreadsheet/components/lockMenu'
+import MoreActions from '~/components/project/spreadsheet/components/MoreActions'
+import ShareViewMenu from '~/components/project/spreadsheet/components/ShareViewMenu'
+import LockMenu from '~/components/project/spreadsheet/components/LockMenu'
export default {
name: 'Spreadsheet',
diff --git a/packages/nc-gui/components/projectList/createNewProjectBtn.vue b/packages/nc-gui/components/projectList/CreateNewProjectBtn.vue
similarity index 80%
rename from packages/nc-gui/components/projectList/createNewProjectBtn.vue
rename to packages/nc-gui/components/projectList/CreateNewProjectBtn.vue
index 1bc3f26184..b9ec8f5816 100644
--- a/packages/nc-gui/components/projectList/createNewProjectBtn.vue
+++ b/packages/nc-gui/components/projectList/CreateNewProjectBtn.vue
@@ -15,11 +15,15 @@
class="nc-new-project-menu elevation-3"
v-on="on"
>
-
mdi-plus
+
+ mdi-plus
+
{{ $t("title.newProj") }}
-
mdi-menu-down
+
+ mdi-menu-down
+
@@ -30,7 +34,9 @@
@click="onCreateProject('xcdb')"
>