@drawbridge/drawbridge-utils 0.0.3 → 0.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.
@@ -1,6 +1,181 @@
1
- const { code, data } = require( 'currency-codes' );
1
+ import { data, code } from 'currency-codes';
2
2
 
3
- const constants = require( './lib/constants' );
3
+ const font = {
4
+ family : 'Roboto Flex',
5
+ transform : 'none',
6
+ weight : 'regular'
7
+ };
8
+
9
+ var constantsData = {
10
+ action : {
11
+ usage : {
12
+ actions : 0
13
+ }
14
+ },
15
+ brand : {
16
+ style : {
17
+ body : font,
18
+ heading : font
19
+ },
20
+ totals : {
21
+ campaigns : 0
22
+ }
23
+ },
24
+ campaign : {
25
+ agreements : {
26
+ marketing : {
27
+ enabled : false,
28
+ label : 'I agree to the marketing terms and conditions',
29
+ link : null
30
+ },
31
+ terms : {
32
+ enabled : false,
33
+ label : 'I agree to the terms and conditions',
34
+ link : null
35
+ }
36
+ },
37
+ defaults : {
38
+ active : 'Enter',
39
+ confirmation : 'Submission was successful',
40
+ inactive : 'Submissions are closed',
41
+ email : 'You were selected'
42
+ },
43
+ notifications : {
44
+ draw : {
45
+ subject : 'You have been selected',
46
+ body : 'Thanks for being part of our giveaway'
47
+ }
48
+ },
49
+ settings : {
50
+ submissionLeadPrimaryKey : 'email',
51
+ submissionEntryMaximum : 1,
52
+ submissionEntryFilter : 'campaign',
53
+ submissionEntryHighscore : false,
54
+ submissionEntryLimit : 1
55
+ },
56
+ status : 'drafted',
57
+ totals : {
58
+ advertisements : 0,
59
+ affiliates : 0,
60
+ draws : 0,
61
+ exports : 0,
62
+ entries : 0,
63
+ fields : 2,
64
+ integrations : 1,
65
+ leads : 0,
66
+ links : 0,
67
+ pages : 0,
68
+ prizes : 0,
69
+ ranges : 0,
70
+ submissions : 0
71
+ },
72
+ type : 'giveaway'
73
+ },
74
+ draw : {
75
+ status : 'qualified',
76
+ totals : {
77
+ notifications : 0
78
+ }
79
+ },
80
+ member : {
81
+ status : 'pending'
82
+ },
83
+ organization : {
84
+ errors : [],
85
+ totals : {
86
+ affiliates : 0,
87
+ brands : 0,
88
+ campaigns : 0,
89
+ leads : 0,
90
+ draws : 0,
91
+ entries : 0,
92
+ invitations : 0,
93
+ invoices : 0,
94
+ members : 0,
95
+ ranges : 0,
96
+ pages : 0,
97
+ prizes : 0,
98
+ storage : 0,
99
+ submissions : 0,
100
+ subscriptions : 0,
101
+ usage : 0
102
+ }
103
+ },
104
+ page : {
105
+ domains : [],
106
+ status : 'drafted',
107
+ totals : {
108
+ leads : 0,
109
+ entries : 0,
110
+ submissions : 0
111
+ }
112
+ },
113
+ prize : {
114
+ inventory : 0,
115
+ remaining : 0,
116
+ shipping : false,
117
+ status : 'drafted',
118
+ totals : {
119
+ draws : 0
120
+ }
121
+ },
122
+ range : {
123
+ totals : {
124
+ leads : 0,
125
+ entries : 0,
126
+ submissions : 0
127
+ }
128
+ },
129
+ referrer : {
130
+ totals : {
131
+ originizations : 0,
132
+ subscriptions : 0,
133
+ users : 0
134
+ }
135
+ },
136
+ template : {
137
+ page : {
138
+ style : {
139
+ body : font,
140
+ heading : font
141
+ }
142
+ }
143
+ },
144
+ usage : {
145
+ totals : {
146
+ actions : 0,
147
+ affiliates : 0,
148
+ brands : 0,
149
+ campaigns : 0,
150
+ connections : 0,
151
+ entries : 0,
152
+ files : 0,
153
+ members : 0,
154
+ orders : 0,
155
+ pages : 0,
156
+ revenue : 0,
157
+ storage : 0,
158
+ submissions : 0,
159
+ workflows : 0
160
+ }
161
+ },
162
+ user : {
163
+ access : {
164
+ ai : false
165
+ },
166
+ image : null,
167
+ totals : {
168
+ inbox : 0,
169
+ invitations : 0,
170
+ messages : 0,
171
+ methods : 0,
172
+ organizations : 1,
173
+ teams : 0
174
+ }
175
+ }
176
+ };
177
+
178
+ const constants = constantsData;
4
179
 
5
180
  const infinite = 1e300;
6
181
 
@@ -232,25 +407,4 @@ const currencies = data.map( ( item ) => ({
232
407
 
233
408
  const currency = ( val ) => code( val );
234
409
 
235
- module.exports = {
236
- bytesToGB,
237
- bytesToMB,
238
- capitalize,
239
- constants,
240
- currencies,
241
- currency,
242
- expiredPaymentMethod,
243
- formatCurrency,
244
- formatDateString,
245
- formatNumber,
246
- getPlanFeature,
247
- gigabyte,
248
- infinite,
249
- isInfinite,
250
- megabyte,
251
- percentage,
252
- reducers,
253
- regex,
254
- shareUrls,
255
- urlRoot
256
- };
410
+ export { bytesToGB, bytesToMB, capitalize, constants, currencies, currency, expiredPaymentMethod, formatCurrency, formatDateString, formatNumber, getPlanFeature, gigabyte, infinite, isInfinite, megabyte, percentage, reducers, regex, shareUrls, urlRoot };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,181 @@
1
- const { code, data } = require( 'currency-codes' );
1
+ import { data, code } from 'currency-codes';
2
2
 
3
- const constants = require( './lib/constants' );
3
+ const font = {
4
+ family : 'Roboto Flex',
5
+ transform : 'none',
6
+ weight : 'regular'
7
+ };
8
+
9
+ var constantsData = {
10
+ action : {
11
+ usage : {
12
+ actions : 0
13
+ }
14
+ },
15
+ brand : {
16
+ style : {
17
+ body : font,
18
+ heading : font
19
+ },
20
+ totals : {
21
+ campaigns : 0
22
+ }
23
+ },
24
+ campaign : {
25
+ agreements : {
26
+ marketing : {
27
+ enabled : false,
28
+ label : 'I agree to the marketing terms and conditions',
29
+ link : null
30
+ },
31
+ terms : {
32
+ enabled : false,
33
+ label : 'I agree to the terms and conditions',
34
+ link : null
35
+ }
36
+ },
37
+ defaults : {
38
+ active : 'Enter',
39
+ confirmation : 'Submission was successful',
40
+ inactive : 'Submissions are closed',
41
+ email : 'You were selected'
42
+ },
43
+ notifications : {
44
+ draw : {
45
+ subject : 'You have been selected',
46
+ body : 'Thanks for being part of our giveaway'
47
+ }
48
+ },
49
+ settings : {
50
+ submissionLeadPrimaryKey : 'email',
51
+ submissionEntryMaximum : 1,
52
+ submissionEntryFilter : 'campaign',
53
+ submissionEntryHighscore : false,
54
+ submissionEntryLimit : 1
55
+ },
56
+ status : 'drafted',
57
+ totals : {
58
+ advertisements : 0,
59
+ affiliates : 0,
60
+ draws : 0,
61
+ exports : 0,
62
+ entries : 0,
63
+ fields : 2,
64
+ integrations : 1,
65
+ leads : 0,
66
+ links : 0,
67
+ pages : 0,
68
+ prizes : 0,
69
+ ranges : 0,
70
+ submissions : 0
71
+ },
72
+ type : 'giveaway'
73
+ },
74
+ draw : {
75
+ status : 'qualified',
76
+ totals : {
77
+ notifications : 0
78
+ }
79
+ },
80
+ member : {
81
+ status : 'pending'
82
+ },
83
+ organization : {
84
+ errors : [],
85
+ totals : {
86
+ affiliates : 0,
87
+ brands : 0,
88
+ campaigns : 0,
89
+ leads : 0,
90
+ draws : 0,
91
+ entries : 0,
92
+ invitations : 0,
93
+ invoices : 0,
94
+ members : 0,
95
+ ranges : 0,
96
+ pages : 0,
97
+ prizes : 0,
98
+ storage : 0,
99
+ submissions : 0,
100
+ subscriptions : 0,
101
+ usage : 0
102
+ }
103
+ },
104
+ page : {
105
+ domains : [],
106
+ status : 'drafted',
107
+ totals : {
108
+ leads : 0,
109
+ entries : 0,
110
+ submissions : 0
111
+ }
112
+ },
113
+ prize : {
114
+ inventory : 0,
115
+ remaining : 0,
116
+ shipping : false,
117
+ status : 'drafted',
118
+ totals : {
119
+ draws : 0
120
+ }
121
+ },
122
+ range : {
123
+ totals : {
124
+ leads : 0,
125
+ entries : 0,
126
+ submissions : 0
127
+ }
128
+ },
129
+ referrer : {
130
+ totals : {
131
+ originizations : 0,
132
+ subscriptions : 0,
133
+ users : 0
134
+ }
135
+ },
136
+ template : {
137
+ page : {
138
+ style : {
139
+ body : font,
140
+ heading : font
141
+ }
142
+ }
143
+ },
144
+ usage : {
145
+ totals : {
146
+ actions : 0,
147
+ affiliates : 0,
148
+ brands : 0,
149
+ campaigns : 0,
150
+ connections : 0,
151
+ entries : 0,
152
+ files : 0,
153
+ members : 0,
154
+ orders : 0,
155
+ pages : 0,
156
+ revenue : 0,
157
+ storage : 0,
158
+ submissions : 0,
159
+ workflows : 0
160
+ }
161
+ },
162
+ user : {
163
+ access : {
164
+ ai : false
165
+ },
166
+ image : null,
167
+ totals : {
168
+ inbox : 0,
169
+ invitations : 0,
170
+ messages : 0,
171
+ methods : 0,
172
+ organizations : 1,
173
+ teams : 0
174
+ }
175
+ }
176
+ };
177
+
178
+ const constants = constantsData;
4
179
 
5
180
  const infinite = 1e300;
6
181
 
@@ -232,25 +407,4 @@ const currencies = data.map( ( item ) => ({
232
407
 
233
408
  const currency = ( val ) => code( val );
234
409
 
235
- module.exports = {
236
- bytesToGB,
237
- bytesToMB,
238
- capitalize,
239
- constants,
240
- currencies,
241
- currency,
242
- expiredPaymentMethod,
243
- formatCurrency,
244
- formatDateString,
245
- formatNumber,
246
- getPlanFeature,
247
- gigabyte,
248
- infinite,
249
- isInfinite,
250
- megabyte,
251
- percentage,
252
- reducers,
253
- regex,
254
- shareUrls,
255
- urlRoot
256
- };
410
+ export { bytesToGB, bytesToMB, capitalize, constants, currencies, currency, expiredPaymentMethod, formatCurrency, formatDateString, formatNumber, getPlanFeature, gigabyte, infinite, isInfinite, megabyte, percentage, reducers, regex, shareUrls, urlRoot };