@appdirect/sfb-toolkit 3.0.3 → 3.0.4

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.
Files changed (39) hide show
  1. package/coverage/clover.xml +12 -6
  2. package/coverage/coverage-final.json +3 -2
  3. package/coverage/lcov-report/constants/customUserAttributesMock.js.html +491 -0
  4. package/coverage/lcov-report/constants/index.html +20 -5
  5. package/coverage/lcov-report/constants/pageUrls.js.html +1 -1
  6. package/coverage/lcov-report/constants/userMock.js.html +29 -29
  7. package/coverage/lcov-report/controllers/controllers-utils/assetsUtils.js.html +1 -1
  8. package/coverage/lcov-report/controllers/controllers-utils/index.html +1 -1
  9. package/coverage/lcov-report/controllers/data-filters/bootstrap-data-filter.js.html +1 -1
  10. package/coverage/lcov-report/controllers/data-filters/call-to-actions-filter.js.html +1 -1
  11. package/coverage/lcov-report/controllers/data-filters/index.html +1 -1
  12. package/coverage/lcov-report/controllers/index.html +1 -1
  13. package/coverage/lcov-report/controllers/index.js.html +2 -2
  14. package/coverage/lcov-report/front-end-utils/src/components/base/ResultItem.js.html +1 -1
  15. package/coverage/lcov-report/front-end-utils/src/components/base/SearchBar.js.html +1 -1
  16. package/coverage/lcov-report/front-end-utils/src/components/base/index.html +1 -1
  17. package/coverage/lcov-report/front-end-utils/src/components/base/item.js.html +1 -1
  18. package/coverage/lcov-report/front-end-utils/src/components/container.js.html +1 -1
  19. package/coverage/lcov-report/front-end-utils/src/components/data-view.js.html +1 -1
  20. package/coverage/lcov-report/front-end-utils/src/components/header-view.js.html +1 -1
  21. package/coverage/lcov-report/front-end-utils/src/components/index.html +1 -1
  22. package/coverage/lcov-report/front-end-utils/src/components/search.js.html +1 -1
  23. package/coverage/lcov-report/front-end-utils/src/constants/index.html +1 -1
  24. package/coverage/lcov-report/front-end-utils/src/constants/pageUrl.js.html +1 -1
  25. package/coverage/lcov-report/front-end-utils/src/constants/roleType.js.html +1 -1
  26. package/coverage/lcov-report/front-end-utils/src/constants/searchType.js.html +1 -1
  27. package/coverage/lcov-report/front-end-utils/src/utils/debounce.js.html +1 -1
  28. package/coverage/lcov-report/front-end-utils/src/utils/index.html +1 -1
  29. package/coverage/lcov-report/index.html +7 -7
  30. package/coverage/lcov-report/middlewares/config.js.html +1 -1
  31. package/coverage/lcov-report/middlewares/index.html +1 -1
  32. package/coverage/lcov.info +15 -3
  33. package/npm-shrinkwrap.json +21 -16
  34. package/package.json +2 -2
  35. package/readme.md +5 -0
  36. package/src/constants/customUserAttributesMock.js +137 -0
  37. package/src/constants/userMock.js +22 -23
  38. package/src/controllers/index.js +1 -1
  39. package/src/tools/toolkit-common-vars.js +1 -1
@@ -0,0 +1,137 @@
1
+ const customUserAttributesMock = {
2
+ key_user_1: {
3
+ id: 3638,
4
+ entityType: "USER",
5
+ type: "TEXT",
6
+ partner: "APPDIRECT",
7
+ attributeKey: "key_user_1",
8
+ enabled: true,
9
+ required: false,
10
+ system: false,
11
+ taggedPermissions: {},
12
+ label: { "en-US": "Demo user ID" },
13
+ hint: { "en-US": "" }
14
+ },
15
+ PatKey: {
16
+ id: 3471,
17
+ entityType: "USER",
18
+ type: "TEXT",
19
+ partner: "APPDIRECT",
20
+ attributeKey: "PatKey",
21
+ enabled: true,
22
+ required: false,
23
+ system: false,
24
+ taggedPermissions: {
25
+ USER_PROFILE: {
26
+ RESELLER: { permission: "READ", required: false },
27
+ CHANNEL_SUPPORT: { permission: "READ", required: false },
28
+ SALES_SUPPORT: { permission: "READ", required: false },
29
+ USER: { permission: "READ", required: false },
30
+ DEVELOPER: { permission: "READ", required: false }
31
+ }
32
+ },
33
+ validation: {
34
+ validationType: "EXTERNAL",
35
+ uuid: "8c4901f6-25f0-4d26-ad97-a8a2242721b0",
36
+ errorMessageTranslations: { "en-US": "asdasd" },
37
+ consumerKey: "asda",
38
+ consumerSecret: "*****",
39
+ endpointTemplate: "http://example.com?{value}",
40
+ errorCodeMessages: {}
41
+ },
42
+ label: { "en-US": "Pat custom attribute" },
43
+ hint: { "en-US": "" }
44
+ },
45
+ "attrnew-francais": {
46
+ id: 7029,
47
+ entityType: "USER",
48
+ type: "MULTISELECT",
49
+ partner: "APPDIRECT",
50
+ attributeKey: "attrnew-francais",
51
+ enabled: true,
52
+ required: false,
53
+ system: false,
54
+ taggedPermissions: {},
55
+ label: {
56
+ fr: "attrnew-francais",
57
+ "en-US": "attrnew-fr"
58
+ },
59
+ hint: {
60
+ fr: "attrnew-francais"
61
+ },
62
+ valueOptions: [
63
+ {
64
+ uuid: "daa455fc-e2ec-404e-bcf7-0372379c06cf",
65
+ optionKey: "francais",
66
+ optionLabel: {
67
+ fr: "francais"
68
+ }
69
+ }
70
+ ]
71
+ },
72
+ user: {
73
+ id: 3481,
74
+ entityType: "USER",
75
+ type: "MULTISELECT",
76
+ partner: "APPDIRECT",
77
+ attributeKey: "user",
78
+ enabled: true,
79
+ required: false,
80
+ system: false,
81
+ taggedPermissions: {
82
+ USER_DETAILS: {
83
+ RESELLER: { permission: "WRITE", required: false },
84
+ CHANNEL_SUPPORT: { permission: "WRITE", required: false },
85
+ SALES_SUPPORT: { permission: "WRITE", required: false }
86
+ }
87
+ },
88
+ label: { "en-US": "user_label" },
89
+ hint: { "en-US": "hint" },
90
+ valueOptions: [
91
+ {
92
+ uuid: "2c3908ec-6389-42c4-a1a2-32ed3e135df6",
93
+ optionKey: "o1",
94
+ optionLabel: { "en-US": "o1" }
95
+ },
96
+ {
97
+ uuid: "bad98a5f-17a5-4661-bb81-48bc397cfab1",
98
+ optionKey: "o2",
99
+ optionLabel: { "en-US": "o2" }
100
+ }
101
+ ]
102
+ },
103
+ user_email: {
104
+ id: 6603,
105
+ entityType: "USER",
106
+ type: "TEXT",
107
+ partner: "APPDIRECT",
108
+ attributeKey: "user_email",
109
+ enabled: true,
110
+ required: false,
111
+ system: false,
112
+ taggedPermissions: {
113
+ USER_DETAILS: {
114
+ SALES_SUPPORT: {
115
+ permission: "WRITE",
116
+ required: false
117
+ },
118
+ RESELLER: {
119
+ permission: "WRITE",
120
+ required: false
121
+ },
122
+ CHANNEL_SUPPORT: {
123
+ permission: "WRITE",
124
+ required: false
125
+ }
126
+ }
127
+ },
128
+ label: {
129
+ "en-US": "user email"
130
+ },
131
+ hint: {
132
+ "en-US": ""
133
+ }
134
+ }
135
+ }
136
+
137
+ module.exports = customUserAttributesMock
@@ -1,27 +1,26 @@
1
+ const customUserAttributes = require("./customUserAttributesMock")
2
+
1
3
  const userMock = {
2
- name: "{Username} LastName",
3
- isLoggedIn: true,
4
- email: "Username.lastname@email.com",
5
- family_name: "{Username}",
6
- given_name: "LastName",
7
- roles: [
8
- "CREATE_QUOTE",
9
- "USER"
10
- ],
11
- userUuid: "686e6521-4ed5-4164-a776-00b04c9d73ff",
12
- hasCustomerContract: false,
13
- locale: "en_US",
14
- attributes: {
4
+ name: "{Username} LastName",
5
+ isLoggedIn: true,
6
+ email: "Username.lastname@email.com",
7
+ family_name: "{Username}",
8
+ given_name: "LastName",
9
+ roles: ["CREATE_QUOTE", "USER"],
10
+ userUuid: "686e6521-4ed5-4164-a776-00b04c9d73ff",
11
+ hasCustomerContract: false,
12
+ locale: "en_US",
13
+ attributes: {
15
14
  HAS_CUSTOMER_CONTRACT: "false"
16
- },
17
- companyUuid: "3dc98547-47dd-47bb-9b01-4569be3412e6",
18
- currency: "USD",
19
- customUserAttributes: { },
20
- customerContractEditionUuids: [ ],
21
- ownedPartners: [ ],
22
- segments: {
23
- items: [ ]
24
- }
15
+ },
16
+ companyUuid: "3dc98547-47dd-47bb-9b01-4569be3412e6",
17
+ currency: "USD",
18
+ customUserAttributes,
19
+ customerContractEditionUuids: [],
20
+ ownedPartners: [],
21
+ segments: {
22
+ items: []
23
+ }
25
24
  }
26
25
 
27
- module.exports = userMock;
26
+ module.exports = userMock
@@ -419,7 +419,7 @@ class Pages {
419
419
  .addToolbar()
420
420
  .addLazyLoad()
421
421
  .addPageReload401()
422
- .addDevUniversalHeader(this.headerAssets)
422
+ .addDevUniversalHeader(this.headerAssets, html)
423
423
  .addChangeCurrency()
424
424
  .addCart({ userId: 117 })
425
425
  .addGlobalStyling(globalStyles)
@@ -15,7 +15,7 @@ const THEME_TEMPLATES_CONFIG_PATH = `${TOOLKIT_PATH}/themes-config.json`;
15
15
  const THEME_TEMPLATES = JSON.parse(fs.readFileSync(THEME_TEMPLATES_CONFIG_PATH));
16
16
  const PAGE_OBJECTS_SUFFIX = "/api/internal/storefront/v1";
17
17
  const THEME_COMPONENT_MODULE = "@appdirect/sfb-theme-components";
18
- const THEME_COMPONENT_VERSION = "0.0.245";
18
+ const THEME_COMPONENT_VERSION = "0.0.262";
19
19
 
20
20
  let WORKSPACE_CONFIG;
21
21
  try {