Skip to content

Commit

Permalink
extract cloudTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
qiyundai committed Dec 17, 2024
1 parent 8567e04 commit 436b2bf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions ecc/blocks/event-format-component/event-format-component.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable max-len */
import { SUPPORTED_CLOUDS } from '../../constants/constants.js';
import { LIBS } from '../../scripts/scripts.js';
import { generateToolTip } from '../../scripts/utils.js';

Expand All @@ -15,10 +16,8 @@ async function decorateCloudTagSelect(column) {

// FIXME: cloulds shouldn't be hardcoded
// const clouds = await getClouds();
// const clouds = [{ id: 'CreativeCloud', name: 'Creative Cloud' }, { id: 'DX', name: 'Experience Cloud' }];
const clouds = [{ id: 'CreativeCloud', name: 'Creative Cloud' }];

Object.entries(clouds).forEach(([, val]) => {
Object.entries(SUPPORTED_CLOUDS).forEach(([, val]) => {
const opt = createTag('sp-menu-item', { value: val.id }, val.name);
select.append(opt);
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SUPPORTED_CLOUDS } from '../../constants/constants.js';
import { LIBS } from '../../scripts/scripts.js';
import {
generateToolTip,
Expand All @@ -19,9 +20,8 @@ async function decorateCloudTagSelect(column) {

// FIXME: cloulds shouldn't be hardcoded
// const clouds = await getClouds();
const clouds = [{ id: 'CreativeCloud', name: 'Creative Cloud' }, { id: 'DX', name: 'Experience Cloud' }];

Object.entries(clouds).forEach(([, val]) => {
Object.entries(SUPPORTED_CLOUDS).forEach(([, val]) => {
const opt = createTag('sp-menu-item', { value: val.id }, val.name);
select.append(opt);
});
Expand Down
1 change: 1 addition & 0 deletions ecc/constants/constants.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export const LINK_REGEX = '^https:\\/\\/[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,63}(:[0-9]{1,5})?(\\/.*)?$';
export const ALLOWED_ACCOUNT_TYPES = ['type3', 'type2e'];
export const SUPPORTED_CLOUDS = [{ id: 'CreativeCloud', name: 'Creative Cloud' }, { id: 'DX', name: 'Experience Cloud' }];

0 comments on commit 436b2bf

Please sign in to comment.