@webitel/ui-sdk 26.6.96 → 26.6.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{components-Bim818Xf.js → components-CSWXogKF.js} +3 -3
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +382 -382
- package/dist/{wt-chat-emoji-CX65m8Dd.js → wt-chat-emoji-Zfe96hoz.js} +1 -1
- package/dist/{wt-datepicker-BP9bBbGY.js → wt-datepicker-BtjegGDk.js} +174 -91
- package/dist/{wt-display-chip-items-tL17x2-U.js → wt-display-chip-items-YauywYzZ.js} +1 -1
- package/dist/{wt-send-message-popup-8TZWTO40.js → wt-send-message-popup-DV1i1Q52.js} +1 -1
- package/dist/{wt-type-extension-value-input-D1wNUHkh.js → wt-type-extension-value-input-CpYbzjDU.js} +1 -1
- package/dist/{wt-vidstack-player-Z3cdtFBu.js → wt-vidstack-player-CC6dwrnv.js} +1 -1
- package/package.json +1 -1
- package/src/components/wt-datepicker/_internals/composables/useAutoSeparator.ts +96 -0
- package/src/components/wt-datepicker/_internals/composables/useDatepicker.ts +78 -0
- package/src/components/wt-datepicker/_internals/composables/usePreventZeroPad.ts +10 -24
- package/src/components/wt-datepicker/_internals/composables/useStrictInput.ts +61 -0
- package/src/components/wt-datepicker/wt-datepicker.vue +4 -8
- package/src/composables/useEventBus/useEventBus.d.ts +4 -4
- package/src/enums/BroadcastChannelName/BroadcastChannelName.d.ts +3 -2
- package/src/enums/BroadcastChannelName/UserSettingsBroadcastMessage.d.ts +7 -7
- package/src/enums/ButtonColor/ButtonColor.d.ts +8 -8
- package/src/enums/ButtonVariant/ButtonVariant.d.ts +3 -3
- package/src/enums/ChipColor/ChipColor.d.ts +8 -8
- package/src/enums/ComponentSize/ComponentSize.d.ts +14 -14
- package/src/enums/ConnectionQualityLevel/ConnectionQualityLevel.enum.d.ts +5 -4
- package/src/enums/CrudAction/CrudAction.d.ts +4 -4
- package/src/enums/DefaultWorkspaceTabSettings/DefaultWorkspaceTabSettings.d.ts +8 -7
- package/src/enums/EmptyCause/EmptyCause.d.ts +3 -3
- package/src/enums/FormatDateMode/FormatDateMode.d.ts +7 -6
- package/src/enums/IconColor/IconColor.d.ts +14 -14
- package/src/enums/LoginOptions/LoginOptions.d.ts +3 -3
- package/src/enums/MessageColor/MessageColor.d.ts +6 -6
- package/src/enums/MessageVariant/MessageVariant.d.ts +3 -3
- package/src/enums/MimeTypes/MimeTypes.enum.d.ts +14 -14
- package/src/enums/ProcessingTableColumnType/ProcessingTableColumnType.d.ts +7 -6
- package/src/enums/QueueType/QueueType.enum.d.ts +22 -22
- package/src/enums/RelativeDatetimeValue/RelativeDatetimeValue.d.ts +6 -5
- package/src/enums/RingtoneType/RingtoneType.d.ts +3 -3
- package/src/enums/SingleSignOnProvider/SingleSignOnProvider.d.ts +6 -5
- package/src/enums/SingleSignOnProviderIconMappings/SingleSignOnProviderIconMappings.d.ts +6 -2
- package/src/enums/WebitelApplications/AdminSections.d.ts +38 -38
- package/src/enums/WebitelApplications/AuditorSections.d.ts +3 -2
- package/src/enums/WebitelApplications/CrmSections.d.ts +13 -13
- package/src/enums/WebitelApplications/SupervisorSections.d.ts +5 -4
- package/src/enums/WebitelApplications/WfmSections.d.ts +3 -3
- package/src/enums/WebitelApplications/WtApplication.d.ts +9 -9
- package/src/enums/WtObject/WtObject.d.ts +57 -57
- package/src/enums/WtTypeExtensionFieldKind/WtTypeExtensionFieldKind.d.ts +8 -7
- package/src/enums/index.d.ts +54 -4
- package/src/modules/Userinfo/constants/UserSettingsConstants.d.ts +1 -1
- package/src/utils/displayText.d.ts +1 -1
- package/src/utils/formatDate.d.ts +9 -3
- package/types/components/wt-datepicker/_internals/composables/useAutoSeparator.d.ts +17 -0
- package/types/components/wt-datepicker/_internals/composables/useDatepicker.d.ts +19 -0
- package/types/components/wt-datepicker/_internals/composables/usePreventZeroPad.d.ts +9 -5
- package/types/components/wt-datepicker/_internals/composables/useStrictInput.d.ts +17 -0
|
@@ -4,43 +4,43 @@
|
|
|
4
4
|
* without any relation to WtObjects (?)
|
|
5
5
|
*/
|
|
6
6
|
export declare const AdminSections: {
|
|
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
|
-
|
|
7
|
+
readonly Agents: 'agents';
|
|
8
|
+
readonly Blacklist: 'blacklist';
|
|
9
|
+
readonly Buckets: 'buckets';
|
|
10
|
+
readonly Calendars: 'calendars';
|
|
11
|
+
readonly Changelogs: 'changelogs';
|
|
12
|
+
readonly ChatGateways: 'chat-gateways';
|
|
13
|
+
readonly Chatplan: 'chatplan';
|
|
14
|
+
readonly CognitiveProfiles: 'cognitive-profiles';
|
|
15
|
+
readonly Communications: 'communications';
|
|
16
|
+
readonly Configuration: 'configuration';
|
|
17
|
+
readonly Dialplan: 'dialplan';
|
|
18
|
+
readonly Devices: 'devices';
|
|
19
|
+
readonly EmailProfiles: 'email-profiles';
|
|
20
|
+
readonly Flow: 'flow';
|
|
21
|
+
readonly Gateways: 'gateways';
|
|
22
|
+
readonly GlobalVariables: 'global-variables';
|
|
23
|
+
readonly ImportCsv: 'import-csv';
|
|
24
|
+
readonly License: 'license';
|
|
25
|
+
readonly Media: 'media';
|
|
26
|
+
readonly Members: 'members';
|
|
27
|
+
readonly Objects: 'objects';
|
|
28
|
+
readonly PauseCause: 'pause-cause';
|
|
29
|
+
readonly PauseTemplates: 'pause-templates';
|
|
30
|
+
readonly Queues: 'queues';
|
|
31
|
+
readonly Regions: 'regions';
|
|
32
|
+
readonly ResourceGroups: 'resource-groups';
|
|
33
|
+
readonly Resources: 'resources';
|
|
34
|
+
readonly Roles: 'roles';
|
|
35
|
+
readonly ShiftTemplates: 'shift-templates';
|
|
36
|
+
readonly SingleSignOn: 'single-sign-on';
|
|
37
|
+
readonly Skills: 'skills';
|
|
38
|
+
readonly Storage: 'storage';
|
|
39
|
+
readonly StoragePolicies: 'storage-policies';
|
|
40
|
+
readonly Teams: 'teams';
|
|
41
|
+
readonly Triggers: 'triggers';
|
|
42
|
+
readonly Users: 'users';
|
|
43
|
+
readonly WorkingConditions: 'working-conditions';
|
|
44
|
+
readonly QuickReplies: 'quick-replies';
|
|
45
45
|
};
|
|
46
46
|
export type AdminSections = (typeof AdminSections)[keyof typeof AdminSections];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const AuditorSections: {
|
|
2
|
-
|
|
2
|
+
readonly Scorecards: 'scorecards';
|
|
3
3
|
};
|
|
4
|
-
export type AuditorSections =
|
|
4
|
+
export type AuditorSections =
|
|
5
|
+
(typeof AuditorSections)[keyof typeof AuditorSections];
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export declare const CrmSections: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
readonly Contacts: 'contacts';
|
|
3
|
+
readonly Cases: 'cases';
|
|
4
|
+
readonly Slas: 'slas';
|
|
5
|
+
readonly ServiceCatalogs: 'service-catalogs';
|
|
6
|
+
readonly Priorities: 'priorities';
|
|
7
|
+
readonly Statuses: 'statuses';
|
|
8
|
+
readonly Sources: 'sources';
|
|
9
|
+
readonly CloseReasonGroups: 'close-reason-groups';
|
|
10
|
+
readonly ContactGroups: 'contact-groups';
|
|
11
|
+
readonly CaseSources: 'case-sources';
|
|
12
|
+
readonly CasesExtensions: 'ext-cases';
|
|
13
|
+
readonly ContactsExtensions: 'ext-contacts';
|
|
14
|
+
readonly CustomLookups: 'custom-lookups';
|
|
15
15
|
};
|
|
16
16
|
export type CrmSections = (typeof CrmSections)[keyof typeof CrmSections];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const SupervisorSections: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
readonly Queues: 'queues';
|
|
3
|
+
readonly Agents: 'agents';
|
|
4
|
+
readonly ActiveCalls: 'active-calls';
|
|
5
5
|
};
|
|
6
|
-
export type SupervisorSections =
|
|
6
|
+
export type SupervisorSections =
|
|
7
|
+
(typeof SupervisorSections)[keyof typeof SupervisorSections];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const WfmSections: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
readonly MySchedules: 'my-schedules';
|
|
3
|
+
readonly Agents: 'agents';
|
|
4
|
+
readonly Schedules: 'schedules';
|
|
5
5
|
};
|
|
6
6
|
export type WfmSections = (typeof WfmSections)[keyof typeof WfmSections];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare const WtApplication: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
readonly Admin: 'admin';
|
|
3
|
+
readonly Agent: 'agent';
|
|
4
|
+
readonly Supervisor: 'supervisor';
|
|
5
|
+
readonly History: 'history';
|
|
6
|
+
readonly Audit: 'audit';
|
|
7
|
+
readonly Analytics: 'grafana';
|
|
8
|
+
readonly Crm: 'crm';
|
|
9
|
+
readonly Wfm: 'wfm';
|
|
10
|
+
readonly Meet: 'meet';
|
|
11
11
|
};
|
|
12
12
|
export type WtApplication = (typeof WtApplication)[keyof typeof WtApplication];
|
|
@@ -2,62 +2,62 @@
|
|
|
2
2
|
* Represents existing Webitel entities
|
|
3
3
|
*/
|
|
4
4
|
export declare const WtObject: {
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
5
|
+
readonly Agent: 'agent';
|
|
6
|
+
readonly Queue: 'queue';
|
|
7
|
+
readonly Contact: 'contact';
|
|
8
|
+
readonly Region: 'region';
|
|
9
|
+
readonly User: 'user';
|
|
10
|
+
readonly Resource: 'resource';
|
|
11
|
+
readonly Device: 'device';
|
|
12
|
+
readonly License: 'license';
|
|
13
|
+
readonly Flow: 'flow';
|
|
14
|
+
readonly Dialplan: 'dialplan';
|
|
15
|
+
readonly Gateway: 'gateway';
|
|
16
|
+
readonly Chatplan: 'chatplan';
|
|
17
|
+
readonly ChatGateway: 'chatGateway';
|
|
18
|
+
readonly Blacklist: 'blacklist';
|
|
19
|
+
readonly Calendar: 'calendar';
|
|
20
|
+
readonly Communication: 'communication';
|
|
21
|
+
readonly PauseCause: 'pauseCause';
|
|
22
|
+
readonly Media: 'media';
|
|
23
|
+
readonly ShiftTemplate: 'shiftTemplate';
|
|
24
|
+
readonly PauseTemplate: 'pauseTemplate';
|
|
25
|
+
readonly WorkingCondition: 'workingCondition';
|
|
26
|
+
readonly Skill: 'skill';
|
|
27
|
+
readonly Bucket: 'bucket';
|
|
28
|
+
readonly Member: 'member';
|
|
29
|
+
readonly ResourceGroup: 'resourceGroup';
|
|
30
|
+
readonly Team: 'team';
|
|
31
|
+
readonly Storage: 'storage';
|
|
32
|
+
readonly CognitiveProfile: 'cognitiveProfile';
|
|
33
|
+
readonly EmailProfile: 'emailProfile';
|
|
34
|
+
readonly SingleSignOn: 'singleSignOn';
|
|
35
|
+
readonly ImportCsv: 'importCsv';
|
|
36
|
+
readonly Trigger: 'trigger';
|
|
37
|
+
readonly Role: 'role';
|
|
38
|
+
readonly Object: 'object';
|
|
39
|
+
readonly ChangeLog: 'changelog';
|
|
40
|
+
readonly Configuration: 'configuration';
|
|
41
|
+
readonly GlobalVariable: 'globalVariable';
|
|
42
|
+
readonly Call: 'call';
|
|
43
|
+
readonly RecordFile: 'recordFile';
|
|
44
|
+
readonly ContactGroup: 'contactGroup';
|
|
45
|
+
readonly Case: 'case';
|
|
46
|
+
readonly CaseComment: 'caseComment';
|
|
47
|
+
readonly Slas: 'slas';
|
|
48
|
+
readonly ServiceCatalog: 'serviceCatalog';
|
|
49
|
+
readonly CaseSource: 'caseSource';
|
|
50
|
+
readonly CloseReasonGroup: 'closeReasonGroup';
|
|
51
|
+
readonly Priorities: 'priorities';
|
|
52
|
+
readonly Status: 'status';
|
|
53
|
+
readonly Source: 'source';
|
|
54
|
+
readonly CustomLookup: 'customLookup';
|
|
55
|
+
readonly AuditForm: 'auditForm';
|
|
56
|
+
readonly AuditRating: 'auditRating';
|
|
57
|
+
readonly QuickReply: 'quickReply';
|
|
58
|
+
readonly ListNumber: 'listNumber';
|
|
59
|
+
readonly AgentWorkingCondition: 'agentWorkingCondition';
|
|
60
|
+
readonly FilePolicy: 'filePolicy';
|
|
61
|
+
readonly PortalUser: 'portalUser';
|
|
62
62
|
};
|
|
63
63
|
export type WtObject = (typeof WtObject)[keyof typeof WtObject];
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
* @description Enumerates (ONLY!) the types of field type.
|
|
4
4
|
*/
|
|
5
5
|
export declare const WtTypeExtensionFieldKind: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
readonly Text: 'string';
|
|
7
|
+
readonly Number: 'int32';
|
|
8
|
+
readonly Select: 'lookup';
|
|
9
|
+
readonly Multiselect: 'list';
|
|
10
|
+
readonly Calendar: 'datetime';
|
|
11
|
+
readonly Boolean: 'bool';
|
|
12
12
|
};
|
|
13
|
-
export type ExtensionFieldType =
|
|
13
|
+
export type ExtensionFieldType =
|
|
14
|
+
(typeof WtTypeExtensionFieldKind)[keyof typeof WtTypeExtensionFieldKind];
|
package/src/enums/index.d.ts
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import AbstractUserStatus from './AbstractUserStatus/AbstractUserStatus.enum.js';
|
|
2
2
|
import AgentStatus from './AgentStatus/AgentStatus.enum.js';
|
|
3
3
|
import { BroadcastChannelName } from './BroadcastChannelName/BroadcastChannelName';
|
|
4
|
-
import type {
|
|
4
|
+
import type {
|
|
5
|
+
UserSettingsBroadcastMessage,
|
|
6
|
+
WebphoneBroadcastMessage,
|
|
7
|
+
WebphoneBroadcastPayload,
|
|
8
|
+
} from './BroadcastChannelName/UserSettingsBroadcastMessage';
|
|
5
9
|
import { ButtonColor } from './ButtonColor/ButtonColor';
|
|
6
10
|
import { ButtonVariant } from './ButtonVariant/ButtonVariant';
|
|
7
11
|
import ChatGatewayProvider from './ChatGatewayProvider/ChatGatewayProvider.enum.js';
|
|
8
12
|
import ProviderIconType from './ChatGatewayProvider/ProviderIconType.enum';
|
|
9
13
|
import { ChipColor } from './ChipColor/ChipColor';
|
|
10
14
|
import { ComponentSize } from './ComponentSize/ComponentSize';
|
|
11
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
ConnectionQualityLevels,
|
|
17
|
+
type ConnectionQualityLevelsType,
|
|
18
|
+
} from './ConnectionQualityLevel/ConnectionQualityLevel.enum';
|
|
12
19
|
import { CrudAction } from './CrudAction/CrudAction';
|
|
13
20
|
import { DefaultWorkspaceTabSettings } from './DefaultWorkspaceTabSettings/DefaultWorkspaceTabSettings';
|
|
14
21
|
import { EmptyCause } from './EmptyCause/EmptyCause';
|
|
@@ -34,5 +41,48 @@ import { WfmSections } from './WebitelApplications/WfmSections';
|
|
|
34
41
|
import { WtApplication } from './WebitelApplications/WtApplication';
|
|
35
42
|
import { WtObject } from './WtObject/WtObject';
|
|
36
43
|
import { WtTypeExtensionFieldKind } from './WtTypeExtensionFieldKind/WtTypeExtensionFieldKind';
|
|
37
|
-
|
|
38
|
-
export {
|
|
44
|
+
|
|
45
|
+
export type {
|
|
46
|
+
ConnectionQualityLevelsType,
|
|
47
|
+
UserSettingsBroadcastMessage,
|
|
48
|
+
WebphoneBroadcastMessage,
|
|
49
|
+
WebphoneBroadcastPayload,
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
AbstractUserStatus,
|
|
53
|
+
AdminSections,
|
|
54
|
+
AgentStatus,
|
|
55
|
+
AuditorSections,
|
|
56
|
+
BroadcastChannelName,
|
|
57
|
+
ButtonColor,
|
|
58
|
+
ButtonVariant,
|
|
59
|
+
ChatGatewayProvider,
|
|
60
|
+
ChipColor,
|
|
61
|
+
ComponentSize,
|
|
62
|
+
ConnectionQualityLevels,
|
|
63
|
+
CrmSections,
|
|
64
|
+
CrudAction,
|
|
65
|
+
DefaultWorkspaceTabSettings,
|
|
66
|
+
EmptyCause,
|
|
67
|
+
FormatDateMode,
|
|
68
|
+
IconAction,
|
|
69
|
+
IconColor,
|
|
70
|
+
LoginOptions,
|
|
71
|
+
MessageColor,
|
|
72
|
+
MessageVariant,
|
|
73
|
+
MimeTypes,
|
|
74
|
+
ProcessingTableColumnType,
|
|
75
|
+
ProviderIconType,
|
|
76
|
+
QueueType,
|
|
77
|
+
QueueTypeName,
|
|
78
|
+
RelativeDatetimeValue,
|
|
79
|
+
RingtoneType,
|
|
80
|
+
SingleSignOnProvider,
|
|
81
|
+
SingleSignOnProviderIconMappings,
|
|
82
|
+
SupervisorSections,
|
|
83
|
+
TypesExportedSettings,
|
|
84
|
+
WfmSections,
|
|
85
|
+
WtApplication,
|
|
86
|
+
WtObject,
|
|
87
|
+
WtTypeExtensionFieldKind,
|
|
88
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const TIMEZONE_STORAGE_KEY =
|
|
1
|
+
export declare const TIMEZONE_STORAGE_KEY = 'user-timezone-setting';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const EMPTY_SYMBOL =
|
|
1
|
+
export declare const EMPTY_SYMBOL = '-';
|
|
2
2
|
export declare const displayText: (text: string) => string;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { FormatDateMode } from '../enums';
|
|
2
|
-
export declare function formatDate(
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export declare function formatDate(
|
|
3
|
+
date: string | number | Date,
|
|
4
|
+
to: (typeof FormatDateMode)[keyof typeof FormatDateMode],
|
|
5
|
+
{
|
|
6
|
+
timezone,
|
|
7
|
+
}?: {
|
|
8
|
+
timezone?: string;
|
|
9
|
+
},
|
|
10
|
+
): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author @HlukhovYe
|
|
3
|
+
*
|
|
4
|
+
* Automatically inserts date/time separators while the user types into the
|
|
5
|
+
* PrimeVue DatePicker input so they don't have to type '/' or ':' manually.
|
|
6
|
+
*
|
|
7
|
+
* Format without time: dd/mm/yyyy → inserts '/' after positions 2 and 5
|
|
8
|
+
* Format with time: dd/mm/yyyy hh:mm → also inserts ' ' after position 10
|
|
9
|
+
* and ':' after position 13
|
|
10
|
+
*
|
|
11
|
+
* The handler runs in the bubble phase (after PrimeVue's own input handler).
|
|
12
|
+
* Listener registration is handled by useDatepicker.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createAutoSeparatorHandler(showTime: () => boolean): {
|
|
15
|
+
onInputBubble: (event: Event) => void;
|
|
16
|
+
resetLength: (input: HTMLInputElement) => void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author @HlukhovYe
|
|
3
|
+
*
|
|
4
|
+
* Single composable entry point for wt-datepicker. Composes all input-handling
|
|
5
|
+
* and overlay logic into a minimal set of DOM listeners — one capture input,
|
|
6
|
+
* one bubble input, one keydown — so the browser dispatches each event once.
|
|
7
|
+
*
|
|
8
|
+
* Returns:
|
|
9
|
+
* onBlur — forward to p-datepicker's @blur
|
|
10
|
+
* lockOverlay / unlockOverlay — forward to onPanelShow / onPanelHide
|
|
11
|
+
*/
|
|
12
|
+
export declare function useDatepicker(getInput: () => HTMLInputElement | null, getDatepicker: () => {
|
|
13
|
+
rawValue: Date | null;
|
|
14
|
+
updateModel: (v: Date) => void;
|
|
15
|
+
} | null, showTime: () => boolean, isClearable: () => boolean): {
|
|
16
|
+
onBlur: () => void;
|
|
17
|
+
lockOverlay: (panel: HTMLElement) => void;
|
|
18
|
+
unlockOverlay: () => void;
|
|
19
|
+
};
|
|
@@ -7,9 +7,13 @@
|
|
|
7
7
|
* is mid-typing. Without this, typing "2" into a cleared two-digit slot immediately
|
|
8
8
|
* reformats to "02", forcing the user to delete the leading zero before the second digit.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
10
|
+
* Capture handler (before PrimeVue): snapshots the partial single-digit value.
|
|
11
|
+
* Bubble handler (after PrimeVue): if PrimeVue zero-padded the value, restores the
|
|
12
|
+
* snapshot and cancels further propagation so the model is not updated yet.
|
|
13
|
+
*
|
|
14
|
+
* Listener registration is handled by useDatepicker.
|
|
14
15
|
*/
|
|
15
|
-
export declare function
|
|
16
|
+
export declare function createPreventZeroPadHandlers(): {
|
|
17
|
+
onInputCapture: (event: Event) => void;
|
|
18
|
+
onInputBubble: (event: Event) => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author @HlukhovYe
|
|
3
|
+
*
|
|
4
|
+
* Enforces strict keyboard input on the PrimeVue DatePicker text field:
|
|
5
|
+
*
|
|
6
|
+
* - Only digits, '/', ':', and ' ' are allowed through.
|
|
7
|
+
* - Input is capped at the maximum length for the active format:
|
|
8
|
+
* dd/mm/yyyy → 10 characters
|
|
9
|
+
* dd/mm/yyyy hh:mm → 16 characters
|
|
10
|
+
*
|
|
11
|
+
* Works via a `keydown` handler so the character is blocked before the browser
|
|
12
|
+
* writes it to the input. Control keys and modifier combos always pass through.
|
|
13
|
+
* Listener registration is handled by useDatepicker.
|
|
14
|
+
*/
|
|
15
|
+
export declare function createStrictInputHandler(showTime: () => boolean): {
|
|
16
|
+
onKeydown: (event: KeyboardEvent) => void;
|
|
17
|
+
};
|