@jsg-developer/vue-pack 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/README.md +16 -66
  2. package/dist/chunks/ArrayObject-CC-LVTui.es.js +4 -0
  3. package/dist/chunks/{ArrayObject-Dqa0clzu.cjs.js → ArrayObject-CGzlqVE4.cjs.js} +1 -1
  4. package/dist/chunks/{ColorPicker-CEsbb5Ag.cjs.js → ColorPicker-B-7lnPz_.cjs.js} +1 -1
  5. package/dist/chunks/ColorPicker-DWajlDz5.es.js +4 -0
  6. package/dist/chunks/{ComboboxComponent-DtoaVSR4.cjs.js → ComboboxComponent-6WfHYEwL.cjs.js} +1 -1
  7. package/dist/chunks/ComboboxComponent-RENQ1FXI.es.js +4 -0
  8. package/dist/chunks/CurrencyInput-CmGrI2Vy.es.js +4 -0
  9. package/dist/chunks/{CurrencyInput-DTIcqJ1a.cjs.js → CurrencyInput-Dzho-dGX.cjs.js} +1 -1
  10. package/dist/chunks/{DateInput-C0SOusmw.cjs.js → DateInput-G26GgCwa.cjs.js} +1 -1
  11. package/dist/chunks/DateInput-J06kg5C-.es.js +4 -0
  12. package/dist/chunks/{DateTimeInput-DbpV0Qce.cjs.js → DateTimeInput-BDjAaSxl.cjs.js} +1 -1
  13. package/dist/chunks/{DateTimeInput-BZAT0grx.es.js → DateTimeInput-DYcjPrwh.es.js} +1 -1
  14. package/dist/chunks/{DateTimeInput.vue_vue_type_script_setup_true_lang-FyVamvm3.cjs.js → DateTimeInput.vue_vue_type_script_setup_true_lang-CEMOLDbR.cjs.js} +1 -1
  15. package/dist/chunks/{DateTimeInput.vue_vue_type_script_setup_true_lang-DYyoakjs.es.js → DateTimeInput.vue_vue_type_script_setup_true_lang-DLvsYOFE.es.js} +1 -1
  16. package/dist/chunks/EmailInput-Did4kNYA.es.js +4 -0
  17. package/dist/chunks/{EmailInput-Bj1hOlZq.cjs.js → EmailInput-mVz5VWCr.cjs.js} +1 -1
  18. package/dist/chunks/{FileArrayInput-BRvQ9JCt.es.js → FileArrayInput-C5drCF6p.es.js} +2 -2
  19. package/dist/chunks/{FileArrayInput-QS2XM7US.cjs.js → FileArrayInput-sF9cSGx6.cjs.js} +1 -1
  20. package/dist/chunks/{FileArrayInput.vue_vue_type_script_setup_true_lang-CKH_wEse.es.js → FileArrayInput.vue_vue_type_script_setup_true_lang-BC-fFxew.es.js} +1 -1
  21. package/dist/chunks/{FileArrayInput.vue_vue_type_script_setup_true_lang-CyOGfL5U.cjs.js → FileArrayInput.vue_vue_type_script_setup_true_lang-C1s1YDCy.cjs.js} +1 -1
  22. package/dist/chunks/FileInput-DEk9Pscj.es.js +4 -0
  23. package/dist/chunks/{FileInput-BHGryD14.cjs.js → FileInput-skfda07B.cjs.js} +1 -1
  24. package/dist/chunks/{GroupRenderer-BmfWEPk1.cjs.js → GroupRenderer-BvBpL8Bq.cjs.js} +1 -1
  25. package/dist/chunks/GroupRenderer-D_3hmVS4.es.js +4 -0
  26. package/dist/chunks/{ImageArrayInput-B-pILI_I.es.js → ImageArrayInput-CbJzqdrg.es.js} +2 -2
  27. package/dist/chunks/{ImageArrayInput-DFnXWcsl.cjs.js → ImageArrayInput-Cn1-cDwf.cjs.js} +1 -1
  28. package/dist/chunks/{ImageArrayInput.vue_vue_type_script_setup_true_lang-BIwMeD6G.cjs.js → ImageArrayInput.vue_vue_type_script_setup_true_lang-BHfmeojG.cjs.js} +1 -1
  29. package/dist/chunks/{ImageArrayInput.vue_vue_type_script_setup_true_lang-1D9mZZ7m.es.js → ImageArrayInput.vue_vue_type_script_setup_true_lang-EJntCDiU.es.js} +1 -1
  30. package/dist/chunks/{ImageInput-CSNbCtqh.cjs.js → ImageInput-BtNhmF5M.cjs.js} +1 -1
  31. package/dist/chunks/ImageInput-hwY64_P3.es.js +4 -0
  32. package/dist/chunks/NumberInput-0l-TANaP.es.js +4 -0
  33. package/dist/chunks/{NumberInput-D5mN1V1M.cjs.js → NumberInput-BMznnD_p.cjs.js} +1 -1
  34. package/dist/chunks/{ObjectInput-DR0aOSLh.cjs.js → ObjectInput-BEGBttyq.cjs.js} +1 -1
  35. package/dist/chunks/ObjectInput-DA7Hfck0.es.js +4 -0
  36. package/dist/chunks/{PasswordInput-DdG4fb10.cjs.js → PasswordInput-DVnZLrab.cjs.js} +1 -1
  37. package/dist/chunks/PasswordInput-DxSoZlRM.es.js +4 -0
  38. package/dist/chunks/RateInput-LQcqAf2f.es.js +4 -0
  39. package/dist/chunks/{RateInput-D4PLWJsQ.cjs.js → RateInput-hNeff8s7.cjs.js} +1 -1
  40. package/dist/chunks/{TabelData-BK_AEoh6.cjs.js → TabelData-Ct-CexJm.cjs.js} +1 -1
  41. package/dist/chunks/{TabelData-BHcz4exi.es.js → TabelData-Dz9sLYJR.es.js} +1 -1
  42. package/dist/chunks/TagInput-Cc7wwjcX.es.js +4 -0
  43. package/dist/chunks/{TagInput-Cr_dgIv1.cjs.js → TagInput-D7Jt9ghP.cjs.js} +1 -1
  44. package/dist/chunks/TelInput-DDqFalm6.es.js +4 -0
  45. package/dist/chunks/{TelInput-C5MYts-b.cjs.js → TelInput-DPwx7ozA.cjs.js} +1 -1
  46. package/dist/chunks/{TextAreaInput-CVZds8O-.cjs.js → TextAreaInput-Bm1U-giD.cjs.js} +1 -1
  47. package/dist/chunks/TextAreaInput-LkFerA8R.es.js +4 -0
  48. package/dist/chunks/{TextAreaQuill-XwQgVWLw.cjs.js → TextAreaQuill-BUmElXSq.cjs.js} +1 -1
  49. package/dist/chunks/{TextAreaQuill-CtpmFHK7.es.js → TextAreaQuill-PSKHjt67.es.js} +1 -1
  50. package/dist/chunks/{TextInput-BcOxjfnX.cjs.js → TextInput-BePpVfyt.cjs.js} +1 -1
  51. package/dist/chunks/TextInput-oBJKDYmM.es.js +4 -0
  52. package/dist/chunks/{TimeInput-DP9dzBSv.cjs.js → TimeInput-Bz62wZi1.cjs.js} +1 -1
  53. package/dist/chunks/TimeInput-DrXYIRmu.es.js +4 -0
  54. package/dist/chunks/ToggleInput-7phZ6wcS.es.js +4 -0
  55. package/dist/chunks/{ToggleInput-BQJ9Z0_X.cjs.js → ToggleInput-Dp4Lv_6z.cjs.js} +1 -1
  56. package/dist/chunks/{UrlInput-DpNGJGaX.cjs.js → UrlInput-ClHoXv2k.cjs.js} +1 -1
  57. package/dist/chunks/UrlInput-YQFu4Cb3.es.js +4 -0
  58. package/dist/chunks/resize-B3p3dEqX.cjs.js +12 -0
  59. package/dist/chunks/{resize-BA9Vve1P.es.js → resize-DjoINfaT.es.js} +686 -681
  60. package/dist/init.cjs.js +1 -1
  61. package/dist/init.es.js +1 -1
  62. package/dist/jsgd-vue-pack.cjs.js +1 -1
  63. package/dist/jsgd-vue-pack.es.js +7 -7
  64. package/dist/style.css +1 -1
  65. package/dist/vue.cjs.js +1 -1
  66. package/dist/vue.es.js +6 -6
  67. package/package.json +1 -1
  68. package/dist/chunks/ArrayObject-DDeI93dc.es.js +0 -4
  69. package/dist/chunks/ColorPicker-I60o5_GX.es.js +0 -4
  70. package/dist/chunks/ComboboxComponent-68U96D9p.es.js +0 -4
  71. package/dist/chunks/CurrencyInput-DGUkU3FD.es.js +0 -4
  72. package/dist/chunks/DateInput-Co6VpTHT.es.js +0 -4
  73. package/dist/chunks/EmailInput-qqhKRmvT.es.js +0 -4
  74. package/dist/chunks/FileInput-DxTlDCLx.es.js +0 -4
  75. package/dist/chunks/GroupRenderer-DMAdfCgE.es.js +0 -4
  76. package/dist/chunks/ImageInput-CRCYTGxc.es.js +0 -4
  77. package/dist/chunks/NumberInput-JR5PkxyV.es.js +0 -4
  78. package/dist/chunks/ObjectInput-Dqfri61J.es.js +0 -4
  79. package/dist/chunks/PasswordInput-U7M7le-1.es.js +0 -4
  80. package/dist/chunks/RateInput-RaBWxAY-.es.js +0 -4
  81. package/dist/chunks/TagInput-Bm2yhHqX.es.js +0 -4
  82. package/dist/chunks/TelInput-DcBE7hlb.es.js +0 -4
  83. package/dist/chunks/TextAreaInput-Cggq_qmY.es.js +0 -4
  84. package/dist/chunks/TextInput-fKC87ySl.es.js +0 -4
  85. package/dist/chunks/TimeInput-CbrXOhwB.es.js +0 -4
  86. package/dist/chunks/ToggleInput-i8LrK8Ut.es.js +0 -4
  87. package/dist/chunks/UrlInput-ckEhZgRN.es.js +0 -4
  88. package/dist/chunks/resize-DDw7Ie92.cjs.js +0 -12
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # jsgd-vue-pack
1
+ # @jsg-developer/vue-pack
2
2
 
3
- [![NPM Version](https://img.shields.io/npm/v/jsgd-vue-pack?style=flat-square)](https://www.npmjs.com/package/jsgd-vue-pack)
4
- [![Build Status](https://img.shields.io/github/actions/workflow/status/JSGDevelompent/jsgd-vue-pack/main.yml?branch=main&style=flat-square)](https://github.com/JSGDevelompent/jsgd-vue-pack/actions)
5
- [![License](https://img.shields.io/badge/license-Custom-blue?style=flat-square)](./LICENSE)
3
+ [![NPM Version](https://img.shields.io/npm/v/@jsg-developer/vue-pack?style=flat-square)](https://www.npmjs.com/package/@jsg-developer/vue-pack)
4
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/JSGDevelompent/@jsg-developer/vue-pack/main.yml?branch=main&style=flat-square)](https://github.com/JSGDevelompent/@jsg-developer/vue-pack/actions)
5
+ [![License](https://img.shields.io/badge/license-MIT-green?style=flat-square)](./LICENSE)
6
6
 
7
- **jsgd-vue-pack** is a comprehensive Vue 3 component library, built with TypeScript and Vite.
7
+ **@jsg-developer/vue-pack** is a comprehensive Vue 3 component library, built with TypeScript and Vite.
8
8
  It is designed to accelerate development by providing a rich set of ready-to-use UI components, ranging from complex data tables and modal forms to various types of input fields.
9
9
 
10
10
  ---
@@ -25,14 +25,15 @@ It is designed to accelerate development by providing a rich set of ready-to-use
25
25
  Install this package using npm:
26
26
 
27
27
  ```bash
28
- npm install jsgd-vue-pack
28
+ npm install @jsg-developer/vue-pack
29
+
29
30
  ```
30
31
 
31
32
  ---
32
33
 
33
34
  ## Usage
34
35
 
35
- Here’s how to integrate and use `jsgd-vue-pack` in your Vite + Vue 3 project.
36
+ Here’s how to integrate and use `@jsg-developer/vue-pack` in your Vite + Vue 3 project.
36
37
 
37
38
  ### 1. Configure the Plugin
38
39
 
@@ -42,7 +43,7 @@ Update your `vite.config.ts` file to include the Vite plugin from this library.
42
43
  // vite.config.ts
43
44
  import { defineConfig } from 'vite'
44
45
  import vue from '@vitejs/plugin-vue'
45
- import JsgdVuePack from 'jsgd-vue-pack/vite' // <-- Import Vite plugin
46
+ import JsgdVuePack from '@jsg-developer/vue-pack/vite' // <-- Import Vite plugin
46
47
 
47
48
  export default defineConfig({
48
49
  plugins: [
@@ -60,7 +61,8 @@ In your main entry file (`main.ts`), use the Vue plugin to register all componen
60
61
  // main.ts
61
62
  import { createApp } from 'vue'
62
63
  import App from './App.vue'
63
- import JsgdComponents from 'jsgd-vue-pack/vue' // <-- Import Vue plugin
64
+ import '@jsg-developer/vue-pack/style.css'
65
+ import JsgdComponents from '@jsg-developer/vue-pack/vue' // <-- Import Vue plugin
64
66
 
65
67
  const app = createApp(App)
66
68
 
@@ -68,59 +70,6 @@ app.use(JsgdComponents) // <-- Register all components
68
70
  app.mount('#app')
69
71
  ```
70
72
 
71
- ### 3. Customization (Optional)
72
-
73
- Create a `jsgd.config.ts` file in your project root to customize behavior, e.g., adding new languages.
74
-
75
- ```typescript
76
- // jsgd.config.ts
77
- import { defineConfig } from 'jsgd-vue-pack/config'
78
-
79
- export default defineConfig({
80
- i18n: {
81
- // Add or override languages
82
- languages: [
83
- {
84
- lang: 'id',
85
- config: {
86
- // ...Indonesian language config here
87
- },
88
- },
89
- ],
90
- },
91
- })
92
- ```
93
-
94
- ### 4. Using Components
95
-
96
- Now you can directly use components inside your `.vue` files.
97
-
98
- ```vue
99
- <template>
100
- <div>
101
- <TabelData :base="tableBaseConfig" :feature="tableFeatures" :endpoints="apiEndpoints" />
102
- </div>
103
- </template>
104
-
105
- <script setup lang="ts">
106
- // Import components manually if you don’t want global registration
107
- // import { TabelData } from 'jsgd-vue-pack';
108
-
109
- // Config for TabelData
110
- const tableBaseConfig = {
111
- // ...
112
- }
113
- const tableFeatures = {
114
- // ...
115
- }
116
- const apiEndpoints = {
117
- // ...
118
- }
119
- </script>
120
- ```
121
-
122
- ---
123
-
124
73
  ## 📦 Available Components
125
74
 
126
75
  This library covers a wide range of component categories, including:
@@ -134,16 +83,17 @@ This library covers a wide range of component categories, including:
134
83
 
135
84
  ## 📜 License
136
85
 
137
- This project is released under a **custom license**. Please see the [LICENSE](./LICENSE) file for full details.
86
+ This project is licensed under the **MIT License**.
87
+
88
+ You are free to use, modify, and distribute this software in your projects, both personal and commercial.
138
89
 
139
- - **Compiled Software (Build/Dist)**: Free to use and modify for personal or internal purposes.
140
- - **Original Source Code**: All rights reserved. Viewing, modifying, or redistributing the original source code without written permission is strictly prohibited.
90
+ See the [LICENSE](https://www.google.com/search?q=./LICENSE) file for full details.
141
91
 
142
92
  ---
143
93
 
144
94
  ## ⚖️ Third-Party Licenses
145
95
 
146
- This project utilizes third-party open-source software. The licenses for these dependencies are available in the [THIRD_PARTY_LICENSES.md](./THIRD_PARTY_LICENSES.md) file.
96
+ This project utilizes third-party open-source software. The licenses for these dependencies are available in the [THIRD_PARTY_LICENSES.md](https://www.google.com/search?q=./THIRD_PARTY_LICENSES.md) file.
147
97
 
148
98
  ---
149
99
 
@@ -0,0 +1,4 @@
1
+ import { b as f } from "./resize-DjoINfaT.es.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-DDw7Ie92.cjs.js");exports.default=e._sfc_main$2;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-B3p3dEqX.cjs.js");exports.default=e._sfc_main$2;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-DDw7Ie92.cjs.js");exports.default=e._sfc_main$3;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-B3p3dEqX.cjs.js");exports.default=e._sfc_main$3;
@@ -0,0 +1,4 @@
1
+ import { c as f } from "./resize-DjoINfaT.es.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-DDw7Ie92.cjs.js");exports.default=e._sfc_main$4;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-B3p3dEqX.cjs.js");exports.default=e._sfc_main$4;
@@ -0,0 +1,4 @@
1
+ import { d as f } from "./resize-DjoINfaT.es.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { e } from "./resize-DjoINfaT.es.js";
2
+ export {
3
+ e as default
4
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-DDw7Ie92.cjs.js");exports.default=e._sfc_main$5;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-B3p3dEqX.cjs.js");exports.default=e._sfc_main$5;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-DDw7Ie92.cjs.js");exports.default=e._sfc_main$7;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-B3p3dEqX.cjs.js");exports.default=e._sfc_main$7;
@@ -0,0 +1,4 @@
1
+ import { g as f } from "./resize-DjoINfaT.es.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./DateTimeInput.vue_vue_type_script_setup_true_lang-FyVamvm3.cjs.js");exports.default=e._sfc_main;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./DateTimeInput.vue_vue_type_script_setup_true_lang-CEMOLDbR.cjs.js");exports.default=e._sfc_main;
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./DateTimeInput.vue_vue_type_script_setup_true_lang-DYyoakjs.es.js";
1
+ import { _ as f } from "./DateTimeInput.vue_vue_type_script_setup_true_lang-DLvsYOFE.es.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("vue"),g=require("./resize-DDw7Ie92.cjs.js");require("dompurify");require("lodash.isequal");require("zod");const T={class:"jsgd-w-full jsgd-relative jsgd-mb-4"},D=["for"],y={class:"jsgd-relative"},w=["id","value","disabled","min","max","placeholder"],V={key:0,class:"jsgd-text-sm jsgd-text-red-500 jsgd-mt-2 jsgd-animate-[fadeIn_300ms_ease-out] dark:jsgd-text-red-400"},M=e.defineComponent({__name:"DateTimeInput",props:{id:{type:String,default:()=>g.setUID()},label:{type:String,required:!0},placeholder:String,modelValue:{type:String,default:""},error:[String,Array],disabled:Boolean,validate:Object,lang:String,outputFormat:{type:String,default:"local-offset"}},emits:["update:modelValue","push:error","remove:error"],setup(n,{emit:b}){const t=n,k=e.inject("TableComponents",{labels:e.ref(g.defaultTextLabelsMap[t.lang??"en"])}).labels,j=b;function f(s){if(!s)return"";if(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/.test(s))return s;if(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/.test(s))return s.substring(0,16);try{const a=new Date(s);if(isNaN(a.getTime()))return"";const r=a.getFullYear(),d=(a.getMonth()+1).toString().padStart(2,"0"),i=a.getDate().toString().padStart(2,"0"),o=a.getHours().toString().padStart(2,"0"),l=a.getMinutes().toString().padStart(2,"0");return`${r}-${d}-${i}T${o}:${l}`}catch{return""}}const x=e.computed(()=>f(t.modelValue)),p=e.computed(()=>{if(t.validate){const s=t.validate,a=[];return s.minDateTime&&a.push(g.getMessage("dateTimeMin",{min:s.minDateTime},t.lang??"en")),s.maxDateTime&&a.push(g.getMessage("dateTimeMax",{max:s.maxDateTime},t.lang??"en")),a.join(`
1
+ "use strict";const e=require("vue"),g=require("./resize-B3p3dEqX.cjs.js");require("dompurify");require("lodash.isequal");require("zod");const T={class:"jsgd-w-full jsgd-relative jsgd-mb-4"},D=["for"],y={class:"jsgd-relative"},w=["id","value","disabled","min","max","placeholder"],V={key:0,class:"jsgd-text-sm jsgd-text-red-500 jsgd-mt-2 jsgd-animate-[fadeIn_300ms_ease-out] dark:jsgd-text-red-400"},M=e.defineComponent({__name:"DateTimeInput",props:{id:{type:String,default:()=>g.setUID()},label:{type:String,required:!0},placeholder:String,modelValue:{type:String,default:""},error:[String,Array],disabled:Boolean,validate:Object,lang:String,outputFormat:{type:String,default:"local-offset"}},emits:["update:modelValue","push:error","remove:error"],setup(n,{emit:b}){const t=n,k=e.inject("TableComponents",{labels:e.ref(g.defaultTextLabelsMap[t.lang??"en"])}).labels,j=b;function f(s){if(!s)return"";if(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/.test(s))return s;if(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/.test(s))return s.substring(0,16);try{const a=new Date(s);if(isNaN(a.getTime()))return"";const r=a.getFullYear(),d=(a.getMonth()+1).toString().padStart(2,"0"),i=a.getDate().toString().padStart(2,"0"),o=a.getHours().toString().padStart(2,"0"),l=a.getMinutes().toString().padStart(2,"0");return`${r}-${d}-${i}T${o}:${l}`}catch{return""}}const x=e.computed(()=>f(t.modelValue)),p=e.computed(()=>{if(t.validate){const s=t.validate,a=[];return s.minDateTime&&a.push(g.getMessage("dateTimeMin",{min:s.minDateTime},t.lang??"en")),s.maxDateTime&&a.push(g.getMessage("dateTimeMax",{max:s.maxDateTime},t.lang??"en")),a.join(`
2
2
  `)}return""}),c=e.ref([]);e.watch(()=>({val:t.modelValue,disabled:t.disabled,validate:t.validate}),({val:s,disabled:a,validate:r})=>{if(a){c.value=[];return}const d=[],i=f(s);if(r){const{minDateTime:o,maxDateTime:l}=r;if(i){const u=o?f(o):void 0,m=l?f(l):void 0;u&&i<u&&d.push(g.getMessage("dateTimeMin",{min:String(u)},t.lang??"en")),m&&i>m&&d.push(g.getMessage("dateTimeMax",{max:String(m)},t.lang??"en"))}}c.value=d,d.length?j("push:error",d,t.id):j("remove:error",t.id)},{deep:!0,immediate:!0});const v=e.computed(()=>t.placeholder??k?.value?.placeholder?.datetime??"");function h(s){if(t.disabled)return;const r=s.target.value;if(!r){j("update:modelValue","",t.id);return}const d=`${r}:00`,i=new Date(d);let o="";if(t.outputFormat==="utc")o=i.toISOString();else{const l=i.getTimezoneOffset(),u=Math.abs(l/60),m=Math.abs(l%60),S=`${l>0?"-":"+"}${String(u).padStart(2,"0")}:${String(m).padStart(2,"0")}`;o=`${d}${S}`}j("update:modelValue",o,t.id)}return(s,a)=>(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("label",{for:n.id,class:e.normalizeClass(["jsgd-inline-flex jsgd-items-center jsgd-gap-2 jsgd-text-sm jsgd-font-medium jsgd-mb-2 jsgd-text-slate-900 jsgd-transition-colors jsgd-duration-200 dark:jsgd-text-slate-100",{"jsgd-text-red-500 dark:jsgd-text-red-400":c.value.length||n.error}])},[e.createTextVNode(e.toDisplayString(n.label)+" ",1),p.value?(e.openBlock(),e.createBlock(e.unref(g._sfc_main$1),{key:0,text:p.value,as:"strong"},{default:e.withCtx(()=>[...a[0]||(a[0]=[e.createTextVNode(" ❓",-1)])]),_:1},8,["text"])):e.createCommentVNode("",!0)],10,D),e.createElementVNode("div",y,[a[1]||(a[1]=e.createElementVNode("div",{class:"jsgd-absolute jsgd-right-3 jsgd-top-1/2 -jsgd-translate-y-1/2 jsgd-pointer-events-none jsgd-text-slate-500 dark:jsgd-text-slate-400"},[e.createElementVNode("span",{class:"jsgd-i-mdi-calendar-clock jsgd-w-5 jsgd-h-5"})],-1)),e.createElementVNode("input",{id:n.id,type:"datetime-local",value:x.value,disabled:n.disabled,min:t.validate?.minDateTime,max:t.validate?.maxDateTime,onInput:h,placeholder:v.value,class:e.normalizeClass(["jsgd-w-full jsgd-py-3 jsgd-px-4 jsgd-text-base jsgd-text-slate-900 jsgd-bg-white jsgd-border-1 jsgd-border-solid jsgd-border-slate-300 jsgd-rounded-lg jsgd-transition-all jsgd-duration-200 jsgd-box-border jsgd-appearance-none focus:jsgd-outline-none focus:jsgd-border-blue-500 focus:jsgd-ring-4 focus:jsgd-ring-blue-500/20 disabled:jsgd-bg-slate-100 disabled:jsgd-text-slate-500 disabled:jsgd-cursor-not-allowed dark:jsgd-bg-slate-800 dark:jsgd-text-slate-100 dark:jsgd-border-slate-600 dark:focus:jsgd-border-blue-400 dark:focus:jsgd-ring-blue-400/25 dark:disabled:jsgd-bg-slate-700 [color-scheme:light_dark] [&::-webkit-calendar-picker-indicator]:jsgd-opacity-0 [&::-webkit-calendar-picker-indicator]:jsgd-cursor-pointer [&::-webkit-calendar-picker-indicator]:jsgd-absolute [&::-webkit-calendar-picker-indicator]:jsgd-right-3 [&::-webkit-calendar-picker-indicator]:jsgd-top-1/2 [&::-webkit-calendar-picker-indicator]:-jsgd-translate-y-1/2 [&::-webkit-calendar-picker-indicator]:jsgd-w-6 [&::-webkit-calendar-picker-indicator]:jsgd-h-6",{"jsgd-border-red-400 focus:jsgd-ring-red-500/20 dark:jsgd-border-red-400 dark:focus:jsgd-ring-red-400/25":c.value.length||n.error}])},null,42,w)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(r,d)=>(e.openBlock(),e.createElementBlock("p",{key:d,class:"jsgd-text-sm jsgd-text-red-500 jsgd-mt-2 jsgd-animate-[fadeIn_300ms_ease-out] dark:jsgd-text-red-400"},e.toDisplayString(r),1))),128)),typeof t.error=="string"&&c.value.length===0?(e.openBlock(),e.createElementBlock("p",V,e.toDisplayString(n.error),1)):e.createCommentVNode("",!0)]))}});exports._sfc_main=M;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as _, inject as C, ref as v, computed as x, watch as N, createElementBlock as p, openBlock as u, createElementVNode as m, createCommentVNode as S, normalizeClass as T, createTextVNode as w, createBlock as B, toDisplayString as k, unref as F, withCtx as z, Fragment as L, renderList as O } from "vue";
2
- import { U as E, z as H, a9 as b, a as U } from "./resize-BA9Vve1P.es.js";
2
+ import { U as E, z as H, a9 as b, a as U } from "./resize-DjoINfaT.es.js";
3
3
  import "dompurify";
4
4
  import "lodash.isequal";
5
5
  import "zod";
@@ -0,0 +1,4 @@
1
+ import { h as f } from "./resize-DjoINfaT.es.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-DDw7Ie92.cjs.js");exports.default=e._sfc_main$8;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-B3p3dEqX.cjs.js");exports.default=e._sfc_main$8;
@@ -1,5 +1,5 @@
1
- import { _ as m } from "./FileArrayInput.vue_vue_type_script_setup_true_lang-CKH_wEse.es.js";
2
- import "./resize-BA9Vve1P.es.js";
1
+ import { _ as m } from "./FileArrayInput.vue_vue_type_script_setup_true_lang-BC-fFxew.es.js";
2
+ import "./resize-DjoINfaT.es.js";
3
3
  export {
4
4
  m as default
5
5
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./FileArrayInput.vue_vue_type_script_setup_true_lang-CyOGfL5U.cjs.js");require("./resize-DDw7Ie92.cjs.js");exports.default=e._sfc_main;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./FileArrayInput.vue_vue_type_script_setup_true_lang-C1s1YDCy.cjs.js");require("./resize-B3p3dEqX.cjs.js");exports.default=e._sfc_main;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as D, inject as C, ref as y, computed as k, watch as R, createElementBlock as n, openBlock as r, createElementVNode as a, normalizeClass as w, createTextVNode as $, createBlock as K, createCommentVNode as F, toDisplayString as c, unref as _, withCtx as N, Fragment as L, renderList as A, normalizeStyle as P } from "vue";
2
- import { U as W, z as q, a9 as o, a as G } from "./resize-BA9Vve1P.es.js";
2
+ import { U as W, z as q, a9 as o, a as G } from "./resize-DjoINfaT.es.js";
3
3
  import "dompurify";
4
4
  import "lodash.isequal";
5
5
  import "zod";
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("vue"),r=require("./resize-DDw7Ie92.cjs.js");require("dompurify");require("lodash.isequal");require("zod");const E={class:"jsgd-w-full jsgd-mb-4"},B=["for"],S={key:0,class:"jsgd-flex jsgd-flex-col jsgd-gap-3 jsgd-mb-6"},z={class:"jsgd-flex jsgd-items-center jsgd-gap-3 jsgd-min-w-0"},C={class:"jsgd-flex jsgd-flex-col jsgd-overflow-hidden"},N={class:"jsgd-font-medium jsgd-text-slate-900 jsgd-truncate dark:jsgd-text-slate-100"},T={class:"jsgd-text-xs jsgd-text-slate-500 dark:jsgd-text-slate-400"},M=["onClick"],L={key:1,class:"jsgd-text-center jsgd-py-8 jsgd-px-4 jsgd-text-slate-400 jsgd-italic dark:jsgd-text-slate-500"},$={class:"jsgd-text-center jsgd-mt-4"},D=["id","disabled"],A=["for"],I=["disabled"],U={class:"jsgd-mt-2 jsgd-flex jsgd-flex-col jsgd-gap-1"},q=e.defineComponent({__name:"FileArrayInput",props:{id:{default:r.setUID},label:{},modelValue:{default:()=>[]},disabled:{type:Boolean},validate:{},lang:{},error:{}},emits:["update:modelValue","push:error","remove:error"],setup(n,{emit:y}){const s=n,i=y,h=e.inject("TableComponents",{labels:e.ref(r.defaultTextLabelsMap[s.lang??"en"])}).labels,c=e.inject("TableComponents")?.ShowAlert,j=e.ref([]),g=e.ref([]),u=e.computed(()=>g.value.length>0?g.value:typeof s.error=="string"?[s.error]:Array.isArray(s.error)?s.error:[]),m=e.computed(()=>s.disabled?!0:s.validate?.maxFiles!==void 0?!!(s.modelValue&&s.modelValue.length>=s.validate.maxFiles):!1),x=e.computed(()=>{if(!s.validate)return"";const t=s.validate,l=[];return t.maxFiles&&l.push(r.getMessage("fileMaxFiles",{max:t.maxFiles},s.lang??"en")),t.allowedTypes&&l.push(r.getMessage("fileType",{},s.lang??"en")+` (${t.allowedTypes.join(", ")})`),t.maxSize&&l.push(r.getMessage("fileMaxSize",{max:t.maxSize},s.lang??"en")),l.join(`
1
+ "use strict";const e=require("vue"),r=require("./resize-B3p3dEqX.cjs.js");require("dompurify");require("lodash.isequal");require("zod");const E={class:"jsgd-w-full jsgd-mb-4"},B=["for"],S={key:0,class:"jsgd-flex jsgd-flex-col jsgd-gap-3 jsgd-mb-6"},z={class:"jsgd-flex jsgd-items-center jsgd-gap-3 jsgd-min-w-0"},C={class:"jsgd-flex jsgd-flex-col jsgd-overflow-hidden"},N={class:"jsgd-font-medium jsgd-text-slate-900 jsgd-truncate dark:jsgd-text-slate-100"},T={class:"jsgd-text-xs jsgd-text-slate-500 dark:jsgd-text-slate-400"},M=["onClick"],L={key:1,class:"jsgd-text-center jsgd-py-8 jsgd-px-4 jsgd-text-slate-400 jsgd-italic dark:jsgd-text-slate-500"},$={class:"jsgd-text-center jsgd-mt-4"},D=["id","disabled"],A=["for"],I=["disabled"],U={class:"jsgd-mt-2 jsgd-flex jsgd-flex-col jsgd-gap-1"},q=e.defineComponent({__name:"FileArrayInput",props:{id:{default:r.setUID},label:{},modelValue:{default:()=>[]},disabled:{type:Boolean},validate:{},lang:{},error:{}},emits:["update:modelValue","push:error","remove:error"],setup(n,{emit:y}){const s=n,i=y,h=e.inject("TableComponents",{labels:e.ref(r.defaultTextLabelsMap[s.lang??"en"])}).labels,c=e.inject("TableComponents")?.ShowAlert,j=e.ref([]),g=e.ref([]),u=e.computed(()=>g.value.length>0?g.value:typeof s.error=="string"?[s.error]:Array.isArray(s.error)?s.error:[]),m=e.computed(()=>s.disabled?!0:s.validate?.maxFiles!==void 0?!!(s.modelValue&&s.modelValue.length>=s.validate.maxFiles):!1),x=e.computed(()=>{if(!s.validate)return"";const t=s.validate,l=[];return t.maxFiles&&l.push(r.getMessage("fileMaxFiles",{max:t.maxFiles},s.lang??"en")),t.allowedTypes&&l.push(r.getMessage("fileType",{},s.lang??"en")+` (${t.allowedTypes.join(", ")})`),t.maxSize&&l.push(r.getMessage("fileMaxSize",{max:t.maxSize},s.lang??"en")),l.join(`
2
2
  `)});e.watch(()=>s.modelValue,t=>{if(!t||t.length===0){j.value=[],b();return}j.value=t.map(l=>l instanceof File?{name:l.name,size:`${(l.size/1024).toFixed(2)} KB`}:{name:l,size:"N/A"}),b()},{immediate:!0,deep:!0});function w(){if(s.disabled)return;if(m.value){c?.("error",r.getMessage("fileMaxFiles",{max:s.validate.maxFiles},s.lang??"en"));return}const t=prompt(h.value.placeholder?.url??"Please enter the file URL");if(t)if(t.startsWith("http://")||t.startsWith("https://")){const l=s.modelValue||[];i("update:modelValue",[...l,t])}else c?.("error","Invalid URL",["Please enter a valid URL starting with http:// or https://"])}function V(t){if(s.disabled)return;const l=t.target,a=l.files;if(!a||a.length===0)return;const d=s.modelValue||[],o=s.validate?.maxFiles;if(o&&d.length+a.length>o){c?.("error",r.getMessage("fileMaxFiles",{max:o},s.lang??"en")),l.value="";return}const p=[],v=s.validate?.allowedTypes?.map(f=>f.toLowerCase())??[];for(const f of Array.from(a)){const k=f.name.split(".").pop()?.toLowerCase();if(v.length>0&&(!k||!v.includes(k))){c?.("error","Invalid file type",[r.getMessage("fileType",{},s.lang??"en")+` (${s.validate?.allowedTypes?.join(", ")})`]);continue}p.push(f)}i("update:modelValue",[...d,...p]),l.value=""}function F(t){if(s.disabled)return;const l=[...s.modelValue||[]];l.splice(t,1),i("update:modelValue",l)}function b(){if(!s.validate||!s.modelValue||s.modelValue.length===0){g.value=[],i("remove:error",s.id);return}const t=[];s.validate.maxFiles&&s.modelValue.length>s.validate.maxFiles&&t.push(r.getMessage("fileMaxFiles",{max:s.validate.maxFiles},s.lang??"en")),s.modelValue.forEach((l,a)=>{if(l instanceof File){const d=_(l,a+1);t.push(...d)}}),g.value=[...new Set(t)],g.value.length>0?i("push:error",g.value,s.id):i("remove:error",s.id)}function _(t,l){const a=[],d=s.validate;if(d.allowedTypes){const o=t.name.split(".").pop()?.toLowerCase();(!o||!d.allowedTypes.map(p=>p.toLowerCase()).includes(o))&&a.push(`File #${l} (${t.name}): `+r.getMessage("fileType",{},s.lang??"en")+` (${d.allowedTypes.join(", ")})`)}return d.maxSize&&t.size/1024>d.maxSize&&a.push(`File #${l} (${t.name}): `+r.getMessage("fileMaxSize",{max:d.maxSize},s.lang??"en")),a}return(t,l)=>(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("label",{for:n.id,class:e.normalizeClass(["jsgd-inline-flex jsgd-items-center jsgd-gap-2 jsgd-text-sm jsgd-font-medium jsgd-mb-2 jsgd-text-slate-900 jsgd-transition-colors jsgd-duration-200 dark:jsgd-text-slate-100",{"jsgd-text-red-500 dark:jsgd-text-red-400":u.value.length!==0}])},[e.createTextVNode(e.toDisplayString(n.label)+" ",1),x.value?(e.openBlock(),e.createBlock(e.unref(r._sfc_main$1),{key:0,text:x.value,as:"strong"},{default:e.withCtx(()=>[...l[0]||(l[0]=[e.createTextVNode(" ❓",-1)])]),_:1},8,["text"])):e.createCommentVNode("",!0)],10,B),e.createElementVNode("div",{class:e.normalizeClass(["jsgd-bg-white jsgd-border-2 jsgd-border-dashed jsgd-border-slate-300 jsgd-rounded-xl jsgd-p-6 jsgd-transition-colors jsgd-duration-200 hover:jsgd-bg-slate-50 hover:jsgd-border-blue-500 dark:jsgd-bg-slate-800 dark:jsgd-border-slate-600 dark:hover:jsgd-bg-slate-700 dark:hover:jsgd-border-blue-400",{"jsgd-border-red-300 dark:jsgd-border-red-800":u.value.length!==0}])},[j.value.length>0?(e.openBlock(),e.createElementBlock("div",S,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,(a,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:"jsgd-group jsgd-flex jsgd-items-center jsgd-justify-between jsgd-p-3 jsgd-bg-slate-50 jsgd-border jsgd-border-slate-200 jsgd-rounded-lg jsgd-shadow-sm jsgd-transition-all jsgd-duration-200 jsgd-animate-[slideInFade_500ms_ease-out_backwards] hover:-jsgd-translate-y-0.5 hover:jsgd-shadow-md dark:jsgd-bg-slate-700 dark:jsgd-border-slate-600 dark:hover:jsgd-bg-slate-600",style:e.normalizeStyle({animationDelay:`${d*60}ms`})},[e.createElementVNode("div",z,[l[1]||(l[1]=e.createElementVNode("span",{class:"jsgd-text-2xl jsgd-text-slate-500 jsgd-shrink-0 dark:jsgd-text-slate-400"},"📄",-1)),e.createElementVNode("div",C,[e.createElementVNode("span",N,e.toDisplayString(a.name),1),e.createElementVNode("span",T,e.toDisplayString(a.size),1)])]),n.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,onClick:o=>F(d),class:"jsgd-w-6 jsgd-h-6 jsgd-flex jsgd-items-center jsgd-justify-center jsgd-pb-[5px] jsgd-shrink-0 jsgd-ml-4 jsgd-text-xl jsgd-font-bold jsgd-text-white jsgd-bg-red-500 jsgd-rounded-full jsgd-border-none jsgd-cursor-pointer jsgd-opacity-0 jsgd-scale-50 jsgd-transition-all jsgd-duration-200 hover:jsgd-bg-red-600 hover:jsgd-scale-110 hover:jsgd-rotate-90 group-hover:jsgd-opacity-100 group-hover:jsgd-scale-100","aria-label":"Remove file"}," × ",8,M))],4))),128))])):(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("p",null,e.toDisplayString(e.unref(h)?.message?.noItemSelected),1)])),e.createElementVNode("div",$,[e.createElementVNode("input",{id:n.id,type:"file",multiple:"",onChange:V,class:"jsgd-hidden",disabled:m.value},null,40,D),e.createElementVNode("label",{for:n.id,class:e.normalizeClass(["jsgd-inline-flex jsgd-items-center jsgd-gap-2 jsgd-px-5 jsgd-py-2.5 jsgd-font-medium jsgd-border-none jsgd-rounded-lg jsgd-text-white jsgd-bg-blue-500 jsgd-cursor-pointer jsgd-transition-all jsgd-duration-200 hover:jsgd-bg-blue-600 hover:jsgd-scale-105 hover:jsgd-shadow-lg disabled:jsgd-bg-slate-100 disabled:jsgd-text-slate-500 disabled:jsgd-cursor-not-allowed dark:jsgd-bg-blue-600 dark:hover:jsgd-bg-blue-500 dark:disabled:jsgd-bg-slate-700 dark:disabled:jsgd-text-slate-400 before:jsgd-content-['+'] before:jsgd-text-lg before:jsgd-leading-none",{"jsgd-opacity-60 jsgd-cursor-not-allowed":m.value}])},e.toDisplayString(e.unref(h)?.btn?.upload??"Upload"),11,A),e.createElementVNode("button",{type:"button",onClick:w,disabled:m.value,class:"jsgd-inline-flex jsgd-items-center jsgd-gap-2 jsgd-px-5 jsgd-py-2.5 jsgd-font-medium jsgd-border-none jsgd-rounded-lg jsgd-text-white jsgd-bg-slate-600 jsgd-cursor-pointer jsgd-transition-all jsgd-duration-200 hover:jsgd-bg-slate-700 hover:jsgd-scale-105 hover:jsgd-shadow-lg disabled:jsgd-opacity-60 disabled:jsgd-cursor-not-allowed dark:jsgd-bg-slate-500 dark:hover:jsgd-bg-slate-400"}," URL ",8,I)])],2),e.createElementVNode("div",U,[u.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.value,(a,d)=>(e.openBlock(),e.createElementBlock("p",{key:d,class:"jsgd-text-sm jsgd-text-red-500 jsgd-animate-[fadeIn_300ms_ease-out] dark:jsgd-text-red-400"},e.toDisplayString(a),1))),128)):e.createCommentVNode("",!0)])]))}});exports._sfc_main=q;
@@ -0,0 +1,4 @@
1
+ import { i as f } from "./resize-DjoINfaT.es.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-DDw7Ie92.cjs.js");exports.default=e._sfc_main$9;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-B3p3dEqX.cjs.js");exports.default=e._sfc_main$9;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-DDw7Ie92.cjs.js");exports.default=e._sfc_main$10;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-B3p3dEqX.cjs.js");exports.default=e._sfc_main$10;
@@ -0,0 +1,4 @@
1
+ import { j as f } from "./resize-DjoINfaT.es.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,5 +1,5 @@
1
- import { _ as m } from "./ImageArrayInput.vue_vue_type_script_setup_true_lang-1D9mZZ7m.es.js";
2
- import "./resize-BA9Vve1P.es.js";
1
+ import { _ as m } from "./ImageArrayInput.vue_vue_type_script_setup_true_lang-EJntCDiU.es.js";
2
+ import "./resize-DjoINfaT.es.js";
3
3
  export {
4
4
  m as default
5
5
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ImageArrayInput.vue_vue_type_script_setup_true_lang-BIwMeD6G.cjs.js");require("./resize-DDw7Ie92.cjs.js");exports.default=e._sfc_main;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ImageArrayInput.vue_vue_type_script_setup_true_lang-BHfmeojG.cjs.js");require("./resize-B3p3dEqX.cjs.js");exports.default=e._sfc_main;
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("vue"),o=require("./resize-DDw7Ie92.cjs.js");require("dompurify");require("lodash.isequal");require("zod");const P={class:"jsgd-w-full jsgd-mb-4"},R=["for"],T={key:0,class:"jsgd-grid jsgd-grid-cols-2 jsgd-gap-4 jsgd-mb-6 min-[480px]:jsgd-grid-cols-3 md:jsgd-grid-cols-4 lg:jsgd-grid-cols-5"},U=["src","alt"],$=["onClick"],z={key:1,class:"jsgd-text-center jsgd-py-8 jsgd-px-4 jsgd-text-slate-400 dark:jsgd-text-slate-500"},A={class:"jsgd-text-center jsgd-mt-4"},D=["id","disabled"],N=["for"],q=["disabled"],K={class:"jsgd-mt-2 jsgd-flex jsgd-flex-col jsgd-gap-1"},G=t.defineComponent({__name:"ImageArrayInput",props:{id:{default:o.setUID},label:{},modelValue:{default:()=>[]},previewAlt:{},disabled:{type:Boolean},error:{},previewImages:{},validate:{},watermark:{},lang:{}},emits:["update:modelValue","push:error","remove:error"],setup(h,{emit:I}){const e=h,u=I,y=t.inject("TableComponents",{labels:t.ref(o.defaultTextLabelsMap[e.lang??"en"])}).labels,f=t.inject("TableComponents")?.ShowAlert,w=t.ref([]),j=t.ref([]),x=t.computed(()=>j.value.length>0?j.value:typeof e.error=="string"?[e.error]:Array.isArray(e.error)?e.error:[]),b=t.computed(()=>e.disabled?!0:!!(e.validate?.maxFiles&&e.modelValue&&e.modelValue.length>=e.validate.maxFiles)),M=t.computed(()=>{if(!e.validate)return"";const a=e.validate,r=[];if(a.maxFiles&&r.push(o.getMessage("imageMaxFiles",{max:a.maxFiles},e.lang??"en")),a.allowedTypes&&r.push(o.getMessage("imageType",{},e.lang??"en")+` (${a.allowedTypes.join(", ")})`),a.maxSize&&r.push(o.getMessage("imageMaxSize",{max:a.maxSize},e.lang??"en")),a.pixel){const s=a.pixel;("minWidth"in s||"maxWidth"in s||"minHeight"in s||"maxHeight"in s)&&(s.minWidth&&r.push(o.getMessage("imageMinWidth",{min:s.minWidth},e.lang??"en")),s.minHeight&&r.push(o.getMessage("imageMinHeight",{min:s.minHeight},e.lang??"en")),s.maxWidth&&r.push(o.getMessage("imageMaxWidth",{max:s.maxWidth},e.lang??"en")),s.maxHeight&&r.push(o.getMessage("imageMaxHeight",{max:s.maxHeight},e.lang??"en"))),("width"in s||"height"in s)&&r.push(o.getMessage("imagePixel",{width:s.width??"any",height:s.height??"any"},e.lang??"en"))}return a.ratio&&r.push(o.getMessage("imageRatio",{w:a.ratio.Width,h:a.ratio.Height},e.lang??"en")),r.join(`
1
+ "use strict";const t=require("vue"),o=require("./resize-B3p3dEqX.cjs.js");require("dompurify");require("lodash.isequal");require("zod");const P={class:"jsgd-w-full jsgd-mb-4"},R=["for"],T={key:0,class:"jsgd-grid jsgd-grid-cols-2 jsgd-gap-4 jsgd-mb-6 min-[480px]:jsgd-grid-cols-3 md:jsgd-grid-cols-4 lg:jsgd-grid-cols-5"},U=["src","alt"],$=["onClick"],z={key:1,class:"jsgd-text-center jsgd-py-8 jsgd-px-4 jsgd-text-slate-400 dark:jsgd-text-slate-500"},A={class:"jsgd-text-center jsgd-mt-4"},D=["id","disabled"],N=["for"],q=["disabled"],K={class:"jsgd-mt-2 jsgd-flex jsgd-flex-col jsgd-gap-1"},G=t.defineComponent({__name:"ImageArrayInput",props:{id:{default:o.setUID},label:{},modelValue:{default:()=>[]},previewAlt:{},disabled:{type:Boolean},error:{},previewImages:{},validate:{},watermark:{},lang:{}},emits:["update:modelValue","push:error","remove:error"],setup(h,{emit:I}){const e=h,u=I,y=t.inject("TableComponents",{labels:t.ref(o.defaultTextLabelsMap[e.lang??"en"])}).labels,f=t.inject("TableComponents")?.ShowAlert,w=t.ref([]),j=t.ref([]),x=t.computed(()=>j.value.length>0?j.value:typeof e.error=="string"?[e.error]:Array.isArray(e.error)?e.error:[]),b=t.computed(()=>e.disabled?!0:!!(e.validate?.maxFiles&&e.modelValue&&e.modelValue.length>=e.validate.maxFiles)),M=t.computed(()=>{if(!e.validate)return"";const a=e.validate,r=[];if(a.maxFiles&&r.push(o.getMessage("imageMaxFiles",{max:a.maxFiles},e.lang??"en")),a.allowedTypes&&r.push(o.getMessage("imageType",{},e.lang??"en")+` (${a.allowedTypes.join(", ")})`),a.maxSize&&r.push(o.getMessage("imageMaxSize",{max:a.maxSize},e.lang??"en")),a.pixel){const s=a.pixel;("minWidth"in s||"maxWidth"in s||"minHeight"in s||"maxHeight"in s)&&(s.minWidth&&r.push(o.getMessage("imageMinWidth",{min:s.minWidth},e.lang??"en")),s.minHeight&&r.push(o.getMessage("imageMinHeight",{min:s.minHeight},e.lang??"en")),s.maxWidth&&r.push(o.getMessage("imageMaxWidth",{max:s.maxWidth},e.lang??"en")),s.maxHeight&&r.push(o.getMessage("imageMaxHeight",{max:s.maxHeight},e.lang??"en"))),("width"in s||"height"in s)&&r.push(o.getMessage("imagePixel",{width:s.width??"any",height:s.height??"any"},e.lang??"en"))}return a.ratio&&r.push(o.getMessage("imageRatio",{w:a.ratio.Width,h:a.ratio.Height},e.lang??"en")),r.join(`
2
2
  `)});t.watch(()=>e.modelValue,async a=>{if(!a||a.length===0){w.value=e.previewImages||[],E();return}const r=a.map(s=>new Promise(d=>{if(typeof s=="string")d(s);else if(s instanceof File){const i=new FileReader;i.onload=g=>d(g.target?.result),i.onerror=()=>d(""),i.readAsDataURL(s)}else d("")}));w.value=await Promise.all(r),E()},{immediate:!0,deep:!0});function V(a,r=!1){return new Promise((s,d)=>{const i=new Image;r&&(i.crossOrigin="anonymous"),i.onload=()=>s(i),i.onerror=g=>{console.error("Failed to load image:",a,g),d(new Error(`Failed to load image: ${a}`))},i.src=a})}async function B(a){if(!e.watermark)return a;const r=e.watermark,s=URL.createObjectURL(a);try{const[d,i]=await Promise.all([V(s,!1),V(r.url,!0)]),g=document.createElement("canvas");g.width=d.width,g.height=d.height;const n=g.getContext("2d");if(!n)return a;n.drawImage(d,0,0),n.globalAlpha=r.transparant/100;let c=0,l=0;const m=10;switch(r.position){case"top-left":c=m,l=m,n.drawImage(i,c,l);break;case"top-right":c=d.width-i.width-m,l=m,n.drawImage(i,c,l);break;case"bottom-left":c=m,l=d.height-i.height-m,n.drawImage(i,c,l);break;case"bottom-right":c=d.width-i.width-m,l=d.height-i.height-m,n.drawImage(i,c,l);break;case"full":n.drawImage(i,0,0,d.width,d.height);break}return n.globalAlpha=1,new Promise((v,k)=>{g.toBlob(p=>{if(p){const F=new File([p],a.name,{type:a.type});v(F)}else k(new Error("Canvas toBlob failed"))},a.type)})}catch(d){throw console.error(`Watermark application failed for ${a.name}:`,d),f?.("error",`Watermark Error (${a.name})`,["Gagal menerapkan watermark pada gambar."]),d}finally{URL.revokeObjectURL(s)}}function _(){if(e.disabled)return;if(b.value){f?.("error",o.getMessage("imageMaxFiles",{max:e.validate.maxFiles},e.lang??"en"));return}const a=prompt(y.value.placeholder?.url??"Please enter the image URL");if(a)if(a.startsWith("http://")||a.startsWith("https://")){const r=e.modelValue||[];u("update:modelValue",[...r,a])}else f?.("error","Invalid URL",["Please enter a valid URL starting with http:// or https://"])}async function C(a){if(e.disabled)return;const r=a.target,s=r.files;if(!s||s.length===0)return;const d=e.modelValue||[],i=e.validate?.maxFiles;if(i&&d.length+s.length>i){f?.("error",o.getMessage("imageMaxFiles",{max:i},e.lang??"en")),r.value="";return}const g=[],n=e.validate?.allowedTypes?.map(l=>l.toLowerCase())??[];for(const l of Array.from(s)){const m=l.name.split(".").pop()?.toLowerCase();if(n.length>0&&(!m||!n.includes(m))){f?.("error","Invalid file type",[o.getMessage("imageType",{},e.lang??"en")+` (${e.validate?.allowedTypes?.join(", ")})`]);continue}g.push(l)}let c=[];if(e.watermark&&g.length>0)try{const l=g.map(m=>B(m));c=await Promise.all(l)}catch(l){console.error("Batch watermarking failed:",l),r.value="";return}else c=g;c.length>0&&u("update:modelValue",[...d,...c]),r.value=""}function W(a){if(e.disabled)return;const r=[...e.modelValue||[]];r.splice(a,1),u("update:modelValue",r)}async function E(){if(!e.validate||!e.modelValue||e.modelValue.length===0){j.value=[],u("remove:error",e.id);return}const a=[];e.validate.maxFiles&&e.modelValue.length>e.validate.maxFiles&&a.push(o.getMessage("imageMaxFiles",{max:e.validate.maxFiles},e.lang??"en"));const r=e.modelValue.map((d,i)=>S(d,i+1));(await Promise.all(r)).forEach(d=>a.push(...d)),j.value=[...new Set(a)],j.value.length>0?u("push:error",j.value,e.id):u("remove:error",e.id)}async function S(a,r){const s=[];if(!(a instanceof File))return typeof a=="string"&&(e.validate?.pixel||e.validate?.ratio),[];const d=a,i=e.validate;if(i.allowedTypes){const g=d.name.split(".").pop()?.toLowerCase();(!g||!i.allowedTypes.map(n=>n.toLowerCase()).includes(g))&&s.push(`File ${r}: `+o.getMessage("imageType",{},e.lang??"en")+` (${i.allowedTypes.join(", ")})`)}if(i.maxSize&&d.size/1024>i.maxSize&&s.push(`File ${r}: `+o.getMessage("imageMaxSize",{max:i.maxSize},e.lang??"en")),i.pixel||i.ratio){const g=await H(d),n=g.width,c=g.height;if(i.pixel){const l=i.pixel;("minWidth"in l&&l.minWidth&&n<l.minWidth||"minHeight"in l&&l.minHeight&&c<l.minHeight||"maxWidth"in l&&l.maxWidth&&n>l.maxWidth||"maxHeight"in l&&l.maxHeight&&c>l.maxHeight)&&s.push(`File ${r}: Invalid dimensions.`),("width"in l&&l.width&&n!==l.width||"height"in l&&l.height&&c!==l.height)&&s.push(`File ${r}: `+o.getMessage("imagePixel",{width:l.width??n,height:l.height??c},e.lang??"en"))}if(i.ratio){const l=i.ratio.Width,m=i.ratio.Height,v=o.simplifyRatio(n,c),k=o.simplifyRatio(l,m);let p=v.w===k.w&&v.h===k.h;if(!p){const F=n/c,L=l/m;p=Math.abs(F-L)<=.01}p||s.push(`File ${r}: `+o.getMessage("imageRatio",{w:String(l),h:String(m)},e.lang??"en"))}}return s}function H(a){return new Promise(r=>{const s=new FileReader;s.onload=d=>{const i=new Image;i.onload=()=>r({width:i.width,height:i.height}),i.onerror=()=>r({width:0,height:0}),i.src=d.target?.result},s.onerror=()=>r({width:0,height:0}),s.readAsDataURL(a)})}return(a,r)=>(t.openBlock(),t.createElementBlock("div",P,[t.createElementVNode("label",{for:h.id,class:t.normalizeClass(["jsgd-inline-flex jsgd-items-center jsgd-gap-2 jsgd-text-sm jsgd-font-medium jsgd-mb-2 jsgd-text-slate-900 jsgd-transition-colors jsgd-duration-200 dark:jsgd-text-slate-100",{"jsgd-text-red-500 dark:jsgd-text-red-400":x.value.length!==0}])},[t.createTextVNode(t.toDisplayString(h.label)+" ",1),M.value?(t.openBlock(),t.createBlock(t.unref(o._sfc_main$1),{key:0,text:M.value,as:"strong"},{default:t.withCtx(()=>[...r[0]||(r[0]=[t.createTextVNode(" ❓",-1)])]),_:1},8,["text"])):t.createCommentVNode("",!0)],10,R),t.createElementVNode("div",{class:t.normalizeClass(["jsgd-bg-slate-50 jsgd-border-2 jsgd-border-dashed jsgd-border-slate-300 jsgd-rounded-xl jsgd-p-6 jsgd-transition-colors jsgd-duration-200 hover:jsgd-bg-slate-100 hover:jsgd-border-blue-500 dark:jsgd-bg-slate-800 dark:jsgd-border-slate-600 dark:hover:jsgd-bg-slate-700 dark:hover:jsgd-border-blue-400",{"jsgd-border-red-300 dark:jsgd-border-red-800":x.value.length!==0}])},[w.value.length>0?(t.openBlock(),t.createElementBlock("div",T,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.value,(s,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,class:"jsgd-relative jsgd-rounded-lg jsgd-overflow-hidden jsgd-shadow-sm jsgd-transition-all jsgd-duration-200 jsgd-group hover:jsgd-scale-105 hover:jsgd-shadow-lg jsgd-animate-[popIn_0.4s_ease-out_backwards]",style:t.normalizeStyle({animationDelay:`${d*50}ms`})},[t.createElementVNode("img",{src:s,alt:`${h.previewAlt} ${d+1}`,class:"jsgd-block jsgd-w-full jsgd-aspect-square jsgd-object-cover jsgd-bg-white dark:jsgd-bg-transparent"},null,8,U),h.disabled?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("button",{key:0,onClick:i=>W(d),class:"jsgd-absolute jsgd-top-2 jsgd-right-2 jsgd-w-7 jsgd-h-7 jsgd-pb-[5px] jsgd-flex jsgd-items-center jsgd-justify-center jsgd-text-xl jsgd-font-bold jsgd-leading-none jsgd-text-white jsgd-bg-red-500/80 jsgd-backdrop-blur-sm jsgd-rounded-full jsgd-border-2 jsgd-border-white jsgd-cursor-pointer jsgd-opacity-0 jsgd-scale-50 jsgd-transition-all jsgd-duration-200 hover:jsgd-bg-red-600 hover:jsgd-scale-110 hover:jsgd-rotate-90 group-hover:jsgd-opacity-100 group-hover:jsgd-scale-100","aria-label":"Remove image"}," × ",8,$))],4))),128))])):(t.openBlock(),t.createElementBlock("div",z,[t.createElementVNode("p",null,t.toDisplayString(t.unref(y)?.message?.noItemSelected),1)])),t.createElementVNode("div",A,[t.createElementVNode("input",{id:h.id,type:"file",accept:"image/*",multiple:"",onChange:C,class:"jsgd-hidden",disabled:b.value},null,40,D),t.createElementVNode("label",{for:h.id,class:t.normalizeClass(["jsgd-inline-flex jsgd-items-center jsgd-gap-2 jsgd-px-5 jsgd-py-2.5 jsgd-font-medium jsgd-border-none jsgd-rounded-lg jsgd-text-white jsgd-bg-blue-500 jsgd-cursor-pointer jsgd-transition-all jsgd-duration-200 hover:jsgd-bg-blue-600 hover:jsgd-scale-105 hover:jsgd-shadow-lg disabled:jsgd-bg-slate-100 disabled:jsgd-text-slate-500 disabled:jsgd-cursor-not-allowed dark:jsgd-bg-blue-600 dark:hover:jsgd-bg-blue-500 dark:disabled:jsgd-bg-slate-700 dark:disabled:jsgd-text-slate-400 before:jsgd-content-['+'] before:jsgd-text-lg before:jsgd-leading-none",{"jsgd-opacity-60 jsgd-cursor-not-allowed":b.value}])},t.toDisplayString(t.unref(y)?.btn?.upload??"Upload"),11,N),t.createElementVNode("button",{type:"button",onClick:_,disabled:b.value,class:"jsgd-inline-flex jsgd-items-center jsgd-gap-2 jsgd-px-5 jsgd-py-2.5 jsgd-font-medium jsgd-border-none jsgd-rounded-lg jsgd-text-white jsgd-bg-slate-600 jsgd-cursor-pointer jsgd-transition-all jsgd-duration-200 hover:jsgd-bg-slate-700 hover:jsgd-scale-105 hover:jsgd-shadow-lg disabled:jsgd-opacity-60 disabled:jsgd-cursor-not-allowed dark:jsgd-bg-slate-500 dark:hover:jsgd-bg-slate-400"}," URL ",8,q)])],2),t.createElementVNode("div",K,[x.value.length>0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(x.value,(s,d)=>(t.openBlock(),t.createElementBlock("p",{key:d,class:"jsgd-text-sm jsgd-text-red-500 jsgd-animate-[fadeIn_300ms_ease-out] dark:jsgd-text-red-400"},t.toDisplayString(s),1))),128)):t.createCommentVNode("",!0)])]))}});exports._sfc_main=G;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as Q, inject as T, ref as C, computed as H, watch as X, createElementBlock as u, openBlock as h, createElementVNode as c, normalizeClass as P, createTextVNode as $, createBlock as Y, createCommentVNode as S, toDisplayString as I, unref as U, withCtx as Z, Fragment as A, renderList as z, normalizeStyle as N } from "vue";
2
- import { U as ee, z as te, a9 as m, S as M, a as ae } from "./resize-BA9Vve1P.es.js";
2
+ import { U as ee, z as te, a9 as m, S as M, a as ae } from "./resize-DjoINfaT.es.js";
3
3
  import "dompurify";
4
4
  import "lodash.isequal";
5
5
  import "zod";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-DDw7Ie92.cjs.js");exports.default=e._sfc_main$11;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-B3p3dEqX.cjs.js");exports.default=e._sfc_main$11;
@@ -0,0 +1,4 @@
1
+ import { k as f } from "./resize-DjoINfaT.es.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { l as f } from "./resize-DjoINfaT.es.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-DDw7Ie92.cjs.js");exports.default=e._sfc_main$12;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-B3p3dEqX.cjs.js");exports.default=e._sfc_main$12;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-DDw7Ie92.cjs.js");exports.default=e._sfc_main$13;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-B3p3dEqX.cjs.js");exports.default=e._sfc_main$13;
@@ -0,0 +1,4 @@
1
+ import { m } from "./resize-DjoINfaT.es.js";
2
+ export {
3
+ m as default
4
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-DDw7Ie92.cjs.js");exports.default=e._sfc_main$14;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-B3p3dEqX.cjs.js");exports.default=e._sfc_main$14;
@@ -0,0 +1,4 @@
1
+ import { n as f } from "./resize-DjoINfaT.es.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { f } from "./resize-DjoINfaT.es.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-DDw7Ie92.cjs.js");exports.default=e._sfc_main$6;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./resize-B3p3dEqX.cjs.js");exports.default=e._sfc_main$6;