@panneau/core 4.0.4 → 4.0.5
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/es/contexts.js +14 -14
- package/package.json +2 -2
package/es/contexts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import isString from 'lodash-es/isString';
|
|
3
|
-
import
|
|
3
|
+
import { createContext, useContext, useMemo, useState, useEffect, useRef, useCallback } from 'react';
|
|
4
4
|
import { ComponentsManager, FieldsManager, Tracking } from '@panneau/core';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
@@ -30,7 +30,7 @@ var BUTTONS_NAMESPACE = 'buttons';
|
|
|
30
30
|
var PAGES_NAMESPACE = 'pages';
|
|
31
31
|
var PREVIEWS_NAMESPACE = 'previews';
|
|
32
32
|
var APP_NAMESPACE = 'app';
|
|
33
|
-
var ComponentsContext = /*#__PURE__*/
|
|
33
|
+
var ComponentsContext = /*#__PURE__*/createContext(null);
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Hooks
|
|
@@ -249,7 +249,7 @@ function ComponentsProvider(_ref) {
|
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
var DefinitionContext = /*#__PURE__*/
|
|
252
|
+
var DefinitionContext = /*#__PURE__*/createContext(null);
|
|
253
253
|
var useDefinitionContext = function useDefinitionContext() {
|
|
254
254
|
return useContext(DefinitionContext);
|
|
255
255
|
};
|
|
@@ -266,7 +266,7 @@ function DefinitionProvider(_ref) {
|
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
var FieldsContext = /*#__PURE__*/
|
|
269
|
+
var FieldsContext = /*#__PURE__*/createContext(null);
|
|
270
270
|
var useFieldsManager = function useFieldsManager() {
|
|
271
271
|
return useContext(FieldsContext);
|
|
272
272
|
};
|
|
@@ -309,7 +309,7 @@ function FieldsProvider(_ref) {
|
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
var GoogleKeysContext = /*#__PURE__*/
|
|
312
|
+
var GoogleKeysContext = /*#__PURE__*/createContext({
|
|
313
313
|
apiKey: null
|
|
314
314
|
});
|
|
315
315
|
var useGoogleKeys = function useGoogleKeys() {
|
|
@@ -332,7 +332,7 @@ function GoogleKeysProvider(_ref) {
|
|
|
332
332
|
});
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
var FontsContext = /*#__PURE__*/
|
|
335
|
+
var FontsContext = /*#__PURE__*/createContext({
|
|
336
336
|
systemFonts: null,
|
|
337
337
|
googleFonts: null,
|
|
338
338
|
customFonts: null
|
|
@@ -441,7 +441,7 @@ function FontsProvider(_ref4) {
|
|
|
441
441
|
});
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
-
var FormContext = /*#__PURE__*/
|
|
444
|
+
var FormContext = /*#__PURE__*/createContext(null);
|
|
445
445
|
var useForm = function useForm() {
|
|
446
446
|
return useContext(FormContext);
|
|
447
447
|
};
|
|
@@ -471,7 +471,7 @@ function FormProvider(_ref) {
|
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
|
|
474
|
-
var GoogleApiClientContext = /*#__PURE__*/
|
|
474
|
+
var GoogleApiClientContext = /*#__PURE__*/createContext(null);
|
|
475
475
|
var useGoogleApiClient = function useGoogleApiClient() {
|
|
476
476
|
return useContext(GoogleApiClientContext);
|
|
477
477
|
};
|
|
@@ -520,7 +520,7 @@ function GoogleApiClientProvider(_ref2) {
|
|
|
520
520
|
});
|
|
521
521
|
}
|
|
522
522
|
|
|
523
|
-
var GoogleMapsClientContext = /*#__PURE__*/
|
|
523
|
+
var GoogleMapsClientContext = /*#__PURE__*/createContext(null);
|
|
524
524
|
var useGoogleMapsClient = function useGoogleMapsClient() {
|
|
525
525
|
return useContext(GoogleMapsClientContext);
|
|
526
526
|
};
|
|
@@ -575,7 +575,7 @@ function GoogleMapsClientProvider(_ref2) {
|
|
|
575
575
|
}
|
|
576
576
|
|
|
577
577
|
var defaultLocales = ['en', 'fr'];
|
|
578
|
-
var LocalesContext = /*#__PURE__*/
|
|
578
|
+
var LocalesContext = /*#__PURE__*/createContext({
|
|
579
579
|
locales: defaultLocales
|
|
580
580
|
});
|
|
581
581
|
var useLocalesContext = function useLocalesContext() {
|
|
@@ -615,7 +615,7 @@ function LocalesProvider(_ref) {
|
|
|
615
615
|
});
|
|
616
616
|
}
|
|
617
617
|
|
|
618
|
-
var ModalContext = /*#__PURE__*/
|
|
618
|
+
var ModalContext = /*#__PURE__*/createContext(null);
|
|
619
619
|
var useModal = function useModal() {
|
|
620
620
|
return useContext(ModalContext) || {};
|
|
621
621
|
};
|
|
@@ -708,7 +708,7 @@ function ModalProvider(_ref) {
|
|
|
708
708
|
});
|
|
709
709
|
}
|
|
710
710
|
|
|
711
|
-
var PanelsContext = /*#__PURE__*/
|
|
711
|
+
var PanelsContext = /*#__PURE__*/createContext({
|
|
712
712
|
panels: [],
|
|
713
713
|
container: null,
|
|
714
714
|
setContainer: function setContainer() {},
|
|
@@ -793,7 +793,7 @@ function PanelsProvider(_ref2) {
|
|
|
793
793
|
}
|
|
794
794
|
|
|
795
795
|
var _excluded = ["component"];
|
|
796
|
-
var PanneauContext = /*#__PURE__*/
|
|
796
|
+
var PanneauContext = /*#__PURE__*/createContext(null);
|
|
797
797
|
var usePanneau = function usePanneau() {
|
|
798
798
|
return useContext(PanneauContext);
|
|
799
799
|
};
|
|
@@ -878,7 +878,7 @@ function PanneauProvider(_ref8) {
|
|
|
878
878
|
});
|
|
879
879
|
}
|
|
880
880
|
|
|
881
|
-
var ResourceContext = /*#__PURE__*/
|
|
881
|
+
var ResourceContext = /*#__PURE__*/createContext(null);
|
|
882
882
|
var useResource = function useResource() {
|
|
883
883
|
return useContext(ResourceContext);
|
|
884
884
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/core",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"publishConfig": {
|
|
113
113
|
"access": "public"
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "ac8b065e8c7ada1d176d15eff1c0fa53599ad31f"
|
|
116
116
|
}
|