@evlop/commons 1.0.85 → 1.0.86

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,7 @@ const providers_1 = require("../../providers");
12
12
  function withCollectionRecord(collectionName) {
13
13
  const CollectionRecordPageType = ({ children }) => {
14
14
  const navigator = hooks_1.useNavigator();
15
- const slug = navigator.getParam('slug');
15
+ const { slug } = hooks_1.useParams();
16
16
  const record = hooks_1.useCollectionRecord(collectionName, slug);
17
17
  return react_1.default.createElement(providers_1.Scope, { name: pluralize_1.singular(change_case_1.camelCase(collectionName)), value: record, children: children });
18
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"withCollectionRecord.js","sourceRoot":"","sources":["../../../../src/components/hoc/withCollectionRecord.tsx"],"names":[],"mappings":";;;;;;AAAA,6CAA0F;AAC1F,yCAAqC;AACrC,kDAA0B;AAC1B,uCAAgE;AAChE,+CAAwC;AAExC,SAAgB,oBAAoB,CAAC,cAAsB;IACvD,MAAM,wBAAwB,GAAG,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAE;QAC5C,MAAM,SAAS,GAAG,oBAAY,EAAE,CAAC;QACjC,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACxC,MAAM,MAAM,GAAG,2BAAmB,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QACzD,OAAO,8BAAC,iBAAK,IAAE,IAAI,EAAE,oBAAQ,CAAC,uBAAS,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAAC;IAClG,CAAC,CAAC;IAEF,wBAAwB,CAAC,SAAS,GAAG,0BAAY,CAAC,oBAAQ,CAAC,cAAc,CAAC,GAAC,UAAU,CAAC,CAAC;IACvF,wBAAwB,CAAC,IAAI,GAAG,sBAAQ,CAAC,cAAc,CAAC,GAAC,QAAQ,CAAC;IAClE,wBAAwB,CAAC,QAAQ,GAAG,0BAAY,CAAC,oBAAQ,CAAC,cAAc,CAAC,GAAC,UAAU,CAAC,CAAC;IAEtF,OAAO,wBAAwB,CAAC;AAEtC,CAAC;AAdD,oDAcC"}
1
+ {"version":3,"file":"withCollectionRecord.js","sourceRoot":"","sources":["../../../../src/components/hoc/withCollectionRecord.tsx"],"names":[],"mappings":";;;;;;AAAA,6CAA8E;AAC9E,yCAAqC;AACrC,kDAA0B;AAC1B,uCAA2E;AAC3E,+CAAwC;AAExC,SAAgB,oBAAoB,CAAC,cAAsB;IACvD,MAAM,wBAAwB,GAAG,CAAC,EAAC,QAAQ,EAAC,EAAE,EAAE;QAC5C,MAAM,SAAS,GAAG,oBAAY,EAAE,CAAC;QACjC,MAAM,EAAC,IAAI,EAAC,GAAG,iBAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,2BAAmB,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QACzD,OAAO,8BAAC,iBAAK,IAAE,IAAI,EAAE,oBAAQ,CAAC,uBAAS,CAAC,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAI,CAAC;IAClG,CAAC,CAAC;IAEF,wBAAwB,CAAC,SAAS,GAAG,0BAAY,CAAC,oBAAQ,CAAC,cAAc,CAAC,GAAC,UAAU,CAAC,CAAC;IACvF,wBAAwB,CAAC,IAAI,GAAG,sBAAQ,CAAC,cAAc,CAAC,GAAC,QAAQ,CAAC;IAClE,wBAAwB,CAAC,QAAQ,GAAG,0BAAY,CAAC,oBAAQ,CAAC,cAAc,CAAC,GAAC,UAAU,CAAC,CAAC;IAEtF,OAAO,wBAAwB,CAAC;AAEtC,CAAC;AAdD,oDAcC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useCollectionRecordProvider.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCollectionRecordProvider.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,2BAA2B,kDAmBvC,CAAC;AAEF,eAAQ,MAAM,uBAAuB,kDAA8B,CAAC"}
1
+ {"version":3,"file":"useCollectionRecordProvider.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCollectionRecordProvider.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,2BAA2B,kDAkBvC,CAAC;AAEF,eAAQ,MAAM,uBAAuB,kDAA8B,CAAC"}
@@ -10,11 +10,10 @@ const react_1 = require("react");
10
10
  const react_redux_1 = require("react-redux");
11
11
  const reducers_1 = require("../reducers");
12
12
  const useCollectionRecord_1 = require("./useCollectionRecord");
13
- const useNavigator_1 = require("./useNavigator");
13
+ const useParams_app_1 = require("./useParams.app");
14
14
  const useCollectionRecordProvider = (collectionName, paramName = 'slug') => {
15
- const navigator = useNavigator_1.useNavigator();
16
15
  const dispatch = react_redux_1.useDispatch();
17
- const param = navigator.getParam(paramName);
16
+ const { [paramName]: param } = useParams_app_1.useParams();
18
17
  const record = useCollectionRecord_1.useCollectionRecord(collectionName, param);
19
18
  const key = change_case_1.constantCase(pluralize_1.default.singular(collectionName));
20
19
  react_1.useEffect(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"useCollectionRecordProvider.js","sourceRoot":"","sources":["../../../src/hooks/useCollectionRecordProvider.tsx"],"names":[],"mappings":";;;;;;AAAA,6CAA2C;AAC3C,0DAAkC;AAClC,iCAAkC;AAClC,6CAA0C;AAC1C,0CAA0D;AAC1D,+DAA4D;AAC5D,iDAA8C;AAEvC,MAAM,2BAA2B,GAAG,CAAE,cAAc,EAAE,SAAS,GAAG,MAAM,EAAE,EAAE;IAC/E,MAAM,SAAS,GAAG,2BAAY,EAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,yBAAW,EAAE,CAAC;IAE/B,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAE5C,MAAM,MAAM,GAAG,yCAAmB,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAE1D,MAAM,GAAG,GAAG,0BAAY,CAAC,mBAAS,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;IAG7D,i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BAAuB,GAAG,mCAA2B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evlop/commons",
3
- "version": "1.0.85",
3
+ "version": "1.0.86",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "peerDependencies": {