@activecollab/components 2.0.490 → 2.0.491

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.
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.EntityGroupContext = exports.EntityGroup = void 0;
7
- var _react = _interopRequireDefault(require("react"));
7
+ var _react = _interopRequireWildcard(require("react"));
8
8
  var _Styles = require("./Styles");
9
9
  var _excluded = ["children", "gap", "renderAs"];
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
11
11
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
12
12
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
13
13
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
@@ -20,10 +20,13 @@ var EntityGroup = exports.EntityGroup = function EntityGroup(_ref) {
20
20
  _ref$renderAs = _ref.renderAs,
21
21
  renderAs = _ref$renderAs === void 0 ? "grid" : _ref$renderAs,
22
22
  rest = _objectWithoutProperties(_ref, _excluded);
23
+ var value = (0, _react.useMemo)(function () {
24
+ return {
25
+ renderAs
26
+ };
27
+ }, [renderAs]);
23
28
  return /*#__PURE__*/_react.default.createElement(EntityGroupContext.Provider, {
24
- value: {
25
- renderAs: renderAs
26
- }
29
+ value: value
27
30
  }, /*#__PURE__*/_react.default.createElement(_Styles.StyledEntityGroup, _extends({
28
31
  $renderAs: renderAs,
29
32
  $gap: gap
@@ -1 +1 @@
1
- {"version":3,"file":"EntityGroup.js","names":["_react","_interopRequireDefault","require","_Styles","_excluded","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","_objectWithoutProperties","o","i","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","EntityGroupContext","exports","React","createContext","renderAs","EntityGroup","_ref","children","gap","_ref$renderAs","rest","createElement","Provider","value","StyledEntityGroup","$renderAs","$gap","displayName"],"sources":["../../../../src/components/Entity/EntityGroup.tsx"],"sourcesContent":["import React, { HTMLAttributes } from \"react\";\n\nimport { StyledEntityGroup } from \"./Styles\";\n\nexport interface IEntityGroupProps\n extends Pick<\n HTMLAttributes<HTMLDivElement>,\n \"className\" | \"style\" | \"children\"\n > {\n gap?: number;\n renderAs?: \"grid\" | \"list\";\n}\n\nexport interface IEntityGroupContext {\n renderAs: \"grid\" | \"list\";\n}\nexport const EntityGroupContext = React.createContext<IEntityGroupContext>({\n renderAs: \"grid\",\n});\nexport const EntityGroup: React.FC<IEntityGroupProps> = ({\n children,\n gap,\n renderAs = \"grid\",\n ...rest\n}) => {\n return (\n <EntityGroupContext.Provider value={{ renderAs: renderAs }}>\n <StyledEntityGroup $renderAs={renderAs} $gap={gap} {...rest}>\n {children}\n </StyledEntityGroup>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W,CAAA,iBAAAD,CAAA,gBAAAH,CAAA,IAAAI,CAAA,SAAAC,cAAA,CAAAC,IAAA,CAAAF,CAAA,EAAAJ,CAAA,gBAAAP,CAAA,CAAAoB,OAAA,CAAAb,CAAA,aAAAG,CAAA,CAAAH,CAAA,IAAAI,CAAA,CAAAJ,CAAA,YAAAG,CAAA;AActC,IAAMY,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,gBAAGE,cAAK,CAACC,aAAa,CAAsB;EACzEC,QAAQ,EAAE;AACZ,CAAC,CAAC;AACK,IAAMC,WAAwC,GAAAJ,OAAA,CAAAI,WAAA,GAAG,SAA3CA,WAAwCA,CAAAC,IAAA,EAK/C;EAAA,IAJJC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IAAAC,aAAA,GAAAH,IAAA,CACHF,QAAQ;IAARA,QAAQ,GAAAK,aAAA,cAAG,MAAM,GAAAA,aAAA;IACdC,IAAI,GAAAjB,wBAAA,CAAAa,IAAA,EAAA7B,SAAA;EAEP,oBACEJ,MAAA,CAAAO,OAAA,CAAA+B,aAAA,CAACX,kBAAkB,CAACY,QAAQ;IAACC,KAAK,EAAE;MAAET,QAAQ,EAAEA;IAAS;EAAE,gBACzD/B,MAAA,CAAAO,OAAA,CAAA+B,aAAA,CAACnC,OAAA,CAAAsC,iBAAiB,EAAAjC,QAAA;IAACkC,SAAS,EAAEX,QAAS;IAACY,IAAI,EAAER;EAAI,GAAKE,IAAI,GACxDH,QACgB,CACQ,CAAC;AAElC,CAAC;AAEDF,WAAW,CAACY,WAAW,GAAG,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"EntityGroup.js","names":["_react","_interopRequireWildcard","require","_Styles","_excluded","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_objectWithoutProperties","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","EntityGroupContext","exports","React","createContext","renderAs","EntityGroup","_ref","children","gap","_ref$renderAs","rest","value","useMemo","createElement","Provider","StyledEntityGroup","$renderAs","$gap","displayName"],"sources":["../../../../src/components/Entity/EntityGroup.tsx"],"sourcesContent":["import React, { HTMLAttributes, useMemo } from \"react\";\n\nimport { StyledEntityGroup } from \"./Styles\";\n\nexport interface IEntityGroupProps\n extends Pick<\n HTMLAttributes<HTMLDivElement>,\n \"className\" | \"style\" | \"children\"\n > {\n gap?: number;\n renderAs?: \"grid\" | \"list\";\n}\n\nexport interface IEntityGroupContext {\n renderAs: \"grid\" | \"list\";\n}\nexport const EntityGroupContext = React.createContext<IEntityGroupContext>({\n renderAs: \"grid\",\n});\nexport const EntityGroup: React.FC<IEntityGroupProps> = ({\n children,\n gap,\n renderAs = \"grid\",\n ...rest\n}) => {\n const value = useMemo(() => ({ renderAs }), [renderAs]);\n\n return (\n <EntityGroupContext.Provider value={value}>\n <StyledEntityGroup $renderAs={renderAs} $gap={gap} {...rest}>\n {children}\n </StyledEntityGroup>\n </EntityGroupContext.Provider>\n );\n};\n\nEntityGroup.displayName = \"EntityGroup\";\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAA6C,IAAAE,SAAA;AAAA,SAAAH,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,wBAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAA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AA,CAAAgD,iBAAiB,EAAA1B,QAAA;IAAC2B,SAAS,EAAEZ,QAAS;IAACa,IAAI,EAAET;EAAI,GAAKE,IAAI,GACxDH,QACgB,CACQ,CAAC;AAElC,CAAC;AAEDF,WAAW,CAACa,WAAW,GAAG,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/Entity/EntityGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI9C,MAAM,WAAW,iBACf,SAAQ,IAAI,CACV,cAAc,CAAC,cAAc,CAAC,EAC9B,WAAW,GAAG,OAAO,GAAG,UAAU,CACnC;IACD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AACD,eAAO,MAAM,kBAAkB,oCAE7B,CAAC;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAanD,CAAC"}
1
+ {"version":3,"file":"EntityGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/Entity/EntityGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAW,MAAM,OAAO,CAAC;AAIvD,MAAM,WAAW,iBACf,SAAQ,IAAI,CACV,cAAc,CAAC,cAAc,CAAC,EAC9B,WAAW,GAAG,OAAO,GAAG,UAAU,CACnC;IACD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AACD,eAAO,MAAM,kBAAkB,oCAE7B,CAAC;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAenD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  const _excluded = ["children", "gap", "renderAs"];
4
- import React from "react";
4
+ import React, { useMemo } from "react";
5
5
  import { StyledEntityGroup } from "./Styles";
6
6
  export const EntityGroupContext = /*#__PURE__*/React.createContext({
7
7
  renderAs: "grid"
@@ -12,10 +12,11 @@ export const EntityGroup = _ref => {
12
12
  _ref$renderAs = _ref.renderAs,
13
13
  renderAs = _ref$renderAs === void 0 ? "grid" : _ref$renderAs,
14
14
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
15
+ const value = useMemo(() => ({
16
+ renderAs
17
+ }), [renderAs]);
15
18
  return /*#__PURE__*/React.createElement(EntityGroupContext.Provider, {
16
- value: {
17
- renderAs: renderAs
18
- }
19
+ value: value
19
20
  }, /*#__PURE__*/React.createElement(StyledEntityGroup, _extends({
20
21
  $renderAs: renderAs,
21
22
  $gap: gap
@@ -1 +1 @@
1
- {"version":3,"file":"EntityGroup.js","names":["React","StyledEntityGroup","EntityGroupContext","createContext","renderAs","EntityGroup","_ref","children","gap","_ref$renderAs","rest","_objectWithoutPropertiesLoose","_excluded","createElement","Provider","value","_extends","$renderAs","$gap","displayName"],"sources":["../../../../src/components/Entity/EntityGroup.tsx"],"sourcesContent":["import React, { HTMLAttributes } from \"react\";\n\nimport { StyledEntityGroup } from \"./Styles\";\n\nexport interface IEntityGroupProps\n extends Pick<\n HTMLAttributes<HTMLDivElement>,\n \"className\" | \"style\" | \"children\"\n > {\n gap?: number;\n renderAs?: \"grid\" | \"list\";\n}\n\nexport interface IEntityGroupContext {\n renderAs: \"grid\" | \"list\";\n}\nexport const EntityGroupContext = React.createContext<IEntityGroupContext>({\n renderAs: \"grid\",\n});\nexport const EntityGroup: React.FC<IEntityGroupProps> = ({\n children,\n gap,\n renderAs = \"grid\",\n ...rest\n}) => {\n return (\n <EntityGroupContext.Provider value={{ renderAs: renderAs }}>\n <StyledEntityGroup $renderAs={renderAs} $gap={gap} {...rest}>\n {children}\n </StyledEntityGroup>\n </EntityGroupContext.Provider>\n );\n};\n\nEntityGroup.displayName = \"EntityGroup\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAA0B,OAAO;AAE7C,SAASC,iBAAiB,QAAQ,UAAU;AAc5C,OAAO,MAAMC,kBAAkB,gBAAGF,KAAK,CAACG,aAAa,CAAsB;EACzEC,QAAQ,EAAE;AACZ,CAAC,CAAC;AACF,OAAO,MAAMC,WAAwC,GAAGC,IAAA,IAKlD;EAAA,IAJJC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IAAAC,aAAA,GAAAH,IAAA,CACHF,QAAQ;IAARA,QAAQ,GAAAK,aAAA,cAAG,MAAM,GAAAA,aAAA;IACdC,IAAI,GAAAC,6BAAA,CAAAL,IAAA,EAAAM,SAAA;EAEP,oBACEZ,KAAA,CAAAa,aAAA,CAACX,kBAAkB,CAACY,QAAQ;IAACC,KAAK,EAAE;MAAEX,QAAQ,EAAEA;IAAS;EAAE,gBACzDJ,KAAA,CAAAa,aAAA,CAACZ,iBAAiB,EAAAe,QAAA;IAACC,SAAS,EAAEb,QAAS;IAACc,IAAI,EAAEV;EAAI,GAAKE,IAAI,GACxDH,QACgB,CACQ,CAAC;AAElC,CAAC;AAEDF,WAAW,CAACc,WAAW,GAAG,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"EntityGroup.js","names":["React","useMemo","StyledEntityGroup","EntityGroupContext","createContext","renderAs","EntityGroup","_ref","children","gap","_ref$renderAs","rest","_objectWithoutPropertiesLoose","_excluded","value","createElement","Provider","_extends","$renderAs","$gap","displayName"],"sources":["../../../../src/components/Entity/EntityGroup.tsx"],"sourcesContent":["import React, { HTMLAttributes, useMemo } from \"react\";\n\nimport { StyledEntityGroup } from \"./Styles\";\n\nexport interface IEntityGroupProps\n extends Pick<\n HTMLAttributes<HTMLDivElement>,\n \"className\" | \"style\" | \"children\"\n > {\n gap?: number;\n renderAs?: \"grid\" | \"list\";\n}\n\nexport interface IEntityGroupContext {\n renderAs: \"grid\" | \"list\";\n}\nexport const EntityGroupContext = React.createContext<IEntityGroupContext>({\n renderAs: \"grid\",\n});\nexport const EntityGroup: React.FC<IEntityGroupProps> = ({\n children,\n gap,\n renderAs = \"grid\",\n ...rest\n}) => {\n const value = useMemo(() => ({ renderAs }), [renderAs]);\n\n return (\n <EntityGroupContext.Provider value={value}>\n <StyledEntityGroup $renderAs={renderAs} $gap={gap} {...rest}>\n {children}\n </StyledEntityGroup>\n </EntityGroupContext.Provider>\n );\n};\n\nEntityGroup.displayName = \"EntityGroup\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAoBC,OAAO,QAAQ,OAAO;AAEtD,SAASC,iBAAiB,QAAQ,UAAU;AAc5C,OAAO,MAAMC,kBAAkB,gBAAGH,KAAK,CAACI,aAAa,CAAsB;EACzEC,QAAQ,EAAE;AACZ,CAAC,CAAC;AACF,OAAO,MAAMC,WAAwC,GAAGC,IAAA,IAKlD;EAAA,IAJJC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,GAAG,GAAAF,IAAA,CAAHE,GAAG;IAAAC,aAAA,GAAAH,IAAA,CACHF,QAAQ;IAARA,QAAQ,GAAAK,aAAA,cAAG,MAAM,GAAAA,aAAA;IACdC,IAAI,GAAAC,6BAAA,CAAAL,IAAA,EAAAM,SAAA;EAEP,MAAMC,KAAK,GAAGb,OAAO,CAAC,OAAO;IAAEI;EAAS,CAAC,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEvD,oBACEL,KAAA,CAAAe,aAAA,CAACZ,kBAAkB,CAACa,QAAQ;IAACF,KAAK,EAAEA;EAAM,gBACxCd,KAAA,CAAAe,aAAA,CAACb,iBAAiB,EAAAe,QAAA;IAACC,SAAS,EAAEb,QAAS;IAACc,IAAI,EAAEV;EAAI,GAAKE,IAAI,GACxDH,QACgB,CACQ,CAAC;AAElC,CAAC;AAEDF,WAAW,CAACc,WAAW,GAAG,aAAa","ignoreList":[]}
package/dist/index.js CHANGED
@@ -30143,10 +30143,13 @@
30143
30143
  _ref$renderAs = _ref.renderAs,
30144
30144
  renderAs = _ref$renderAs === void 0 ? "grid" : _ref$renderAs,
30145
30145
  rest = _objectWithoutProperties(_ref, _excluded$f);
30146
+ var value = React.useMemo(function () {
30147
+ return {
30148
+ renderAs
30149
+ };
30150
+ }, [renderAs]);
30146
30151
  return /*#__PURE__*/React__default["default"].createElement(EntityGroupContext.Provider, {
30147
- value: {
30148
- renderAs: renderAs
30149
- }
30152
+ value: value
30150
30153
  }, /*#__PURE__*/React__default["default"].createElement(StyledEntityGroup, _extends({
30151
30154
  $renderAs: renderAs,
30152
30155
  $gap: gap