From ec9f23cef8387f456cc901d2cc0d1c6d60a91fd8 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 12 Nov 2024 06:45:55 +0000 Subject: [PATCH 1/7] feat(nc-gui): bulk update extension manifest --- .../extensions/bulk-update/assets/icon.svg | 12 + .../bulk-update/assets/publisher-icon.svg | 12 + .../extensions/bulk-update/description.md | 39 ++ .../nc-gui/extensions/bulk-update/index.vue | 431 ++++++++++++++++++ .../extensions/bulk-update/manifest.json | 21 + 5 files changed, 515 insertions(+) create mode 100644 packages/nc-gui/extensions/bulk-update/assets/icon.svg create mode 100644 packages/nc-gui/extensions/bulk-update/assets/publisher-icon.svg create mode 100644 packages/nc-gui/extensions/bulk-update/description.md create mode 100644 packages/nc-gui/extensions/bulk-update/index.vue create mode 100644 packages/nc-gui/extensions/bulk-update/manifest.json diff --git a/packages/nc-gui/extensions/bulk-update/assets/icon.svg b/packages/nc-gui/extensions/bulk-update/assets/icon.svg new file mode 100644 index 0000000000..2381559164 --- /dev/null +++ b/packages/nc-gui/extensions/bulk-update/assets/icon.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/nc-gui/extensions/bulk-update/assets/publisher-icon.svg b/packages/nc-gui/extensions/bulk-update/assets/publisher-icon.svg new file mode 100644 index 0000000000..2381559164 --- /dev/null +++ b/packages/nc-gui/extensions/bulk-update/assets/publisher-icon.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/nc-gui/extensions/bulk-update/description.md b/packages/nc-gui/extensions/bulk-update/description.md new file mode 100644 index 0000000000..46d29d73fe --- /dev/null +++ b/packages/nc-gui/extensions/bulk-update/description.md @@ -0,0 +1,39 @@ +Bulk update +

+ +// Todo: update details + +The download process is handled asynchronously in the background, ensuring that your workflow remains uninterrupted. Once your file is ready, you’ll receive a notification, allowing you to download the CSV at your convenience. +

+ +**Key Features** + +- Easy CSV downloads for specific tables and views +- Asynchronous processing for seamless operation +- Instant notifications when the file is ready for download +

+ +Elevate your data handling capabilities with the NocoDB Data Exporter extension! +

+ + + + Learn more + + + + + + + +

+ +
+ + +
+
+
+ + +
diff --git a/packages/nc-gui/extensions/bulk-update/index.vue b/packages/nc-gui/extensions/bulk-update/index.vue new file mode 100644 index 0000000000..9844273de6 --- /dev/null +++ b/packages/nc-gui/extensions/bulk-update/index.vue @@ -0,0 +1,431 @@ + + + + + + + diff --git a/packages/nc-gui/extensions/bulk-update/manifest.json b/packages/nc-gui/extensions/bulk-update/manifest.json new file mode 100644 index 0000000000..e0fce0dda3 --- /dev/null +++ b/packages/nc-gui/extensions/bulk-update/manifest.json @@ -0,0 +1,21 @@ +{ + "id": "nc-bulk-update", + "title": "Bulk Update", + "subTitle": "Upload multiple records values in a field with a single click", + "description": "bulk-update/description.md", + "entry": "bulk-update", + "version": "0.1", + "iconUrl": "bulk-update/assets/icon.svg", + "publisher": { + "name": "NocoDB", + "email": "contact@nocodb.com", + "url": "https://www.nocodb.com", + "icon": { + "src": "bulk-update/assets/publisher-icon.svg", + "width": 24, + "height": 24 + } + }, + "links": [], + "config": {} +} From 2970f7e1d3768ab413a4b0cb579046005dfbf64a Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 12 Nov 2024 06:45:55 +0000 Subject: [PATCH 2/7] fix(nc-gui): bulk update extension import issue --- .../components/extensions/Extension.vue | 12 +- .../extensions/bulk-update/assets/icon.svg | 12 - .../bulk-update/assets/publisher-icon.svg | 12 - .../extensions/bulk-update/description.md | 39 -- .../nc-gui/extensions/bulk-update/index.vue | 431 ------------------ .../extensions/bulk-update/manifest.json | 21 - .../nc-gui/extensions/json-exporter/index.vue | 8 +- 7 files changed, 15 insertions(+), 520 deletions(-) delete mode 100644 packages/nc-gui/extensions/bulk-update/assets/icon.svg delete mode 100644 packages/nc-gui/extensions/bulk-update/assets/publisher-icon.svg delete mode 100644 packages/nc-gui/extensions/bulk-update/description.md delete mode 100644 packages/nc-gui/extensions/bulk-update/index.vue delete mode 100644 packages/nc-gui/extensions/bulk-update/manifest.json diff --git a/packages/nc-gui/components/extensions/Extension.vue b/packages/nc-gui/components/extensions/Extension.vue index 0c5063cf85..4b3a98be9b 100644 --- a/packages/nc-gui/components/extensions/Extension.vue +++ b/packages/nc-gui/components/extensions/Extension.vue @@ -67,10 +67,14 @@ onMounted(() => { return } - import(`../../extensions/${extensionManifest.value.entry}/index.vue`).then((mod) => { - component.value = markRaw(mod.default) - isLoadedExtension.value = false - }) + import(`../../extensions/${extensionManifest.value.entry}/index.vue`) + .then((mod) => { + component.value = markRaw(mod.default) + isLoadedExtension.value = false + }) + .catch((e) => { + throw new Error(e) + }) }) .catch((err) => { if (!extensionManifest.value) { diff --git a/packages/nc-gui/extensions/bulk-update/assets/icon.svg b/packages/nc-gui/extensions/bulk-update/assets/icon.svg deleted file mode 100644 index 2381559164..0000000000 --- a/packages/nc-gui/extensions/bulk-update/assets/icon.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/nc-gui/extensions/bulk-update/assets/publisher-icon.svg b/packages/nc-gui/extensions/bulk-update/assets/publisher-icon.svg deleted file mode 100644 index 2381559164..0000000000 --- a/packages/nc-gui/extensions/bulk-update/assets/publisher-icon.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/nc-gui/extensions/bulk-update/description.md b/packages/nc-gui/extensions/bulk-update/description.md deleted file mode 100644 index 46d29d73fe..0000000000 --- a/packages/nc-gui/extensions/bulk-update/description.md +++ /dev/null @@ -1,39 +0,0 @@ -Bulk update -

- -// Todo: update details - -The download process is handled asynchronously in the background, ensuring that your workflow remains uninterrupted. Once your file is ready, you’ll receive a notification, allowing you to download the CSV at your convenience. -

- -**Key Features** - -- Easy CSV downloads for specific tables and views -- Asynchronous processing for seamless operation -- Instant notifications when the file is ready for download -

- -Elevate your data handling capabilities with the NocoDB Data Exporter extension! -

- - - - Learn more - - - - - - - -

- -
- - -
-
-
- - -
diff --git a/packages/nc-gui/extensions/bulk-update/index.vue b/packages/nc-gui/extensions/bulk-update/index.vue deleted file mode 100644 index 9844273de6..0000000000 --- a/packages/nc-gui/extensions/bulk-update/index.vue +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - diff --git a/packages/nc-gui/extensions/bulk-update/manifest.json b/packages/nc-gui/extensions/bulk-update/manifest.json deleted file mode 100644 index e0fce0dda3..0000000000 --- a/packages/nc-gui/extensions/bulk-update/manifest.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "id": "nc-bulk-update", - "title": "Bulk Update", - "subTitle": "Upload multiple records values in a field with a single click", - "description": "bulk-update/description.md", - "entry": "bulk-update", - "version": "0.1", - "iconUrl": "bulk-update/assets/icon.svg", - "publisher": { - "name": "NocoDB", - "email": "contact@nocodb.com", - "url": "https://www.nocodb.com", - "icon": { - "src": "bulk-update/assets/publisher-icon.svg", - "width": 24, - "height": 24 - } - }, - "links": [], - "config": {} -} diff --git a/packages/nc-gui/extensions/json-exporter/index.vue b/packages/nc-gui/extensions/json-exporter/index.vue index 721c263de4..40eb9c4a4c 100644 --- a/packages/nc-gui/extensions/json-exporter/index.vue +++ b/packages/nc-gui/extensions/json-exporter/index.vue @@ -101,4 +101,10 @@ onMounted(() => { - + From ea2b8f0f0ac7d7bf3cbe989768ba670b34da50f5 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 12 Nov 2024 06:45:55 +0000 Subject: [PATCH 3/7] fix(nc-gui): load only those extensions which are available --- packages/nc-gui/composables/useExtensions.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/nc-gui/composables/useExtensions.ts b/packages/nc-gui/composables/useExtensions.ts index 190db1e18a..c9a571b03e 100644 --- a/packages/nc-gui/composables/useExtensions.ts +++ b/packages/nc-gui/composables/useExtensions.ts @@ -68,6 +68,10 @@ export const useExtensions = createSharedComposable(() => { const availableExtensions = ref([]) + const availableExtensionIds = computed(() => { + return availableExtensions.value.map((e) => e.id) + }) + // Object to store description content for each extension const descriptionContent = ref>({}) @@ -85,11 +89,11 @@ export const useExtensions = createSharedComposable(() => { }) const extensionList = computed(() => { - return (activeBaseExtensions.value ? activeBaseExtensions.value.extensions : []).sort( - (a: ExtensionType, b: ExtensionType) => { + return (activeBaseExtensions.value ? activeBaseExtensions.value.extensions : []) + .filter((e: ExtensionType) => availableExtensionIds.value.includes(e.extensionId)) + .sort((a: ExtensionType, b: ExtensionType) => { return (a?.order ?? Infinity) - (b?.order ?? Infinity) - }, - ) + }) }) const toggleExtensionPanel = () => { From e002ce67ca1f12627251414774f86d81de9ea95f Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 12 Nov 2024 06:45:56 +0000 Subject: [PATCH 4/7] fix(nc-gui): trigger field reload on adding new field --- packages/nc-gui/components/smartsheet/column/EditOrAdd.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue b/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue index 2910a1ba0a..27ddf716fc 100644 --- a/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue +++ b/packages/nc-gui/components/smartsheet/column/EditOrAdd.vue @@ -53,6 +53,8 @@ const { t } = useI18n() const { isMetaReadOnly } = useRoles() +const { eventBus } = useSmartsheetStoreOrThrow() + const columnLabel = computed(() => props.columnLabel || t('objects.field')) const { $e } = useNuxtApp() @@ -179,6 +181,8 @@ const onSelectType = (uidt: UITypes) => { const reloadMetaAndData = async () => { await getMeta(meta.value?.id as string, true) + eventBus.emit(SmartsheetStoreEvents.FIELD_RELOAD) + if (!isKanban.value) { reloadDataTrigger?.trigger() } From 50a2fbbdaedbde38d5af0f2ae0400c7f123e138e Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 12 Nov 2024 06:45:57 +0000 Subject: [PATCH 5/7] fix(nc-gui): longtext cell icon color issue --- packages/nc-gui/assets/nc-icons/cell-longtext.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nc-gui/assets/nc-icons/cell-longtext.svg b/packages/nc-gui/assets/nc-icons/cell-longtext.svg index bfdb92ae92..dcb7c9d8fb 100644 --- a/packages/nc-gui/assets/nc-icons/cell-longtext.svg +++ b/packages/nc-gui/assets/nc-icons/cell-longtext.svg @@ -3,6 +3,6 @@ - + From 47460c52778ae078bdf867f3215be3f8965a2b26 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 12 Nov 2024 06:45:58 +0000 Subject: [PATCH 6/7] chore(nc-gui): lint --- packages/nc-gui/components/extensions/Extension.vue | 2 +- packages/nc-gui/components/extensions/Market.vue | 4 +--- packages/nc-gui/extensions/json-exporter/index.vue | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/nc-gui/components/extensions/Extension.vue b/packages/nc-gui/components/extensions/Extension.vue index 4b3a98be9b..7f0918bfd9 100644 --- a/packages/nc-gui/components/extensions/Extension.vue +++ b/packages/nc-gui/components/extensions/Extension.vue @@ -6,7 +6,7 @@ interface Prop { const { extensionId, error } = defineProps() -const { extensionList, extensionsLoaded, availableExtensions, eventBus } = useExtensions() +const { extensionList, extensionsLoaded, availableExtensions } = useExtensions() const isLoadedExtension = ref(true) diff --git a/packages/nc-gui/components/extensions/Market.vue b/packages/nc-gui/components/extensions/Market.vue index 7b5772150a..df295da80f 100644 --- a/packages/nc-gui/components/extensions/Market.vue +++ b/packages/nc-gui/components/extensions/Market.vue @@ -1,6 +1,4 @@