@notabene/javascript-sdk 1.32.0 → 1.35.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.
- package/.husky/commit-msg +0 -0
- package/.husky/pre-commit +1 -1
- package/.husky/pre-push +0 -0
- package/.yarn/releases/yarn-3.2.2.cjs +783 -0
- package/.yarnrc.yml +5 -0
- package/CODEOWNERS +1 -1
- package/README.md +13 -1
- package/dist/es/index.js +1 -1
- package/dist/lib/index.js +14 -1
- package/package.json +2 -3
- package/src/notabene.ts +20 -5
- package/src/types.ts +1 -0
package/dist/lib/index.js
CHANGED
|
@@ -26,6 +26,7 @@ function $parcel$interopDefault(a) {
|
|
|
26
26
|
|
|
27
27
|
$parcel$export(module.exports, "Notabene", () => $fef5d623a19b12b5$export$2e2bcd8739ae039);
|
|
28
28
|
|
|
29
|
+
|
|
29
30
|
var $48505191f6b4c91c$exports = {};
|
|
30
31
|
|
|
31
32
|
$parcel$export($48505191f6b4c91c$exports, "WidgetType", () => $48505191f6b4c91c$export$95cdd842edb044c5);
|
|
@@ -36,7 +37,6 @@ let $48505191f6b4c91c$export$95cdd842edb044c5;
|
|
|
36
37
|
})($48505191f6b4c91c$export$95cdd842edb044c5 || ($48505191f6b4c91c$export$95cdd842edb044c5 = {}));
|
|
37
38
|
|
|
38
39
|
|
|
39
|
-
|
|
40
40
|
const $fd25ee12f453fb93$var$generalProps = {
|
|
41
41
|
vaspDID: {
|
|
42
42
|
type: 'string',
|
|
@@ -132,6 +132,7 @@ class $fef5d623a19b12b5$export$2e2bcd8739ae039 {
|
|
|
132
132
|
action: 'DECLARATION'
|
|
133
133
|
},
|
|
134
134
|
];
|
|
135
|
+
this.config.counterpartyManualEntry = this.config.counterpartyManualEntry !== undefined ? this.config.counterpartyManualEntry : true;
|
|
135
136
|
}
|
|
136
137
|
/**
|
|
137
138
|
* Renders a new widget
|
|
@@ -227,6 +228,11 @@ class $fef5d623a19b12b5$export$2e2bcd8739ae039 {
|
|
|
227
228
|
width: '100%',
|
|
228
229
|
height: '280px'
|
|
229
230
|
},
|
|
231
|
+
attributes: {
|
|
232
|
+
iframe: {
|
|
233
|
+
allow: 'usb *;bluetooth *'
|
|
234
|
+
}
|
|
235
|
+
},
|
|
230
236
|
props: $fd25ee12f453fb93$export$1aafbfc7f973e450
|
|
231
237
|
})({
|
|
232
238
|
vaspDID: this.config.vaspDID,
|
|
@@ -239,6 +245,7 @@ class $fef5d623a19b12b5$export$2e2bcd8739ae039 {
|
|
|
239
245
|
fieldsProps: this.config.fieldsProps,
|
|
240
246
|
fallbacks: this.config.fallbacks,
|
|
241
247
|
optInFeatures: this.config.optInFeatures,
|
|
248
|
+
counterpartyManualEntry: this.config.counterpartyManualEntry,
|
|
242
249
|
onRequireAdditionalInformation: ()=>{
|
|
243
250
|
this.popup.updateProps({
|
|
244
251
|
popupOpen: true
|
|
@@ -280,6 +287,11 @@ class $fef5d623a19b12b5$export$2e2bcd8739ae039 {
|
|
|
280
287
|
width: '100%',
|
|
281
288
|
height: '100%'
|
|
282
289
|
},
|
|
290
|
+
attributes: {
|
|
291
|
+
iframe: {
|
|
292
|
+
allow: 'usb *;bluetooth *'
|
|
293
|
+
}
|
|
294
|
+
},
|
|
283
295
|
props: $fd25ee12f453fb93$export$73ab9d0d47d71b0c,
|
|
284
296
|
containerTemplate: ({ uid: uid , doc: doc , frame: frame , prerenderFrame: prerenderFrame })=>{
|
|
285
297
|
return $4mxld$jsxpragmatic.node('div', {
|
|
@@ -324,6 +336,7 @@ class $fef5d623a19b12b5$export$2e2bcd8739ae039 {
|
|
|
324
336
|
transaction: this.tx,
|
|
325
337
|
beneficiaryDetails: this.config.beneficiaryDetails,
|
|
326
338
|
fieldsProps: this.config.fieldsProps,
|
|
339
|
+
counterpartyManualEntry: this.config.counterpartyManualEntry,
|
|
327
340
|
storeTransaction: (tx)=>{
|
|
328
341
|
this.setTransaction(tx);
|
|
329
342
|
console.debug('Notabene: Transaction stored');
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"author": "Notabene <developers@notabene.id>",
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"version": "1.
|
|
11
|
+
"version": "1.35.2",
|
|
12
12
|
"main": "dist/index.js",
|
|
13
13
|
"packageManager": "yarn@3.2.2",
|
|
14
14
|
"browserslist": "> 0.5%, last 2 versions, not dead",
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"buffer": false
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
|
-
"prepare": "husky install",
|
|
38
37
|
"watch": "parcel watch",
|
|
39
38
|
"dev": "sirv --dev --port 3002 public",
|
|
40
39
|
"build:dev": "yarn build && yarn dev",
|
|
@@ -92,4 +91,4 @@
|
|
|
92
91
|
"jsx-pragmatic": "^2.0.22",
|
|
93
92
|
"zoid": "^9.0.86"
|
|
94
93
|
}
|
|
95
|
-
}
|
|
94
|
+
}
|
package/src/notabene.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// @ts-ignore
|
|
2
2
|
import { dom, node } from 'jsx-pragmatic';
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
import zoid, { destroy } from 'zoid';
|
|
3
5
|
import {
|
|
6
|
+
Fallback,
|
|
4
7
|
FieldsProps,
|
|
5
8
|
NonCustodialDeclarationType,
|
|
9
|
+
OptInFeature,
|
|
6
10
|
Theme,
|
|
7
11
|
Transaction,
|
|
8
12
|
TransactionTypeAllowed,
|
|
9
13
|
WidgetType,
|
|
10
|
-
Fallback,
|
|
11
|
-
OptInFeature,
|
|
12
14
|
} from './types';
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
import zoid, { destroy } from 'zoid';
|
|
15
15
|
import { popupProps, widgetProps } from './zoidComponentProps';
|
|
16
16
|
|
|
17
17
|
interface NotabeneConfig {
|
|
@@ -29,6 +29,7 @@ interface NotabeneConfig {
|
|
|
29
29
|
fieldsProps?: FieldsProps;
|
|
30
30
|
fallbacks?: Fallback[];
|
|
31
31
|
optInFeatures?: OptInFeature[];
|
|
32
|
+
counterpartyManualEntry?: boolean;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
export default class Notabene {
|
|
@@ -52,6 +53,8 @@ export default class Notabene {
|
|
|
52
53
|
this.config.fallbacks = this.config.fallbacks || [
|
|
53
54
|
{ flow: 'WALLET_NOT_SUPPORTED', action: 'DECLARATION' },
|
|
54
55
|
];
|
|
56
|
+
this.config.counterpartyManualEntry = this.config.counterpartyManualEntry !== undefined ? this.config.counterpartyManualEntry : true;
|
|
57
|
+
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
/**
|
|
@@ -137,6 +140,7 @@ export default class Notabene {
|
|
|
137
140
|
const url = new URL(this.config.widget);
|
|
138
141
|
url.search = 'popup=true';
|
|
139
142
|
url.hash = `authToken=${this.config.authToken}`;
|
|
143
|
+
|
|
140
144
|
return url.toString();
|
|
141
145
|
}
|
|
142
146
|
|
|
@@ -167,6 +171,11 @@ export default class Notabene {
|
|
|
167
171
|
width: '100%',
|
|
168
172
|
height: '280px',
|
|
169
173
|
},
|
|
174
|
+
attributes: {
|
|
175
|
+
iframe: {
|
|
176
|
+
allow: 'usb *;bluetooth *',
|
|
177
|
+
},
|
|
178
|
+
},
|
|
170
179
|
props: widgetProps,
|
|
171
180
|
})({
|
|
172
181
|
vaspDID: this.config.vaspDID,
|
|
@@ -179,6 +188,7 @@ export default class Notabene {
|
|
|
179
188
|
fieldsProps: this.config.fieldsProps,
|
|
180
189
|
fallbacks: this.config.fallbacks,
|
|
181
190
|
optInFeatures: this.config.optInFeatures,
|
|
191
|
+
counterpartyManualEntry: this.config.counterpartyManualEntry,
|
|
182
192
|
onRequireAdditionalInformation: () => {
|
|
183
193
|
this.popup.updateProps({
|
|
184
194
|
popupOpen: true,
|
|
@@ -224,6 +234,11 @@ export default class Notabene {
|
|
|
224
234
|
width: '100%',
|
|
225
235
|
height: '100%',
|
|
226
236
|
},
|
|
237
|
+
attributes: {
|
|
238
|
+
iframe: {
|
|
239
|
+
allow: 'usb *;bluetooth *',
|
|
240
|
+
},
|
|
241
|
+
},
|
|
227
242
|
props: popupProps,
|
|
228
243
|
containerTemplate: ({ uid, doc, frame, prerenderFrame }: any) => {
|
|
229
244
|
return node(
|
|
@@ -269,6 +284,7 @@ export default class Notabene {
|
|
|
269
284
|
transaction: this.tx,
|
|
270
285
|
beneficiaryDetails: this.config.beneficiaryDetails,
|
|
271
286
|
fieldsProps: this.config.fieldsProps,
|
|
287
|
+
counterpartyManualEntry: this.config.counterpartyManualEntry,
|
|
272
288
|
storeTransaction: (tx: Transaction) => {
|
|
273
289
|
this.setTransaction(tx);
|
|
274
290
|
console.debug('Notabene: Transaction stored');
|
|
@@ -300,7 +316,6 @@ export default class Notabene {
|
|
|
300
316
|
this.popupRendered = true;
|
|
301
317
|
this.cleanUpDestroyedComponents();
|
|
302
318
|
});
|
|
303
|
-
|
|
304
319
|
return builtPopup;
|
|
305
320
|
}
|
|
306
321
|
}
|