@fewangsit/wangsvue 1.5.216-alpha.0 → 1.5.217-alpha.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/components/animation/Animation.vue.d.ts +9 -1
- package/components/badge/Badge.vue.d.ts +1 -1
- package/components/badgegroup/BadgeGroup.vue.d.ts +3 -1
- package/components/basetree/BaseTree.vue.d.ts +7 -2
- package/components/button/Button.vue.d.ts +4 -3
- package/components/buttonImportExcel/ButtonImportExcel.vue.d.ts +1 -1
- package/components/buttonbulkaction/ButtonBulkAction.vue.d.ts +1 -0
- package/components/buttondownload/ButtonDownload.vue.d.ts +31 -0
- package/components/buttonradio/ButtonRadio.vue.d.ts +2 -1
- package/components/buttonscan/ButtonScan.vue.d.ts +3 -2
- package/components/buttonsearchbyscan/ButtonSearchByScan.vue.d.ts +2 -0
- package/components/buttonselecttree/ButtonSelectTree.vue.d.ts +11 -1
- package/components/buttonsplit/ButtonSplit.vue.d.ts +10 -7
- package/components/buttonsync/ButtonSync.vue.d.ts +1 -1
- package/components/buttontoggle/ButtonToggle.vue.d.ts +1 -0
- package/components/card/Card.vue.d.ts +2 -1
- package/components/changelog/Changelog.vue.d.ts +7 -5
- package/components/changelogpage/ChangelogPage.vue.d.ts +10 -3
- package/components/checkbox/Checkbox.vue.d.ts +2 -1
- package/components/comment/Comment.vue.d.ts +3 -4
- package/components/customcolumn/CustomColumn.vue.d.ts +1 -1
- package/components/datatable/DataTable.vue.d.ts +14 -4
- package/components/detailmember/DetailMember.vue.d.ts +2 -2
- package/components/detailsprint/DetailSprint.vue.d.ts +2 -2
- package/components/detailsprint/helpers/updateSprintStatus.util.d.ts +7 -2
- package/components/detailsprint/options/quickFilterFields.d.ts +5 -2
- package/components/dialog/Dialog.vue.d.ts +1 -1
- package/components/{dialogAdjustmentTask → dialogadjustmenttask}/DialogAdjustmentTask.vue.d.ts +5 -5
- package/components/dialogadjustmenttask/options/dialogAdjustmentTaskBulkAction.d.ts +7 -0
- package/components/dialogadjustmenttask/options/dialogAdjustmentTaskSingleAction.d.ts +7 -0
- package/components/dialogadjustmenttask/options/dialogAdjustmentTaskTableColumn.d.ts +2 -0
- package/components/dialogconfirm/DialogConfirm.vue.d.ts +3 -2
- package/components/dialogdetailcomponent/DialogDetailComponent.vue.d.ts +1 -1
- package/components/dialogdetailpbi/DialogDetailPbi.vue.d.ts +3 -3
- package/components/dialogform/DialogForm.vue.d.ts +1 -1
- package/components/dialogimprovementtask/DialogImprovementTask.vue.d.ts +1 -2
- package/components/{detailsprint → dialogpreparepbi}/DialogPreparePbi.vue.d.ts +2 -2
- package/components/dialogselecttree/DialogSelectTree.vue.d.ts +14 -3
- package/components/dropdown/Dropdown.vue.d.ts +22 -3
- package/components/editor/Editor.vue.d.ts +2 -1
- package/components/fieldwrapper/FieldWrapper.vue.d.ts +19 -2
- package/components/fileupload/FileUpload.vue.d.ts +2 -1
- package/components/filtercontainer/FilterContainer.vue.d.ts +103 -67
- package/components/form/Form.vue.d.ts +5 -2
- package/components/icon/Icon.vue.d.ts +4 -1
- package/components/image/Image.vue.d.ts +9 -1
- package/components/imagecompressor/ImageCompressor.vue.d.ts +9 -1
- package/components/index.d.ts +32 -30
- package/components/inlinemessage/InlineMessage.vue.d.ts +1 -1
- package/components/inputbadge/InputBadge.vue.d.ts +1 -1
- package/components/inputcurrency/InputCurrency.vue.d.ts +1 -1
- package/components/inputcurrency/helpers/currency.helper.d.ts +5 -1
- package/components/inputemail/InputEmail.vue.d.ts +1 -0
- package/components/inputinitialname/InputInitialName.vue.d.ts +1 -2
- package/components/inputnumber/InputNumber.vue.d.ts +6 -0
- package/components/inputpassword/InputPassword.vue.d.ts +1 -0
- package/components/inputrangenumber/InputRangeNumber.vue.d.ts +1 -0
- package/components/inputrepositoryname/InputRepositoryName.vue.d.ts +2 -3
- 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 +1 -1
- package/components/languagedropdown/LanguageDropdown.vue.d.ts +3 -2
- package/components/litedropdown/LiteDropdown.vue.d.ts +4 -2
- package/components/loading/store/loading.store.d.ts +3 -3
- package/components/menu/Menu.vue.d.ts +3 -2
- package/components/multiselect/MultiSelect.vue.d.ts +3 -2
- package/components/notificationitem/NotificationItem.vue.d.ts +4 -3
- package/components/notificationitem/helpers/goToDetail.helper.d.ts +13 -4
- package/components/overlaypanel/OverlayPanel.vue.d.ts +2 -1
- package/components/paginator/Paginator.vue.d.ts +285 -0
- package/components/progressbar/ProgressBar.vue.d.ts +2 -1
- package/components/quickfilter/QuickFilter.vue.d.ts +2 -1
- package/components/summaryaccordion/SummaryAccordion.vue.d.ts +3 -3
- package/components/tabmenu/TabMenu.vue.d.ts +7 -191
- package/components/taskdetail/TaskDetail.vue.d.ts +4 -2
- package/components/taskdetail/blocks/sections/API/TestApi/options/keyValueTableColumn.d.ts +1 -1
- package/components/{dialogdetailpbi → taskdetailpbi}/TaskDetailPbi.vue.d.ts +3 -3
- package/components/taskdetailpbi/options/memberFilterFields.d.ts +7 -0
- package/components/taskdetailpbi/options/taskQuickFilterFields.d.ts +6 -0
- package/components/tasktable/TaskTable.vue.d.ts +2 -2
- package/components/textarea/Textarea.vue.d.ts +2 -1
- package/components/timeline/Timeline.vue.d.ts +22 -3
- package/components/toast/Toast.vue.d.ts +3 -2
- package/components/toggleswitch/ToggleSwitch.vue.d.ts +2 -1
- package/components/tree/Tree.vue.d.ts +9 -3
- package/components/ts-helpers.d.ts +8 -0
- package/components/usergroup/UserGroup.vue.d.ts +1 -1
- package/components/username/UserName.vue.d.ts +9 -4
- package/components/workcalendar/WorkCalendar.vue.d.ts +0 -1
- 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/dto/member.dto.d.ts +52 -52
- package/dto/task.dto.d.ts +65 -65
- package/dto/taskApi.dto.d.ts +15 -15
- package/dto/taskAttachment.dto.d.ts +5 -5
- package/dto/taskChecklist.dto.d.ts +23 -23
- package/dto/taskDependency.dto.d.ts +4 -4
- package/event-bus/index.d.ts +59 -56
- package/event-bus/mitt.d.ts +29 -14
- package/main.d.ts +30 -2
- package/no-data-CTKux8RI.js +4 -0
- package/no-data-Dep79CBh.js +1 -0
- package/package.json +19 -8
- package/plugins/WangsVue.d.ts +276 -214
- package/plugins/formValidation.d.ts +16 -6
- package/services/calendar.service.d.ts +4 -4
- package/stats.html +4949 -0
- package/style.css +4 -2
- package/types/member.type.d.ts +68 -59
- package/types/project.type.d.ts +52 -52
- package/types/projectApproval.type.d.ts +1 -1
- package/types/projectModule.type.d.ts +4 -4
- package/types/projectProcess.type.d.ts +12 -12
- package/types/projectQc.type.d.ts +38 -38
- package/types/projectSubmodule.type.d.ts +8 -8
- package/types/queryParamsStringfy.type.d.ts +1 -1
- package/types/roleDetailAccess.type.d.ts +13 -13
- package/types/subModule.type.d.ts +2 -2
- package/types/task.type.d.ts +196 -196
- package/types/team.type.d.ts +2 -2
- package/types/ticket.type.d.ts +16 -9
- package/types/user.type.d.ts +15 -15
- package/types/wangsStatus.type.d.ts +40 -6
- package/utils/addAttachment.util.d.ts +28 -12
- package/utils/convertJsonImage.util.d.ts +4 -2
- package/utils/date.util.d.ts +64 -31
- package/utils/exportToExcel.util.d.ts +23 -16
- package/utils/genPlaceholder.util.d.ts +7 -2
- package/utils/getProjectPermission.util.d.ts +4 -1
- package/utils/getSalesRole.util.d.ts +26 -26
- package/utils/index.d.ts +17 -14
- package/utils/object.util.d.ts +14 -3
- package/utils/queryParamsStringfy.util.d.ts +4 -2
- package/utils/role.util.d.ts +5 -1
- package/utils/statusSeverity.util.d.ts +4 -2
- package/utils/toast.util.d.ts +78 -78
- package/utils/xlsx.util.d.ts +19 -0
- package/wangsvue.js +66286 -0
- package/wangsvue.system.js +73 -258
- package/assets/json/currencies.json.d.ts +0 -1068
- package/assets/json/emoji-by-group.json.d.ts +0 -15629
- 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 -13
- package/components/approverinfo/ApproverInfo.vue.d.ts +0 -51
- package/components/buttonscan/helpers/getErrorCode.helper.d.ts +0 -3
- package/components/buttonscan/helpers/index.d.ts +0 -1
- package/components/buttonscan/workers/scanner.worker.d.ts +0 -1
- package/components/calendar/BaseCalendar.vue.d.ts +0 -96
- package/components/calendar/Calendar.vue.d.ts +0 -597
- package/components/changelogpage/ChangelogFilter.vue.d.ts +0 -16
- package/components/comment/CommentBlock.vue.d.ts +0 -35
- 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/detailmember/DetailMemberAdmin.vue.d.ts +0 -18
- package/components/detailmember/DetailMemberLeader.vue.d.ts +0 -15
- package/components/detailmember/DetailMemberLog.vue.d.ts +0 -15
- package/components/detailmember/DialogMemberAdmin.vue.d.ts +0 -23
- package/components/detailsprint/DialogAddPbi.vue.d.ts +0 -24
- package/components/detailsprint/DialogConfirmSprint.vue.d.ts +0 -24
- package/components/detailsprint/SprintSummary.vue.d.ts +0 -15
- package/components/dialogAdjustmentTask/DialogAdjustmentTaskHeader.vue.d.ts +0 -27
- package/components/dialogAdjustmentTask/common/TaskDependency.vue.d.ts +0 -12
- package/components/dialogAdjustmentTask/common/TaskStatusBadge.vue.d.ts +0 -16
- package/components/dialogAdjustmentTask/options/dialogAdjustmentTaskBulkAction.d.ts +0 -3
- package/components/dialogAdjustmentTask/options/dialogAdjustmentTaskSingleAction.d.ts +0 -3
- package/components/dialogAdjustmentTask/options/dialogAdjustmentTaskTableColumn.d.ts +0 -2
- package/components/dialogdetailpbi/AssignMember.vue.d.ts +0 -30
- package/components/dialogdetailpbi/TaskDetailUnassignedPbi.vue.d.ts +0 -27
- package/components/dialogdetailpbi/options/memberFilterFields.d.ts +0 -2
- package/components/dialogdetailpbi/options/taskQuickFilterFields.d.ts +0 -3
- package/components/dialogreportbug/DialogReportBug.vue.d.ts +0 -25
- package/components/dialogreportbug/imageData.json.d.ts +0 -28
- 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/getOption.helper.d.ts +0 -3
- package/components/hardwaresync/HardwareSync.vue.d.ts +0 -30
- package/components/hardwaresync/store/device.store.d.ts +0 -36
- 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 -32
- 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/languageswitcher/LanguageSwitcher.vue.d.ts +0 -15
- 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/notificationitem/dialogs/ConfirmDeploy.vue.d.ts +0 -24
- package/components/tagtype/TagType.vue.d.ts +0 -21
- package/components/taskdetail/blocks/Tabs/DescriptionTab.vue.d.ts +0 -2
- package/components/taskdetail/blocks/Tabs/EventLogTab.vue.d.ts +0 -2
- package/components/taskdetail/blocks/Tabs/InfoTaskTab.vue.d.ts +0 -2
- package/components/taskdetail/blocks/Tabs/ReviewTab.vue.d.ts +0 -2
- package/components/taskdetail/blocks/common/AttachmentThumbnail.vue.d.ts +0 -18
- package/components/taskdetail/blocks/common/DialogAddAttachment.vue.d.ts +0 -32
- package/components/taskdetail/blocks/common/DialogAssignMember.vue.d.ts +0 -30
- package/components/taskdetail/blocks/common/DialogConfirmApproval.vue.d.ts +0 -26
- package/components/taskdetail/blocks/common/DialogConfirmDeleteTask.vue.d.ts +0 -28
- package/components/taskdetail/blocks/common/DialogConfirmEdit.vue.d.ts +0 -24
- package/components/taskdetail/blocks/common/DialogConfirmFinishTask.vue.d.ts +0 -24
- package/components/taskdetail/blocks/common/DialogPriorityValue.vue.d.ts +0 -21
- package/components/taskdetail/blocks/common/DialogSetDuration.vue.d.ts +0 -18
- package/components/taskdetail/blocks/common/InputAdditional.vue.d.ts +0 -30
- package/components/taskdetail/blocks/common/Legend.vue.d.ts +0 -79
- package/components/taskdetail/blocks/common/SonarQubeSummary.vue.d.ts +0 -17
- package/components/taskdetail/blocks/common/TaskMore.vue.d.ts +0 -16
- package/components/taskdetail/blocks/sections/API/API.vue.d.ts +0 -2
- package/components/taskdetail/blocks/sections/API/APIItem.vue.d.ts +0 -29
- package/components/taskdetail/blocks/sections/API/DialogAPIChangelog.vue.d.ts +0 -18
- package/components/taskdetail/blocks/sections/API/DialogAddEditApi.vue.d.ts +0 -25
- package/components/taskdetail/blocks/sections/API/DialogCopyApi.vue.d.ts +0 -22
- package/components/taskdetail/blocks/sections/API/DialogTestApi.vue.d.ts +0 -22
- package/components/taskdetail/blocks/sections/API/IsRequiredText.vue.d.ts +0 -15
- package/components/taskdetail/blocks/sections/API/ValueFormDataInput.vue.d.ts +0 -37
- package/components/taskdetail/blocks/sections/Attachment/Attachment.vue.d.ts +0 -2
- package/components/taskdetail/blocks/sections/Attachment/AttachmentChangelog.vue.d.ts +0 -18
- package/components/taskdetail/blocks/sections/Attachment/AttachmentItem.vue.d.ts +0 -65
- package/components/taskdetail/blocks/sections/Checklist/Checklist.vue.d.ts +0 -22
- package/components/taskdetail/blocks/sections/Checklist/ChecklistChangelog.vue.d.ts +0 -18
- package/components/taskdetail/blocks/sections/Checklist/DialogAddChecklist.vue.d.ts +0 -32
- package/components/taskdetail/blocks/sections/Checklist/DialogConfirmChecklist.vue.d.ts +0 -26
- package/components/taskdetail/blocks/sections/Checklist/DialogDetailChecklistTemplate.vue.d.ts +0 -18
- package/components/taskdetail/blocks/sections/Checklist/DialogSaveChecklistTemplate.vue.d.ts +0 -22
- package/components/taskdetail/blocks/sections/Description/Description.vue.d.ts +0 -2
- package/components/taskdetail/blocks/sections/Review/DialogFinishReview.vue.d.ts +0 -26
- package/components/taskdetail/blocks/sections/Review/DialogReviewLeader.vue.d.ts +0 -25
- package/components/taskdetail/blocks/sections/Review/ReviewItem.vue.d.ts +0 -16
- package/components/taskdetail/blocks/sections/TaskDependency/DialogCustomDependency.vue.d.ts +0 -20
- package/components/taskdetail/blocks/sections/TaskDependency/TaskDependency.vue.d.ts +0 -2
- package/components/taskdetail/blocks/sections/TaskLink/DialogSetTaskLink.vue.d.ts +0 -40
- package/components/taskdetail/blocks/sections/TaskLink/TaskLink.vue.d.ts +0 -2
- package/components/taskdetail/blocks/sections/TaskLink/TaskLinkChangelog.vue.d.ts +0 -22
- package/components/taskdetail/blocks/sections/TaskList/LegendList.vue.d.ts +0 -55
- package/components/taskdetail/blocks/sections/TaskList/TaskList.vue.d.ts +0 -15
- package/components/taskdetail/blocks/sections/Ticket/Ticket.vue.d.ts +0 -2
- package/components/tasktable/DependencyCol.vue.d.ts +0 -16
- package/components/tasktable/DialogConfirmDeleteTaskPermanently.vue.d.ts +0 -24
- package/components/tasktable/DialogConfirmRestoreTask.vue.d.ts +0 -24
- package/components/tasktable/DialogSelectProject.vue.d.ts +0 -20
- package/components/timeline/TimelineContentByType.vue.d.ts +0 -16
- package/components/tooltipspan/TooltipSpan.vue.d.ts +0 -20
- package/components/tree/helpers/filterNodeKeys.helper.d.ts +0 -16
- package/components/tree/helpers/flattenTreeNodeChildren.helper.d.ts +0 -6
- package/components/tree/helpers/index.d.ts +0 -3
- package/index.d.ts +0 -2
- package/plugins/i18n.d.ts +0 -94
- package/utils/filterOptions.util.d.ts +0 -3
- 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.es.js +0 -161460
|
@@ -1,15 +1,28 @@
|
|
|
1
|
-
export type FileType =
|
|
1
|
+
export type FileType =
|
|
2
|
+
| 'link'
|
|
3
|
+
| 'image'
|
|
4
|
+
| 'txt'
|
|
5
|
+
| 'doc'
|
|
6
|
+
| 'xls'
|
|
7
|
+
| 'pdf'
|
|
8
|
+
| 'csv'
|
|
9
|
+
| 'html'
|
|
10
|
+
| 'json'
|
|
11
|
+
| 'mp4'
|
|
12
|
+
| 'mkv'
|
|
13
|
+
| 'compressed'
|
|
14
|
+
| 'unknown';
|
|
2
15
|
export type FormattedFile = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
name: string;
|
|
17
|
+
type: string;
|
|
18
|
+
size: number;
|
|
19
|
+
webkitRelativePath: string;
|
|
20
|
+
fileType: FileType;
|
|
21
|
+
file: File;
|
|
22
|
+
imgPreviewURL?: string;
|
|
23
|
+
uploadProgress?: number;
|
|
24
|
+
controller?: AbortController;
|
|
25
|
+
isCanceled?: boolean;
|
|
13
26
|
};
|
|
14
27
|
/**
|
|
15
28
|
* Maps a mime type to a custom file type.
|
|
@@ -32,7 +45,10 @@ export declare const formatFile: (file: File) => FormattedFile;
|
|
|
32
45
|
* @param customFileSize The maximum size limit in megabytes. @default 1
|
|
33
46
|
* @returns True if the file is under the maximum size limit, false otherwise.
|
|
34
47
|
*/
|
|
35
|
-
export declare const validateFileSize: (
|
|
48
|
+
export declare const validateFileSize: (
|
|
49
|
+
file: File,
|
|
50
|
+
customFileSize?: number,
|
|
51
|
+
) => boolean;
|
|
36
52
|
/**
|
|
37
53
|
* Checks if a file has a valid type.
|
|
38
54
|
* Make sure user doesn't upload a folder.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { JSONContent } from '
|
|
2
|
-
declare const convertJsonImage: (
|
|
1
|
+
import { JSONContent } from '../components/editor/Editor.vue.d';
|
|
2
|
+
declare const convertJsonImage: (
|
|
3
|
+
content: JSONContent | JSONContent[],
|
|
4
|
+
) => JSONContent | JSONContent[];
|
|
3
5
|
export default convertJsonImage;
|
package/utils/date.util.d.ts
CHANGED
|
@@ -1,34 +1,64 @@
|
|
|
1
|
-
export type TDateFormat =
|
|
2
|
-
|
|
1
|
+
export type TDateFormat =
|
|
2
|
+
| 'd/m/yy'
|
|
3
|
+
| 'm/d/yy'
|
|
4
|
+
| 'd/mm/yy'
|
|
5
|
+
| 'dd/mm/yy'
|
|
6
|
+
| 'dd/mm/yyyy'
|
|
7
|
+
| 'dd M yy'
|
|
8
|
+
| 'dd M yyyy'
|
|
9
|
+
| 'dd MM yy'
|
|
10
|
+
| 'dd MM yyyy'
|
|
11
|
+
| 'D dd M yy'
|
|
12
|
+
| 'D dd M yyyy'
|
|
13
|
+
| 'DD dd MM yy'
|
|
14
|
+
| 'DD dd MM yyyy'
|
|
15
|
+
| 'D, dd M yy'
|
|
16
|
+
| 'D, dd M yyyy'
|
|
17
|
+
| 'DD, dd MM yy'
|
|
18
|
+
| 'DD, dd MM yyyy';
|
|
19
|
+
export type GoDateLayout =
|
|
20
|
+
| '02/01/06'
|
|
21
|
+
| '_2/_1/06'
|
|
22
|
+
| '_1/_2/06'
|
|
23
|
+
| '02 Jan 06'
|
|
24
|
+
| 'Mon, 02 Jan 06'
|
|
25
|
+
| 'Mon, 02 Jan 2006';
|
|
3
26
|
export type TTimeFormat = 'HH:mm' | 'HH:mm a' | 'HH:mm:ss' | 'HH:mm:ss a';
|
|
4
27
|
export type GoTimeLayout = '15:04' | '03:04 PM' | '15:04:05' | '03:04:05 PM';
|
|
5
|
-
export type CustomDateTimeFormatOptions = Omit<
|
|
6
|
-
|
|
7
|
-
|
|
28
|
+
export type CustomDateTimeFormatOptions = Omit<
|
|
29
|
+
Intl.DateTimeFormatOptions,
|
|
30
|
+
'timeZone'
|
|
31
|
+
> & {
|
|
32
|
+
timezone?: string;
|
|
33
|
+
locale?: string;
|
|
8
34
|
};
|
|
9
35
|
export type DateOptions = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
36
|
+
locale?: string;
|
|
37
|
+
dateFormat?: TDateFormat | GoDateLayout;
|
|
38
|
+
timeFormat?: TTimeFormat | GoTimeLayout;
|
|
39
|
+
timezone?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Show the time in the formatted date.
|
|
42
|
+
*
|
|
43
|
+
* @default true - when `timeFormat` is provided
|
|
44
|
+
*/
|
|
45
|
+
showTime?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Show the date in the formatted date.
|
|
48
|
+
*
|
|
49
|
+
* @default true
|
|
50
|
+
*/
|
|
51
|
+
showDate?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* This is old format (general settings), if configuration still using old settings then this option parameter can be used
|
|
54
|
+
*/
|
|
55
|
+
formatPreset?: CustomDateTimeFormatOptions;
|
|
30
56
|
};
|
|
31
|
-
export declare const formatDate: (
|
|
57
|
+
export declare const formatDate: (
|
|
58
|
+
date: Date,
|
|
59
|
+
options?: DateOptions,
|
|
60
|
+
useGeneralSettings?: boolean,
|
|
61
|
+
) => string;
|
|
32
62
|
export declare const formatISODate: (date: string | Date) => string;
|
|
33
63
|
/**
|
|
34
64
|
* Formats a date to human readable form (timeago / relative time from now).
|
|
@@ -37,10 +67,13 @@ export declare const formatISODate: (date: string | Date) => string;
|
|
|
37
67
|
* @param maxSeconds - Max value of seconds difference. Use it for formats a date according to the user's general settings.
|
|
38
68
|
* @returns The formatted date string.
|
|
39
69
|
*/
|
|
40
|
-
export declare const formatDateReadable: (
|
|
70
|
+
export declare const formatDateReadable: (
|
|
71
|
+
date: Date,
|
|
72
|
+
maxSeconds?: number,
|
|
73
|
+
) => string;
|
|
41
74
|
export declare const getRemainingTime: (deadline: string) => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
75
|
+
seconds: number;
|
|
76
|
+
days: number;
|
|
77
|
+
hours: number;
|
|
78
|
+
minutes: number;
|
|
46
79
|
};
|
|
@@ -1,20 +1,27 @@
|
|
|
1
|
+
import { ButtonDownloadLocaleConfig } from '../components/buttondownload/ButtonDownload.vue.d';
|
|
2
|
+
import {
|
|
3
|
+
Data,
|
|
4
|
+
DataTableLocaleConfig,
|
|
5
|
+
TableColumn,
|
|
6
|
+
} from '../components/datatable/DataTable.vue.d';
|
|
7
|
+
import { LocaleConfig } from '../plugins/WangsVue';
|
|
1
8
|
export interface ITable {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
9
|
+
headers: string[];
|
|
10
|
+
data: Record<string, unknown>[];
|
|
11
|
+
tableName?: string;
|
|
12
|
+
tableTitle?: string;
|
|
6
13
|
}
|
|
7
14
|
interface IExcelOptions {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
15
|
+
tables: ITable[];
|
|
16
|
+
fileName: string;
|
|
17
|
+
additionalTexts?: (string | string[])[];
|
|
11
18
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export
|
|
19
|
+
export declare const exportToExcel: (options: IExcelOptions) => Promise<void>;
|
|
20
|
+
export declare const normalizeTableData: (
|
|
21
|
+
data?: Data[],
|
|
22
|
+
includedColumns?: TableColumn[],
|
|
23
|
+
locale?: (DataTableLocaleConfig | ButtonDownloadLocaleConfig) & {
|
|
24
|
+
global: LocaleConfig['global'];
|
|
25
|
+
},
|
|
26
|
+
) => Record<string, unknown>[];
|
|
27
|
+
export {};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export declare const genRandomPlaceholderBg: () => string;
|
|
2
|
-
export declare const genPlaceholder: (
|
|
2
|
+
export declare const genPlaceholder: (
|
|
3
|
+
text: string,
|
|
4
|
+
size: 30 | 125,
|
|
5
|
+
bgColor?: string,
|
|
6
|
+
fontOptions?: {
|
|
3
7
|
font?: string;
|
|
4
8
|
fontWeight?: string;
|
|
5
9
|
fontSize?: number;
|
|
6
10
|
fontColor?: string;
|
|
7
|
-
}
|
|
11
|
+
},
|
|
12
|
+
) => HTMLCanvasElement;
|
|
8
13
|
export default genPlaceholder;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Project, Teams } from '../types/project.type';
|
|
2
2
|
import { RoleMemberPermission } from '../types/roleDetailAccess.type';
|
|
3
|
-
declare const getProjectPermission: (
|
|
3
|
+
declare const getProjectPermission: (
|
|
4
|
+
project?: Project,
|
|
5
|
+
leaders?: Teams[],
|
|
6
|
+
) => RoleMemberPermission;
|
|
4
7
|
export default getProjectPermission;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
export type SalesRole = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
sales: boolean;
|
|
3
|
+
seniorSales: boolean;
|
|
4
|
+
admin: boolean;
|
|
5
|
+
elsa: boolean;
|
|
6
|
+
licenseTrial: boolean;
|
|
7
|
+
incentive: boolean;
|
|
8
|
+
priceInformation: boolean;
|
|
9
|
+
referenceNumber: boolean;
|
|
10
|
+
manageDistributor: boolean;
|
|
11
|
+
managePartner: boolean;
|
|
12
|
+
manageProduct: boolean;
|
|
13
|
+
settingsUser: boolean;
|
|
14
|
+
settingsApproval: boolean;
|
|
15
|
+
settingsRole: boolean;
|
|
16
|
+
settingsExpiredTime: boolean;
|
|
17
|
+
settingsPPN: boolean;
|
|
18
|
+
settingsCustomField: boolean;
|
|
19
|
+
settingsTermAndCondition: boolean;
|
|
20
|
+
approvalProduct: boolean;
|
|
21
|
+
approvalLicenseTrial: boolean;
|
|
22
|
+
approvalSPRF: boolean;
|
|
23
|
+
approvalQuotation: boolean;
|
|
24
|
+
approvalBillingForm: boolean;
|
|
25
|
+
approvalCashback: boolean;
|
|
26
|
+
approvalElsa: boolean;
|
|
27
|
+
approvalQRF: boolean;
|
|
28
28
|
};
|
|
29
29
|
declare const getSalesRole: () => SalesRole;
|
|
30
30
|
export default getSalesRole;
|
package/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export type * from '../utils/toast.util';
|
|
2
|
+
export type * from '../utils/date.util';
|
|
3
|
+
export type * from '../utils/addAttachment.util';
|
|
2
4
|
export { queryParamsStringfy } from './queryParamsStringfy.util';
|
|
5
|
+
export { getNestedPropertyValue } from '../utils/object.util';
|
|
6
|
+
export {
|
|
7
|
+
formatDate,
|
|
8
|
+
formatISODate,
|
|
9
|
+
formatDateReadable,
|
|
10
|
+
} from '../utils/date.util';
|
|
11
|
+
export { checkRouteAccess } from '../utils/role.util';
|
|
12
|
+
export { exportToExcel } from '../utils/exportToExcel.util';
|
|
13
|
+
export {
|
|
14
|
+
formatFile,
|
|
15
|
+
getFileType,
|
|
16
|
+
validateFileSize,
|
|
17
|
+
validateFileType,
|
|
18
|
+
} from '../utils/addAttachment.util';
|
|
3
19
|
export { default as getSalesRole } from './getSalesRole.util';
|
|
4
20
|
export { default as getStatusSeverity } from './statusSeverity.util';
|
|
5
21
|
export { default as getUser } from './getUser.util';
|
|
@@ -8,16 +24,3 @@ export { default as getProjectPermission } from './getProjectPermission.util';
|
|
|
8
24
|
export { default as isIntersect } from './isIntersect';
|
|
9
25
|
export { default as convertJsonImage } from './convertJsonImage.util';
|
|
10
26
|
export { default as useToast } from './toast.util';
|
|
11
|
-
export * from './addAttachment.util';
|
|
12
|
-
export * from './object.util';
|
|
13
|
-
export * from './date.util';
|
|
14
|
-
export type { ToastParams, ToastMethod, UseToastConfig } from './toast.util';
|
|
15
|
-
export type { ITable } from './exportToExcel.util';
|
|
16
|
-
export { default as exportToExcel } from './exportToExcel.util';
|
|
17
|
-
export { default as useToast } from './toast.util';
|
|
18
|
-
export { default as getAttachmentIcon } from './getAttachmentIcon.util';
|
|
19
|
-
export { default as filterOptions } from './filterOptions.util';
|
|
20
|
-
export { default as mergePropsWithDefaults } from './mergePropsWithDefaults.util';
|
|
21
|
-
export { formatUserName, getInititalName } from './textFormatter.util';
|
|
22
|
-
export { genPlaceholder } from './genPlaceholder.util';
|
|
23
|
-
export { checkRouteAccess } from './role.util';
|
package/utils/object.util.d.ts
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Utility function to get nested property value.
|
|
3
3
|
*/
|
|
4
|
-
export declare const getNestedPropertyValue: (
|
|
4
|
+
export declare const getNestedPropertyValue: (
|
|
5
|
+
obj: Record<string, any>,
|
|
6
|
+
path: string,
|
|
7
|
+
) => any;
|
|
5
8
|
/**
|
|
6
9
|
* Utility function to set nested property value.
|
|
7
10
|
*/
|
|
8
|
-
export declare const setNestedPropertyValue: (
|
|
11
|
+
export declare const setNestedPropertyValue: (
|
|
12
|
+
obj: Record<string, any>,
|
|
13
|
+
path: string,
|
|
14
|
+
value: any,
|
|
15
|
+
) => void;
|
|
9
16
|
export declare const isEmptyObject: (obj: object) => boolean;
|
|
10
17
|
export declare const deepEquals: (a: object, b: object) => boolean;
|
|
11
|
-
export declare const equals: (
|
|
18
|
+
export declare const equals: (
|
|
19
|
+
obj1: object,
|
|
20
|
+
obj2: object,
|
|
21
|
+
field?: string,
|
|
22
|
+
) => boolean;
|
|
12
23
|
export declare const resolveFieldData: (data: object, field?: string) => object;
|
|
13
24
|
export declare const contains: (value: object, list: object[]) => boolean;
|
|
14
25
|
export declare const isNotEmpty: (value: object) => boolean;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { QueryParams } from '
|
|
1
|
+
import { QueryParams } from '../components/datatable/DataTable.vue.d';
|
|
2
2
|
import { QueryParamsStringfy } from '../types/queryParamsStringfy.type';
|
|
3
3
|
/**
|
|
4
4
|
* This Function will turn all array query params to string
|
|
5
5
|
* using JSON Stringfy
|
|
6
6
|
*/
|
|
7
|
-
export declare const queryParamsStringfy: (
|
|
7
|
+
export declare const queryParamsStringfy: (
|
|
8
|
+
data: QueryParams | undefined,
|
|
9
|
+
) => QueryParamsStringfy | undefined;
|
package/utils/role.util.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { NavigationGuardNext, RouteLocationNormalized } from 'vue-router';
|
|
2
|
-
export declare const checkRouteAccess: (
|
|
2
|
+
export declare const checkRouteAccess: (
|
|
3
|
+
to: RouteLocationNormalized,
|
|
4
|
+
from: RouteLocationNormalized,
|
|
5
|
+
next: NavigationGuardNext,
|
|
6
|
+
) => void;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { BadgeProps } from '
|
|
1
|
+
import { BadgeProps } from '../components/badge/Badge.vue.d';
|
|
2
2
|
import { WangsitStatus } from '../types/wangsStatus.type';
|
|
3
|
-
export default function getStatusSeverity(
|
|
3
|
+
export default function getStatusSeverity(
|
|
4
|
+
status: WangsitStatus,
|
|
5
|
+
): BadgeProps['severity'];
|
package/utils/toast.util.d.ts
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
1
|
import { WangsIcons } from '../components/icon/Icon.vue.d';
|
|
2
2
|
export type ToastSeverity = 'success' | 'error' | 'info';
|
|
3
3
|
export interface ToastParams {
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
4
|
+
/**
|
|
5
|
+
* The main message to display in the toast. Will be formatted based on template message.
|
|
6
|
+
*/
|
|
7
|
+
message: string;
|
|
8
|
+
/**
|
|
9
|
+
* Indicates whether the message is customized and does not follow the default message template.
|
|
10
|
+
* If true, custom formatting will be applied.
|
|
11
|
+
*/
|
|
12
|
+
customMessage?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The severity level of the toast message.
|
|
15
|
+
* Can be 'success', 'error', or 'info'.
|
|
16
|
+
*/
|
|
17
|
+
severity?: ToastSeverity;
|
|
18
|
+
/**
|
|
19
|
+
* The icon to display in the toast.
|
|
20
|
+
*/
|
|
21
|
+
icon?: WangsIcons;
|
|
22
|
+
/**
|
|
23
|
+
* The custom CSS class to apply to the icon.
|
|
24
|
+
*/
|
|
25
|
+
iconClass?: any;
|
|
26
|
+
/**
|
|
27
|
+
* The error object from a catch statement, used to provide additional details for error toasts.
|
|
28
|
+
* Accepts any type of error object.
|
|
29
|
+
*/
|
|
30
|
+
error?: unknown;
|
|
31
|
+
/**
|
|
32
|
+
* The duration for which the toast will be displayed, in milliseconds.
|
|
33
|
+
* Set to 0 to show the message infinitely.
|
|
34
|
+
*
|
|
35
|
+
* @default 3000 - 3 seconds
|
|
36
|
+
*/
|
|
37
|
+
life?: number;
|
|
38
|
+
/**
|
|
39
|
+
* The name of the message group to which this toast belongs.
|
|
40
|
+
*/
|
|
41
|
+
group?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Unique identifier of the toast message.
|
|
44
|
+
*/
|
|
45
|
+
messageId?: string;
|
|
46
46
|
}
|
|
47
47
|
export interface ToastMethod {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
add(params: ToastParams): void;
|
|
49
|
+
/**
|
|
50
|
+
* Clears the messages that belongs to the group.
|
|
51
|
+
* @param {string} group - Name of the message group.
|
|
52
|
+
*/
|
|
53
|
+
removeGroup(group: string): void;
|
|
54
|
+
removeAllGroups(): void;
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Configuration options for the `useToast` hook.
|
|
58
58
|
*/
|
|
59
59
|
export interface UseToastConfig {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Default message templates for each severity level.
|
|
62
|
+
* Keys represent the severity, and values are the template strings.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* {
|
|
66
|
+
* severity: {
|
|
67
|
+
* success: 'Success, {message}',
|
|
68
|
+
* error: 'Error, {message} {additionalMessage}',
|
|
69
|
+
* info: 'Info, {message} {additionalMessage}',
|
|
70
|
+
* },
|
|
71
|
+
* additionalMessage: ' Silahkan cek kembali koneksi Anda.'
|
|
72
|
+
* }
|
|
73
|
+
*/
|
|
74
|
+
template?: {
|
|
75
|
+
severity?: Record<string, string>;
|
|
76
|
+
additionalMessage?: string;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Icons for each severity level.
|
|
80
|
+
* Keys represent the severity, and values are the corresponding icon identifiers.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* {
|
|
84
|
+
* success: 'emotion-happy-fill',
|
|
85
|
+
* error: 'emotion-unhappy-fill',
|
|
86
|
+
* }
|
|
87
|
+
*/
|
|
88
|
+
icons?: Record<string, WangsIcons>;
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
91
|
* Hook to create and manage toast notifications.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as XLSX from 'xlsx/types/index';
|
|
2
|
+
/**
|
|
3
|
+
* Dynamically loads SheetJS (XLSX) from a CDN to avoid bundling its large package size.
|
|
4
|
+
*
|
|
5
|
+
* SheetJS is a powerful but heavy library (~700KB+ uncompressed). To improve bundle performance and reduce initial
|
|
6
|
+
* JavaScript payload, we load it only when needed (on demand), directly from a CDN.
|
|
7
|
+
*
|
|
8
|
+
* The official CDN build is a UMD module that exposes the `XLSX` object on the global `window`.
|
|
9
|
+
* This function ensures it's loaded once and cached for subsequent use.
|
|
10
|
+
*
|
|
11
|
+
* @returns {Promise<XLSXType>} A promise that resolves with the XLSX object once the script is loaded.
|
|
12
|
+
*/
|
|
13
|
+
declare const loadSheetJSFromCDN: () => Promise<typeof XLSX>;
|
|
14
|
+
export default loadSheetJSFromCDN;
|
|
15
|
+
declare global {
|
|
16
|
+
interface Window {
|
|
17
|
+
XLSX: typeof XLSX;
|
|
18
|
+
}
|
|
19
|
+
}
|