@bagelink/vue 0.0.716 → 0.0.726

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 (187) hide show
  1. package/dist/components/Btn.vue.d.ts +3 -3
  2. package/dist/components/Btn.vue.d.ts.map +1 -1
  3. package/dist/components/Carousel.vue.d.ts +1 -1
  4. package/dist/components/ComboBox.vue.d.ts +3 -3
  5. package/dist/components/Comments.vue.d.ts +2 -2
  6. package/dist/components/ContactSubmissions.vue.d.ts +2 -2
  7. package/dist/components/DropDown.vue.d.ts +3 -3
  8. package/dist/components/FormSchema.vue.d.ts +4 -5
  9. package/dist/components/LangText.vue.d.ts +2 -2
  10. package/dist/components/MaterialIcon.vue.d.ts +0 -1
  11. package/dist/components/MaterialIcon.vue.d.ts.map +1 -1
  12. package/dist/components/ModalBglForm.vue.d.ts +20 -21
  13. package/dist/components/PersonPreview.vue.d.ts +4 -5
  14. package/dist/components/PersonPreviewFormkit.vue.d.ts +3 -4
  15. package/dist/components/Popover.vue.d.ts +10 -0
  16. package/dist/components/Popover.vue.d.ts.map +1 -0
  17. package/dist/components/RTXEditor.vue.d.ts +3 -3
  18. package/dist/components/TabbedLayout.vue.d.ts +4 -5
  19. package/dist/components/charts/BarChart.vue.d.ts +2 -2
  20. package/dist/components/form/BglForm.vue.d.ts +1 -1
  21. package/dist/components/form/BglMultiStepForm.vue.d.ts +11 -11
  22. package/dist/components/form/ItemRef.vue.d.ts +3 -5
  23. package/dist/components/form/ItemRef.vue.d.ts.map +1 -1
  24. package/dist/components/form/MaterialIcon.vue.d.ts +3 -4
  25. package/dist/components/form/PlainInputField.vue.d.ts +3 -3
  26. package/dist/components/form/inputs/CurrencyInput.vue.d.ts +3 -3
  27. package/dist/components/form/inputs/DatetimeInput.vue.d.ts +3 -3
  28. package/dist/components/form/inputs/DurationInput.vue.d.ts +3 -3
  29. package/dist/components/form/inputs/DynamicLinkField.vue.d.ts +3 -3
  30. package/dist/components/form/inputs/EmailInput.vue.d.ts +3 -3
  31. package/dist/components/form/inputs/FileUpload.vue.d.ts.map +1 -1
  32. package/dist/components/form/inputs/FloatInput.vue.d.ts +3 -3
  33. package/dist/components/form/inputs/IntInput.vue.d.ts +3 -3
  34. package/dist/components/form/inputs/JSONInput.vue.d.ts +1 -1
  35. package/dist/components/form/inputs/JSONInput.vue.d.ts.map +1 -1
  36. package/dist/components/form/inputs/LinkField.vue.d.ts +3 -3
  37. package/dist/components/form/inputs/Password.vue.d.ts +3 -3
  38. package/dist/components/form/inputs/PasswordInput.vue.d.ts +3 -3
  39. package/dist/components/form/inputs/PlainText.vue.d.ts +3 -3
  40. package/dist/components/form/inputs/RadioPillsInput.vue.d.ts +1 -1
  41. package/dist/components/form/inputs/RadioPillsInput.vue.d.ts.map +1 -1
  42. package/dist/components/form/inputs/ReadOnlyInput.vue.d.ts +2 -2
  43. package/dist/components/form/inputs/RichText2/index.vue.d.ts.map +1 -1
  44. package/dist/components/form/inputs/RichTextEditor.vue.d.ts +3 -3
  45. package/dist/components/form/inputs/SelectField.vue.d.ts +8 -6
  46. package/dist/components/form/inputs/SelectField.vue.d.ts.map +1 -1
  47. package/dist/components/form/inputs/TelInput.vue.d.ts +5 -5
  48. package/dist/components/form/inputs/TelInput.vue.d.ts.map +1 -1
  49. package/dist/components/form/inputs/TextArea.vue.d.ts +3 -3
  50. package/dist/components/formkit/AddressArray.vue.d.ts +2 -2
  51. package/dist/components/formkit/BankDetailsArray.vue.d.ts +2 -2
  52. package/dist/components/formkit/ContactArrayFormKit.vue.d.ts +2 -2
  53. package/dist/components/formkit/FileUploader.vue.d.ts +2 -2
  54. package/dist/components/formkit/MiscFields.vue.d.ts +2 -2
  55. package/dist/components/formkit/Toggle.vue.d.ts +2 -2
  56. package/dist/components/lightbox/Lightbox.vue.d.ts +10 -0
  57. package/dist/components/lightbox/Lightbox.vue.d.ts.map +1 -0
  58. package/dist/components/lightbox/index.d.ts +6 -0
  59. package/dist/components/lightbox/index.d.ts.map +1 -0
  60. package/dist/components/lightbox/lightbox.types.d.ts +7 -0
  61. package/dist/components/lightbox/lightbox.types.d.ts.map +1 -0
  62. package/dist/components/whatsapp/form/MsgTemplate.vue.d.ts +3 -4
  63. package/dist/components/whatsapp/form/TextVariableExamples.vue.d.ts +2 -2
  64. package/dist/index.cjs +271 -53
  65. package/dist/index.mjs +272 -54
  66. package/dist/plugins/bagel.d.ts.map +1 -1
  67. package/dist/style.css +142 -44
  68. package/dist/types/materialIcon.d.ts +2 -0
  69. package/dist/types/materialIcon.d.ts.map +1 -0
  70. package/dist/utils/BagelFormUtils.d.ts +48 -48
  71. package/dist/utils/objects.d.ts +0 -1
  72. package/package.json +1 -1
  73. package/src/components/form/inputs/FileUpload.vue +2 -2
  74. package/src/components/form/inputs/RichText2/FontWithASyntaxHighlighter-Regular.woff2 +0 -0
  75. package/src/components/form/inputs/RichText2/index.vue +31 -11
  76. package/src/components/lightbox/Lightbox.vue +228 -0
  77. package/src/components/lightbox/index.ts +63 -0
  78. package/src/components/lightbox/lightbox.types.ts +6 -0
  79. package/src/plugins/bagel.ts +2 -2
  80. package/dist/components/Accordion.d.ts +0 -12
  81. package/dist/components/Accordion.d.ts.map +0 -1
  82. package/dist/components/AccordionItem.d.ts +0 -34
  83. package/dist/components/AccordionItem.d.ts.map +0 -1
  84. package/dist/components/Alert.d.ts +0 -34
  85. package/dist/components/Alert.d.ts.map +0 -1
  86. package/dist/components/Avatar.d.ts +0 -36
  87. package/dist/components/Avatar.d.ts.map +0 -1
  88. package/dist/components/Badge.d.ts +0 -22
  89. package/dist/components/Badge.d.ts.map +0 -1
  90. package/dist/components/BglVideo.d.ts +0 -20
  91. package/dist/components/BglVideo.d.ts.map +0 -1
  92. package/dist/components/Btn.d.ts +0 -99
  93. package/dist/components/Btn.d.ts.map +0 -1
  94. package/dist/components/Card.d.ts +0 -39
  95. package/dist/components/Card.d.ts.map +0 -1
  96. package/dist/components/Carousel.d.ts +0 -74
  97. package/dist/components/Carousel.d.ts.map +0 -1
  98. package/dist/components/DataPreview.d.ts +0 -42
  99. package/dist/components/DataPreview.d.ts.map +0 -1
  100. package/dist/components/Drop.vue.d.ts +0 -34
  101. package/dist/components/Drop.vue.d.ts.map +0 -1
  102. package/dist/components/FileUploader.vue.d.ts +0 -60
  103. package/dist/components/FileUploader.vue.d.ts.map +0 -1
  104. package/dist/components/Flag.d.ts +0 -20
  105. package/dist/components/Flag.d.ts.map +0 -1
  106. package/dist/components/ListItem.d.ts +0 -34
  107. package/dist/components/ListItem.d.ts.map +0 -1
  108. package/dist/components/ListView.d.ts +0 -13
  109. package/dist/components/ListView.d.ts.map +0 -1
  110. package/dist/components/MapEmbed.d.ts +0 -3
  111. package/dist/components/MapEmbed.d.ts.map +0 -1
  112. package/dist/components/MaterialIcon.d.ts +0 -26
  113. package/dist/components/MaterialIcon.d.ts.map +0 -1
  114. package/dist/components/Modal.d.ts +0 -46
  115. package/dist/components/Modal.d.ts.map +0 -1
  116. package/dist/components/ModalConfirm.d.ts +0 -24
  117. package/dist/components/ModalConfirm.d.ts.map +0 -1
  118. package/dist/components/ModalForm.d.ts +0 -78
  119. package/dist/components/ModalForm.d.ts.map +0 -1
  120. package/dist/components/NavBar.d.ts +0 -64
  121. package/dist/components/NavBar.d.ts.map +0 -1
  122. package/dist/components/PageTitle.d.ts +0 -24
  123. package/dist/components/PageTitle.d.ts.map +0 -1
  124. package/dist/components/RouterWrapper.d.ts +0 -3
  125. package/dist/components/RouterWrapper.d.ts.map +0 -1
  126. package/dist/components/TableSchema.d.ts +0 -35
  127. package/dist/components/TableSchema.d.ts.map +0 -1
  128. package/dist/components/Title.d.ts +0 -42
  129. package/dist/components/Title.d.ts.map +0 -1
  130. package/dist/components/TopBar.d.ts +0 -12
  131. package/dist/components/TopBar.d.ts.map +0 -1
  132. package/dist/components/dashboard/Lineart.d.ts +0 -20
  133. package/dist/components/dashboard/Lineart.d.ts.map +0 -1
  134. package/dist/components/form/BglField.d.ts +0 -25
  135. package/dist/components/form/BglField.d.ts.map +0 -1
  136. package/dist/components/form/BglForm.d.ts +0 -75
  137. package/dist/components/form/BglForm.d.ts.map +0 -1
  138. package/dist/components/form/inputs/CheckInput.d.ts +0 -56
  139. package/dist/components/form/inputs/CheckInput.d.ts.map +0 -1
  140. package/dist/components/form/inputs/Checkbox.d.ts +0 -16
  141. package/dist/components/form/inputs/Checkbox.d.ts.map +0 -1
  142. package/dist/components/form/inputs/ColorPicker.d.ts +0 -48
  143. package/dist/components/form/inputs/ColorPicker.d.ts.map +0 -1
  144. package/dist/components/form/inputs/DateInput.d.ts +0 -64
  145. package/dist/components/form/inputs/DateInput.d.ts.map +0 -1
  146. package/dist/components/form/inputs/DatePicker.d.ts +0 -33
  147. package/dist/components/form/inputs/DatePicker.d.ts.map +0 -1
  148. package/dist/components/form/inputs/FileUpload.d.ts +0 -108
  149. package/dist/components/form/inputs/FileUpload.d.ts.map +0 -1
  150. package/dist/components/form/inputs/JSONInput.d.ts +0 -53
  151. package/dist/components/form/inputs/JSONInput.d.ts.map +0 -1
  152. package/dist/components/form/inputs/RadioGroup.d.ts +0 -42
  153. package/dist/components/form/inputs/RadioGroup.d.ts.map +0 -1
  154. package/dist/components/form/inputs/RadioPillsInput.d.ts +0 -48
  155. package/dist/components/form/inputs/RadioPillsInput.d.ts.map +0 -1
  156. package/dist/components/form/inputs/RichText.d.ts +0 -20
  157. package/dist/components/form/inputs/RichText.d.ts.map +0 -1
  158. package/dist/components/form/inputs/RichText2/Toolbar.d.ts +0 -22
  159. package/dist/components/form/inputs/RichText2/Toolbar.d.ts.map +0 -1
  160. package/dist/components/form/inputs/RichText2/index.d.ts +0 -24
  161. package/dist/components/form/inputs/RichText2/index.d.ts.map +0 -1
  162. package/dist/components/form/inputs/SelectInput.d.ts +0 -55
  163. package/dist/components/form/inputs/SelectInput.d.ts.map +0 -1
  164. package/dist/components/form/inputs/SignaturePad.d.ts +0 -72
  165. package/dist/components/form/inputs/SignaturePad.d.ts.map +0 -1
  166. package/dist/components/form/inputs/TableField.d.ts +0 -45
  167. package/dist/components/form/inputs/TableField.d.ts.map +0 -1
  168. package/dist/components/form/inputs/TelInput.d.ts +0 -241
  169. package/dist/components/form/inputs/TelInput.d.ts.map +0 -1
  170. package/dist/components/form/inputs/TextInput.d.ts +0 -90
  171. package/dist/components/form/inputs/TextInput.d.ts.map +0 -1
  172. package/dist/components/form/inputs/ToggleInput.d.ts +0 -58
  173. package/dist/components/form/inputs/ToggleInput.d.ts.map +0 -1
  174. package/dist/components/layout/BottomMenu.d.ts +0 -27
  175. package/dist/components/layout/BottomMenu.d.ts.map +0 -1
  176. package/dist/components/layout/Layout.d.ts +0 -58
  177. package/dist/components/layout/Layout.d.ts.map +0 -1
  178. package/dist/components/layout/SidebarMenu.d.ts +0 -38
  179. package/dist/components/layout/SidebarMenu.d.ts.map +0 -1
  180. package/dist/components/layout/TabbedLayout.d.ts +0 -42
  181. package/dist/components/layout/TabbedLayout.d.ts.map +0 -1
  182. package/dist/components/layout/Tabs.d.ts +0 -31
  183. package/dist/components/layout/Tabs.d.ts.map +0 -1
  184. package/dist/components/layout/TabsBody.d.ts +0 -23
  185. package/dist/components/layout/TabsBody.d.ts.map +0 -1
  186. package/dist/components/layout/TabsNav.d.ts +0 -35
  187. package/dist/components/layout/TabsNav.d.ts.map +0 -1
@@ -50,10 +50,13 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
50
50
  type: import('vue').PropType<import('..').BglFormSchemaFnT<any>>;
51
51
  required: true;
52
52
  };
53
- id: {
53
+ label: {
54
54
  type: import('vue').PropType<string>;
55
55
  };
56
- label: {
56
+ onSubmit: {
57
+ type: import('vue').PropType<(data: any) => void>;
58
+ };
59
+ id: {
57
60
  type: import('vue').PropType<string>;
58
61
  };
59
62
  modelValue: {
@@ -63,15 +66,12 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
63
66
  onDelete: {
64
67
  type: import('vue').PropType<(id: string) => void>;
65
68
  };
66
- onSubmit: {
67
- type: import('vue').PropType<(data: any) => void>;
68
- };
69
69
  status: {
70
70
  type: import('vue').PropType<import('../components/form/BglForm.vue').FormStatus>;
71
71
  };
72
72
  }>> & {
73
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
74
73
  onSubmit?: ((...args: any[]) => any) | undefined;
74
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
75
75
  onDirty?: ((...args: any[]) => any) | undefined;
76
76
  }, {
77
77
  submit: () => void;
@@ -88,10 +88,13 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
88
88
  type: import('vue').PropType<import('..').BglFormSchemaFnT<any>>;
89
89
  required: true;
90
90
  };
91
- id: {
91
+ label: {
92
92
  type: import('vue').PropType<string>;
93
93
  };
94
- label: {
94
+ onSubmit: {
95
+ type: import('vue').PropType<(data: any) => void>;
96
+ };
97
+ id: {
95
98
  type: import('vue').PropType<string>;
96
99
  };
97
100
  modelValue: {
@@ -101,15 +104,12 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
101
104
  onDelete: {
102
105
  type: import('vue').PropType<(id: string) => void>;
103
106
  };
104
- onSubmit: {
105
- type: import('vue').PropType<(data: any) => void>;
106
- };
107
107
  status: {
108
108
  type: import('vue').PropType<import('../components/form/BglForm.vue').FormStatus>;
109
109
  };
110
110
  }>> & {
111
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
112
111
  onSubmit?: ((...args: any[]) => any) | undefined;
112
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
113
113
  onDirty?: ((...args: any[]) => any) | undefined;
114
114
  }, {
115
115
  modelValue: Record<string, any>;
@@ -125,10 +125,13 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
125
125
  type: import('vue').PropType<import('..').BglFormSchemaFnT<any>>;
126
126
  required: true;
127
127
  };
128
- id: {
128
+ label: {
129
129
  type: import('vue').PropType<string>;
130
130
  };
131
- label: {
131
+ onSubmit: {
132
+ type: import('vue').PropType<(data: any) => void>;
133
+ };
134
+ id: {
132
135
  type: import('vue').PropType<string>;
133
136
  };
134
137
  modelValue: {
@@ -138,15 +141,12 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
138
141
  onDelete: {
139
142
  type: import('vue').PropType<(id: string) => void>;
140
143
  };
141
- onSubmit: {
142
- type: import('vue').PropType<(data: any) => void>;
143
- };
144
144
  status: {
145
145
  type: import('vue').PropType<import('../components/form/BglForm.vue').FormStatus>;
146
146
  };
147
147
  }>> & {
148
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
149
148
  onSubmit?: ((...args: any[]) => any) | undefined;
149
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
150
150
  onDirty?: ((...args: any[]) => any) | undefined;
151
151
  }, {
152
152
  submit: () => void;
@@ -165,10 +165,13 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
165
165
  type: import('vue').PropType<import('..').BglFormSchemaFnT<any>>;
166
166
  required: true;
167
167
  };
168
- id: {
168
+ label: {
169
169
  type: import('vue').PropType<string>;
170
170
  };
171
- label: {
171
+ onSubmit: {
172
+ type: import('vue').PropType<(data: any) => void>;
173
+ };
174
+ id: {
172
175
  type: import('vue').PropType<string>;
173
176
  };
174
177
  modelValue: {
@@ -178,15 +181,12 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
178
181
  onDelete: {
179
182
  type: import('vue').PropType<(id: string) => void>;
180
183
  };
181
- onSubmit: {
182
- type: import('vue').PropType<(data: any) => void>;
183
- };
184
184
  status: {
185
185
  type: import('vue').PropType<import('../components/form/BglForm.vue').FormStatus>;
186
186
  };
187
187
  }>> & {
188
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
189
188
  onSubmit?: ((...args: any[]) => any) | undefined;
189
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
190
190
  onDirty?: ((...args: any[]) => any) | undefined;
191
191
  }, {
192
192
  submit: () => void;
@@ -227,10 +227,13 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
227
227
  type: import('vue').PropType<import('..').BglFormSchemaFnT<any>>;
228
228
  required: true;
229
229
  };
230
- id: {
230
+ label: {
231
231
  type: import('vue').PropType<string>;
232
232
  };
233
- label: {
233
+ onSubmit: {
234
+ type: import('vue').PropType<(data: any) => void>;
235
+ };
236
+ id: {
234
237
  type: import('vue').PropType<string>;
235
238
  };
236
239
  modelValue: {
@@ -240,15 +243,12 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
240
243
  onDelete: {
241
244
  type: import('vue').PropType<(id: string) => void>;
242
245
  };
243
- onSubmit: {
244
- type: import('vue').PropType<(data: any) => void>;
245
- };
246
246
  status: {
247
247
  type: import('vue').PropType<import('../components/form/BglForm.vue').FormStatus>;
248
248
  };
249
249
  }>> & {
250
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
251
250
  onSubmit?: ((...args: any[]) => any) | undefined;
251
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
252
252
  onDirty?: ((...args: any[]) => any) | undefined;
253
253
  }, {
254
254
  submit: () => void;
@@ -265,10 +265,13 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
265
265
  type: import('vue').PropType<import('..').BglFormSchemaFnT<any>>;
266
266
  required: true;
267
267
  };
268
- id: {
268
+ label: {
269
269
  type: import('vue').PropType<string>;
270
270
  };
271
- label: {
271
+ onSubmit: {
272
+ type: import('vue').PropType<(data: any) => void>;
273
+ };
274
+ id: {
272
275
  type: import('vue').PropType<string>;
273
276
  };
274
277
  modelValue: {
@@ -278,15 +281,12 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
278
281
  onDelete: {
279
282
  type: import('vue').PropType<(id: string) => void>;
280
283
  };
281
- onSubmit: {
282
- type: import('vue').PropType<(data: any) => void>;
283
- };
284
284
  status: {
285
285
  type: import('vue').PropType<import('../components/form/BglForm.vue').FormStatus>;
286
286
  };
287
287
  }>> & {
288
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
289
288
  onSubmit?: ((...args: any[]) => any) | undefined;
289
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
290
290
  onDirty?: ((...args: any[]) => any) | undefined;
291
291
  }, {
292
292
  modelValue: Record<string, any>;
@@ -302,10 +302,13 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
302
302
  type: import('vue').PropType<import('..').BglFormSchemaFnT<any>>;
303
303
  required: true;
304
304
  };
305
- id: {
305
+ label: {
306
306
  type: import('vue').PropType<string>;
307
307
  };
308
- label: {
308
+ onSubmit: {
309
+ type: import('vue').PropType<(data: any) => void>;
310
+ };
311
+ id: {
309
312
  type: import('vue').PropType<string>;
310
313
  };
311
314
  modelValue: {
@@ -315,15 +318,12 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
315
318
  onDelete: {
316
319
  type: import('vue').PropType<(id: string) => void>;
317
320
  };
318
- onSubmit: {
319
- type: import('vue').PropType<(data: any) => void>;
320
- };
321
321
  status: {
322
322
  type: import('vue').PropType<import('../components/form/BglForm.vue').FormStatus>;
323
323
  };
324
324
  }>> & {
325
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
326
325
  onSubmit?: ((...args: any[]) => any) | undefined;
326
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
327
327
  onDirty?: ((...args: any[]) => any) | undefined;
328
328
  }, {
329
329
  submit: () => void;
@@ -342,10 +342,13 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
342
342
  type: import('vue').PropType<import('..').BglFormSchemaFnT<any>>;
343
343
  required: true;
344
344
  };
345
- id: {
345
+ label: {
346
346
  type: import('vue').PropType<string>;
347
347
  };
348
- label: {
348
+ onSubmit: {
349
+ type: import('vue').PropType<(data: any) => void>;
350
+ };
351
+ id: {
349
352
  type: import('vue').PropType<string>;
350
353
  };
351
354
  modelValue: {
@@ -355,15 +358,12 @@ export declare function bglForm(idOrField?: string | Field, ...schema: Field[]):
355
358
  onDelete: {
356
359
  type: import('vue').PropType<(id: string) => void>;
357
360
  };
358
- onSubmit: {
359
- type: import('vue').PropType<(data: any) => void>;
360
- };
361
361
  status: {
362
362
  type: import('vue').PropType<import('../components/form/BglForm.vue').FormStatus>;
363
363
  };
364
364
  }>> & {
365
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
366
365
  onSubmit?: ((...args: any[]) => any) | undefined;
366
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
367
367
  onDirty?: ((...args: any[]) => any) | undefined;
368
368
  }, {
369
369
  submit: () => void;
@@ -1,5 +1,4 @@
1
1
  import { BagelField } from '..';
2
-
3
2
  export declare function getPropByPath(obj: Record<string, any>, propPath?: string, bagelField?: BagelField): {};
4
3
  export declare function setPropByPath(obj: Record<string, any>, path?: string, value?: any): void;
5
4
  //# sourceMappingURL=objects.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.716",
4
+ "version": "0.0.726",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -196,7 +196,7 @@ function drop(e: DragEvent) {
196
196
  :key="file.id"
197
197
  class="multi-image-item-preview"
198
198
  >
199
- <img v-if="isImage(file.extension || file.url)" class="multi-preview" :src="file.url" alt="">
199
+ <img v-if="isImage(file.extension || file.url)" v-lightbox class="multi-preview" :src="file.url" alt="">
200
200
  <Icon v-else icon="draft" class="multi-preview" />
201
201
  <p class="m-0">
202
202
  {{ file.name }}
@@ -250,7 +250,7 @@ function drop(e: DragEvent) {
250
250
  class="single-image-item-preview"
251
251
  :class="{ 'bgl_fill-image': fill }"
252
252
  >
253
- <img v-if="isImage(file.extension || file.url)" class="single-preview" :src="file.url" alt="">
253
+ <img v-if="isImage(file.extension || file.url)" v-lightbox class="single-preview" :src="file.url" alt="">
254
254
  <Icon v-else :size="4" weight="2" icon="draft" class="color-primary w-100" />
255
255
  </div>
256
256
 
@@ -146,33 +146,53 @@ function handleKeyDown(event: KeyboardEvent) {
146
146
  </template>
147
147
 
148
148
  <style scoped>
149
+ @font-face {
150
+ font-family: 'FontWithASyntaxHighlighter';
151
+ font-style: normal;
152
+ font-weight: 400;
153
+ font-stretch: 100%;
154
+ font-display: swap;
155
+ src: url(https://bagel.sfo2.cdn.digitaloceanspaces.com/Fonts/FontWithASyntaxHighlighter-Regular.woff2) format('woff2')
156
+ }
157
+
158
+ @font-palette-values --myCustomPalette {
159
+ font-family: 'FontWithASyntaxHighlighter';
160
+ override-colors:
161
+ 0 #6191c2, /* keywords, {} */
162
+ 1 #75975d, /* comments */
163
+ 2 yellow, /* literals */
164
+ 3 #a3c19a, /* numbers */
165
+ 4 blue, /* functions, [] */
166
+ 5 orange, /* js others */
167
+ 6 black, /* not in use */
168
+ 7 #bc8abd, /* inside quotes, css properties, few chars */
169
+ 8 #818181 /* few chars */
170
+ ;
171
+ }
172
+ .preview-area{
173
+ font-family: "FontWithASyntaxHighlighter", monospace;
174
+ font-palette: --myCustomPalette;
175
+ }
149
176
  .rich-text-editor {
150
177
  background: var(--input-bg);
151
178
  margin-bottom: 0.5rem;
152
179
  width: 100%;
153
- /* font-family: Arial, sans-serif; */
154
- /* max-width: 800px; */
155
- /* margin: 0 auto; */
156
180
  }
157
181
  .editableContent{
158
182
  min-height: 100%;
159
183
  white-space: pre-wrap;
160
184
  outline: none;
161
185
  }
186
+ .content-area, .preview-area{
187
+ min-height: 200px;
188
+ }
189
+
162
190
  /* [contenteditable='true'] {
163
191
  white-space: pre-wrap;
164
192
  word-wrap: break-word;
165
193
  outline: none;
166
194
  height: 100%;
167
195
  } */
168
- .content-area{
169
- }
170
- .content-area, .preview-area{
171
- min-height: 200px;
172
-
173
- }
174
- .preview-area{}
175
-
176
196
  /*
177
197
 
178
198
  .editor-container {
@@ -0,0 +1,228 @@
1
+ <script setup lang="ts">
2
+ import { Btn, Icon } from '@bagelink/vue'
3
+ import { watch } from 'vue'
4
+ import type { LightboxItem } from './lightbox.types'
5
+
6
+ let isOpen = $ref(false)
7
+ let currentItem = $ref<LightboxItem>()
8
+ let group = $ref<LightboxItem[]>([])
9
+ let currentIndex = $ref(0)
10
+
11
+ function open(item: LightboxItem, groupItems: LightboxItem[] = []) {
12
+ isOpen = true
13
+ currentItem = item
14
+ if (!groupItems.length) return
15
+ group = groupItems
16
+ currentIndex = groupItems.indexOf(item)
17
+ document.addEventListener('keydown', handleKeydown)
18
+ }
19
+
20
+ function close() {
21
+ isOpen = false
22
+ document.removeEventListener('keydown', handleKeydown)
23
+ }
24
+
25
+ function next() {
26
+ if (group.length > 1) {
27
+ currentIndex = (currentIndex + 1) % group.length
28
+ currentItem = group[currentIndex]
29
+ }
30
+ }
31
+
32
+ function prev() {
33
+ if (group.length > 1) {
34
+ currentIndex = (currentIndex - 1 + group.length) % group.length
35
+ currentItem = group[currentIndex]
36
+ }
37
+ }
38
+
39
+ function selectItem(index: number) {
40
+ currentIndex = index
41
+ currentItem = group[index]
42
+ }
43
+
44
+ watch(() => isOpen, (val) => {
45
+ if (val) document.body.style.overflow = 'hidden'
46
+ else document.body.style.overflow = ''
47
+ })
48
+
49
+ function normalizeURL(url: string) {
50
+ if (url.startsWith('https://')) return url
51
+ url = url.replace(/http:\/\//, '')
52
+ return `//${url}`
53
+ }
54
+
55
+ function handleKeydown(event: KeyboardEvent) {
56
+ if (event.key === 'Escape') {
57
+ close()
58
+ } else if (event.key === 'ArrowLeft') {
59
+ prev()
60
+ } else if (event.key === 'ArrowRight') {
61
+ next()
62
+ }
63
+ }
64
+
65
+ defineExpose({ open, close })
66
+ </script>
67
+
68
+ <template>
69
+ <div
70
+ v-if="isOpen"
71
+ class="lightbox-overlay"
72
+ @keydown.esc="close"
73
+ @keydown.left="prev"
74
+ @keydown.right="next"
75
+ @click="close"
76
+ >
77
+ <div class="lightbox" @click.stop>
78
+ <Btn flat class="close-button color-white" icon="close" @click="close" />
79
+ <div class="lightbox-item">
80
+ <template v-if="currentItem?.type === 'image'">
81
+ <img :src="currentItem?.src" alt="Preview">
82
+ </template>
83
+ <template v-else-if="currentItem?.type === 'video'">
84
+ <video controls autoplay>
85
+ <source :src="currentItem?.src" type="video/mp4">
86
+ <track kind="captions" src="#" srclang="en" label="English">
87
+ </video>
88
+ </template>
89
+ <template v-else-if="currentItem?.type === 'pdf'">
90
+ <embed
91
+ :src="normalizeURL(currentItem?.src)"
92
+ type="application/pdf"
93
+ width="100%"
94
+ height="1080"
95
+ :title="currentItem?.name"
96
+ >
97
+ </template>
98
+ <template v-else>
99
+ <div class="file-info txt-white">
100
+ <p>File: {{ currentItem?.name }}</p>
101
+ <p>Type: {{ currentItem?.type }}</p>
102
+ <a :href="currentItem?.src" target="_blank">Open file</a>
103
+ </div>
104
+ </template>
105
+ </div>
106
+ <div class="navigation">
107
+ <Btn
108
+ class="navigation-btn"
109
+ icon="arrow_back"
110
+ @click="prev"
111
+ />
112
+ <Btn
113
+ class="navigation-btn"
114
+ icon="arrow_forward"
115
+ @click="next"
116
+ />
117
+ </div>
118
+ <div v-if="group && group.length > 1" class="thumbnails">
119
+ <template
120
+ v-for="(item, index) in group"
121
+ :key="index"
122
+ >
123
+ <img
124
+ v-if="item.type === 'image'"
125
+ class="thumbnail"
126
+ :src="item.src"
127
+ alt=""
128
+ @click="selectItem(index)"
129
+ >
130
+ <Icon
131
+ v-else
132
+ class="thumbnail"
133
+ icon="description"
134
+ @click="selectItem(index)"
135
+ />
136
+ </template>
137
+ </div>
138
+ </div>
139
+ </div>
140
+ </template>
141
+
142
+ <style scoped>
143
+ .lightbox-overlay {
144
+ position: fixed;
145
+ top: 0;
146
+ left: 0;
147
+ width: 100%;
148
+ height: 100%;
149
+ background: rgba(0, 0, 0, 0.8);
150
+ display: flex;
151
+ justify-content: center;
152
+ align-items: center;
153
+ z-index: 1000;
154
+ }
155
+
156
+ .lightbox {
157
+ position: relative;
158
+ max-height: 90%;
159
+ width: 90vw;
160
+ text-align: center;
161
+ }
162
+
163
+ .close-button {
164
+ position: fixed;
165
+ top: 1rem;
166
+ inset-inline-end: 1rem;
167
+ }
168
+
169
+ .lightbox-item * {
170
+ max-width: 90%;
171
+ max-height: calc(80vh - 90px);
172
+ border-radius: 3px;
173
+ }
174
+
175
+ .navigation {
176
+ display: flex;
177
+ justify-content: space-between;
178
+ width: 100%;
179
+ position: absolute;
180
+ top: 50%;
181
+ transform: translateY(-50%);
182
+ }
183
+
184
+ .navigation-btn {
185
+ user-select: none;
186
+ width: var(--input-height);
187
+ height: var(--input-height);
188
+ border-radius: 100%;
189
+ }
190
+
191
+ .thumbnails {
192
+ display: flex;
193
+ justify-content: center;
194
+ margin-top: 10px;
195
+ overflow: auto;
196
+ padding: 1rem;
197
+ position: fixed;
198
+ bottom: 0;
199
+ left: 0;
200
+ right: 0;
201
+ }
202
+
203
+ .thumbnail {
204
+ height: 50px;
205
+ width: 50px;
206
+ object-fit: cover;
207
+ margin: 0 5px;
208
+ cursor: pointer;
209
+ opacity: 0.5;
210
+ border-radius: 3px;
211
+ transition: all 200ms ease;
212
+ background-color: white;
213
+ display: flex;
214
+ justify-content: center;
215
+ align-items: center;
216
+ }
217
+ .thumbnail:hover {
218
+ opacity: 1;
219
+ }
220
+ .thumbnail:active {
221
+ opacity: 0.8;
222
+ }
223
+
224
+ .thumbnail.active {
225
+ opacity: 1;
226
+ outline: 2px solid white;
227
+ }
228
+ </style>
@@ -0,0 +1,63 @@
1
+ import type { App, DirectiveBinding } from 'vue'
2
+ import { createApp } from 'vue'
3
+ import { IMAGE_FORMATS_REGEXP, VIDEO_FORMATS_REGEXP } from '@bagelink/vue'
4
+ import Lightbox from './Lightbox.vue'
5
+ import type { LightboxItem } from './lightbox.types'
6
+
7
+ type OpenFunction = (item: LightboxItem, groupItems?: LightboxItem[]) => void
8
+ const groups: Record<string, LightboxItem[]> = {}
9
+ const lightboxDirective = {
10
+ mounted(el: HTMLElement, binding: DirectiveBinding) {
11
+ const lightboxInstance = createLightboxInstance()
12
+ if (!lightboxInstance || !lightboxInstance.open) return
13
+ if (binding.value.group) {
14
+ if (!groups[binding.value.group]) groups[binding.value.group] = []
15
+ const src = binding.value.src || binding.value || el.getAttribute('src') || ''
16
+ groups[binding.value.group].push({
17
+ src,
18
+ type: binding.value.type || determineFileType(src),
19
+ name: binding.value.name || ''
20
+ })
21
+ }
22
+ el.addEventListener('click', (e) => {
23
+ e.stopPropagation()
24
+ const group = binding.value.group || null
25
+ const item: LightboxItem = {
26
+ src: binding.value.src || binding.value,
27
+ type: binding.value.type || determineFileType(binding.value.src || binding.value),
28
+ name: binding.value.name || '',
29
+ thumbnail: binding.value.thumbnail || '',
30
+ }
31
+ const lightboxInstance = createLightboxInstance()
32
+ if (!lightboxInstance || !lightboxInstance.open) return
33
+ if (binding.value.group) {
34
+ if (!groups[binding.value.group]) groups[binding.value.group] = []
35
+ groups[binding.value.group].push(item)
36
+ }
37
+ const open = lightboxInstance.open as OpenFunction
38
+ open(item, groups[group])
39
+ })
40
+ },
41
+ }
42
+
43
+ function determineFileType(url: string): string {
44
+ const extension = url.split('.').pop()?.toLowerCase() || ''
45
+ if (IMAGE_FORMATS_REGEXP.test(extension)) return 'image'
46
+ if (VIDEO_FORMATS_REGEXP.test(extension)) return 'video'
47
+ if (['pdf'].includes(extension)) return 'pdf'
48
+ return 'unknown'
49
+ }
50
+
51
+ function createLightboxInstance(): InstanceType<typeof Lightbox> | null {
52
+ const lightboxEl = document.createElement('div')
53
+ document.body.prepend(lightboxEl)
54
+
55
+ const app = createApp(Lightbox)
56
+ return app.mount(lightboxEl) as InstanceType<typeof Lightbox>
57
+ }
58
+
59
+ export default {
60
+ install(app: App) {
61
+ app.directive('lightbox', lightboxDirective)
62
+ },
63
+ }
@@ -0,0 +1,6 @@
1
+ export interface LightboxItem {
2
+ src: string
3
+ type: string
4
+ name: string
5
+ thumbnail?: string
6
+ }
@@ -1,8 +1,8 @@
1
- // import { vTooltip } from 'floating-vue';
2
1
  import FloatingVue from 'floating-vue'
3
2
  import { inject } from 'vue'
4
3
  import type { InjectionKey, Plugin } from 'vue'
5
4
  import { Bagel } from '@bagelink/sdk'
5
+ import Lightbox from '../components/lightbox'
6
6
  import clickOutside from '../utils/clickOutside'
7
7
  import { useLang } from '../utils'
8
8
 
@@ -37,7 +37,7 @@ export const BagelVue: Plugin = {
37
37
  install: (app, options: BagelOptions) => {
38
38
  const bagel = new Bagel({ host: options.host, onError: options.onError })
39
39
  app.directive('click-outside', clickOutside)
40
-
40
+ app.use(Lightbox)
41
41
  app.use(FloatingVue, {
42
42
  themes: {
43
43
  'bgl-theme': {
@@ -1,12 +0,0 @@
1
- declare function __VLS_template(): {
2
- default?(_: {}): any;
3
- };
4
- declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{}>>, {}, {}>;
5
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
6
- export default _default;
7
- type __VLS_WithTemplateSlots<T, S> = T & {
8
- new (): {
9
- $slots: S;
10
- };
11
- };
12
- //# sourceMappingURL=Accordion.vue.d.ts.map