@scrippsproduct/networks-ui-library 1.1.0-alpha.6 → 1.1.0-alpha.7

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,33 +1,33 @@
1
- import { jsx as C } from "react/jsx-runtime";
2
- import { createContext as S, useState as c, useRef as g, useCallback as v, useEffect as x, useMemo as b } from "react";
3
- const j = S(void 0);
4
- function q({
1
+ import { jsx as S } from "react/jsx-runtime";
2
+ import { createContext as g, useState as y, useRef as v, useCallback as x, useEffect as b, useMemo as j } from "react";
3
+ const D = g(void 0);
4
+ function L({
5
5
  schedule: r,
6
6
  weeks: a,
7
7
  handleDateChanged: o = () => !0,
8
- children: y
8
+ children: c
9
9
  }) {
10
- const [i, A] = c(a[0][0].date), [n, u] = c(!1), t = g(r), s = v((e) => {
11
- u(!0), A(e), o(e);
10
+ const [i, A] = y(a[0][0].date), [n, f] = y(!1), t = v(r), u = x((e) => {
11
+ f(!0), A(e), o(e);
12
12
  }, [o]);
13
- x(() => {
13
+ b(() => {
14
14
  let e = !1;
15
- typeof r == "object" && !Array.isArray(r) && "queryStatus" in r ? e = !(typeof t.current == "object" && !Array.isArray(t.current) && "queryStatus" in t.current) : Array.isArray(r) && Array.isArray(t.current) ? e = t.current.length !== r.length || t.current.some((m, p) => {
16
- var f;
17
- return m.id !== ((f = r[p]) == null ? void 0 : f.id);
18
- }) : e = !0, e && n && (u(!1), t.current = r);
15
+ typeof r == "object" && !Array.isArray(r) && (r != null && r.queryStatus) ? e = !(typeof t.current == "object" && !Array.isArray(t.current) && "queryStatus" in t.current) : Array.isArray(r) && Array.isArray(t.current) ? e = t.current.length !== r.length || t.current.some((p, C) => {
16
+ var s;
17
+ return p.id !== ((s = r[C]) == null ? void 0 : s.id);
18
+ }) : e = !0, e && n && (f(!1), t.current = r);
19
19
  }, [r, n]);
20
- const l = b(() => ({
20
+ const m = j(() => ({
21
21
  schedule: r,
22
22
  weeks: a,
23
23
  currentDate: i,
24
24
  isLoading: n,
25
- setCurrentDate: s
26
- }), [r, a, i, n, s]);
27
- return /* @__PURE__ */ C(j.Provider, { value: l, children: y });
25
+ setCurrentDate: u
26
+ }), [r, a, i, n, u]);
27
+ return /* @__PURE__ */ S(D.Provider, { value: m, children: c });
28
28
  }
29
29
  export {
30
- j as ScheduleContext,
31
- q as ScheduleProvider,
32
- q as default
30
+ D as ScheduleContext,
31
+ L as ScheduleProvider,
32
+ L as default
33
33
  };
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.0-alpha.6",
2
+ "version": "1.1.0-alpha.7",
3
3
  "name": "@scrippsproduct/networks-ui-library",
4
4
  "description": "React Component Library for use in Scripps Networks external applications",
5
5
  "author": {