diff --git a/components/dist/form.min.js b/components/dist/form.min.js index 0c3a3f9..077bc4c 100644 Binary files a/components/dist/form.min.js and b/components/dist/form.min.js differ diff --git a/components/index.html b/components/index.html index c16005b..89445a8 100644 --- a/components/index.html +++ b/components/index.html @@ -2354,10 +2354,11 @@ const extension = getRef('get_minified').checked ? '.min.js' : '.js' const filesList = [] selectedComponents.forEach(async component => { - for (let compObj in allComponentsObj) { + for (const compObj in allComponentsObj) { const { name, download_url } = allComponentsObj[compObj] if (name === `${component}${extension}`) { filesList.push(fetch(download_url).then(async res => await res.text())) + break; } } }); @@ -2367,8 +2368,7 @@ const selectedComponents = await getSelectedComponents() if (selectedComponents.length) { downloadJs(selectedComponents, { minified: getRef('get_minified').checked }) - } - else { + } else { notify('Please select at least one component', 'error') } } @@ -2388,7 +2388,7 @@ let allComponentsObj = [] async function getComponents() { - const files = await fetch('https://api.github.com/repos/ranchimall/standard-visual-design-system/contents/components/dist') + const files = await fetch('https://api.github.com/repos/ranchimall/standard-ui/contents/components/dist') allComponentsObj = await files.json() } function downloadJs(componentsArray, options = { minified: true }) { diff --git a/components/index.min.html b/components/index.min.html index 41f76a5..ed84f5a 100644 --- a/components/index.min.html +++ b/components/index.min.html @@ -740,10 +740,11 @@ const extension = getRef('get_minified').checked ? '.min.js' : '.js' const filesList = [] selectedComponents.forEach(async component => { - for (let compObj in allComponentsObj) { + for (const compObj in allComponentsObj) { const { name, download_url } = allComponentsObj[compObj] if (name === `${component}${extension}`) { filesList.push(fetch(download_url).then(async res => await res.text())) + break; } } }); @@ -753,8 +754,7 @@ const selectedComponents = await getSelectedComponents() if (selectedComponents.length) { downloadJs(selectedComponents, { minified: getRef('get_minified').checked }) - } - else { + } else { notify('Please select at least one component', 'error') } } @@ -774,7 +774,7 @@ let allComponentsObj = [] async function getComponents() { - const files = await fetch('https://api.github.com/repos/ranchimall/standard-visual-design-system/contents/components/dist') + const files = await fetch('https://api.github.com/repos/ranchimall/standard-ui/contents/components/dist') allComponentsObj = await files.json() } function downloadJs(componentsArray, options = { minified: true }) {