@jahia/data-helper 1.0.7 → 1.0.9
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/esm/fragments/PredefinedFragments.js +2 -1
- package/esm/fragments/PredefinedFragments.js.map +1 -0
- package/esm/fragments/encodeName.js +2 -1
- package/esm/fragments/encodeName.js.map +1 -0
- package/esm/fragments/fragments.utils.js +9 -5
- package/esm/fragments/fragments.utils.js.map +1 -0
- package/esm/fragments/getIsNodeTypeFragment.js +6 -2
- package/esm/fragments/getIsNodeTypeFragment.js.map +1 -0
- package/esm/fragments/getPermissionFragment.js +6 -2
- package/esm/fragments/getPermissionFragment.js.map +1 -0
- package/esm/fragments/index.js +2 -1
- package/esm/fragments/index.js.map +1 -0
- package/esm/hooks/index.js +2 -1
- package/esm/hooks/index.js.map +1 -0
- package/esm/hooks/useContentPreview/index.js +2 -1
- package/esm/hooks/useContentPreview/index.js.map +1 -0
- package/esm/hooks/useContentPreview/useContentPreview.gql-queries.js +3 -2
- package/esm/hooks/useContentPreview/useContentPreview.gql-queries.js.map +1 -0
- package/esm/hooks/useContentPreview/useContentPreview.js +2 -1
- package/esm/hooks/useContentPreview/useContentPreview.js.map +1 -0
- package/esm/hooks/useContentPreview/useContentPreview.spec.js +3 -2
- package/esm/hooks/useContentPreview/useContentPreview.spec.js.map +1 -0
- package/esm/hooks/useDeepCompareMemo/index.js +2 -1
- package/esm/hooks/useDeepCompareMemo/index.js.map +1 -0
- package/esm/hooks/useDeepCompareMemo/useDeepCompareMemo.js +2 -1
- package/esm/hooks/useDeepCompareMemo/useDeepCompareMemo.js.map +1 -0
- package/esm/hooks/useDeepCompareMemo/useDeepCompareMemo.spec.js +2 -1
- package/esm/hooks/useDeepCompareMemo/useDeepCompareMemo.spec.js.map +1 -0
- package/esm/hooks/useNodeChecks/index.js +2 -1
- package/esm/hooks/useNodeChecks/index.js.map +1 -0
- package/esm/hooks/useNodeChecks/useNodeChecks.js +6 -2
- package/esm/hooks/useNodeChecks/useNodeChecks.js.map +1 -0
- package/esm/hooks/useNodeChecks/useNodeChecks.spec.js +85 -89
- package/esm/hooks/useNodeChecks/useNodeChecks.spec.js.map +1 -0
- package/esm/hooks/useNodeInfo/index.js +2 -1
- package/esm/hooks/useNodeInfo/index.js.map +1 -0
- package/esm/hooks/useNodeInfo/useMemoRequest.js +4 -3
- package/esm/hooks/useNodeInfo/useMemoRequest.js.map +1 -0
- package/esm/hooks/useNodeInfo/useNodeInfo.gql-queries.js +2 -1
- package/esm/hooks/useNodeInfo/useNodeInfo.gql-queries.js.map +1 -0
- package/esm/hooks/useNodeInfo/useNodeInfo.js +20 -7
- package/esm/hooks/useNodeInfo/useNodeInfo.js.map +1 -0
- package/esm/hooks/useNodeInfo/useNodeInfo.spec.js +303 -320
- package/esm/hooks/useNodeInfo/useNodeInfo.spec.js.map +1 -0
- package/esm/hooks/useNodeInfo/useNodeInfo.utils.js +6 -3
- package/esm/hooks/useNodeInfo/useNodeInfo.utils.js.map +1 -0
- package/esm/hooks/useSchemaFields/index.js +2 -1
- package/esm/hooks/useSchemaFields/index.js.map +1 -0
- package/esm/hooks/useSchemaFields/useSchemaFields.gql-queries.js +2 -1
- package/esm/hooks/useSchemaFields/useSchemaFields.gql-queries.js.map +1 -0
- package/esm/hooks/useSchemaFields/{useSchemaFields.jsx → useSchemaFields.js} +2 -1
- package/esm/hooks/useSchemaFields/useSchemaFields.js.map +1 -0
- package/esm/hooks/useSiteInfo/index.js +2 -1
- package/esm/hooks/useSiteInfo/index.js.map +1 -0
- package/esm/hooks/useSiteInfo/useSiteInfo.gql-queries.js +2 -1
- package/esm/hooks/useSiteInfo/useSiteInfo.gql-queries.js.map +1 -0
- package/esm/hooks/useSiteInfo/useSiteInfo.js +6 -2
- package/esm/hooks/useSiteInfo/useSiteInfo.js.map +1 -0
- package/esm/hooks/useSiteInfo/useSiteInfo.spec.js +2 -1
- package/esm/hooks/useSiteInfo/useSiteInfo.spec.js.map +1 -0
- package/esm/hooks/useTreeEntries/index.js +2 -1
- package/esm/hooks/useTreeEntries/index.js.map +1 -0
- package/esm/hooks/useTreeEntries/useTreeEntries.gql-queries.js +2 -1
- package/esm/hooks/useTreeEntries/useTreeEntries.gql-queries.js.map +1 -0
- package/esm/hooks/useTreeEntries/useTreeEntries.js +7 -3
- package/esm/hooks/useTreeEntries/useTreeEntries.js.map +1 -0
- package/esm/hooks/useTreeEntries/useTreeEntries.spec.js +2 -1
- package/esm/hooks/useTreeEntries/useTreeEntries.spec.js.map +1 -0
- package/esm/index.js +2 -1
- package/esm/index.js.map +1 -0
- package/esm/legacy/Picker.gql-fragments.js +2 -1
- package/esm/legacy/Picker.gql-fragments.js.map +1 -0
- package/esm/legacy/Picker.js +7 -4
- package/esm/legacy/Picker.js.map +1 -0
- package/esm/legacy/index.js +2 -1
- package/esm/legacy/index.js.map +1 -0
- package/js/fragments/PredefinedFragments.js +2 -1
- package/js/fragments/PredefinedFragments.js.map +1 -0
- package/js/fragments/encodeName.js +2 -1
- package/js/fragments/encodeName.js.map +1 -0
- package/js/fragments/fragments.utils.js +8 -4
- package/js/fragments/fragments.utils.js.map +1 -0
- package/js/fragments/getIsNodeTypeFragment.js +6 -2
- package/js/fragments/getIsNodeTypeFragment.js.map +1 -0
- package/js/fragments/getPermissionFragment.js +6 -2
- package/js/fragments/getPermissionFragment.js.map +1 -0
- package/js/fragments/index.js +2 -1
- package/js/fragments/index.js.map +1 -0
- package/js/hooks/index.js +2 -1
- package/js/hooks/index.js.map +1 -0
- package/js/hooks/useContentPreview/index.js +2 -1
- package/js/hooks/useContentPreview/index.js.map +1 -0
- package/js/hooks/useContentPreview/useContentPreview.gql-queries.js +4 -3
- package/js/hooks/useContentPreview/useContentPreview.gql-queries.js.map +1 -0
- package/js/hooks/useContentPreview/useContentPreview.js +2 -1
- package/js/hooks/useContentPreview/useContentPreview.js.map +1 -0
- package/js/hooks/useContentPreview/useContentPreview.spec.js +3 -2
- package/js/hooks/useContentPreview/useContentPreview.spec.js.map +1 -0
- package/js/hooks/useDeepCompareMemo/index.js +2 -1
- package/js/hooks/useDeepCompareMemo/index.js.map +1 -0
- package/js/hooks/useDeepCompareMemo/useDeepCompareMemo.js +2 -1
- package/js/hooks/useDeepCompareMemo/useDeepCompareMemo.js.map +1 -0
- package/js/hooks/useDeepCompareMemo/useDeepCompareMemo.spec.js +2 -1
- package/js/hooks/useDeepCompareMemo/useDeepCompareMemo.spec.js.map +1 -0
- package/js/hooks/useNodeChecks/index.js +2 -1
- package/js/hooks/useNodeChecks/index.js.map +1 -0
- package/js/hooks/useNodeChecks/useNodeChecks.js +6 -2
- package/js/hooks/useNodeChecks/useNodeChecks.js.map +1 -0
- package/js/hooks/useNodeChecks/useNodeChecks.spec.js +85 -89
- package/js/hooks/useNodeChecks/useNodeChecks.spec.js.map +1 -0
- package/js/hooks/useNodeInfo/index.js +2 -1
- package/js/hooks/useNodeInfo/index.js.map +1 -0
- package/js/hooks/useNodeInfo/useMemoRequest.js +4 -3
- package/js/hooks/useNodeInfo/useMemoRequest.js.map +1 -0
- package/js/hooks/useNodeInfo/useNodeInfo.gql-queries.js +2 -1
- package/js/hooks/useNodeInfo/useNodeInfo.gql-queries.js.map +1 -0
- package/js/hooks/useNodeInfo/useNodeInfo.js +20 -7
- package/js/hooks/useNodeInfo/useNodeInfo.js.map +1 -0
- package/js/hooks/useNodeInfo/useNodeInfo.spec.js +303 -320
- package/js/hooks/useNodeInfo/useNodeInfo.spec.js.map +1 -0
- package/js/hooks/useNodeInfo/useNodeInfo.utils.js +6 -3
- package/js/hooks/useNodeInfo/useNodeInfo.utils.js.map +1 -0
- package/js/hooks/useSchemaFields/index.js +2 -1
- package/js/hooks/useSchemaFields/index.js.map +1 -0
- package/js/hooks/useSchemaFields/useSchemaFields.gql-queries.js +2 -1
- package/js/hooks/useSchemaFields/useSchemaFields.gql-queries.js.map +1 -0
- package/js/hooks/useSchemaFields/{useSchemaFields.jsx → useSchemaFields.js} +2 -1
- package/js/hooks/useSchemaFields/useSchemaFields.js.map +1 -0
- package/js/hooks/useSiteInfo/index.js +2 -1
- package/js/hooks/useSiteInfo/index.js.map +1 -0
- package/js/hooks/useSiteInfo/useSiteInfo.gql-queries.js +2 -1
- package/js/hooks/useSiteInfo/useSiteInfo.gql-queries.js.map +1 -0
- package/js/hooks/useSiteInfo/useSiteInfo.js +6 -2
- package/js/hooks/useSiteInfo/useSiteInfo.js.map +1 -0
- package/js/hooks/useSiteInfo/useSiteInfo.spec.js +2 -1
- package/js/hooks/useSiteInfo/useSiteInfo.spec.js.map +1 -0
- package/js/hooks/useTreeEntries/index.js +2 -1
- package/js/hooks/useTreeEntries/index.js.map +1 -0
- package/js/hooks/useTreeEntries/useTreeEntries.gql-queries.js +2 -1
- package/js/hooks/useTreeEntries/useTreeEntries.gql-queries.js.map +1 -0
- package/js/hooks/useTreeEntries/useTreeEntries.js +7 -3
- package/js/hooks/useTreeEntries/useTreeEntries.js.map +1 -0
- package/js/hooks/useTreeEntries/useTreeEntries.spec.js +2 -1
- package/js/hooks/useTreeEntries/useTreeEntries.spec.js.map +1 -0
- package/js/index.js +2 -1
- package/js/index.js.map +1 -0
- package/js/legacy/Picker.gql-fragments.js +2 -1
- package/js/legacy/Picker.gql-fragments.js.map +1 -0
- package/js/legacy/Picker.js +8 -5
- package/js/legacy/Picker.js.map +1 -0
- package/js/legacy/index.js +2 -1
- package/js/legacy/index.js.map +1 -0
- package/package.json +33 -30
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["gql","displayName","variables","language","applyFor","_templateObject","_taggedTemplateLiteral","primaryNodeType","displayLanguage","displayLanguageSet","_templateObject2","parentNode","_templateObject3","aggregatedPublicationInfo","aggregatedPublicationInfoSubNodes","aggregatedPublicationInfoIncludeReference","_templateObject4","aggregatedPublicationInfoWithExistInLive","_templateObject5","operationSupport","_templateObject6","allProperties","_templateObject7","getProperties","getPropertiesNames","_templateObject8","installedModules","_templateObject9","siteLanguages","_templateObject10","displayableNode","_templateObject11","lockInfo","_templateObject12","subNodesCount","subNodesCountTypes","_templateObject13","childNodeTypes","_templateObject14","contentRestrictions","_templateObject15","siteHomePage","_templateObject16","nodeCacheRequiredFields","_templateObject17","nodeTypeDisplayName","_templateObject18","nodeTypeSubTypes","_templateObject19","mimeTypes","_templateObject20","PredefinedFragments"],"sources":["PredefinedFragments.js"],"sourcesContent":["import gql from 'graphql-tag';\n\nexport const displayName = {\n variables: {\n language: 'String!'\n },\n applyFor: 'node',\n gql: gql`fragment DisplayName on JCRNode {\n displayName(language:$language)\n }`\n};\n\nexport const primaryNodeType = {\n variables: {\n displayLanguage: 'String!',\n displayLanguageSet: 'Boolean!'\n },\n applyFor: 'node',\n gql: gql`fragment NodeInfoPrimaryNodeType on JCRNode {\n primaryNodeType {\n name\n displayName(language: $displayLanguage) @include(if: $displayLanguageSet)\n icon\n }\n }`\n};\n\nexport const parentNode = {\n applyFor: 'node',\n gql: gql`fragment ParentNodeInfo on JCRNode {\n parent {\n path\n name\n ...NodeCacheRequiredFields\n }\n }`\n};\n\nexport const aggregatedPublicationInfo = {\n variables: {\n language: 'String!',\n aggregatedPublicationInfoSubNodes: 'Boolean',\n aggregatedPublicationInfoIncludeReference: 'Boolean'\n },\n applyFor: 'node',\n gql: gql`fragment AggregatedPublicationInfo on JCRNode {\n aggregatedPublicationInfo(language: $language, subNodes: $aggregatedPublicationInfoSubNodes, references:$aggregatedPublicationInfoIncludeReference) {\n publicationStatus\n }\n }`\n};\n\nexport const aggregatedPublicationInfoWithExistInLive = {\n variables: {\n language: 'String!',\n aggregatedPublicationInfoSubNodes: 'Boolean',\n aggregatedPublicationInfoIncludeReference: 'Boolean'\n },\n applyFor: 'node',\n gql: gql`fragment AggregatedPublicationInfoWithExistsInLive on JCRNode {\n aggregatedPublicationInfo(language: $language, subNodes: $aggregatedPublicationInfoSubNodes, references:$aggregatedPublicationInfoIncludeReference) {\n publicationStatus\n existsInLive\n }\n }`\n};\n\nexport const operationSupport = {\n applyFor: 'node',\n gql: gql`fragment OperationSupport on JCRNode {\n operationsSupport {\n lock\n markForDeletion\n publication\n }\n }`\n};\n\nexport const allProperties = {\n variables: {\n language: 'String!'\n },\n applyFor: 'node',\n gql: gql`fragment NodeAllProperties on JCRNode {\n properties(language:$language) {\n name\n value\n values\n }\n }`\n};\n\nexport const getProperties = {\n variables: {\n language: 'String!',\n getPropertiesNames: '[String!]!'\n },\n applyFor: 'node',\n gql: gql`fragment NodeProperties on JCRNode {\n properties(names: $getPropertiesNames, language: $language) {\n name\n value\n values\n }\n }`\n};\n\nexport const installedModules = {\n applyFor: 'node',\n gql: gql`fragment SiteInstalledModules on JCRNode {\n site {\n installedModulesWithAllDependencies\n ...NodeCacheRequiredFields\n }\n }`\n};\n\nexport const siteLanguages = {\n applyFor: 'node',\n gql: gql`fragment SiteLanguages on JCRNode {\n site {\n defaultLanguage\n ...NodeCacheRequiredFields\n languages {\n displayName\n language\n activeInEdit\n }\n }\n }`\n};\n\nexport const displayableNode = {\n applyFor: 'node',\n gql: gql`fragment DisplayableNodePath on JCRNode {\n displayableNode {\n path\n ...NodeCacheRequiredFields\n }\n }`\n};\n\nexport const lockInfo = {\n applyFor: 'node',\n gql: gql`fragment LockInfo on JCRNode {\n lockOwner: property(name: \"jcr:lockOwner\") {\n value\n }\n lockTypes: property(name: \"j:lockTypes\") {\n values\n }\n }`\n};\n\nexport const subNodesCount = {\n variables: {\n subNodesCountTypes: '[String!]!'\n },\n applyFor: 'node',\n gql: gql`fragment SubNodesCount on JCRNode {\n subNodes: children(typesFilter: {types: $subNodesCountTypes, multi: ANY}) {\n pageInfo {\n totalCount\n }\n }\n }`\n};\n\nexport const childNodeTypes = {\n applyFor: 'node',\n gql: gql`fragment AllowedChildNodeType on JCRNode {\n allowedChildNodeTypes(includeSubTypes: false) {\n name\n }\n }`\n};\n\nexport const contentRestrictions = {\n applyFor: 'node',\n gql: gql`fragment ContentRestriction on JCRNode {\n contributeTypes: property(name: \"j:contributeTypes\") {\n values\n }\n ancestors(fieldFilter: {filters: {evaluation: NOT_EMPTY, fieldName: \"contributeTypes\"}}) {\n ...NodeCacheRequiredFields\n contributeTypes : property(name: \"j:contributeTypes\") {\n values\n }\n }\n }`\n};\n\nexport const siteHomePage = {\n applyFor: 'node',\n gql: gql`fragment NodeSiteHomePage on JCRNode {\n children(typesFilter:{types:[\"jnt:page\"]}, propertiesFilter:{filters:[{property:\"j:isHomePage\", value:\"true\" }]}) {\n nodes {\n path\n ...NodeCacheRequiredFields\n }\n }\n }`\n};\n\nexport const nodeCacheRequiredFields = {\n applyFor: 'node',\n gql: gql`fragment NodeCacheRequiredFields on JCRNode {\n uuid\n workspace\n path\n }`\n};\n\nexport const nodeTypeDisplayName = {\n variables: {\n language: 'String!'\n },\n applyFor: 'nodeType',\n gql: gql`fragment NodeTypeDisplayName on JCRNodeType {\n displayName(language:$language)\n }`\n};\n\nexport const nodeTypeSubTypes = {\n variables: {\n language: 'String!'\n },\n applyFor: 'nodeType',\n gql: gql`fragment NodeTypeSubTypes on JCRNodeType {\n subTypes {\n nodes {\n name\n displayName(language:$language)\n abstract\n mixin\n }\n }\n }`\n};\n\nexport const mimeTypes = {\n applyFor: 'node',\n gql: gql`fragment NodeInfoResourceNode on JCRNode {\n resourceChildren: children(names: [\"jcr:content\"]) {\n nodes {\n ...NodeCacheRequiredFields\n mimeType: property(name: \"jcr:mimeType\") {\n value\n }\n }\n }\n }`\n};\n\nexport const PredefinedFragments = {\n displayName,\n primaryNodeType,\n parentNode,\n aggregatedPublicationInfo,\n operationSupport,\n allProperties,\n getProperties,\n installedModules,\n siteLanguages,\n displayableNode,\n lockInfo,\n subNodesCount,\n contentRestrictions,\n siteHomePage,\n nodeCacheRequiredFields,\n nodeTypeDisplayName,\n nodeTypeSubTypes,\n mimeTypes\n};\n"],"mappings":";;AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,OAAO,IAAMC,WAAW,GAAG;EACvBC,SAAS,EAAE;IACPC,QAAQ,EAAE;EACd,CAAC;EACDC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,gBAAgB;EAChBE,aAAa,EAAbA,aAAa;EACbE,eAAe,EAAfA,eAAe;EACfE,QAAQ,EAARA,QAAQ;EACRE,aAAa,EAAbA,aAAa;EACbK,mBAAmB,EAAnBA,mBAAmB;EACnBE,YAAY,EAAZA,YAAY;EACZE,uBAAuB,EAAvBA,uBAAuB;EACvBE,mBAAmB,EAAnBA,mBAAmB;EACnBE,gBAAgB,EAAhBA,gBAAgB;EAChBE,SAAS,EAATA;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["encodeName","name","btoa","replace"],"sources":["encodeName.js"],"sourcesContent":["export const encodeName = name => 'encoded_' + btoa(name).replace(/=/g, '');\n"],"mappings":"AAAA,OAAO,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAGC,IAAI;EAAA,OAAI,UAAU,GAAGC,IAAI,CAACD,IAAI,CAAC,CAACE,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;AAAA"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import _cloneDeep from "lodash/cloneDeep";
|
|
1
|
+
import _cloneDeep from "lodash/cloneDeep"; // TODO BACKLOG-12393 - remove lodash
|
|
2
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
4
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
5
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
6
|
-
function _iterableToArrayLimit(arr, i) { var _i =
|
|
6
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
7
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
9
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
10
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
14
|
import { parseType } from 'graphql';
|
|
12
15
|
import { PredefinedFragments } from '../fragments';
|
|
13
16
|
function findParametersInDocument(doc) {
|
|
@@ -158,4 +161,5 @@ function replaceFragmentsInSelectionSet(selectionSet, fragments, def, document)
|
|
|
158
161
|
});
|
|
159
162
|
}
|
|
160
163
|
}
|
|
161
|
-
export { replaceFragmentsInDocument, findParametersInDocument, findFragmentsInSelectionSet };
|
|
164
|
+
export { replaceFragmentsInDocument, findParametersInDocument, findFragmentsInSelectionSet };
|
|
165
|
+
//# sourceMappingURL=fragments.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_typeof","obj","Symbol","iterator","constructor","prototype","_slicedToArray","arr","i","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","o","minLen","_arrayLikeToArray","n","Object","toString","call","slice","name","Array","from","test","len","length","arr2","_i","_s","_e","_x","_r","_arr","_n","_d","next","done","push","value","err","isArray","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","apply","_objectSpread","target","arguments","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","Number","parseType","PredefinedFragments","findParametersInDocument","doc","definitions","flatMap","def","findParametersInSelectionSet","selectionSet","queryCache","replaceFragmentsInDocument","fragments","map","f","gql","sort","join","clonedQuery","_cloneDeep","replaceFragmentsInSelectionSet","selections","sel","kind","concat","findFragmentsInSelectionSet","document","_selectionSet$selecti","newFragmentsSpreads","removedFragmentSpreads","existing","find","definition","frag","applyableFragments","applyFor","fragment","newSpread","allVariables","reduce","result","variables","entries","_ref","_ref2","variableDefinitions","variable","type","noLocation","indexOf"],"sources":["fragments.utils.js"],"sourcesContent":["// TODO BACKLOG-12393 - remove lodash\nimport * as _ from 'lodash';\nimport {parseType} from 'graphql';\nimport {PredefinedFragments} from '../fragments';\n\nfunction findParametersInDocument(doc) {\n if (doc && doc.definitions) {\n return doc.definitions.flatMap(def => findParametersInSelectionSet(def.selectionSet));\n }\n\n return [];\n}\n\nconst queryCache = {};\n\nfunction replaceFragmentsInDocument(doc, fragments) {\n if (!fragments) {\n fragments = [];\n }\n\n const key = doc.definitions[0].name.value + '__' + fragments\n .map(f => (typeof f === 'string') ? PredefinedFragments[f] : f)\n .map(f => f.gql.definitions[0].name.value)\n .sort()\n .join('_');\n\n if (queryCache[key]) {\n return queryCache[key];\n }\n\n let clonedQuery = null;\n if (doc && doc.definitions) {\n clonedQuery = _.cloneDeep(doc);\n clonedQuery.definitions.forEach(def => replaceFragmentsInSelectionSet(def.selectionSet, fragments, def, clonedQuery));\n clonedQuery.definitions[0].name.value = key;\n }\n\n queryCache[key] = clonedQuery;\n\n return clonedQuery;\n}\n\nfunction findParametersInSelectionSet(selectionSet) {\n if (selectionSet && selectionSet.selections) {\n return selectionSet.selections.flatMap(sel =>\n sel.arguments.filter(arg => (arg.value.kind === 'Variable')).flatMap(arg => arg.value.name.value)\n .concat(findParametersInSelectionSet(sel.selectionSet))\n .filter(f => typeof f !== 'undefined')\n );\n }\n\n return [];\n}\n\nfunction findFragmentsInSelectionSet(selectionSet) {\n if (selectionSet && selectionSet.selections) {\n return selectionSet.selections.filter(sel => sel.kind === 'FragmentSpread').map(sel => sel.name.value)\n .concat(selectionSet.selections.flatMap(sel => findFragmentsInSelectionSet(sel.selectionSet)));\n }\n\n return [];\n}\n\nfunction replaceFragmentsInSelectionSet(selectionSet, fragments, def, document) {\n if (selectionSet && selectionSet.selections) {\n const newFragmentsSpreads = [];\n const removedFragmentSpreads = [];\n // Look for all existing fragment spreads in selection set\n selectionSet.selections.filter(sel => sel.kind === 'FragmentSpread').forEach(sel => {\n // Handle only named fragments\n if (sel.name.value) {\n // Check if spread exists in current doc - if not, we replace or remove it\n const existing = document.definitions.find(definition => definition.kind === 'FragmentDefinition' && definition.name.value === sel.name.value);\n\n if (!existing) {\n // First remove the spread, as it has no match in document\n removedFragmentSpreads.push(sel);\n\n // Check if a replacement is provided for this pseudo-fragment, then insert spreads and definitions\n if (fragments) {\n fragments = fragments.map(frag => (typeof frag === 'string') ? PredefinedFragments[frag] : frag);\n\n const applyableFragments = fragments.filter(frag => frag.applyFor === sel.name.value);\n\n applyableFragments.flatMap(fragment => fragment.gql.definitions).forEach(frag => {\n const newSpread = _.cloneDeep(sel);\n newSpread.name.value = frag.name.value;\n newFragmentsSpreads.push(newSpread);\n\n // Add the new fragment definition in document if it has not already been added\n const existing = document.definitions.find(definition => definition.kind === 'FragmentDefinition' && definition.name.value === frag.name.value);\n if (!existing) {\n document.definitions.push(frag);\n }\n });\n\n // Adds the associated variables to the query\n const allVariables = applyableFragments.reduce((result, n) => ({...result, ...n.variables}), {});\n Object.entries(allVariables).forEach(([name, value]) => {\n const existing = def.variableDefinitions.find(def => def.variable.name.value === name);\n if (!existing) {\n const type = parseType(value, {noLocation: true});\n def.variableDefinitions.push({\n kind: 'VariableDefinition',\n variable: {\n kind: 'Variable',\n name: {\n kind: 'Name',\n value: name\n }\n },\n type\n });\n }\n });\n }\n }\n }\n });\n\n // Removed replaced spreads\n selectionSet.selections = selectionSet.selections.filter(sel => removedFragmentSpreads.indexOf(sel) === -1);\n\n // Add all new spreads\n selectionSet.selections.push(...newFragmentsSpreads);\n\n // Recursively call on sub-selections set\n selectionSet.selections.forEach(sel => replaceFragmentsInSelectionSet(sel.selectionSet, fragments, def, document));\n }\n}\n\nexport {replaceFragmentsInDocument, findParametersInDocument, findFragmentsInSelectionSet};\n"],"mappings":"2CAAA;AAAA,SAAAA,QAAAC,GAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,GAAA,kBAAAA,GAAA,gBAAAA,GAAA,WAAAA,GAAA,yBAAAC,MAAA,IAAAD,GAAA,CAAAG,WAAA,KAAAF,MAAA,IAAAD,GAAA,KAAAC,MAAA,CAAAG,SAAA,qBAAAJ,GAAA,KAAAD,OAAA,CAAAC,GAAA;AAAA,SAAAK,eAAAC,GAAA,EAAAC,CAAA,WAAAC,eAAA,CAAAF,GAAA,KAAAG,qBAAA,CAAAH,GAAA,EAAAC,CAAA,KAAAG,2BAAA,CAAAJ,GAAA,EAAAC,CAAA,KAAAI,gBAAA;AAAA,SAAAA,iBAAA,cAAAC,SAAA;AAAA,SAAAF,4BAAAG,CAAA,EAAAC,MAAA,SAAAD,CAAA,qBAAAA,CAAA,sBAAAE,iBAAA,CAAAF,CAAA,EAAAC,MAAA,OAAAE,CAAA,GAAAC,MAAA,CAAAb,SAAA,CAAAc,QAAA,CAAAC,IAAA,CAAAN,CAAA,EAAAO,KAAA,aAAAJ,CAAA,iBAAAH,CAAA,CAAAV,WAAA,EAAAa,CAAA,GAAAH,CAAA,CAAAV,WAAA,CAAAkB,IAAA,MAAAL,CAAA,cAAAA,CAAA,mBAAAM,KAAA,CAAAC,IAAA,CAAAV,CAAA,OAAAG,CAAA,+DAAAQ,IAAA,CAAAR,CAAA,UAAAD,iBAAA,CAAA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AAAc,KAAA,CAAAkD,qBAAA,EAAIC,mBAAmB,CAAC;;IAEpD;IACAnB,YAAY,CAACY,UAAU,CAACvC,OAAO,CAAC,UAAAwC,GAAG;MAAA,OAAIF,8BAA8B,CAACE,GAAG,CAACb,YAAY,EAAEG,SAAS,EAAEL,GAAG,EAAEmB,QAAQ,CAAC;IAAA,EAAC;EACtH;AACJ;AAEA,SAAQf,0BAA0B,EAAER,wBAAwB,EAAEsB,2BAA2B"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
3
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
7
|
import gql from 'graphql-tag';
|
|
5
8
|
import { encodeName } from './encodeName';
|
|
6
9
|
var fragments = {};
|
|
@@ -23,4 +26,5 @@ export var getNodeTypeFragment = function getNodeTypeFragment(name) {
|
|
|
23
26
|
};
|
|
24
27
|
export var getEncodedNodeTypeName = function getEncodedNodeTypeName(name) {
|
|
25
28
|
return 'nodeType_' + encodeName(name);
|
|
26
|
-
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=getIsNodeTypeFragment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["gql","encodeName","fragments","getNodeTypeFragment","name","encodedName","getEncodedNodeTypeName","fragment","applyFor","variables","_defineProperty","_templateObject","_taggedTemplateLiteral","types"],"sources":["getIsNodeTypeFragment.js"],"sourcesContent":["import gql from 'graphql-tag';\nimport {encodeName} from './encodeName';\n\nconst fragments = {};\n\nexport const getNodeTypeFragment = name => {\n const encodedName = getEncodedNodeTypeName(name);\n if (!fragments[encodedName]) {\n const fragment = {\n applyFor: 'node',\n variables: {\n [encodedName]: 'InputNodeTypesInput!'\n },\n gql: gql`fragment NodeType_${encodedName} on JCRNode {\n ${encodedName}:isNodeType(type: $${encodedName})\n }`\n };\n\n fragments[encodedName] = fragment;\n }\n\n return {\n fragment: fragments[encodedName],\n variables: {\n [encodedName]: {\n types: name\n }\n }\n };\n};\n\nexport const getEncodedNodeTypeName = name => 'nodeType_' + encodeName(name);\n"],"mappings":";;;;;;AAAA,OAAOA,GAAG,MAAM,aAAa;AAC7B,SAAQC,UAAU,QAAO,cAAc;AAEvC,IAAMC,SAAS,GAAG,CAAC,CAAC;AAEpB,OAAO,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAGC,IAAI,EAAI;EACvC,IAAMC,WAAW,GAAGC,sBAAsB,CAACF,IAAI,CAAC;EAChD,IAAI,CAACF,SAAS,CAACG,WAAW,CAAC,EAAE;IACzB,IAAME,QAAQ,GAAG;MACbC,QAAQ,EAAE,MAAM;MAChBC,SAAS,EAAAC,eAAA,KACJL,WAAW,EAAG,sBAAsB,CACxC;MACDL,GAAG,EAAEA,GAAG,CAAAW,eAAA,KAAAA,eAAA,GAAAC,sBAAA,yGAAqBP,WAAW,EAClCA,WAAW,EAAsBA,WAAW;IAEtD,CAAC;IAEDH,SAAS,CAACG,WAAW,CAAC,GAAGE,QAAQ;EACrC;EAEA,OAAO;IACHA,QAAQ,EAAEL,SAAS,CAACG,WAAW,CAAC;IAChCI,SAAS,EAAAC,eAAA,KACJL,WAAW,EAAG;MACXQ,KAAK,EAAET;IACX,CAAC;EAET,CAAC;AACL,CAAC;AAED,OAAO,IAAME,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAAGF,IAAI;EAAA,OAAI,WAAW,GAAGH,UAAU,CAACG,IAAI,CAAC;AAAA"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
var _templateObject, _templateObject2;
|
|
2
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
3
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
7
|
import gql from 'graphql-tag';
|
|
5
8
|
import { encodeName } from './encodeName';
|
|
6
9
|
var fragments = {};
|
|
@@ -36,4 +39,5 @@ export var getSitePermissionFragment = function getSitePermissionFragment(name)
|
|
|
36
39
|
};
|
|
37
40
|
export var getEncodedPermissionName = function getEncodedPermissionName(name) {
|
|
38
41
|
return 'permission_' + encodeName(name);
|
|
39
|
-
};
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=getPermissionFragment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["gql","encodeName","fragments","getPermissionFragment","name","encodedName","getEncodedPermissionName","fragment","applyFor","variables","_defineProperty","_templateObject","_taggedTemplateLiteral","getSitePermissionFragment","_templateObject2"],"sources":["getPermissionFragment.js"],"sourcesContent":["import gql from 'graphql-tag';\nimport {encodeName} from './encodeName';\n\nconst fragments = {};\n\nexport const getPermissionFragment = name => {\n const encodedName = getEncodedPermissionName(name);\n if (!fragments[encodedName]) {\n const fragment = {\n applyFor: 'node',\n variables: {\n [encodedName]: 'String!'\n },\n gql: gql`fragment NodePermission_${encodedName} on JCRNode {\n ${encodedName}:hasPermission(permissionName: $${encodedName})\n }`\n };\n\n fragments[encodedName] = fragment;\n }\n\n return {\n fragment: fragments[encodedName],\n variables: {\n [encodedName]: name\n }\n };\n};\n\nexport const getSitePermissionFragment = name => {\n const encodedName = getEncodedPermissionName(name);\n if (!fragments['site_' + encodedName]) {\n const fragment = {\n applyFor: 'node',\n variables: {\n [encodedName]: 'String!'\n },\n gql: gql`fragment SiteNodePermission_${encodedName} on JCRNode {\n site {\n ...NodeCacheRequiredFields\n ${encodedName}:hasPermission(permissionName: $${encodedName})\n }\n }`\n };\n\n fragments['site_' + encodedName] = fragment;\n }\n\n return {\n fragment: fragments['site_' + encodedName],\n variables: {\n [encodedName]: name\n }\n };\n};\n\nexport const getEncodedPermissionName = name => 'permission_' + encod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,SAAS,CAAC,OAAO,GAAGG,WAAW,CAAC;IAC1CI,SAAS,EAAAC,eAAA,KACJL,WAAW,EAAGD,IAAI;EAE3B,CAAC;AACL,CAAC;AAED,OAAO,IAAME,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAGF,IAAI;EAAA,OAAI,aAAa,GAAGH,UAAU,CAACG,IAAI,CAAC;AAAA"}
|
package/esm/fragments/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.js"],"sourcesContent":["export * from './PredefinedFragments';\nexport * from './fragments.utils';\n"],"mappings":"AAAA,cAAc,uBAAuB;AACrC,cAAc,mBAAmB"}
|
package/esm/hooks/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.js"],"sourcesContent":["export * from './useContentPreview';\nexport * from './useNodeChecks';\nexport * from './useNodeInfo';\nexport * from './useSiteInfo';\nexport * from './useTreeEntries';\n"],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,iBAAiB;AAC/B,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,kBAAkB"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './useContentPreview';
|
|
1
|
+
export * from './useContentPreview';
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.js"],"sourcesContent":["export * from './useContentPreview';\n"],"mappings":"AAAA,cAAc,qBAAqB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import gql from 'graphql-tag';
|
|
4
|
-
import { nodeCacheRequiredFields } from '../../fragments
|
|
5
|
-
export var CONTENT_PREVIEW_QUERY = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["query previewQueryByWorkspace($path: String!, $templateType: String!, $view: String!, $contextConfiguration: String!, $language: String!, $workspace: Workspace!, $requestAttributes: [InputRenderRequestAttributeInput]) {\n jcr(workspace: $workspace) {\n nodeByPath(path: $path) {\n id: uuid\n isFile: isNodeType(type: {types: [\"jnt:file\"]})\n path\n lastModified: property(name: \"jcr:lastModified\", language: $language) {\n value\n }\n renderedContent(templateType: $templateType, view: $view, contextConfiguration: $contextConfiguration, language: $language, requestAttributes: $requestAttributes) {\n output\n staticAssets(type: \"css\") {\n key\n }\n }\n ...NodeCacheRequiredFields\n }\n }\n}", ""])), nodeCacheRequiredFields.gql);
|
|
4
|
+
import { mimeTypes, nodeCacheRequiredFields } from '../../fragments';
|
|
5
|
+
export var CONTENT_PREVIEW_QUERY = gql(_templateObject || (_templateObject = _taggedTemplateLiteral(["query previewQueryByWorkspace($path: String!, $templateType: String!, $view: String!, $contextConfiguration: String!, $language: String!, $workspace: Workspace!, $requestAttributes: [InputRenderRequestAttributeInput]) {\n jcr(workspace: $workspace) {\n nodeByPath(path: $path) {\n id: uuid\n isFile: isNodeType(type: {types: [\"jnt:file\"]})\n path\n lastModified: property(name: \"jcr:lastModified\", language: $language) {\n value\n }\n renderedContent(templateType: $templateType, view: $view, contextConfiguration: $contextConfiguration, language: $language, requestAttributes: $requestAttributes) {\n output\n staticAssets(type: \"css\") {\n key\n }\n }\n ...NodeInfoResourceNode\n ...NodeCacheRequiredFields\n }\n }\n}", "", ""])), nodeCacheRequiredFields.gql, mimeTypes.gql);
|
|
6
|
+
//# sourceMappingURL=useContentPreview.gql-queries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["gql","mimeTypes","nodeCacheRequiredFields","CONTENT_PREVIEW_QUERY","_templateObject","_taggedTemplateLiteral"],"sources":["useContentPreview.gql-queries.js"],"sourcesContent":["import gql from 'graphql-tag';\nimport {mimeTypes, nodeCacheRequiredFields} from '../../fragments';\n\nexport const CONTENT_PREVIEW_QUERY = gql`query previewQueryByWorkspace($path: String!, $templateType: String!, $view: String!, $contextConfiguration: String!, $language: String!, $workspace: Workspace!, $requestAttributes: [InputRenderRequestAttributeInput]) {\n jcr(workspace: $workspace) {\n nodeByPath(path: $path) {\n id: uuid\n isFile: isNodeType(type: {types: [\"jnt:file\"]})\n path\n lastModified: property(name: \"jcr:lastModified\", language: $language) {\n value\n }\n renderedContent(templateType: $templateType, view: $view, contextConfiguration: $contextConfiguration, language: $language, requestAttributes: $requestAttributes) {\n output\n staticAssets(type: \"css\") {\n key\n }\n }\n ...NodeInfoResourceNode\n ...NodeCacheRequiredFields\n }\n }\n}${nodeCacheRequiredFields.gql}${mimeTypes.gql}`;\n"],"mappings":";;AAAA,OAAOA,GAAG,MAAM,aAAa;AAC7B,SAAQC,SAAS,EAAEC,uBAAuB,QAAO,iBAAiB;AAElE,OAAO,IAAMC,qBAAqB,GAAGH,GAAG,CAAAI,eAAA,KAAAA,eAAA,GAAAC,sBAAA,26BAmBrCH,uBAAuB,CAACF,GAAG,EAAGC,SAAS,CAACD,GAAG,CAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useQuery","CONTENT_PREVIEW_QUERY","useContentPreview","_ref","path","workspace","language","templateType","view","contextConfiguration","requestAttributes","fetchPolicy","variables","toUpperCase","errorPolicy"],"sources":["useContentPreview.js"],"sourcesContent":["import {useQuery} from 'react-apollo';\nimport {CONTENT_PREVIEW_QUERY} from './useContentPreview.gql-queries';\n\nexport const useContentPreview = ({\n path,\n workspace,\n language,\n templateType,\n view,\n contextConfiguration,\n requestAttributes,\n fetchPolicy\n}) => {\n const variables = {\n path,\n templateType,\n view,\n contextConfiguration,\n language,\n workspace: workspace.toUpperCase(),\n requestAttributes\n };\n\n return useQuery(CONTENT_PREVIEW_QUERY, {\n variables,\n errorPolicy: 'all',\n fetchPolicy\n });\n};\n"],"mappings":"AAAA,SAAQA,QAAQ,QAAO,cAAc;AACrC,SAAQC,qBAAqB,QAAO,iCAAiC;AAErE,OAAO,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EASxB;EAAA,IARFC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IACZC,IAAI,GAAAL,IAAA,CAAJK,IAAI;IACJC,oBAAoB,GAAAN,IAAA,CAApBM,oBAAoB;IACpBC,iBAAiB,GAAAP,IAAA,CAAjBO,iBAAiB;IACjBC,WAAW,GAAAR,IAAA,CAAXQ,WAAW;EAEX,IAAMC,SAAS,GAAG;IACdR,IAAI,EAAJA,IAAI;IACJG,YAAY,EAAZA,YAAY;IACZC,IAAI,EAAJA,IAAI;IACJC,oBAAoB,EAApBA,oBAAoB;IACpBH,QAAQ,EAARA,QAAQ;IACRD,SAAS,EAAEA,SAAS,CAACQ,WAAW,CAAC,CAAC;IAClCH,iBAAiB,EAAjBA;EACJ,CAAC;EAED,OAAOV,QAAQ,CAACC,qBAAqB,EAAE;IACnCW,SAAS,EAATA,SAAS;IACTE,WAAW,EAAE,KAAK;IAClBH,WAAW,EAAXA;EACJ,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -28,7 +28,8 @@ describe('useContentPreview', function () {
|
|
|
28
28
|
useContentPreview(args);
|
|
29
29
|
expect(useQuery).toHaveBeenCalled();
|
|
30
30
|
});
|
|
31
|
-
it('should return empty object when return
|
|
31
|
+
it('should return empty object when return empty data', function () {
|
|
32
32
|
expect(useContentPreview(args).data).toEqual({});
|
|
33
33
|
});
|
|
34
|
-
});
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=useContentPreview.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useContentPreview","jest","mock","useQuery","fn","data","loading","error","describe","args","beforeEach","path","workspace","language","templateType","view","contextConfiguration","requestAttributes","it","expect","toHaveBeenCalled","toEqual"],"sources":["useContentPreview.spec.js"],"sourcesContent":["import {useContentPreview} from './index.js';\n\njest.mock('react-apollo', () => ({\n useQuery: jest.fn(() => ({\n data: {},\n loading: false,\n error: null\n }))\n}));\n\nimport {useQuery} from 'react-apollo';\n\ndescribe('useContentPreview', () => {\n let args;\n beforeEach(() => {\n args = {\n path: 'site/digitall',\n workspace: 'home',\n language: 'fr',\n templateType: 'player',\n view: 'partial',\n contextConfiguration: 'cc',\n requestAttributes: 'attrs'\n };\n });\n\n it('should trigger a graphql request', () => {\n useContentPreview(args);\n expect(useQuery).toHaveBeenCalled();\n });\n\n it('should return empty object when return empty data', () => {\n expect(useContentPreview(args).data).toEqual({});\n });\n});\n"],"mappings":"AAAA,SAAQA,iBAAiB,QAAO,YAAY;AAE5CC,IAAI,CAACC,IAAI,CAAC,cAAc,EAAE;EAAA,OAAO;IAC7BC,QAAQ,EAAEF,IAAI,CAACG,EAAE,CAAC;MAAA,OAAO;QACrBC,IAAI,EAAE,CAAC,CAAC;QACRC,OAAO,EAAE,KAAK;QACdC,KAAK,EAAE;MACX,CAAC;IAAA,CAAC;EACN,CAAC;AAAA,CAAC,CAAC;AAEH,SAAQJ,QAAQ,QAAO,cAAc;AAErCK,QAAQ,CAAC,mBAAmB,EAAE,YAAM;EAChC,IAAIC,IAAI;EACRC,UAAU,CAAC,YAAM;IACbD,IAAI,GAAG;MACHE,IAAI,EAAE,eAAe;MACrBC,SAAS,EAAE,MAAM;MACjBC,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE,QAAQ;MACtBC,IAAI,EAAE,SAAS;MACfC,oBAAoB,EAAE,IAAI;MAC1BC,iBAAiB,EAAE;IACvB,CAAC;EACL,CAAC,CAAC;EAEFC,EAAE,CAAC,kCAAkC,EAAE,YAAM;IACzClB,iBAAiB,CAACS,IAAI,CAAC;IACvBU,MAAM,CAAChB,QAAQ,CAAC,CAACiB,gBAAgB,CAAC,CAAC;EACvC,CAAC,CAAC;EAEFF,EAAE,CAAC,mDAAmD,EAAE,YAAM;IAC1DC,MAAM,CAACnB,iBAAiB,CAACS,IAAI,CAAC,CAACJ,IAAI,CAAC,CAACgB,OAAO,CAAC,CAAC,CAAC,CAAC;EACpD,CAAC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './useDeepCompareMemo';
|
|
1
|
+
export * from './useDeepCompareMemo';
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.js"],"sourcesContent":["export * from './useDeepCompareMemo';\n"],"mappings":"AAAA,cAAc,sBAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useRef","deepEquals","useDeepCompareMemoize","value","ref","current"],"sources":["useDeepCompareMemo.js"],"sourcesContent":["import {useRef} from 'react';\nimport deepEquals from 'fast-deep-equal';\n\nexport const useDeepCompareMemoize = value => {\n const ref = useRef(value);\n\n if (!deepEquals(value, ref.current)) {\n ref.current = value;\n }\n\n return ref.current;\n};\n"],"mappings":"AAAA,SAAQA,MAAM,QAAO,OAAO;AAC5B,OAAOC,UAAU,MAAM,iBAAiB;AAExC,OAAO,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAGC,KAAK,EAAI;EAC1C,IAAMC,GAAG,GAAGJ,MAAM,CAACG,KAAK,CAAC;EAEzB,IAAI,CAACF,UAAU,CAACE,KAAK,EAAEC,GAAG,CAACC,OAAO,CAAC,EAAE;IACjCD,GAAG,CAACC,OAAO,GAAGF,KAAK;EACvB;EAEA,OAAOC,GAAG,CAACC,OAAO;AACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useDeepCompareMemoize","jest","mock","current","useRef","v","describe","beforeEach","restoreAllMocks","it","origValue1","origValue2","value1","value2","expect","toBe"],"sources":["useDeepCompareMemo.spec.js"],"sourcesContent":["import {useDeepCompareMemoize} from './index';\n\njest.mock('react', () => {\n let current;\n\n return ({\n useRef(v) {\n if (!current) {\n current = v;\n }\n\n return ({\n current\n });\n }\n });\n});\n\ndescribe('useDeepCompareMemoize', () => {\n beforeEach(() => {\n jest.restoreAllMocks();\n });\n\n it('should return the same value', () => {\n const origValue1 = ['v1'];\n const origValue2 = ['v1'];\n const value1 = useDeepCompareMemoize(origValue1);\n const value2 = useDeepCompareMemoize(origValue2);\n\n expect(origValue1 === origValue2).toBe(false);\n expect(value1 === value2).toBe(true);\n });\n\n it('should not return the same value', () => {\n const origValue1 = ['v1'];\n const origValue2 = ['v2'];\n const value1 = useDeepCompareMemoize(origValue1);\n const value2 = useDeepCompareMemoize(origValue2);\n\n expect(origValue1 === origValue2).toBe(false);\n expect(value1 === value2).toBe(false);\n });\n});\n"],"mappings":"AAAA,SAAQA,qBAAqB,QAAO,SAAS;AAE7CC,IAAI,CAACC,IAAI,CAAC,OAAO,EAAE,YAAM;EACrB,IAAIC,OAAO;EAEX,OAAQ;IACJC,MAAM,WAAAA,OAACC,CAAC,EAAE;MACN,IAAI,CAACF,OAAO,EAAE;QACVA,OAAO,GAAGE,CAAC;MACf;MAEA,OAAQ;QACJF,OAAO,EAAPA;MACJ,CAAC;IACL;EACJ,CAAC;AACL,CAAC,CAAC;AAEFG,QAAQ,CAAC,uBAAuB,EAAE,YAAM;EACpCC,UAAU,CAAC,YAAM;IACbN,IAAI,CAACO,eAAe,CAAC,CAAC;EAC1B,CAAC,CAAC;EAEFC,EAAE,CAAC,8BAA8B,EAAE,YAAM;IACrC,IAAMC,UAAU,GAAG,CAAC,IAAI,CAAC;IACzB,IAAMC,UAAU,GAAG,CAAC,IAAI,CAAC;IACzB,IAAMC,MAAM,GAAGZ,qBAAqB,CAACU,UAAU,CAAC;IAChD,IAAMG,MAAM,GAAGb,qBAAqB,CAACW,UAAU,CAAC;IAEhDG,MAAM,CAACJ,UAAU,KAAKC,UAAU,CAAC,CAACI,IAAI,CAAC,KAAK,CAAC;IAC7CD,MAAM,CAACF,MAAM,KAAKC,MAAM,CAAC,CAACE,IAAI,CAAC,IAAI,CAAC;EACxC,CAAC,CAAC;EAEFN,EAAE,CAAC,kCAAkC,EAAE,YAAM;IACzC,IAAMC,UAAU,GAAG,CAAC,IAAI,CAAC;IACzB,IAAMC,UAAU,GAAG,CAAC,IAAI,CAAC;IACzB,IAAMC,MAAM,GAAGZ,qBAAqB,CAACU,UAAU,CAAC;IAChD,IAAMG,MAAM,GAAGb,qBAAqB,CAACW,UAAU,CAAC;IAEhDG,MAAM,CAACJ,UAAU,KAAKC,UAAU,CAAC,CAACI,IAAI,CAAC,KAAK,CAAC;IAC7CD,MAAM,CAACF,MAAM,KAAKC,MAAM,CAAC,CAACE,IAAI,CAAC,KAAK,CAAC;EACzC,CAAC,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './useNodeChecks';
|
|
1
|
+
export * from './useNodeChecks';
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.js"],"sourcesContent":["export * from './useNodeChecks';\n"],"mappings":"AAAA,cAAc,iBAAiB"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
1
2
|
var _excluded = ["requiredPermission", "requiredSitePermission", "showOnNodeTypes", "hideOnNodeTypes", "requireModuleInstalledOnSite", "showForPaths", "hideForPaths"],
|
|
2
3
|
_excluded2 = ["node", "nodes", "loading"];
|
|
3
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
7
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
11
|
import { useNodeInfo } from '../useNodeInfo';
|
|
@@ -79,4 +82,5 @@ export var useNodeChecks = function useNodeChecks(variables, options, queryOptio
|
|
|
79
82
|
checksResult: result,
|
|
80
83
|
loading: loading
|
|
81
84
|
}, othersResults);
|
|
82
|
-
};
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=useNodeChecks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useNodeInfo","evaluateVisibilityPaths","visible","visibilityPaths","nodePath","i","length","RegExp","test","addArrayOptionValues","newValue","useNodeInfoOptions","useNodeInfoKey","concat","filter","item","indexOf","useNodeChecks","variables","options","queryOptions","requiredPermission","requiredSitePermission","showOnNodeTypes","hideOnNodeTypes","requireModuleInstalledOnSite","showForPaths","hideForPaths","othersOptions","_objectWithoutProperties","_excluded","_objectSpread","requiredPermissions","requiredSitePermissions","getSiteInstalledModules","_useNodeInfo","node","nodes","loading","othersResults","_excluded2","checksResult","doNodeCheck","reduce","acc","val","site","installedModulesWithAllDependencies","includes","path","result"],"sources":["useNodeChecks.js"],"sourcesContent":["import {useNodeInfo} from '../useNodeInfo';\n\nconst evaluateVisibilityPaths = (visible, visibilityPaths, nodePath) => {\n for (let i = 0; i < visibilityPaths.length; i++) {\n if (new RegExp(visibilityPaths[i]).test(nodePath)) {\n return visible;\n }\n }\n\n return !visible;\n};\n\nfunction addArrayOptionValues(newValue, useNodeInfoOptions, useNodeInfoKey) {\n if (newValue) {\n useNodeInfoOptions[useNodeInfoKey] = useNodeInfoOptions[useNodeInfoKey] || [];\n useNodeInfoOptions[useNodeInfoKey] = useNodeInfoOptions[useNodeInfoKey].concat(newValue.filter(item => useNodeInfoOptions[useNodeInfoKey].indexOf(item) < 0));\n }\n}\n\nexport const useNodeChecks = (variables, options, queryOptions) => {\n const {requiredPermission, requiredSitePermission, showOnNodeTypes, hideOnNodeTypes, requireModuleInstalledOnSite, showForPaths, hideForPaths, ...othersOptions} = options;\n const useNodeInfoOptions = {...othersOptions};\n\n const requiredPermissions = (typeof requiredPermission === 'string') ? [requiredPermission] : requiredPermission;\n const requiredSitePermissions = (typeof requiredSitePermission === 'string') ? [requiredSitePermission] : requiredSitePermission;\n\n addArrayOptionValues(requiredPermissions, useNodeInfoOptions, 'getPermissions');\n addArrayOptionValues(requiredSitePermissions, useNodeInfoOptions, 'getSitePermissions');\n addArrayOptionValues(showOnNodeTypes, useNodeInfoOptions, 'getIsNodeTypes');\n addArrayOptionValues(hideOnNodeTypes, useNodeInfoOptions, 'getIsNodeTypes');\n\n if (requireModuleInstalledOnSite) {\n useNodeInfoOptions.getSiteInstalledModules = true;\n }\n\n const {node, nodes, loading, ...othersResults} = useNodeInfo(variables, useNodeInfoOptions, queryOptions);\n\n if (loading) {\n return {loading, ...othersResults};\n }\n\n if (!node && !nodes) {\n return {checksResult: false, loading, ...othersResults};\n }\n\n const doNodeCheck = node =>\n (!requiredPermissions || requiredPermissions.reduce((acc, val) => acc || node[val], false))\n && (!requiredSitePermissions || requiredSitePermissions.reduce((acc, val) => acc || node.site[val], false))\n && (!showOnNodeTypes || showOnNodeTypes.reduce((acc, val) => acc || node[val], false))\n && (!hideOnNodeTypes || !hideOnNodeTypes.reduce((acc, val) => acc || node[val], false))\n && (!requireModuleInstalledOnSite || requireModuleInstalledOnSite.reduce((acc, val) => acc && node.site.installedModulesWithAllDependencies.includes(val), true))\n && (!hideForPaths || evaluateVisibilityPaths(false, hideForPaths, node.path || variables.path))\n && (!showForPaths || evaluateVisibilityPaths(true, showForPaths, node.path || variables.path));\n\n const result = node ? doNodeCheck(node) : nodes.reduce((acc, val) => acc && doNodeCheck(val), true);\n\n return {node, nodes, checksResult: result, loading, ...othersResults};\n};\n"],"mappings":";;;;;;;;;;AAAA,SAAQA,WAAW,QAAO,gBAAgB;AAE1C,IAAMC,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAIC,OAAO,EAAEC,e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