+ @if ($field['type'] == 'depends')
+ @include('admin::configuration.dependent-field-type')
+ @else
+
+
+
+ {!! __($field['title']) . ( __($field['title']) ? '' : '') !!}
+
+ @if (
+ ! empty($field['channel_based'])
+ && $channels->count() > 1
+ )
+
+ {{ $currentChannel->name }}
+
+ @endif
+
+ @if (! empty($field['locale_based']))
+
+ {{ $currentLocale->name }}
+
+ @endif
+
+
+
+
+ @if ($field['type'] == 'text')
+
+
+
+
+ @elseif ($field['type'] == 'password')
+
+
+
+
+ @elseif ($field['type'] == 'number')
+
+
+
+
+ @elseif ($field['type'] == 'color')
+
+
+
+
+ @elseif ($field['type'] == 'textarea')
+
+
+
+
+ @elseif ($field['type'] == 'editor')
+
+
+
+
+
+ @elseif ($field['type'] == 'select')
+ @php $selectedOption = core()->getConfigData($nameKey, $currentChannel->code, $currentLocale->code) ?? ''; @endphp
+
+
+ @if (isset($field['repository']))
+ @foreach ($value as $key => $option)
+
+ @endforeach
+ @else
+ @foreach ($field['options'] as $option)
+ @php
+ $value = ! isset($option['value']) ? null : ( $value = ! $option['value'] ? 0 : $option['value'] );
+ @endphp
+
+
+ @endforeach
+ @endif
+
+
+
+ @elseif ($field['type'] == 'multiselect')
+ @php $selectedOption = core()->getConfigData($nameKey, $currentChannel->code, $currentLocale->code) ?? ''; @endphp
+
+
+
+
+
+
+
+ @elseif ($field['type'] == 'boolean')
+ @php
+ $selectedOption = core()->getConfigData($nameKey, $currentChannel->code, $currentLocale->code) ?? ($field['default_value'] ?? '');
+ @endphp
+
+
+
+
+
+ @elseif ($field['type'] == 'image')
+
+ @php
+ $src = Storage::url(core()->getConfigData($nameKey, $currentChannel->code, $currentLocale->code));
+ $result = core()->getConfigData($nameKey, $currentChannel->code, $currentLocale->code);
+ @endphp
+
+
+ @if ($result)
+
+
+
+ @endif
+
+
+
+
+
+ @if ($result)
+
+
+
+
+
+ @lang('admin::app.configuration.index.delete')
+
+
+ @endif
+
+ @elseif ($field['type'] == 'file')
+ @php
+ $result = core()->getConfigData($nameKey, $currentChannel->code, $currentLocale->code);
+ $src = explode("/", $result);
+ $path = end($src);
+ @endphp
+
+ @if ($result)
+
+
+
+ @endif
+
+
+
+
+ @if ($result)
+
+
+
+
+
+ @lang('admin::app.configuration.index.delete')
+
+
+ @endif
+
+
+ @elseif ($field['type'] == 'country')
+
+
+
+
+ @foreach (core()->countries() as $country)
+
+ @endforeach
+
+
+
+
+
+
+ @elseif ($field['type'] == 'state')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @endif
+
+ @endif
+
+ @if (isset($field['info']))
+
+ @endif
+
+
+
+
+
+
+@if ($field['type'] == 'country')
+ @pushOnce('scripts')
+
+
+
+
+
+
+
+ @endPushOnce
+@endif
\ No newline at end of file
diff --git a/packages/Webkul/UpsShipping/tailwind.config.js b/packages/Webkul/UpsShipping/tailwind.config.js
new file mode 100644
index 0000000..56c3a70
--- /dev/null
+++ b/packages/Webkul/UpsShipping/tailwind.config.js
@@ -0,0 +1,10 @@
+/** @type {import('tailwindcss').Config} */
+module.exports = {
+ content: ["./src/Resources/**/*.blade.php", "./src/Resources/**/*.js"],
+
+ theme: {
+ extend: {},
+ },
+
+ plugins: [],
+};
\ No newline at end of file
diff --git a/packages/Webkul/UpsShipping/vite.config.js b/packages/Webkul/UpsShipping/vite.config.js
new file mode 100644
index 0000000..6f038dc
--- /dev/null
+++ b/packages/Webkul/UpsShipping/vite.config.js
@@ -0,0 +1,43 @@
+import { defineConfig, loadEnv } from "vite";
+import laravel from "laravel-vite-plugin";
+import path from "path";
+
+export default defineConfig(({ mode }) => {
+ const envDir = "../../../";
+
+ Object.assign(process.env, loadEnv(mode, envDir));
+
+ return {
+ build: {
+ emptyOutDir: true,
+ },
+
+ envDir,
+
+ server: {
+ host: process.env.VITE_HOST || "localhost",
+ port: process.env.VITE_PORT || 5173,
+ },
+
+ plugins: [
+ laravel({
+ hotFile: "../../../public/ups-module-vite.hot",
+ publicDirectory: "../../../public",
+ buildDirectory: "themes/ups-module/build",
+ input: [
+ "src/Resources/assets/css/app.css",
+ "src/Resources/assets/js/app.js",
+ ],
+ refresh: true,
+ }),
+ ],
+
+ experimental: {
+ renderBuiltUrl(filename, { hostId, hostType, type }) {
+ if (hostType === "css") {
+ return path.basename(filename);
+ }
+ },
+ },
+ };
+});
\ No newline at end of file
diff --git a/src/Config/carriers.php b/src/Config/carriers.php
deleted file mode 100755
index 515b479..0000000
--- a/src/Config/carriers.php
+++ /dev/null
@@ -1,11 +0,0 @@
- [
- 'code' => 'ups',
- 'title' => 'UPS Shipping',
- 'description' => 'UPS Shipping',
- 'active' => true,
- 'class' => 'Webkul\UpsShipping\Carriers\Ups',
- ]
-];
\ No newline at end of file
diff --git a/src/Repositories/UpsRepository.php b/src/Repositories/UpsRepository.php
deleted file mode 100644
index 07964e9..0000000
--- a/src/Repositories/UpsRepository.php
+++ /dev/null
@@ -1,139 +0,0 @@
-getConfigData('sales.carriers.ups.services'));
-
- foreach ($allServices as $services) {
- $allowedMethod =[];
- foreach ($services as $service) {
-
- foreach ($service as $serviceType =>$upsService) {
- if (in_array($serviceType , $allowedServices)) {
- $allowedMethod[] = [
- $serviceType => $upsService
- ];
- } else {
- $notAllowed[] = [
- $serviceType => $upsService
- ];
- }
- }
- }
-
- if ($allowedMethod == null) {
- continue;
- }
- $allowedMethods[] = $allowedMethod;
- }
-
- if (isset($allowedMethods)) {
- return $this->getCommonMethods($allowedMethods);
- }
-
- return false;
- }
-
- /**
- * get the Common method
- *
- * @param $Methods
- */
- public function getCommonMethods($methods)
- {
- $countMethods = count($methods);
-
- foreach ($methods as $fedexMethods) {
-
- foreach ($fedexMethods as $key => $fedexMethod) {
- $avilableServicesArray[] = $key;
- }
- }
-
- $countServices = array_count_values($avilableServicesArray);
- $finalServices = [];
-
- foreach ($countServices as $serviceType => $servicesCount) {
-
- foreach ($methods as $fedexMethods) {
-
- foreach ($fedexMethods as $type => $fedexMethod) {
-
- if ($serviceType == $type && $servicesCount == $countMethods) {
- $finalServices[$serviceType][] =$fedexMethod;
- }
- }
- }
- if ($finalServices == null) {
- continue;
- }
- }
-
- if (empty($finalServices)) {
- return false;
- }
-
- return $finalServices;
- }
-}
-
diff --git a/webpack.mix.js b/webpack.mix.js
deleted file mode 100644
index 6713475..0000000
--- a/webpack.mix.js
+++ /dev/null
@@ -1,19 +0,0 @@
-const { mix } = require("laravel-mix");
-require("laravel-mix-merge-manifest");
-
-if (mix.inProduction()) {
- var publicPath = 'publishable/assets';
-} else {
- var publicPath = "../../../public/themes/default/assets";
-}
-
-mix.setPublicPath(publicPath).mergeManifest();
-mix.disableNotifications();
-
-mix.options({
- processCssUrls: false
- });
-
-if (mix.inProduction()) {
- mix.version();
-}
\ No newline at end of file