@washingtonpost/subs-de-inputs 0.5.7 → 1.0.0-react18.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/dist/components/DESelect/index.d.ts +35 -30
- package/dist/index.d.ts +4 -8
- package/dist/interfaces/index.d.ts +34 -61
- package/dist/services/dataEnrichment.d.ts +3 -0
- package/dist/subs-de-inputs.cjs.development.js +480 -585
- package/dist/subs-de-inputs.cjs.development.js.map +1 -1
- package/dist/subs-de-inputs.cjs.production.min.js +1 -1
- package/dist/subs-de-inputs.cjs.production.min.js.map +1 -1
- package/dist/subs-de-inputs.esm.js +483 -580
- package/dist/subs-de-inputs.esm.js.map +1 -1
- package/dist/utils/hasRequiredPrivacyCookies.d.ts +1 -1
- package/package.json +27 -51
- package/CHANGELOG.md +0 -69
- package/dist/components/DEDisclosure/hooks/useOnetrustAlertBoxClosedPromise.d.ts +0 -23
- package/dist/components/DEDisclosure/index.d.ts +0 -12
- package/dist/components/DEDisclosure/utils/checkCookie.d.ts +0 -1
- package/dist/components/DEDisclosure/utils/getConfig.d.ts +0 -2
- package/dist/components/DEDisclosure/utils/hydrateLinks.d.ts +0 -3
- package/dist/components/DESelect/Dropdown.d.ts +0 -16
- package/dist/constants/IngestDataTypes.d.ts +0 -15
- package/dist/interfaces/disclosure.d.ts +0 -8
- package/dist/interfaces/twpdeu.d.ts +0 -12
- package/dist/services/getAttributes.d.ts +0 -6
- package/dist/services/ingest.d.ts +0 -14
- package/dist/services/sendToGA.d.ts +0 -9
- package/dist/utils/isAnonymousWebview.d.ts +0 -1
- package/dist/utils/push.d.ts +0 -14
|
@@ -1,30 +1,35 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SubsWindow } from '@washingtonpost/subs-sdk';
|
|
3
|
+
import { Attribute, AttributeValue } from '../../interfaces';
|
|
4
|
+
declare global {
|
|
5
|
+
interface Window extends SubsWindow {
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
interface DESelectProps {
|
|
9
|
+
source: string;
|
|
10
|
+
fieldName: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
dataDictionaryConfig?: Attribute;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
submit: boolean;
|
|
16
|
+
onChange?: ({ value }: {
|
|
17
|
+
value: string;
|
|
18
|
+
}) => void;
|
|
19
|
+
onFinished?: ({ isFinished, isError, }: {
|
|
20
|
+
isFinished: boolean;
|
|
21
|
+
isError: boolean;
|
|
22
|
+
}) => void;
|
|
23
|
+
valuesFilter?: (value: AttributeValue) => boolean;
|
|
24
|
+
selectProps?: {
|
|
25
|
+
root?: any;
|
|
26
|
+
trigger?: any;
|
|
27
|
+
label?: any;
|
|
28
|
+
value?: any;
|
|
29
|
+
content?: any;
|
|
30
|
+
item?: any;
|
|
31
|
+
};
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
export declare const DESelect: React.FC<DESelectProps>;
|
|
35
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
export * from './interfaces/index';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './services/getAttributes';
|
|
6
|
-
export * from './components/DESelect';
|
|
7
|
-
export * from './components/DEDisclosure';
|
|
8
|
-
export { FirstPartyIngestDataTypes } from './constants/IngestDataTypes';
|
|
1
|
+
export * from './interfaces/index';
|
|
2
|
+
export * from './utils/hasRequiredPrivacyCookies';
|
|
3
|
+
export * from './services/dataEnrichment';
|
|
4
|
+
export * from './components/DESelect';
|
|
@@ -1,61 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
readonly
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
readonly
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
31
|
-
readonly
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
readonly IMPLICIT: "implicit";
|
|
36
|
-
};
|
|
37
|
-
export declare const IngestResponseState: {
|
|
38
|
-
readonly SUCCESS: "100";
|
|
39
|
-
readonly SYSTEM_ERROR: "101";
|
|
40
|
-
readonly INVALID_TYPE: "102";
|
|
41
|
-
readonly INVALID_IDENTIFIER: "103";
|
|
42
|
-
readonly INVALID_DATA: "104";
|
|
43
|
-
readonly INVALID_ATTRIBUTE_DEFINITION: "105";
|
|
44
|
-
readonly INVALID_META_DEFINITION: "106";
|
|
45
|
-
readonly UNAUTHENTICATED: "107";
|
|
46
|
-
readonly MISMATCHED_IDENTIFIER: "108";
|
|
47
|
-
readonly DISABLED_ATTRIBUTE_DEFINITION: "109";
|
|
48
|
-
readonly DO_NOT_COLLECT: "110";
|
|
49
|
-
};
|
|
50
|
-
export interface IProfileResponse {
|
|
51
|
-
status: ResponseStatusType;
|
|
52
|
-
state: typeof AttributesState;
|
|
53
|
-
attributes: {
|
|
54
|
-
[key: string]: {
|
|
55
|
-
attribute_name: string;
|
|
56
|
-
value: string | null;
|
|
57
|
-
date_created: number;
|
|
58
|
-
last_modified_date: number;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
}
|
|
1
|
+
export type AttributeValue = {
|
|
2
|
+
name: string;
|
|
3
|
+
date_created: Number;
|
|
4
|
+
last_modified_date: Number;
|
|
5
|
+
archived: boolean;
|
|
6
|
+
order: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const CollectionBehaviors: {
|
|
9
|
+
readonly COLLECT: "COLLECT";
|
|
10
|
+
readonly DO_NOT_COLLECT: "DO_NOT_COLLECT";
|
|
11
|
+
};
|
|
12
|
+
export type Attribute = {
|
|
13
|
+
name: string;
|
|
14
|
+
approved_for_use?: boolean;
|
|
15
|
+
collection_behavior?: (typeof CollectionBehaviors)[keyof typeof CollectionBehaviors];
|
|
16
|
+
datatype: 'string';
|
|
17
|
+
explicit: boolean;
|
|
18
|
+
multiple_value: boolean;
|
|
19
|
+
last_modified_date: Number;
|
|
20
|
+
date_created: Number;
|
|
21
|
+
values: Array<AttributeValue>;
|
|
22
|
+
};
|
|
23
|
+
export declare const AttributesState: {
|
|
24
|
+
readonly SUCCESS: "100";
|
|
25
|
+
};
|
|
26
|
+
export declare const IngestResponseState: {
|
|
27
|
+
readonly SUCCESS: "100";
|
|
28
|
+
readonly SYSTEM_ERROR: "101";
|
|
29
|
+
readonly INVALID_TYPE: "102";
|
|
30
|
+
readonly INVALID_IDENTIFIER: "103";
|
|
31
|
+
readonly INVALID_DATA: "104";
|
|
32
|
+
readonly INVALID_ATTRIBUTE_DEFINITION: "105";
|
|
33
|
+
readonly INVALID_META_DEFINITION: "106";
|
|
34
|
+
};
|