@fewangsit/wangsvue-fats 1.0.0-alpha.21 → 1.0.0-alpha.22

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 (179) hide show
  1. package/event-bus/mitt.d.ts +25 -7
  2. package/package.json +1 -1
  3. package/plugins/WangsVue.d.ts +184 -16
  4. package/plugins/formValidation.d.ts +11 -2
  5. package/plugins/i18n.d.ts +23 -5
  6. package/utils/addAttachment.util.d.ts +18 -2
  7. package/utils/date.util.d.ts +33 -4
  8. package/utils/filterOptions.util.d.ts +4 -2
  9. package/utils/genPlaceholder.util.d.ts +11 -6
  10. package/utils/mergePropsWithDefaults.util.d.ts +4 -1
  11. package/utils/object.util.d.ts +14 -3
  12. package/utils/role.util.d.ts +5 -32
  13. package/utils/textFormatter.util.d.ts +15 -3
  14. package/assets/json/currencies.json.d.ts +0 -1068
  15. package/assets/lottie/admin/loading-page.lottie +0 -0
  16. package/assets/lottie/admin/loading-table.lottie +0 -0
  17. package/assets/lottie/admin/no-data.lottie +0 -0
  18. package/assets/lottie/supplyasset/loading-page.lottie +0 -0
  19. package/assets/lottie/supplyasset/loading-table.lottie +0 -0
  20. package/assets/lottie/supplyasset/no-data.lottie +0 -0
  21. package/assets/lottie/workspace/loading-page.lottie +0 -0
  22. package/assets/lottie/workspace/loading-plane.lottie +0 -0
  23. package/assets/lottie/workspace/loading-table.lottie +0 -0
  24. package/assets/lottie/workspace/no-data.lottie +0 -0
  25. package/build-entry.d.ts +0 -14
  26. package/components/animation/Animation.vue.d.ts +0 -24
  27. package/components/approverinfo/ApproverInfo.vue.d.ts +0 -51
  28. package/components/assetinfo/AssetInfo.vue.d.ts +0 -32
  29. package/components/badge/Badge.vue.d.ts +0 -73
  30. package/components/badgegroup/BadgeGroup.vue.d.ts +0 -52
  31. package/components/basecomponent/index.d.ts +0 -28
  32. package/components/basetree/BaseTree.vue.d.ts +0 -591
  33. package/components/basetree/TreeNode.vue.d.ts +0 -35
  34. package/components/breadcrumb/Breadcrumb.vue.d.ts +0 -26
  35. package/components/button/Button.vue.d.ts +0 -188
  36. package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +0 -35
  37. package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +0 -104
  38. package/components/buttoncopy/ButtonCopy.vue.d.ts +0 -26
  39. package/components/buttondownload/ButtonDownload.vue.d.ts +0 -49
  40. package/components/buttonfilter/ButtonFilter.vue.d.ts +0 -12
  41. package/components/buttonradio/ButtonRadio.vue.d.ts +0 -257
  42. package/components/buttonscan/ButtonScan.vue.d.ts +0 -201
  43. package/components/buttonscan/helpers/getErrorCode.helper.d.ts +0 -3
  44. package/components/buttonscan/helpers/index.d.ts +0 -1
  45. package/components/buttonscan/workers/scanner.worker.d.ts +0 -1
  46. package/components/buttonsearch/ButtonSearch.vue.d.ts +0 -38
  47. package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +0 -200
  48. package/components/buttonsplit/ButtonSplit.d.ts +0 -350
  49. package/components/buttonsplit/ButtonSplit.vue.d.ts +0 -34
  50. package/components/buttonsync/ButtonSync.vue.d.ts +0 -10
  51. package/components/buttontoggle/ButtonToggle.vue.d.ts +0 -18
  52. package/components/buttonviewlog/ButtonViewLog.vue.d.ts +0 -17
  53. package/components/calendar/BaseCalendar.vue.d.ts +0 -86
  54. package/components/calendar/Calendar.vue.d.ts +0 -570
  55. package/components/card/Card.vue.d.ts +0 -139
  56. package/components/checkbox/Checkbox.vue.d.ts +0 -329
  57. package/components/codesnippet/CodeSnippet.vue.d.ts +0 -14
  58. package/components/customcolumn/ColumnList.vue.d.ts +0 -27
  59. package/components/customcolumn/CustomColumn.vue.d.ts +0 -37
  60. package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +0 -12
  61. package/components/datatable/DataTable.vue.d.ts +0 -735
  62. package/components/datatable/MultiRow.vue.d.ts +0 -16
  63. package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +0 -1
  64. package/components/datatable/helpers/filter.helper.d.ts +0 -28
  65. package/components/datatable/helpers/index.d.ts +0 -3
  66. package/components/datatable/helpers/readConfig.helper.d.ts +0 -2
  67. package/components/datatable/store/dataTable.store.d.ts +0 -22
  68. package/components/dialog/Dialog.vue.d.ts +0 -464
  69. package/components/dialogconfirm/DialogConfirm.vue.d.ts +0 -164
  70. package/components/dialogform/DialogForm.vue.d.ts +0 -349
  71. package/components/dialogselecttree/DialogSelectTree.vue.d.ts +0 -136
  72. package/components/dropdown/Dropdown.vue.d.ts +0 -264
  73. package/components/editor/CodeSnippetAdapter.vue.d.ts +0 -92
  74. package/components/editor/Editor.vue.d.ts +0 -191
  75. package/components/editor/EditorButton.vue.d.ts +0 -15
  76. package/components/editor/MentionList.vue.d.ts +0 -35
  77. package/components/editor/MentionSection.vue.d.ts +0 -92
  78. package/components/editor/codeSnippetExtension.d.ts +0 -3
  79. package/components/editor/mentionSectionExtension.d.ts +0 -3
  80. package/components/editor/suggestion.d.ts +0 -2
  81. package/components/fieldwrapper/FieldWrapper.vue.d.ts +0 -69
  82. package/components/fileupload/FileUpload.vue.d.ts +0 -169
  83. package/components/filtercontainer/FilterContainer.vue.d.ts +0 -182
  84. package/components/filtercontainer/helpers/applyFilter.helper.d.ts +0 -5
  85. package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +0 -7
  86. package/components/filtercontainer/helpers/getOption.helper.d.ts +0 -3
  87. package/components/form/Form.vue.d.ts +0 -316
  88. package/components/gallerypreview/GalleryPreview.vue.d.ts +0 -31
  89. package/components/hardwaresync/store/device.store.d.ts +0 -36
  90. package/components/helpers/convertToArrayClass.helper.d.ts +0 -2
  91. package/components/helpers/index.d.ts +0 -2
  92. package/components/helpers/label.d.ts +0 -15
  93. package/components/icon/Icon.vue.d.ts +0 -256
  94. package/components/image/Image.vue.d.ts +0 -403
  95. package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +0 -36
  96. package/components/imagecompressor/ImageCompressor.vue.d.ts +0 -229
  97. package/components/imagecompressor/ImageInputInfo.vue.d.ts +0 -32
  98. package/components/index.d.ts +0 -69
  99. package/components/inlinemessage/InlineMessage.vue.d.ts +0 -167
  100. package/components/inputbadge/InputBadge.vue.d.ts +0 -122
  101. package/components/inputcurrency/InputCurrency.vue.d.ts +0 -170
  102. package/components/inputcurrency/helpers/currency.helper.d.ts +0 -4
  103. package/components/inputemail/InputEmail.vue.d.ts +0 -25
  104. package/components/inputgroup/InputGroup.vue.d.ts +0 -141
  105. package/components/inputnumber/InputNumber.vue.d.ts +0 -282
  106. package/components/inputpassword/InputPassword.vue.d.ts +0 -32
  107. package/components/inputphonenumber/InputPhoneNumber.vue.d.ts +0 -99
  108. package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +0 -8
  109. package/components/inputrangenumber/InputRangeNumber.vue.d.ts +0 -120
  110. package/components/inputsearch/InputSearch.vue.d.ts +0 -32
  111. package/components/inputtext/InputText.vue.d.ts +0 -352
  112. package/components/inputurl/InputURL.vue.d.ts +0 -39
  113. package/components/invisiblefield/InvisibleField.vue.d.ts +0 -36
  114. package/components/languagedropdown/LanguageDropdown.vue.d.ts +0 -47
  115. package/components/languagedropdown/LanguageDropdownOption.vue.d.ts +0 -18
  116. package/components/languageswitcher/LanguageSwitcher.vue.d.ts +0 -15
  117. package/components/litedropdown/LiteDropdown.vue.d.ts +0 -96
  118. package/components/loading/Loading.vue.d.ts +0 -47
  119. package/components/loading/store/loading.store.d.ts +0 -8
  120. package/components/menu/Menu.vue.d.ts +0 -390
  121. package/components/menu/helpers/filterMenu.helper.d.ts +0 -12
  122. package/components/menu/helpers/index.d.ts +0 -1
  123. package/components/menuitem/MenuItem.vue.d.ts +0 -19
  124. package/components/menuitem/index.d.ts +0 -106
  125. package/components/multiselect/MultiSelect.vue.d.ts +0 -192
  126. package/components/overlaypanel/OverlayPanel.vue.d.ts +0 -301
  127. package/components/passthrough/index.d.ts +0 -16
  128. package/components/progressbar/ProgressBar.vue.d.ts +0 -72
  129. package/components/quickfilter/QuickFilter.vue.d.ts +0 -25
  130. package/components/tabmenu/TabMenu.vue.d.ts +0 -288
  131. package/components/tagtype/TagType.vue.d.ts +0 -21
  132. package/components/textarea/Textarea.vue.d.ts +0 -170
  133. package/components/timeline/Timeline.vue.d.ts +0 -121
  134. package/components/timeline/TimelineContentByType.vue.d.ts +0 -16
  135. package/components/toast/Toast.vue.d.ts +0 -367
  136. package/components/toggleswitch/ToggleSwitch.vue.d.ts +0 -281
  137. package/components/tooltipspan/TooltipSpan.vue.d.ts +0 -20
  138. package/components/tree/Tree.vue.d.ts +0 -148
  139. package/components/tree/helpers/filterNodeKeys.helper.d.ts +0 -16
  140. package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +0 -6
  141. package/components/tree/helpers/index.d.ts +0 -3
  142. package/components/treesearchinput/TreeSearchInput.vue.d.ts +0 -16
  143. package/components/ts-helpers.d.ts +0 -83
  144. package/components/usergroup/UserGroup.vue.d.ts +0 -57
  145. package/components/username/UserName.vue.d.ts +0 -113
  146. package/components/userwithicon/UserWithIcon.vue.d.ts +0 -21
  147. package/components/validatormessage/ValidatorMessage.vue.d.ts +0 -12
  148. package/config/defaultProps.d.ts +0 -3
  149. package/config/index.d.ts +0 -3
  150. package/config/locale.d.ts +0 -3
  151. package/loading-page-BrQattYE.js +0 -1
  152. package/loading-page-CgfbWppy.js +0 -1
  153. package/loading-page-CoC9UhfC.js +0 -4
  154. package/loading-page-CoXtqoc9.js +0 -4
  155. package/loading-page-DbLuqCHa.js +0 -1
  156. package/loading-page-f8D03l3G.js +0 -4
  157. package/loading-plane-CgfbWppy.js +0 -1
  158. package/loading-plane-CoXtqoc9.js +0 -4
  159. package/loading-table-Bdr9ZhtP.js +0 -1
  160. package/loading-table-ByUoWqUo.js +0 -4
  161. package/loading-table-BygEMzFM.js +0 -4
  162. package/loading-table-BzrSQlA0.js +0 -1
  163. package/loading-table-D9bw9OcI.js +0 -4
  164. package/loading-table-chOgXi94.js +0 -1
  165. package/main.d.ts +0 -2
  166. package/no-data-CTKux8RI.js +0 -4
  167. package/no-data-Cgze_Rvp.js +0 -1
  168. package/no-data-DLHO1L_u.js +0 -4
  169. package/no-data-Dep79CBh.js +0 -1
  170. package/no-data-g0dJCy2p.js +0 -4
  171. package/no-data-y1X5WtcQ.js +0 -1
  172. package/plugins/i18n-extension.d.ts +0 -4
  173. package/style.css +0 -1
  174. package/types/options.type.d.ts +0 -16
  175. package/utils/getSeverityByAssetStatus.util.d.ts +0 -3
  176. package/utils/index.d.ts +0 -22
  177. package/utils/listenSidebarChanges.util.d.ts +0 -11
  178. package/wangsvue-fats.es.js +0 -133302
  179. package/wangsvue-fats.system.js +0 -489
@@ -1,264 +0,0 @@
1
- import { Slot } from 'vue';
2
- import { DropdownOption, OptionValue } from 'lib/types/options.type';
3
- import { CustomValidation } from '../form/Form.vue.d';
4
- import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
5
- import { BadgeProps } from 'lib/components/badge/Badge.vue.d';
6
-
7
- /**
8
- * Configuration interface for localizing dropdown component placeholders and error messages.
9
- */
10
- export interface DropdownLocaleConfig {
11
- /**
12
- * Placeholder text for the filter input field.
13
- *
14
- * @default undefined
15
- */
16
- filterPlaceholder?: string;
17
-
18
- /**
19
- * Placeholder text displayed while the dropdown is loading.
20
- *
21
- * @example 'Loading...'
22
- * @default undefined
23
- */
24
- loadingPlaceholder?: string;
25
-
26
- /**
27
- * Placeholder text for the input field when no selection has been made.
28
- *
29
- * This text can include a placeholder `{label}` which will be replaced with the value of `props.label`.
30
- *
31
- * @example 'Select {label}' - If `props.label` is 'Option', the placeholder will be 'Select Option'.
32
- * @example 'Select {lowercaseLabel}' - If `props.label` is 'Option', the placeholder will be 'Select option'.
33
- * @default undefined
34
- */
35
- inputPlaceholder?: string;
36
-
37
- /**
38
- * Error message displayed when no selection has been made.
39
- *
40
- * This message can include placeholders:
41
- * - `{label}`: Replaced with the value of `props.label`.
42
- * - `{formattedLabel}`: Replaced with the value of `props.label` formatted with an appropriate article (a/an).
43
- *
44
- * @example
45
- * // If `props.label` is 'Label', the error message will be:
46
- * '{label} must be picked' - 'Label must be picked'
47
- *
48
- * @example
49
- * // If `props.label` is 'user', the error message will be:
50
- * 'You must pick {formattedLabel}' - 'You must pick a user'
51
- *
52
- * @default undefined
53
- */
54
- emptySelectionErrorMessage?: string;
55
- }
56
-
57
- /**
58
- * Dropdown component props
59
- */
60
- export interface DropdownProps {
61
- /**
62
- * Don't use modelValue with useValidator at the same time.
63
- * It may lead unexpected behavior.
64
- */
65
- modelValue?: OptionValue;
66
-
67
- /**
68
- * If you deals with form validation on edit form action, you can set the initial value of the field.
69
- */
70
- initialValue?: OptionValue;
71
-
72
- /**
73
- * The input label. Tell the user what input is this.
74
- */
75
- label?: string;
76
-
77
- /**
78
- * List of options to display.
79
- */
80
- options?: DropdownOption[] | string[] | Record<string, any>;
81
-
82
- /**
83
- * Allows `null` to be treated as a valid selectable option in the dropdown.
84
- *
85
- * When enabled, `null` can be included in the options list and selected by the user.
86
- */
87
- allowNullOption?: boolean;
88
-
89
- /**
90
- * Specify the property name of option to be used as label.
91
- *
92
- * @default undefined - the label will be sets to the option itself.
93
- */
94
- optionLabel?: string;
95
-
96
- /**
97
- * Specify the property name of option to be used as value.
98
- *
99
- * @default undefined - the value will be sets to the option itself.
100
- */
101
- optionValue?: string;
102
-
103
- /**
104
- * Define the value style, whether badge or plain text
105
- *
106
- * @default 'plain'
107
- */
108
- valueType?: 'badge' | 'plain';
109
-
110
- /**
111
- * Bind the badge property to the dropdown value
112
- */
113
- badgeValueProps?: Omit<BadgeProps, 'label'>;
114
-
115
- /**
116
- * Set the input border style
117
- *
118
- * @default 'default'
119
- */
120
- inputBorder?: 'none' | 'default';
121
-
122
- /**
123
- * A property to uniquely identify an option.
124
- */
125
- dataKey?: string | undefined;
126
-
127
- /**
128
- * Determines if the field uses a validator
129
- */
130
- useValidator?: boolean;
131
-
132
- /**
133
- * Determines if the field is mandatory
134
- */
135
- mandatory?: boolean;
136
-
137
- /**
138
- * Show the text (opsional)
139
- *
140
- * @default true if mandatory true
141
- */
142
- showOptionalText?: boolean;
143
-
144
- /**
145
- * Set custom validator message.
146
- * It is rarely use, this component has handled the validator message.
147
- *
148
- *
149
- * @example: 'This field is required'
150
- * @example: { empty: 'This field is required' }
151
- */
152
- validatorMessage?: string | CustomValidation<'empty'>;
153
-
154
- /**
155
- * Wether to format the message
156
- *
157
- * @default true
158
- */
159
- formatValidatorMessage?: boolean;
160
-
161
- /**
162
- * Set custom invalid state.
163
- */
164
- invalid?: boolean;
165
-
166
- /**
167
- * This prop is required if you use this component in a form input.
168
- * Specify the unique field name, match with your needs for API request.
169
- *
170
- * @default 'dropdown'
171
- */
172
- fieldName?: string;
173
-
174
- /**
175
- * Default text to display when no option is selected.
176
- *
177
- * @default `Select ${label}`
178
- */
179
- placeholder?: string;
180
-
181
- /**
182
- * Whether the dropdown is in loading state.
183
- * @defaultValue false
184
- */
185
- loading?: boolean;
186
-
187
- /**
188
- * Show icon 'info' on the right side of label.
189
- * Show information to user about the field on icon hover.
190
- */
191
- fieldInfo?: string;
192
-
193
- /**
194
- * Set disabled state for input dropdown.
195
- */
196
- disabled?: boolean;
197
-
198
- /**
199
- * Whether show the Dropdown option search or not.
200
- *
201
- * @default true,
202
- */
203
- filter?: boolean;
204
-
205
- /**
206
- * The filter input Placeholder
207
- *
208
- * @default 'Search'
209
- */
210
- filterPlaceholder?: string;
211
- }
212
-
213
- export interface DropdownSlots {
214
- 'value': Slot<{ value: string; originalValue: any }>;
215
- 'option': Slot<{ option: DropdownOption }>;
216
- 'addon-left': Slot;
217
- 'addon-right': Slot;
218
- }
219
-
220
- /**
221
- * Dropdown component emits
222
- */
223
- export type DropdownEmits = {
224
- /**
225
- * Emits when an option selected.
226
- */
227
- 'update:modelValue': [value: OptionValue | undefined];
228
-
229
- /**
230
- * Emits when overlay shown.
231
- */
232
- 'show': [];
233
- };
234
-
235
- /**
236
- * **WangsVue - Dropdown**
237
- *
238
- * _Dropdown also known as Select, is used to choose an item from a collection of options._
239
- *
240
- * --- ---
241
- * ![WangsVue](https://www.wangs.id/wp-content/uploads/2023/12/cropped-Logo_Wangsid-removebg-preview-192x192.png)
242
- *
243
- * @group Component
244
- */
245
- declare class Dropdown extends ClassComponent<
246
- DropdownProps,
247
- DropdownSlots,
248
- DropdownEmits
249
- > {
250
- /**
251
- * Shows the overlay.
252
- *
253
- * @memberof MultiSelect
254
- */
255
- showOverlay(): void;
256
- }
257
-
258
- declare module '@vue/runtime-core' {
259
- interface GlobalComponents {
260
- Dropdown: GlobalComponentConstructor<Dropdown>;
261
- }
262
- }
263
-
264
- export default Dropdown;
@@ -1,92 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{
2
- editor: {
3
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["editor"]>;
4
- required: true;
5
- };
6
- node: {
7
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["node"]>;
8
- required: true;
9
- };
10
- decorations: {
11
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["decorations"]>;
12
- required: true;
13
- };
14
- selected: {
15
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["selected"]>;
16
- required: true;
17
- };
18
- extension: {
19
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["extension"]>;
20
- required: true;
21
- };
22
- getPos: {
23
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["getPos"]>;
24
- required: true;
25
- };
26
- updateAttributes: {
27
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["updateAttributes"]>;
28
- required: true;
29
- };
30
- deleteNode: {
31
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["deleteNode"]>;
32
- required: true;
33
- };
34
- view: {
35
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["view"]>;
36
- required: true;
37
- };
38
- innerDecorations: {
39
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["innerDecorations"]>;
40
- required: true;
41
- };
42
- HTMLAttributes: {
43
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["HTMLAttributes"]>;
44
- required: true;
45
- };
46
- }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
47
- editor: {
48
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["editor"]>;
49
- required: true;
50
- };
51
- node: {
52
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["node"]>;
53
- required: true;
54
- };
55
- decorations: {
56
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["decorations"]>;
57
- required: true;
58
- };
59
- selected: {
60
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["selected"]>;
61
- required: true;
62
- };
63
- extension: {
64
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["extension"]>;
65
- required: true;
66
- };
67
- getPos: {
68
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["getPos"]>;
69
- required: true;
70
- };
71
- updateAttributes: {
72
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["updateAttributes"]>;
73
- required: true;
74
- };
75
- deleteNode: {
76
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["deleteNode"]>;
77
- required: true;
78
- };
79
- view: {
80
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["view"]>;
81
- required: true;
82
- };
83
- innerDecorations: {
84
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["innerDecorations"]>;
85
- required: true;
86
- };
87
- HTMLAttributes: {
88
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["HTMLAttributes"]>;
89
- required: true;
90
- };
91
- }>>, {}, {}>;
92
- export default _default;
@@ -1,191 +0,0 @@
1
- import { EditorEvents } from '@tiptap/vue-3';
2
- import { ClassComponent } from '../ts-helpers';
3
-
4
- export interface EditorProps {
5
- /**
6
- * Model Value For Editor Content
7
- */
8
- modelValue?: JSONContent;
9
- /**
10
- * Model Value For Editor Content
11
- */
12
- initialValue?: JSONContent;
13
- /**
14
- * Specify the input placeholder.
15
- */
16
- placeholder?: string;
17
- /**
18
- * Determine Editor State Readonly / Editable.
19
- * @default 'editable'
20
- */
21
- editorState?: EditorState;
22
- /**
23
- * Change Editor Border Content.
24
- * @default false
25
- */
26
- borderLess?: boolean;
27
- /**
28
- * The input label. Tell the user what input is this.
29
- */
30
- label?: string;
31
- /**
32
- * Wether the input should be validated with vee-validator or not.
33
- * If you use this component within form input, you need to set this props as true.
34
- */
35
- useValidator?: boolean;
36
- /**
37
- * This prop is required if you use this component in a form input.
38
- * Specify the unique field name, match with your needs for API request.
39
- *
40
- * @default 'editorInput'
41
- */
42
- fieldName?: string;
43
- /**
44
- * Specify classes for label.
45
- */
46
- labelClass?: string;
47
- /**
48
- * Show information to user about the field.
49
- */
50
- fieldInfo?: string;
51
- /**
52
- * Classes for validator message in input field.
53
- */
54
- validatorMessageClass?: string;
55
- /**
56
- * Set custom validator message.
57
- * Will be show if invalid="true"
58
- */
59
- validatorMessage?: string | { empty: string };
60
- /**
61
- * Wether this input field is required or not.
62
- */
63
- mandatory?: boolean;
64
- /**
65
- * Invalid input state.
66
- */
67
- invalid?: boolean;
68
- /**
69
- * Showing Optional value text on Label.
70
- * @default true
71
- */
72
- showOptionalText?: boolean;
73
- /**
74
- * Determine for image upload from local machine if value is true, no need to use postImageLocal emitter
75
- * @default false
76
- */
77
- isImageUploadBase64?: boolean;
78
- /**
79
- * Fetch function for mention this will get triger if putting @ in editor
80
- */
81
- fetchMentionSuggestionFunction?: () => Promise<
82
- GetMentionSuggestionResponse | undefined
83
- >;
84
- /**
85
- * Getting all mentioned list
86
- */
87
- mentionedList?: string[];
88
- /**
89
- * Add custom class tailwind for editor wrapper/container
90
- * and preferred for using "!" bang! for your tailwind class just to make sure it apply
91
- */
92
- editorWrapperClass?: string;
93
- /**
94
- * Add custom class tailwind for editor toolbar wrapper/container
95
- * and preferred for using "!" bang! for your tailwind class just to make sure it apply
96
- */
97
- toolbarWrapperClass?: string;
98
- /**
99
- * Add custom class tailwind for editor content wrapper/container
100
- * and preferred for using "!" bang! for your tailwind class just to make sure it apply
101
- */
102
- contentWrapperClass?: string;
103
- }
104
-
105
- export type EditorEmits = {
106
- /**
107
- * Event emitted when the model value is updated
108
- */
109
- 'update:modelValue': [value: JSONContent];
110
- /**
111
- * Event emitted when try to upload image from local machine,
112
- * and need to send file image to server first using value.image params and then
113
- * get back image url that already get hosted.
114
- * to set the image url back to editor to be show up simply using value.setImageCb from params
115
- */
116
- 'postImageLocal': [value: PostImage];
117
- /**
118
- * Event emitted when button in floating menu named :(unset image) is clicked,
119
- * but this only get triger if selected image get set by postImageLocal function
120
- */
121
- 'deleteImageLocal': [value: ImageProperties];
122
- /**
123
- * Event emitted when the editor is blurred
124
- */
125
- 'blur': [value: EditorEvents['blur']];
126
- /**
127
- * Event emitted when the editor is focused
128
- */
129
- 'focus': [value: EditorEvents['focus']];
130
- /**
131
- * Emited Everytime mentioned user in editor change
132
- */
133
- 'update:mentionedList': [value: string[]];
134
- };
135
-
136
- export type PostImage = {
137
- /**
138
- * This Is Image File that should be send to server
139
- */
140
- image: File;
141
- /**
142
- * Set Image Cb Is Callback For setting back image url that get send back
143
- * from server through response
144
- */
145
- setImageCb: (imageUrl: string) => void;
146
- };
147
-
148
- /**
149
- * Editor Content Meta Data
150
- */
151
- export type JSONContent = {
152
- type?: string;
153
- attrs?: Record<string, any>;
154
- content?: JSONContent[];
155
- marks?: {
156
- type: string;
157
- attrs?: Record<string, any>;
158
- [key: string]: any;
159
- }[];
160
- text?: string;
161
- [key: string]: any;
162
- };
163
-
164
- export type ImageProperties = {
165
- alt?: string;
166
- src: string;
167
- title: string;
168
- };
169
-
170
- export type GetMentionSuggestionResponse = {
171
- status: number;
172
- message: string;
173
- data: MentionSuggestion[];
174
- };
175
-
176
- export type MentionSuggestion = {
177
- _id: string;
178
- fullName: string;
179
- nickName: string;
180
- profilePicture: string;
181
- };
182
-
183
- export type EditorState = 'editable' | 'readonly';
184
-
185
- declare class Editor extends ClassComponent<
186
- EditorProps,
187
- unknown,
188
- EditorEmits
189
- > {}
190
-
191
- export default Editor;
@@ -1,15 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
2
- classButton?: string[];
3
- }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<{
4
- classButton?: string[];
5
- }>>>, {}, {}>;
6
- export default _default;
7
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
8
- type __VLS_TypePropsToOption<T> = {
9
- [K in keyof T]-?: {} extends Pick<T, K> ? {
10
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
11
- } : {
12
- type: import('vue').PropType<T[K]>;
13
- required: true;
14
- };
15
- };
@@ -1,35 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<{
2
- items: {
3
- id: string;
4
- label: string;
5
- nickName: string;
6
- profilePicture: string;
7
- }[];
8
- command: (arg: {
9
- id: string;
10
- label: string;
11
- }) => void;
12
- }>, {
13
- onKeyDown: (event: KeyboardEvent) => boolean;
14
- }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToOption<{
15
- items: {
16
- id: string;
17
- label: string;
18
- nickName: string;
19
- profilePicture: string;
20
- }[];
21
- command: (arg: {
22
- id: string;
23
- label: string;
24
- }) => void;
25
- }>>>, {}, {}>;
26
- export default _default;
27
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
- type __VLS_TypePropsToOption<T> = {
29
- [K in keyof T]-?: {} extends Pick<T, K> ? {
30
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
31
- } : {
32
- type: import('vue').PropType<T[K]>;
33
- required: true;
34
- };
35
- };
@@ -1,92 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<{
2
- editor: {
3
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["editor"]>;
4
- required: true;
5
- };
6
- node: {
7
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["node"]>;
8
- required: true;
9
- };
10
- decorations: {
11
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["decorations"]>;
12
- required: true;
13
- };
14
- selected: {
15
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["selected"]>;
16
- required: true;
17
- };
18
- extension: {
19
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["extension"]>;
20
- required: true;
21
- };
22
- getPos: {
23
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["getPos"]>;
24
- required: true;
25
- };
26
- updateAttributes: {
27
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["updateAttributes"]>;
28
- required: true;
29
- };
30
- deleteNode: {
31
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["deleteNode"]>;
32
- required: true;
33
- };
34
- view: {
35
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["view"]>;
36
- required: true;
37
- };
38
- innerDecorations: {
39
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["innerDecorations"]>;
40
- required: true;
41
- };
42
- HTMLAttributes: {
43
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["HTMLAttributes"]>;
44
- required: true;
45
- };
46
- }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
47
- editor: {
48
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["editor"]>;
49
- required: true;
50
- };
51
- node: {
52
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["node"]>;
53
- required: true;
54
- };
55
- decorations: {
56
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["decorations"]>;
57
- required: true;
58
- };
59
- selected: {
60
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["selected"]>;
61
- required: true;
62
- };
63
- extension: {
64
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["extension"]>;
65
- required: true;
66
- };
67
- getPos: {
68
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["getPos"]>;
69
- required: true;
70
- };
71
- updateAttributes: {
72
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["updateAttributes"]>;
73
- required: true;
74
- };
75
- deleteNode: {
76
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["deleteNode"]>;
77
- required: true;
78
- };
79
- view: {
80
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["view"]>;
81
- required: true;
82
- };
83
- innerDecorations: {
84
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["innerDecorations"]>;
85
- required: true;
86
- };
87
- HTMLAttributes: {
88
- type: import('vue').PropType<import('@tiptap/vue-3').NodeViewProps["HTMLAttributes"]>;
89
- required: true;
90
- };
91
- }>>, {}, {}>;
92
- export default _default;
@@ -1,3 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- declare const _default: Node<any, any>;
3
- export default _default;
@@ -1,3 +0,0 @@
1
- import { Node } from '@tiptap/core';
2
- declare const _default: Node<any, any>;
3
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const suggestion: () => any;
2
- export default suggestion;