@fewangsit/wangsvue-fats 1.0.0-alpha.10 → 1.0.0-alpha.100
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/components/animation/Animation.vue.d.ts +9 -1
- package/components/assetinfo/AssetInfo.vue.d.ts +39 -0
- package/components/badgegroup/BadgeGroup.vue.d.ts +3 -1
- package/components/basetree/BaseTree.vue.d.ts +6 -1
- package/components/button/Button.vue.d.ts +7 -3
- package/components/buttonaddbyscan/ButtonAddByScan.vue.d.ts +40 -0
- package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +1 -0
- package/components/buttonradio/ButtonRadio.vue.d.ts +1 -0
- package/components/buttonscan/ButtonScan.vue.d.ts +202 -0
- package/components/buttonsearchbyscan/ButtonSearchByScan.vue.d.ts +46 -0
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +2 -1
- package/components/buttonsplit/ButtonSplit.vue.d.ts +352 -34
- package/components/buttonsync/ButtonSync.vue.d.ts +22 -0
- package/components/buttontoggle/ButtonToggle.vue.d.ts +1 -0
- package/components/buttonviewlog/ButtonViewLog.vue.d.ts +17 -0
- package/components/calendar/Calendar.vue.d.ts +32 -4
- package/components/card/Card.vue.d.ts +1 -0
- package/components/checkbox/Checkbox.vue.d.ts +1 -0
- package/components/datatable/DataTable.vue.d.ts +12 -4
- package/components/dialog/Dialog.vue.d.ts +4 -3
- package/components/dialogassetnamedetail/DialogAssetNameDetail.vue.d.ts +46 -0
- package/components/dialogassetnamedetail/options/columns.d.ts +2 -0
- package/components/dialogassetnamedetail/options/filter.d.ts +2 -0
- package/components/dialogconfirm/DialogConfirm.vue.d.ts +1 -0
- package/components/dialogform/DialogForm.vue.d.ts +3 -2
- package/components/dialoglinkedasset/DialogLinkedAsset.vue.d.ts +106 -0
- package/components/dialogprintqr/DialogPrintQR.vue.d.ts +18 -0
- package/components/dialogreportdamage/DialogReportDamage.vue.d.ts +34 -0
- package/components/dialogreportmissing/DialogReportMissing.vue.d.ts +33 -0
- package/components/dialogreporttag/DialogReportTag.vue.d.ts +31 -0
- package/components/dialogselecttree/DialogSelectTree.vue.d.ts +3 -2
- package/components/dialogselectuser/DialogSelectUser.vue.d.ts +102 -0
- package/components/dialogselectuser/options/columns.d.ts +3 -0
- package/components/dropdown/Dropdown.vue.d.ts +23 -4
- package/components/editor/Editor.vue.d.ts +1 -0
- package/components/fieldwrapper/FieldWrapper.vue.d.ts +12 -2
- package/components/fileupload/FileUpload.vue.d.ts +1 -0
- package/components/filtercontainer/FilterContainer.vue.d.ts +12 -8
- package/components/form/Form.vue.d.ts +2 -1
- package/components/icon/Icon.vue.d.ts +3 -0
- package/components/image/Image.vue.d.ts +8 -0
- package/components/imagecompressor/ImageCompressor.vue.d.ts +6 -0
- package/components/index.d.ts +29 -18
- package/components/inputcurrency/helpers/currency.helper.d.ts +5 -1
- package/components/inputemail/InputEmail.vue.d.ts +1 -0
- package/components/inputnumber/InputNumber.vue.d.ts +6 -0
- package/components/inputotp/InputOtp.vue.d.ts +3 -0
- package/components/inputpassword/InputPassword.vue.d.ts +1 -0
- package/components/inputrangenumber/InputRangeNumber.vue.d.ts +1 -0
- package/components/inputsearch/InputSearch.vue.d.ts +36 -0
- package/components/inputtext/InputText.vue.d.ts +2 -1
- package/components/inputurl/InputURL.vue.d.ts +4 -2
- package/components/invisiblefield/InvisibleField.vue.d.ts +32 -36
- package/components/languagedropdown/LanguageDropdown.vue.d.ts +5 -19
- package/components/litedropdown/LiteDropdown.vue.d.ts +5 -3
- package/components/loading/store/loading.store.d.ts +3 -3
- package/components/menu/Menu.vue.d.ts +2 -1
- package/components/multiselect/MultiSelect.vue.d.ts +7 -4
- package/components/overlaypanel/OverlayPanel.vue.d.ts +1 -0
- package/components/paginator/Paginator.vue.d.ts +285 -0
- package/components/tabmenu/TabMenu.vue.d.ts +6 -190
- package/components/tagtype/TagType.vue.d.ts +26 -0
- package/components/textarea/Textarea.vue.d.ts +2 -1
- package/components/timeline/Timeline.vue.d.ts +21 -2
- package/components/toast/Toast.vue.d.ts +2 -1
- package/components/toggleswitch/ToggleSwitch.vue.d.ts +1 -0
- package/components/transactionroles/TransactionRoles.vue.d.ts +58 -0
- package/components/tree/Tree.vue.d.ts +6 -3
- package/components/tree/helpers/filterNodeKeys.helper.d.ts +8 -2
- package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +3 -1
- package/components/username/UserName.vue.d.ts +6 -1
- package/components/userwithicon/UserWithIcon.vue.d.ts +21 -0
- package/config/defaultProps.d.ts +1 -1
- package/config/index.d.ts +1 -1
- package/config/locale.d.ts +1 -1
- package/directives/focus.d.ts +1 -1
- package/event-bus/index.d.ts +55 -50
- package/event-bus/mitt.d.ts +29 -14
- package/main.d.ts +34 -2
- package/package.json +10 -6
- package/plugins/VueHtmlToPaper.d.ts +11 -0
- package/plugins/WangsVue.d.ts +272 -98
- package/plugins/formValidation.d.ts +15 -6
- package/plugins/i18n-extension.d.ts +1 -1
- package/plugins/i18n.d.ts +89 -113
- package/stats.html +4949 -0
- package/style.css +1 -1
- package/utils/date.util.d.ts +64 -31
- package/utils/formatTagCode.util.d.ts +1 -0
- package/utils/getSeverityByAssetStatus.util.d.ts +3 -0
- package/utils/index.d.ts +6 -20
- package/utils/listenSidebarChanges.util.d.ts +16 -0
- package/utils/object.util.d.ts +14 -3
- package/utils/role.util.d.ts +67 -1
- package/utils/toast.util.d.ts +78 -78
- package/wangsvue-fats.js +56470 -0
- package/wangsvue-fats.system.js +204 -267
- package/assets/json/currencies.json.d.ts +0 -1068
- package/assets/lottie/admin/loading-page.lottie +0 -0
- package/assets/lottie/admin/loading-table.lottie +0 -0
- package/assets/lottie/admin/no-data.lottie +0 -0
- package/assets/lottie/supplyasset/loading-page.lottie +0 -0
- package/assets/lottie/supplyasset/loading-table.lottie +0 -0
- package/assets/lottie/supplyasset/no-data.lottie +0 -0
- package/assets/lottie/workspace/loading-page.lottie +0 -0
- package/assets/lottie/workspace/loading-plane.lottie +0 -0
- package/assets/lottie/workspace/loading-table.lottie +0 -0
- package/assets/lottie/workspace/no-data.lottie +0 -0
- package/build-entry.d.ts +0 -14
- package/components/buttonsplit/ButtonSplit.d.ts +0 -350
- package/components/calendar/BaseCalendar.vue.d.ts +0 -86
- package/components/codesnippet/CodeSnippet.vue.d.ts +0 -14
- package/components/customcolumn/ColumnList.vue.d.ts +0 -27
- package/components/customcolumn/helpers/setVisibilityColumn.helper.d.ts +0 -12
- package/components/datatable/MultiRow.vue.d.ts +0 -16
- package/components/datatable/helpers/adjustMenuPosition.helper.d.ts +0 -1
- package/components/datatable/helpers/filter.helper.d.ts +0 -28
- package/components/datatable/helpers/index.d.ts +0 -3
- package/components/datatable/helpers/readConfig.helper.d.ts +0 -2
- package/components/datatable/store/dataTable.store.d.ts +0 -22
- package/components/editor/CodeSnippetAdapter.vue.d.ts +0 -92
- package/components/editor/EditorButton.vue.d.ts +0 -15
- package/components/editor/MentionList.vue.d.ts +0 -35
- package/components/editor/MentionSection.vue.d.ts +0 -92
- package/components/editor/codeSnippetExtension.d.ts +0 -3
- package/components/editor/mentionSectionExtension.d.ts +0 -3
- package/components/editor/suggestion.d.ts +0 -2
- package/components/filtercontainer/helpers/applyFilter.helper.d.ts +0 -5
- package/components/filtercontainer/helpers/formatDateTimeRange.helper.d.ts +0 -7
- package/components/filtercontainer/helpers/getOption.helper.d.ts +0 -3
- package/components/gallerypreview/GalleryPreview.vue.d.ts +0 -31
- package/components/helpers/convertToArrayClass.helper.d.ts +0 -2
- package/components/helpers/index.d.ts +0 -2
- package/components/helpers/label.d.ts +0 -15
- package/components/imagecompressor/BackgroundImageCropper.vue.d.ts +0 -36
- package/components/imagecompressor/ImageInputInfo.vue.d.ts +0 -30
- package/components/inputgroup/InputGroup.vue.d.ts +0 -141
- package/components/inputphonenumber/helpers/getUserLocation.helper.d.ts +0 -8
- package/components/languagedropdown/LanguageDropdownOption.vue.d.ts +0 -18
- package/components/menu/helpers/filterMenu.helper.d.ts +0 -12
- package/components/menu/helpers/index.d.ts +0 -1
- package/components/menuitem/MenuItem.vue.d.ts +0 -19
- package/components/progressbar/ProgressBar.vue.d.ts +0 -72
- package/components/quickfilter/QuickFilter.vue.d.ts +0 -25
- package/components/timeline/TimelineContentByType.vue.d.ts +0 -16
- package/components/tooltipspan/TooltipSpan.vue.d.ts +0 -20
- package/components/tree/helpers/index.d.ts +0 -3
- package/components/usergroup/UserGroup.vue.d.ts +0 -57
- package/components/validatormessage/ValidatorMessage.vue.d.ts +0 -12
- package/types/options.type.d.ts +0 -16
- package/utils/addAttachment.util.d.ts +0 -43
- package/utils/exportToExcel.util.d.ts +0 -20
- package/utils/filterOptions.util.d.ts +0 -3
- package/utils/genPlaceholder.util.d.ts +0 -8
- package/utils/getAttachmentIcon.util.d.ts +0 -8
- package/utils/mergePropsWithDefaults.util.d.ts +0 -20
- package/utils/textFormatter.util.d.ts +0 -17
- package/wangsvue-fats.es.js +0 -132389
package/plugins/i18n.d.ts
CHANGED
|
@@ -1,127 +1,103 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
|
-
import { LanguageOption } from '../components/languagedropdown/LanguageDropdown.vue.d';
|
|
3
2
|
import { App, Ref } from 'vue';
|
|
4
3
|
export type Locale = string;
|
|
4
|
+
export interface LanguageOption {
|
|
5
|
+
/**
|
|
6
|
+
* ISO 639-1 language code (e.g., "en" for English, "fr" for French).
|
|
7
|
+
*/
|
|
8
|
+
isoCode?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The name of the language in English (e.g., "English", "Français").
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* The URL of the country's flag image.
|
|
15
|
+
* Flags are sourced from https://flagcdn.com and are typically in SVG format for high-quality resolution.
|
|
16
|
+
*/
|
|
17
|
+
flag?: string;
|
|
18
|
+
}
|
|
5
19
|
export interface I18n {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Locale message translation
|
|
22
|
+
*
|
|
23
|
+
* @param key - The translation key
|
|
24
|
+
* @param params - A values of named interpolation
|
|
25
|
+
* @param args - Positional interpolation values
|
|
26
|
+
*
|
|
27
|
+
* @returns translation message
|
|
28
|
+
* @example `t('Hello {user}!', { user: 'John Doe' })` - returns: 'Hello John Doe!'
|
|
29
|
+
* @example `t('Hello %s! I am %s.', "John Doe", "Peter Smith")` - returns: 'Hello John Doe! I am Peter Smith.'
|
|
30
|
+
*/
|
|
31
|
+
t: {
|
|
32
|
+
(key: string, params: Record<string, any>): string;
|
|
33
|
+
(key: string, ...args: (string | number | boolean)[]): string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Change the locale dynamically
|
|
37
|
+
*
|
|
38
|
+
* @param newLocale - The locale to switch to
|
|
39
|
+
*/
|
|
40
|
+
setLocale: (newLocale: Locale) => Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Get the current locale
|
|
43
|
+
*
|
|
44
|
+
* @returns Current locale
|
|
45
|
+
*/
|
|
46
|
+
locale: Ref<Locale>;
|
|
47
|
+
/**
|
|
48
|
+
* Service methods handle fetch requests
|
|
49
|
+
*/
|
|
50
|
+
service?: I18nService;
|
|
37
51
|
}
|
|
38
52
|
type MessageMap = Record<string, string>;
|
|
39
53
|
export interface I18nService {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
translations: TranslateTextResponseTranslation[];
|
|
71
|
-
}
|
|
72
|
-
export interface TranslateTextResponseTranslation {
|
|
73
|
-
translatedText: string;
|
|
74
|
-
}
|
|
75
|
-
export interface GoogleTranslationResponse {
|
|
76
|
-
data: TranslateTextResponseList;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Query parameters for making a request to the Google Cloud Translate API v2.
|
|
80
|
-
* Reference: https://cloud.google.com/translate/docs/reference/rest/v2/translate
|
|
81
|
-
*/
|
|
82
|
-
export interface GoogleTranslateRequestQueryParams {
|
|
83
|
-
/**
|
|
84
|
-
* The input text to translate.
|
|
85
|
-
* Can be a single string or an array of strings (up to 128 items).
|
|
86
|
-
* Example: "Hello world" or ["Hello", "How are you?"]
|
|
87
|
-
*/
|
|
88
|
-
q: string | string[];
|
|
89
|
-
/**
|
|
90
|
-
* The target language code to translate the input text into.
|
|
91
|
-
* Must be a supported language code from:
|
|
92
|
-
* https://cloud.google.com/translate/docs/languages
|
|
93
|
-
* Example: "id" for Indonesian, "es" for Spanish.
|
|
94
|
-
*/
|
|
95
|
-
target: string;
|
|
96
|
-
/**
|
|
97
|
-
* (Optional) The format of the source text.
|
|
98
|
-
* Use `"text"` for plain text or `"html"` if the source contains HTML tags.
|
|
99
|
-
* Default is `"html"`.
|
|
100
|
-
*/
|
|
101
|
-
format?: 'html' | 'text';
|
|
102
|
-
/**
|
|
103
|
-
* (Optional) The source language code of the input text.
|
|
104
|
-
* If omitted, the API will automatically detect the source language.
|
|
105
|
-
* Supported language codes: https://cloud.google.com/translate/docs/languages
|
|
106
|
-
* Example: "en" for English.
|
|
107
|
-
*/
|
|
108
|
-
source?: string;
|
|
109
|
-
/**
|
|
110
|
-
* A valid API key for authenticating the request.
|
|
111
|
-
* You can generate and manage API keys in the Google Cloud Console:
|
|
112
|
-
* https://console.cloud.google.com/apis/credentials
|
|
113
|
-
*/
|
|
114
|
-
key: string;
|
|
54
|
+
/**
|
|
55
|
+
* Fetch all translation messages for a specific locale.
|
|
56
|
+
* @param locale The locale code (e.g., 'en', 'id').
|
|
57
|
+
* @returns A promise resolving to a key-value record of messages.
|
|
58
|
+
*/
|
|
59
|
+
getMessages(locale: string): Promise<
|
|
60
|
+
AxiosResponse<{
|
|
61
|
+
data: MessageMap;
|
|
62
|
+
}>
|
|
63
|
+
>;
|
|
64
|
+
/**
|
|
65
|
+
* Fetch all available lang options for LanguageDropdown and LanguageSwitcher
|
|
66
|
+
*
|
|
67
|
+
* @returns Promise Array of options
|
|
68
|
+
*/
|
|
69
|
+
getLanguageOptions(): Promise<LanguageOption[]>;
|
|
70
|
+
/**
|
|
71
|
+
* Fetch single lang option meta data
|
|
72
|
+
*
|
|
73
|
+
* @param locale The locale code (e.g., 'en', 'id').
|
|
74
|
+
* @returns Promise LanguageMeta
|
|
75
|
+
*/
|
|
76
|
+
getLanguageOptionMeta(locale: string): Promise<LanguageOption>;
|
|
77
|
+
/**
|
|
78
|
+
* Translate a specific text to the target locale.
|
|
79
|
+
* @param key Unique translation key.
|
|
80
|
+
* @param locale Target locale code.
|
|
81
|
+
* @returns A promise resolving to the translated string.
|
|
82
|
+
*/
|
|
83
|
+
translateText(key: string, locale: string): Promise<string>;
|
|
115
84
|
}
|
|
116
85
|
export declare const useI18n: () => I18n;
|
|
117
86
|
declare const i18n: {
|
|
118
|
-
|
|
87
|
+
install: (app: App) => void;
|
|
119
88
|
};
|
|
120
|
-
export declare const createI18nWithExtension: (
|
|
89
|
+
export declare const createI18nWithExtension: (
|
|
90
|
+
service: I18nService,
|
|
91
|
+
) => typeof i18n;
|
|
121
92
|
export default i18n;
|
|
122
93
|
declare module 'vue' {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
94
|
+
interface ComponentCustomProperties {
|
|
95
|
+
$i18n: I18n;
|
|
96
|
+
$t: I18n['t'];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
declare global {
|
|
100
|
+
interface Window {
|
|
101
|
+
i18n: I18n;
|
|
102
|
+
}
|
|
127
103
|
}
|