@opens/widget-ui 1.7.1 → 1.7.2

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-article-page.vue.d.ts","sourceRoot":"","sources":["../src/components/pages/app-article-page.vue"],"names":[],"mappings":"AACA,cAAc,mHAAmH,CAAC;AAClI,OAAO,gIAAgI,CAAC;AACxI,OAAO,gHAAgH,CAAC;;AAExH,wBAA0F"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-screen-page.vue.d.ts","sourceRoot":"","sources":["../src/components/pages/app-screen-page.vue"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,kHAAkH,CAAC;AACzI,cAAc,kHAAkH,CAAC;AACjI,eAAe,SAAS,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-service-page.vue.d.ts","sourceRoot":"","sources":["../src/components/pages/app-service-page.vue"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,mHAAmH,CAAC;AAC1I,cAAc,mHAAmH,CAAC;AAClI,eAAe,SAAS,CAAC"}
@@ -28,8 +28,13 @@ export declare function useIdentificationPage(rule: MaybeRefOrGetter<Rule>, emit
28
28
  };
29
29
  fieldLabel: (field: IdentificationRuleFieldComponent) => string;
30
30
  fieldPlaceholder: (field: IdentificationRuleFieldComponent) => string;
31
- fieldType: (name: string) => "text" | "email" | "tel";
31
+ fieldType: (name: string) => "email" | "text" | "tel";
32
32
  fieldMask: (name: string) => MaskFunction | undefined;
33
33
  fieldIcon: (name: string) => "email" | "call" | "person" | "receipt" | "badge";
34
+ isFieldInvalid: (field: IdentificationRuleFieldComponent) => boolean;
35
+ fieldFeedback: (field: IdentificationRuleFieldComponent) => string | null;
36
+ continueLabel: import('vue').ComputedRef<string>;
37
+ backLabel: import('vue').ComputedRef<string>;
38
+ actionLabelAt: (index: number) => string;
34
39
  goBack: () => void;
35
40
  };
@@ -0,0 +1,29 @@
1
+ import { WidgetLanguage } from '@opens/gateways/chat-config';
2
+ export type IdentificationPageCopy = {
3
+ requiredField: string;
4
+ step: (current: number, total: number) => string;
5
+ nameTitle: string;
6
+ nameSubtitle: string;
7
+ almostThere: (name?: string) => string;
8
+ hello: (name?: string) => string;
9
+ requiredFieldSubtitle: (label: string) => string;
10
+ optionalFieldSubtitle: (label: string) => string;
11
+ labelName: string;
12
+ labelPhone: string;
13
+ labelEmail: string;
14
+ labelCpf: string;
15
+ labelOrder: string;
16
+ placeholderName: string;
17
+ placeholderPhone: string;
18
+ placeholderEmail: string;
19
+ placeholderCpf: string;
20
+ invalidEmail: string;
21
+ invalidPhone: string;
22
+ incompleteCpf: string;
23
+ back: string;
24
+ continue: string;
25
+ finish: string;
26
+ };
27
+ export declare const getIdentificationPageCopy: (language: WidgetLanguage) => IdentificationPageCopy;
28
+ export declare const resolveIdentificationFieldLabel: (name: string, language: WidgetLanguage) => string | undefined;
29
+ export declare const resolveIdentificationFieldPlaceholder: (name: string, language: WidgetLanguage) => string | undefined;
@@ -0,0 +1,14 @@
1
+ import { WidgetLanguage } from '@opens/gateways/chat-config';
2
+ /** Empty values are valid; only filled values are checked (same as client-v2 contact-form). */
3
+ export declare const getIsEmailInvalid: (address: string) => boolean;
4
+ /** Empty CPF is valid; incomplete digit count is invalid (same as client-v2 isCpfIncomplete). */
5
+ export declare const getIsCpfInvalid: (value: string) => boolean;
6
+ /**
7
+ * Empty phone is valid. Filled phones are checked with libphonenumber for any country
8
+ * (same "only validate when typed" behavior as client-v2 contact-form).
9
+ * Local/masked input defaults to BR; numbers with `+` or a country calling code are validated internationally.
10
+ */
11
+ export declare const getIsPhoneInvalid: (number: string) => boolean;
12
+ export type IdentificationFieldValidationName = 'email' | 'phone' | 'cpf' | string;
13
+ export declare const getIsFieldFormatInvalid: (name: IdentificationFieldValidationName, value: string) => boolean;
14
+ export declare const getFieldFormatErrorMessage: (name: IdentificationFieldValidationName, value: string, language?: WidgetLanguage) => string | null;