@m4l/core 0.0.38 → 0.0.39

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.
@@ -5,6 +5,7 @@ const initialValue = {
5
5
  toast: () => 0,
6
6
  startProgress: voidFunction,
7
7
  stopProgress: voidFunction,
8
+ formatDate: () => "",
8
9
  events_add_listener: voidFunction,
9
10
  events_remove_listener: voidFunction,
10
11
  events_emit: voidFunction
@@ -1,4 +1,4 @@
1
- import { createContext, useState, useLayoutEffect, useCallback } from "react";
1
+ import { createContext, useState, useEffect, useCallback } from "react";
2
2
  import { u as useEnvironment } from "../../hooks/useEnvironment/index.js";
3
3
  import { u as useFlags } from "../../hooks/useFlags/index.js";
4
4
  import { u as useHostTools } from "../../hooks/useHostTools/index.js";
@@ -33,7 +33,7 @@ function ModuleDictionaryProvider(props) {
33
33
  const {
34
34
  networkOperation
35
35
  } = useNetwork();
36
- useLayoutEffect(() => {
36
+ useEffect(() => {
37
37
  let mounted = true;
38
38
  startProgress();
39
39
  networkOperation({
@@ -1,4 +1,4 @@
1
- import { createContext, useState, useLayoutEffect, useCallback } from "react";
1
+ import { createContext, useState, useEffect, useCallback } from "react";
2
2
  import "../EnvironmentContext/index.js";
3
3
  import { u as useFlags } from "../../hooks/useFlags/index.js";
4
4
  import { u as useHostTools } from "../../hooks/useHostTools/index.js";
@@ -26,7 +26,7 @@ function ModulePrivilegesProvider(props) {
26
26
  const {
27
27
  networkOperation
28
28
  } = useNetwork();
29
- useLayoutEffect(() => {
29
+ useEffect(() => {
30
30
  let mounted = true;
31
31
  if (queryPrivileges.length === 0) {
32
32
  addFlag("privileges_loaded");
@@ -37,6 +37,7 @@ export declare interface HostToolsType {
37
37
  toast: ToastFunction;
38
38
  startProgress: VoidFunction;
39
39
  stopProgress: VoidFunction;
40
+ formatDate: (date: Date | number, format: string, options?: any) => string;
40
41
  events_add_listener: (eventName: string, handler: EventFunListener) => void;
41
42
  events_remove_listener: (eventName: string, handler: Maybe<EventFunListener>) => void;
42
43
  events_emit: (eventName: string, arg: any) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@m4l/core",
3
3
  "private": false,
4
- "version": "0.0.38",
4
+ "version": "0.0.39",
5
5
  "license": "UNLICENSED",
6
6
  "author": "M4L Team",
7
7
  "scripts": {