@formio/js 5.0.0-dev.5692.a9fe9c4 → 5.0.0-dev.5695.024ad9c

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.
@@ -13,10 +13,6 @@ const Components_1 = __importDefault(require("./components/Components"));
13
13
  const NestedDataComponent_1 = __importDefault(require("./components/_classes/nesteddata/NestedDataComponent"));
14
14
  const utils_1 = require("./utils/utils");
15
15
  const formUtils_1 = require("./utils/formUtils");
16
- // We need this here because dragula pulls in CustomEvent class that requires global to exist.
17
- if (typeof window !== 'undefined' && typeof window.global === 'undefined') {
18
- window.global = window;
19
- }
20
16
  const dragula_1 = __importDefault(require("dragula"));
21
17
  // Initialize the available forms.
22
18
  Formio_1.Formio.forms = {};
@@ -113,6 +113,10 @@ class AddressComponent extends Container_1.default {
113
113
  if (!this.builderMode) {
114
114
  if (this.component.provider) {
115
115
  const { provider, providerOptions, } = this.component;
116
+ if (lodash_1.default.get(providerOptions, 'params.subscriptionKey')) {
117
+ lodash_1.default.set(providerOptions, "params['subscription-key']", lodash_1.default.get(providerOptions, 'params.subscriptionKey'));
118
+ lodash_1.default.unset(providerOptions, 'params.subscriptionKey');
119
+ }
116
120
  this.provider = this.initializeProvider(provider, providerOptions);
117
121
  }
118
122
  else if (this.component.map) {
@@ -31,7 +31,7 @@ exports.default = [
31
31
  {
32
32
  type: 'textfield',
33
33
  input: true,
34
- key: "providerOptions.params['subscription-key']",
34
+ key: "providerOptions.params.subscriptionKey",
35
35
  label: 'Subscription Key',
36
36
  placeholder: 'Enter Subscription Key',
37
37
  weight: 10,
@@ -8,10 +8,6 @@ import Components from "./components/Components";
8
8
  import NestedDataComponent from "./components/_classes/nesteddata/NestedDataComponent";
9
9
  import { fastCloneDeep, currentTimezone, unescapeHTML, getStringFromComponentPath, convertStringToHTMLElement, getArrayFromComponentPath, } from "./utils/utils";
10
10
  import { eachComponent } from "./utils/formUtils";
11
- // We need this here because dragula pulls in CustomEvent class that requires global to exist.
12
- if (typeof window !== 'undefined' && typeof window.global === 'undefined') {
13
- window.global = window;
14
- }
15
11
  import dragula from "dragula";
16
12
  // Initialize the available forms.
17
13
  Formio.forms = {};
@@ -107,6 +107,10 @@ export default class AddressComponent extends ContainerComponent {
107
107
  if (!this.builderMode) {
108
108
  if (this.component.provider) {
109
109
  const { provider, providerOptions, } = this.component;
110
+ if (_.get(providerOptions, 'params.subscriptionKey')) {
111
+ _.set(providerOptions, "params['subscription-key']", _.get(providerOptions, 'params.subscriptionKey'));
112
+ _.unset(providerOptions, 'params.subscriptionKey');
113
+ }
110
114
  this.provider = this.initializeProvider(provider, providerOptions);
111
115
  }
112
116
  else if (this.component.map) {
@@ -26,7 +26,7 @@ export default [
26
26
  {
27
27
  type: 'textfield',
28
28
  input: true,
29
- key: "providerOptions.params['subscription-key']",
29
+ key: "providerOptions.params.subscriptionKey",
30
30
  label: 'Subscription Key',
31
31
  placeholder: 'Enter Subscription Key',
32
32
  weight: 10,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5692.a9fe9c4",
3
+ "version": "5.0.0-dev.5695.024ad9c",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {