pukaad-ui-lib 1.429.2 → 1.430.0

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.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
3
  "configKey": "pukaadUI",
4
- "version": "1.429.2",
4
+ "version": "1.430.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -46,6 +46,8 @@
46
46
  :accept="mediaAccept"
47
47
  :limit="mediaLimit"
48
48
  :preview-size="66"
49
+ :min-video-seconds="1"
50
+ :max-video-seconds="0"
49
51
  :width="66"
50
52
  :height="66"
51
53
  disabled-drop
@@ -45,6 +45,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
45
45
  showCover: boolean;
46
46
  previewFullSize: boolean;
47
47
  previewSize: number;
48
+ minVideoSeconds: number;
49
+ maxVideoSeconds: number;
48
50
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
49
51
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
50
52
  declare const _default: typeof __VLS_export;
@@ -186,7 +186,9 @@ const props = defineProps({
186
186
  column: { type: Boolean, required: false, default: false },
187
187
  showCover: { type: Boolean, required: false, default: false },
188
188
  previewFullSize: { type: Boolean, required: false, default: false },
189
- previewSize: { type: Number, required: false, default: 98 }
189
+ previewSize: { type: Number, required: false, default: 98 },
190
+ minVideoSeconds: { type: Number, required: false, default: 10 },
191
+ maxVideoSeconds: { type: Number, required: false, default: 60 }
190
192
  });
191
193
  const isDrag = ref(false);
192
194
  const { errorMessage, setErrors } = useField(props.name);
@@ -231,19 +233,19 @@ const createFileItem = async (file) => {
231
233
  return null;
232
234
  }
233
235
  const duration = await getVideoDuration(file);
234
- if (duration < 10) {
236
+ if (props.minVideoSeconds > 0 && duration < props.minVideoSeconds) {
235
237
  $alert.show({
236
238
  type: "error",
237
239
  title: "\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14 !",
238
- description: "\u0E40\u0E19\u0E37\u0E48\u0E2D\u0E07\u0E08\u0E32\u0E01\u0E27\u0E34\u0E14\u0E35\u0E42\u0E2D\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 \u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32 10 \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35"
240
+ description: `\u0E40\u0E19\u0E37\u0E48\u0E2D\u0E07\u0E08\u0E32\u0E01\u0E27\u0E34\u0E14\u0E35\u0E42\u0E2D\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 \u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32 ${props.minVideoSeconds} \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35`
239
241
  });
240
242
  return null;
241
243
  }
242
- if (duration > 60) {
244
+ if (props.maxVideoSeconds > 0 && duration > props.maxVideoSeconds) {
243
245
  $alert.show({
244
246
  type: "error",
245
247
  title: "\u0E40\u0E01\u0E34\u0E14\u0E02\u0E49\u0E2D\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14 !",
246
- description: "\u0E40\u0E19\u0E37\u0E48\u0E2D\u0E07\u0E08\u0E32\u0E01\u0E27\u0E34\u0E14\u0E35\u0E42\u0E2D\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 \u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E40\u0E01\u0E34\u0E19 60 \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35"
248
+ description: `\u0E40\u0E19\u0E37\u0E48\u0E2D\u0E07\u0E08\u0E32\u0E01\u0E27\u0E34\u0E14\u0E35\u0E42\u0E2D\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 \u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E40\u0E01\u0E34\u0E19 ${props.maxVideoSeconds} \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35`
247
249
  });
248
250
  return null;
249
251
  }
@@ -45,6 +45,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
45
45
  showCover: boolean;
46
46
  previewFullSize: boolean;
47
47
  previewSize: number;
48
+ minVideoSeconds: number;
49
+ maxVideoSeconds: number;
48
50
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
49
51
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
50
52
  declare const _default: typeof __VLS_export;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.429.2",
3
+ "version": "1.430.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",