@adaptabletools/adaptable-cjs 22.0.0-canary.9 → 22.0.1-canary.0

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.
Files changed (180) hide show
  1. package/index.css +1157 -1319
  2. package/index.css.map +1 -1
  3. package/index.d.ts +8 -8
  4. package/index.js +8 -8
  5. package/package.json +1 -4
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
  7. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
  8. package/src/AdaptableState/Common/AdaptableColumn.d.ts +3 -3
  9. package/src/AdaptableState/Common/AdaptableForm.d.ts +1 -1
  10. package/src/AdaptableState/Common/AggregationColumns.d.ts +1 -0
  11. package/src/AdaptableState/Common/AggregationColumns.js +2 -1
  12. package/src/AdaptableState/Common/DataUpdateConfig.d.ts +15 -5
  13. package/src/AdaptableState/Common/TransposeConfig.d.ts +4 -9
  14. package/src/AdaptableState/InitialState.d.ts +1 -1
  15. package/src/AdaptableState/UserInterfaceState.d.ts +1 -1
  16. package/src/Api/ColumnApi.d.ts +1 -1
  17. package/src/Api/GridApi.d.ts +8 -0
  18. package/src/Api/Implementation/ApiBase.d.ts +1 -1
  19. package/src/Api/Implementation/ApiBase.js +1 -1
  20. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
  21. package/src/Api/Implementation/ColumnApiImpl.js +4 -4
  22. package/src/Api/Implementation/GridApiImpl.d.ts +2 -0
  23. package/src/Api/Implementation/GridApiImpl.js +9 -5
  24. package/src/Api/Implementation/LayoutHelpers.js +1 -1
  25. package/src/Api/Implementation/RowFormApiImpl.d.ts +1 -0
  26. package/src/Api/Implementation/RowFormApiImpl.js +13 -0
  27. package/src/Api/Internal/ActionColumnInternalApi.js +2 -19
  28. package/src/Api/Internal/ColumnInternalApi.d.ts +1 -1
  29. package/src/Api/Internal/ColumnInternalApi.js +5 -3
  30. package/src/Api/Internal/EventInternalApi.js +1 -1
  31. package/src/Api/Internal/ExportInternalApi.js +1 -1
  32. package/src/Api/RowFormApi.d.ts +5 -0
  33. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
  34. package/src/Redux/Store/AdaptableReduxMerger.js +5 -6
  35. package/src/Strategy/CellSummaryModule.d.ts +1 -0
  36. package/src/Strategy/CellSummaryModule.js +3 -0
  37. package/src/Strategy/FormatColumnModule.js +2 -2
  38. package/src/Strategy/LayoutModule.js +23 -19
  39. package/src/Strategy/PlusMinusModule.d.ts +1 -0
  40. package/src/Strategy/PlusMinusModule.js +8 -2
  41. package/src/Strategy/StyledColumnModule.js +14 -6
  42. package/src/Strategy/TeamSharingModule.js +2 -2
  43. package/src/Strategy/Utilities/FormatColumn/{getFormatColumnSettingsTargetItems.d.ts → getFormatColumnRowTargetItems.d.ts} +1 -1
  44. package/src/Strategy/Utilities/FormatColumn/getFormatColumnRowTargetItems.js +26 -0
  45. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +5 -13
  46. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
  47. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +1 -1
  48. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
  49. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
  50. package/src/Utilities/Extensions/StringExtensions.js +1 -1
  51. package/src/Utilities/Helpers/AdaptableHelper.js +2 -2
  52. package/src/Utilities/Helpers/FormatHelper.js +2 -2
  53. package/src/Utilities/Hooks/index.d.ts +1 -2
  54. package/src/Utilities/Hooks/index.js +1 -3
  55. package/src/Utilities/Services/LicenseService/index.js +1 -1
  56. package/src/Utilities/Services/RowSummaryService.d.ts +1 -1
  57. package/src/Utilities/Services/RowSummaryService.js +2 -2
  58. package/src/Utilities/getScopeViewItems.js +1 -1
  59. package/src/Utilities/only.d.ts +18 -0
  60. package/src/Utilities/only.js +44 -0
  61. package/src/Utilities/utils/chunk.d.ts +6 -0
  62. package/src/Utilities/utils/chunk.js +20 -0
  63. package/src/Utilities/utils/clamp.d.ts +5 -0
  64. package/src/Utilities/utils/clamp.js +10 -0
  65. package/src/Utilities/utils/cloneDeepWith.d.ts +9 -0
  66. package/src/Utilities/utils/cloneDeepWith.js +70 -0
  67. package/src/Utilities/utils/debounce.d.ts +20 -0
  68. package/src/Utilities/utils/debounce.js +124 -0
  69. package/src/Utilities/utils/flatten.d.ts +5 -0
  70. package/src/Utilities/utils/flatten.js +10 -0
  71. package/src/Utilities/utils/flattenDeep.d.ts +5 -0
  72. package/src/Utilities/utils/flattenDeep.js +10 -0
  73. package/src/Utilities/utils/get.d.ts +6 -0
  74. package/src/Utilities/utils/get.js +38 -0
  75. package/src/Utilities/utils/index.d.ts +22 -0
  76. package/src/Utilities/utils/index.js +48 -0
  77. package/src/Utilities/utils/isArray.d.ts +6 -0
  78. package/src/Utilities/utils/isArray.js +8 -0
  79. package/src/Utilities/utils/isEqual.d.ts +5 -0
  80. package/src/Utilities/utils/isEqual.js +127 -0
  81. package/src/Utilities/utils/isObject.d.ts +6 -0
  82. package/src/Utilities/utils/isObject.js +12 -0
  83. package/src/Utilities/utils/isPlainObject.d.ts +6 -0
  84. package/src/Utilities/utils/isPlainObject.js +20 -0
  85. package/src/Utilities/utils/kebabCase.d.ts +5 -0
  86. package/src/Utilities/utils/kebabCase.js +12 -0
  87. package/src/Utilities/utils/merge.d.ts +11 -0
  88. package/src/Utilities/utils/merge.js +44 -0
  89. package/src/Utilities/utils/mergeWith.d.ts +7 -0
  90. package/src/Utilities/utils/mergeWith.js +50 -0
  91. package/src/Utilities/utils/orderBy.d.ts +8 -0
  92. package/src/Utilities/utils/orderBy.js +33 -0
  93. package/src/Utilities/utils/parseInt.d.ts +6 -0
  94. package/src/Utilities/utils/parseInt.js +12 -0
  95. package/src/Utilities/utils/sentenceCase.d.ts +6 -0
  96. package/src/Utilities/utils/sentenceCase.js +19 -0
  97. package/src/Utilities/utils/startCase.d.ts +5 -0
  98. package/src/Utilities/utils/startCase.js +15 -0
  99. package/src/Utilities/utils/throttle.d.ts +17 -0
  100. package/src/Utilities/utils/throttle.js +23 -0
  101. package/src/Utilities/utils/toNumber.d.ts +5 -0
  102. package/src/Utilities/utils/toNumber.js +42 -0
  103. package/src/Utilities/utils/uniq.d.ts +7 -0
  104. package/src/Utilities/utils/uniq.js +12 -0
  105. package/src/Utilities/utils/uniqBy.d.ts +8 -0
  106. package/src/Utilities/utils/uniqBy.js +25 -0
  107. package/src/Utilities/utils/words.d.ts +7 -0
  108. package/src/Utilities/utils/words.js +13 -0
  109. package/src/Utilities/weightedAverage.d.ts +11 -0
  110. package/src/Utilities/weightedAverage.js +60 -46
  111. package/src/View/AdaptableComputedCSSVarsContext.js +1 -1
  112. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +1 -1
  113. package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -2
  114. package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
  115. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
  116. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +2 -2
  117. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +2 -2
  118. package/src/View/Components/RangesComponent.js +1 -1
  119. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
  120. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
  121. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  122. package/src/View/Components/ValueSelector/index.js +7 -2
  123. package/src/View/Dashboard/CustomDashboardButton.js +1 -1
  124. package/src/View/Dashboard/Dashboard.js +1 -1
  125. package/src/View/Dashboard/DashboardPopup.js +4 -3
  126. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
  127. package/src/View/DataSet/DataSetViewPanel.d.ts +1 -1
  128. package/src/View/Export/Wizard/NewReportWizard.js +8 -8
  129. package/src/View/Filter/FilterViewPanel.d.ts +1 -1
  130. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +19 -10
  131. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -1
  132. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
  133. package/src/View/FormatColumn/Wizard/FormatColumnRowScopeWizardSection.d.ts +8 -0
  134. package/src/View/FormatColumn/Wizard/FormatColumnRowScopeWizardSection.js +86 -0
  135. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +22 -61
  136. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +22 -10
  137. package/src/View/GridFilter/GridFilterViewPanel.js +3 -3
  138. package/src/View/Layout/LayoutViewPanel.js +1 -1
  139. package/src/View/Layout/TransposedPopup.js +0 -1
  140. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  141. package/src/View/Note/NoteEditor.js +1 -1
  142. package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
  143. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  144. package/src/View/StyledColumn/Wizard/StyledColumnBadgeRowsSection.d.ts +8 -0
  145. package/src/View/StyledColumn/Wizard/{StyledColumnWizardSettingsSection.js → StyledColumnBadgeRowsSection.js} +22 -22
  146. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +10 -11
  147. package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +1 -1
  148. package/src/View/Theme/ThemeEditor.js +1 -1
  149. package/src/View/Theme/ThemeField.js +1 -1
  150. package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
  151. package/src/View/Wizard/OnePageWizards.js +1 -1
  152. package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
  153. package/src/agGrid/AdaptableAgGrid.js +28 -6
  154. package/src/agGrid/AgGridAdapter.js +4 -4
  155. package/src/agGrid/AgGridColumnAdapter.js +11 -4
  156. package/src/agGrid/AgGridExportAdapter.d.ts +2 -2
  157. package/src/agGrid/AgGridExportAdapter.js +7 -6
  158. package/src/agGrid/cellRenderers/PercentBarRenderer.js +17 -5
  159. package/src/components/ColorPicker/ColorPicker.js +1 -1
  160. package/src/components/DropdownButton/renderItem.js +1 -1
  161. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +1 -1
  162. package/src/components/FormLayout/index.js +1 -1
  163. package/src/components/OverlayTrigger/index.js +1 -1
  164. package/src/components/Select/Select.js +4 -0
  165. package/src/env.js +2 -2
  166. package/src/layout-manager/src/isLayoutEqual.js +1 -1
  167. package/src/metamodel/adaptable.metamodel.d.ts +12 -1
  168. package/src/metamodel/adaptable.metamodel.js +1 -1
  169. package/src/migration/VersionUpgrade22.js +9 -0
  170. package/themes/dark.css +2 -3
  171. package/themes/light.css +1 -1
  172. package/tsconfig.cjs.tsbuildinfo +1 -1
  173. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsTargetItems.js +0 -16
  174. package/src/Utilities/Hooks/useAdaptableState.d.ts +0 -3
  175. package/src/Utilities/Hooks/useAdaptableState.js +0 -42
  176. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.d.ts +0 -8
  177. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.js +0 -37
  178. package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.d.ts +0 -8
  179. /package/src/View/FormatColumn/Wizard/{FormatColumnScopeWizardSection.d.ts → FormatColumnColumnScopeWizardSection.d.ts} +0 -0
  180. /package/src/View/FormatColumn/Wizard/{FormatColumnScopeWizardSection.js → FormatColumnColumnScopeWizardSection.js} +0 -0
@@ -22,7 +22,7 @@ exports.IsNumeric = IsNumeric;
22
22
  exports.UnescapeHtmlEntities = UnescapeHtmlEntities;
23
23
  exports.ReplaceAllOccurencesExceptLastOne = ReplaceAllOccurencesExceptLastOne;
24
24
  const tslib_1 = require("tslib");
25
- const startCase_1 = tslib_1.__importDefault(require("lodash/startCase"));
25
+ const startCase_1 = tslib_1.__importDefault(require("../utils/startCase"));
26
26
  function IsNull(stringToCheck) {
27
27
  return stringToCheck == null || stringToCheck == undefined;
28
28
  }
@@ -9,8 +9,8 @@ exports.removeAdaptableObjectPrimitivesInline = removeAdaptableObjectPrimitivesI
9
9
  exports.removeAdaptableObjectPrimitives = removeAdaptableObjectPrimitives;
10
10
  exports.isAdaptableObject = isAdaptableObject;
11
11
  const tslib_1 = require("tslib");
12
- const cloneDeepWith_1 = tslib_1.__importDefault(require("lodash/cloneDeepWith"));
13
- const isPlainObject_1 = tslib_1.__importDefault(require("lodash/isPlainObject"));
12
+ const cloneDeepWith_1 = tslib_1.__importDefault(require("../utils/cloneDeepWith"));
13
+ const isPlainObject_1 = tslib_1.__importDefault(require("../utils/isPlainObject"));
14
14
  const Uuid_1 = require("../../AdaptableState/Uuid");
15
15
  const package_json_1 = tslib_1.__importDefault(require("../../../package.json"));
16
16
  const GET_CURRENT_VERSION = () => {
@@ -6,7 +6,7 @@ exports.StringFormatter = StringFormatter;
6
6
  const tslib_1 = require("tslib");
7
7
  // TODO inspect why the following is erroring on angular build
8
8
  const date_fns_1 = require("date-fns");
9
- const sentence_case_1 = require("sentence-case");
9
+ const sentenceCase_1 = tslib_1.__importDefault(require("../utils/sentenceCase"));
10
10
  const GeneralConstants_1 = require("../Constants/GeneralConstants");
11
11
  const Helper_1 = tslib_1.__importDefault(require("./Helper"));
12
12
  const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
@@ -175,7 +175,7 @@ function StringFormatter(input, options = {}, rowNode, column, api) {
175
175
  s = s.toUpperCase();
176
176
  }
177
177
  else if (options.Case == 'Sentence') {
178
- s = (0, sentence_case_1.sentenceCase)(s);
178
+ s = (0, sentenceCase_1.default)(s);
179
179
  }
180
180
  }
181
181
  if (options.Trim !== undefined && options.Trim == true) {
@@ -1,4 +1,3 @@
1
1
  import { useAdaptableColumn } from './useAdaptableColumn';
2
2
  import { useAdaptableOptions } from './useAdaptableOptions';
3
- import { useAdaptableState } from './useAdaptableState';
4
- export { useAdaptableColumn, useAdaptableOptions, useAdaptableState };
3
+ export { useAdaptableColumn, useAdaptableOptions };
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAdaptableState = exports.useAdaptableOptions = exports.useAdaptableColumn = void 0;
3
+ exports.useAdaptableOptions = exports.useAdaptableColumn = void 0;
4
4
  const useAdaptableColumn_1 = require("./useAdaptableColumn");
5
5
  Object.defineProperty(exports, "useAdaptableColumn", { enumerable: true, get: function () { return useAdaptableColumn_1.useAdaptableColumn; } });
6
6
  const useAdaptableOptions_1 = require("./useAdaptableOptions");
7
7
  Object.defineProperty(exports, "useAdaptableOptions", { enumerable: true, get: function () { return useAdaptableOptions_1.useAdaptableOptions; } });
8
- const useAdaptableState_1 = require("./useAdaptableState");
9
- Object.defineProperty(exports, "useAdaptableState", { enumerable: true, get: function () { return useAdaptableState_1.useAdaptableState; } });
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/InternalRedux"),t=require("../../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../../ObjectFactory")),i=e.__importDefault(require("lodash/clamp")),o=require("../../Constants/DocumentationLinkConstants"),n=require("../../license/decode"),r=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",c=10,d=864e5;var p;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(p||(exports.LicenseValidityType=p={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===s},_=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===s},I=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===s};class O{adaptable;licenseKey;packageDetails;constructor(e,a,t){this.adaptable=e,this.licenseKey=a,this.packageDetails=t,this.adaptable=e,this.adaptable.api.eventApi.on("AdaptableReady",()=>{requestAnimationFrame(()=>{this.adaptable.isDestroyed||this.init()})})}init(){let e=null;if(this.licenseKey)try{e=(0,n.decode)(this.licenseKey)}catch(a){e=a}E()||_()||I()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}getValidityType(e,a){if(!e)return p.NO_LICENSE;if(e instanceof Error)return p.INVALID_LICENSE;const t=new Date(a.publishedAt),s=new Date(e.end),i=s<new Date,o=e.trial;let n=null;return n=i?s>t?o?p.NON_PRODUCTION_EXPIRED_IN_SCOPE:p.COMMERCIAL_EXPIRED_IN_SCOPE:o?p.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:p.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?p.NON_PRODUCTION_VALID:p.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){const t=new Date;t.setHours(0,0,0,0);let s=0;e instanceof Error||!e?.end||(s=Math.floor((e?.end?.getTime()-t.getTime())/d),s=(0,i.default)(s,0,1/0));let p="",h="";!e||e instanceof Error||!e.appName||e.appName==n.GENERIC_APP_NAME||(p=e.appName,h=" for application [APP_NAME]");const E=(e,a=o.LicenseDocsLink,t=l,i=s,n=p)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",n).replace("[DAYS]",`${i}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(s<=c)this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,r.shouldLogThankYouMessage)()&&this.adaptable.logger.consoleLogByMessageType(E(`Thank you for using a valid AdapTable license${h}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,t.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:s.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseDisablePersistence)())}destroy(){}}exports.LicenseService=O;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/InternalRedux"),t=require("../../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../../ObjectFactory")),i=e.__importDefault(require("../../utils/clamp")),o=require("../../Constants/DocumentationLinkConstants"),n=require("../../license/decode"),r=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",c=10,d=864e5;var p;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(p||(exports.LicenseValidityType=p={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===s},_=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===s},I=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===s};class O{adaptable;licenseKey;packageDetails;constructor(e,a,t){this.adaptable=e,this.licenseKey=a,this.packageDetails=t,this.adaptable=e,this.adaptable.api.eventApi.on("AdaptableReady",()=>{requestAnimationFrame(()=>{this.adaptable.isDestroyed||this.init()})})}init(){let e=null;if(this.licenseKey)try{e=(0,n.decode)(this.licenseKey)}catch(a){e=a}E()||_()||I()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}getValidityType(e,a){if(!e)return p.NO_LICENSE;if(e instanceof Error)return p.INVALID_LICENSE;const t=new Date(a.publishedAt),s=new Date(e.end),i=s<new Date,o=e.trial;let n=null;return n=i?s>t?o?p.NON_PRODUCTION_EXPIRED_IN_SCOPE:p.COMMERCIAL_EXPIRED_IN_SCOPE:o?p.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:p.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?p.NON_PRODUCTION_VALID:p.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){const t=new Date;t.setHours(0,0,0,0);let s=0;e instanceof Error||!e?.end||(s=Math.floor((e?.end?.getTime()-t.getTime())/d),s=(0,i.default)(s,0,1/0));let p="",h="";!e||e instanceof Error||!e.appName||e.appName==n.GENERIC_APP_NAME||(p=e.appName,h=" for application [APP_NAME]");const E=(e,a=o.LicenseDocsLink,t=l,i=s,n=p)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",n).replace("[DAYS]",`${i}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(s<=c)this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,r.shouldLogThankYouMessage)()&&this.adaptable.logger.consoleLogByMessageType(E(`Thank you for using a valid AdapTable license${h}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,t.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:s.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseDisablePersistence)())}destroy(){}}exports.LicenseService=O;
@@ -19,7 +19,7 @@ export declare class RowSummaryService {
19
19
  *
20
20
  * @param colId optional to evaluate only one column
21
21
  */
22
- _throttledEvaluateRowSummary: import("lodash").DebouncedFuncLeading<(reason?: {
22
+ _throttledEvaluateRowSummary: import("../utils/debounce").DebouncedFunction<(reason?: {
23
23
  columnIds: string[];
24
24
  }) => void>;
25
25
  private evaluateRowSummary;
@@ -8,8 +8,8 @@ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/
8
8
  const Helper_1 = tslib_1.__importDefault(require("../Helpers/Helper"));
9
9
  const AggregatedScalarLiveValue_1 = require("./AggregatedScalarLiveValue");
10
10
  const ObjectExtensions_1 = require("../Extensions/ObjectExtensions");
11
- const throttle_1 = tslib_1.__importDefault(require("lodash/throttle"));
12
- const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
11
+ const throttle_1 = tslib_1.__importDefault(require("../utils/throttle"));
12
+ const isEqual_1 = tslib_1.__importDefault(require("../utils/isEqual"));
13
13
  /**
14
14
  * The logic is extracted here to make it easier to follow
15
15
  */
@@ -21,7 +21,7 @@ const getScopeViewItems = (scope, api) => {
21
21
  values = scope.ColumnTypes;
22
22
  }
23
23
  return {
24
- label: 'Scope',
24
+ label: 'Columns',
25
25
  name: 'Target',
26
26
  values,
27
27
  };
@@ -0,0 +1,18 @@
1
+ import { IAggFuncParams } from 'ag-grid-enterprise';
2
+ interface OnlyAggResult {
3
+ distinctValues: Set<number | string>;
4
+ value: number | string | null;
5
+ toString(): string;
6
+ }
7
+ /**
8
+ * AG Grid aggFunc that returns the column value only when all rows in the group
9
+ * share the same value. Returns null when values differ (or when there are no values).
10
+ *
11
+ * params.values already respects suppressAggFilteredOnly, containing either:
12
+ * - Raw cell values (string | number) for leaf children
13
+ * - OnlyAggResult objects for sub-group children (with pre-computed distinct values)
14
+ *
15
+ * Bails out early as soon as two distinct values are found.
16
+ */
17
+ export declare const only: (params: IAggFuncParams) => OnlyAggResult;
18
+ export {};
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.only = void 0;
4
+ function createOnlyResult(distinctValues) {
5
+ const value = distinctValues.size === 1 ? distinctValues.values().next().value : null;
6
+ return {
7
+ distinctValues,
8
+ value,
9
+ toString() {
10
+ return value != null ? String(value) : '';
11
+ },
12
+ };
13
+ }
14
+ /**
15
+ * AG Grid aggFunc that returns the column value only when all rows in the group
16
+ * share the same value. Returns null when values differ (or when there are no values).
17
+ *
18
+ * params.values already respects suppressAggFilteredOnly, containing either:
19
+ * - Raw cell values (string | number) for leaf children
20
+ * - OnlyAggResult objects for sub-group children (with pre-computed distinct values)
21
+ *
22
+ * Bails out early as soon as two distinct values are found.
23
+ */
24
+ const only = (params) => {
25
+ const { values } = params;
26
+ const distinctValues = new Set();
27
+ for (let i = 0; i < values.length; i++) {
28
+ const value = values[i];
29
+ if (typeof value === 'number' || typeof value === 'string') {
30
+ distinctValues.add(value);
31
+ }
32
+ else if (value != null && typeof value === 'object' && 'distinctValues' in value) {
33
+ // sub-group: merge pre-computed distinct values (set has at most 2 elements)
34
+ for (const v of value.distinctValues) {
35
+ distinctValues.add(v);
36
+ }
37
+ }
38
+ if (distinctValues.size > 1) {
39
+ return createOnlyResult(distinctValues);
40
+ }
41
+ }
42
+ return createOnlyResult(distinctValues);
43
+ };
44
+ exports.only = only;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Creates an array of elements split into groups the length of size.
3
+ * If array can't be split evenly, the final chunk will be the remaining elements.
4
+ * Drop-in replacement for lodash/chunk.
5
+ */
6
+ export default function chunk<T>(array: T[], size?: number): T[][];
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = chunk;
4
+ /**
5
+ * Creates an array of elements split into groups the length of size.
6
+ * If array can't be split evenly, the final chunk will be the remaining elements.
7
+ * Drop-in replacement for lodash/chunk.
8
+ */
9
+ function chunk(array, size = 1) {
10
+ const length = array.length;
11
+ if (!length || !(size >= 1)) {
12
+ return [];
13
+ }
14
+ const chunkSize = Math.floor(size);
15
+ const result = [];
16
+ for (let i = 0; i < length; i += chunkSize) {
17
+ result.push(array.slice(i, i + chunkSize));
18
+ }
19
+ return result;
20
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Clamps number within the inclusive lower and upper bounds.
3
+ * Drop-in replacement for lodash/clamp.
4
+ */
5
+ export default function clamp(number: number, lower: number, upper: number): number;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = clamp;
4
+ /**
5
+ * Clamps number within the inclusive lower and upper bounds.
6
+ * Drop-in replacement for lodash/clamp.
7
+ */
8
+ function clamp(number, lower, upper) {
9
+ return Math.min(Math.max(number, lower), upper);
10
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This method is like `cloneDeep` except that it accepts customizer which
3
+ * is invoked to produce the cloned value. If customizer returns undefined,
4
+ * cloning is handled by the method instead.
5
+ * Drop-in replacement for lodash/cloneDeepWith.
6
+ */
7
+ type CloneCustomizer = (value: any) => any;
8
+ export default function cloneDeepWith<T>(value: T, customizer: CloneCustomizer): T;
9
+ export {};
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ /**
3
+ * This method is like `cloneDeep` except that it accepts customizer which
4
+ * is invoked to produce the cloned value. If customizer returns undefined,
5
+ * cloning is handled by the method instead.
6
+ * Drop-in replacement for lodash/cloneDeepWith.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.default = cloneDeepWith;
10
+ function baseCloneDeep(value, customizer, seen) {
11
+ // Invoke customizer first
12
+ const customResult = customizer(value);
13
+ if (customResult !== undefined) {
14
+ return customResult;
15
+ }
16
+ // Primitives
17
+ if (value === null || typeof value !== 'object') {
18
+ return value;
19
+ }
20
+ // Circular reference detection
21
+ if (seen.has(value)) {
22
+ return seen.get(value);
23
+ }
24
+ // Date
25
+ if (value instanceof Date) {
26
+ return new Date(value.getTime());
27
+ }
28
+ // RegExp
29
+ if (value instanceof RegExp) {
30
+ return new RegExp(value.source, value.flags);
31
+ }
32
+ // Map
33
+ if (value instanceof Map) {
34
+ const cloned = new Map();
35
+ seen.set(value, cloned);
36
+ value.forEach((v, k) => {
37
+ cloned.set(baseCloneDeep(k, customizer, seen), baseCloneDeep(v, customizer, seen));
38
+ });
39
+ return cloned;
40
+ }
41
+ // Set
42
+ if (value instanceof Set) {
43
+ const cloned = new Set();
44
+ seen.set(value, cloned);
45
+ value.forEach((v) => {
46
+ cloned.add(baseCloneDeep(v, customizer, seen));
47
+ });
48
+ return cloned;
49
+ }
50
+ // Arrays
51
+ if (Array.isArray(value)) {
52
+ const cloned = [];
53
+ seen.set(value, cloned);
54
+ for (let i = 0; i < value.length; i++) {
55
+ cloned[i] = baseCloneDeep(value[i], customizer, seen);
56
+ }
57
+ return cloned;
58
+ }
59
+ // Plain objects and others
60
+ const cloned = Object.create(Object.getPrototypeOf(value));
61
+ seen.set(value, cloned);
62
+ const keys = Object.keys(value);
63
+ for (const key of keys) {
64
+ cloned[key] = baseCloneDeep(value[key], customizer, seen);
65
+ }
66
+ return cloned;
67
+ }
68
+ function cloneDeepWith(value, customizer) {
69
+ return baseCloneDeep(value, customizer, new Map());
70
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Creates a debounced function that delays invoking func until after wait
3
+ * milliseconds have elapsed since the last time the debounced function was
4
+ * invoked. The debounced function comes with a cancel method to cancel
5
+ * delayed func invocations and a flush method to immediately invoke them.
6
+ *
7
+ * Supports options: { leading, trailing, maxWait }
8
+ * Drop-in replacement for lodash/debounce.
9
+ */
10
+ export interface DebounceOptions {
11
+ leading?: boolean;
12
+ trailing?: boolean;
13
+ maxWait?: number;
14
+ }
15
+ export interface DebouncedFunction<T extends (...args: any[]) => any> {
16
+ (...args: Parameters<T>): ReturnType<T> | undefined;
17
+ cancel(): void;
18
+ flush(): ReturnType<T> | undefined;
19
+ }
20
+ export default function debounce<T extends (...args: any[]) => any>(func: T, wait?: number, options?: DebounceOptions): DebouncedFunction<T>;
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ /**
3
+ * Creates a debounced function that delays invoking func until after wait
4
+ * milliseconds have elapsed since the last time the debounced function was
5
+ * invoked. The debounced function comes with a cancel method to cancel
6
+ * delayed func invocations and a flush method to immediately invoke them.
7
+ *
8
+ * Supports options: { leading, trailing, maxWait }
9
+ * Drop-in replacement for lodash/debounce.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.default = debounce;
13
+ function debounce(func, wait = 0, options) {
14
+ let lastArgs;
15
+ let lastThis;
16
+ let result;
17
+ let timerId;
18
+ let lastCallTime;
19
+ let lastInvokeTime = 0;
20
+ const leading = options?.leading ?? false;
21
+ const trailing = options?.trailing ?? true;
22
+ const maxWait = options?.maxWait;
23
+ const hasMaxWait = maxWait !== undefined;
24
+ const maxing = hasMaxWait;
25
+ function invokeFunc(time) {
26
+ const args = lastArgs;
27
+ const thisArg = lastThis;
28
+ lastArgs = undefined;
29
+ lastThis = undefined;
30
+ lastInvokeTime = time;
31
+ result = func.apply(thisArg, args);
32
+ return result;
33
+ }
34
+ function startTimer(pendingFunc, waitMs) {
35
+ timerId = setTimeout(pendingFunc, waitMs);
36
+ }
37
+ function cancelTimer() {
38
+ if (timerId !== undefined) {
39
+ clearTimeout(timerId);
40
+ }
41
+ timerId = undefined;
42
+ }
43
+ function remainingWait(time) {
44
+ const timeSinceLastCall = time - (lastCallTime ?? 0);
45
+ const timeSinceLastInvoke = time - lastInvokeTime;
46
+ const timeWaiting = wait - timeSinceLastCall;
47
+ return maxing
48
+ ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke)
49
+ : timeWaiting;
50
+ }
51
+ function shouldInvoke(time) {
52
+ const timeSinceLastCall = time - (lastCallTime ?? 0);
53
+ const timeSinceLastInvoke = time - lastInvokeTime;
54
+ return (lastCallTime === undefined ||
55
+ timeSinceLastCall >= wait ||
56
+ timeSinceLastCall < 0 ||
57
+ (maxing && timeSinceLastInvoke >= maxWait));
58
+ }
59
+ function timerExpired() {
60
+ const time = Date.now();
61
+ if (shouldInvoke(time)) {
62
+ trailingEdge(time);
63
+ return;
64
+ }
65
+ // Restart the timer
66
+ startTimer(timerExpired, remainingWait(time));
67
+ }
68
+ function trailingEdge(time) {
69
+ timerId = undefined;
70
+ if (trailing && lastArgs) {
71
+ invokeFunc(time);
72
+ }
73
+ else {
74
+ lastArgs = undefined;
75
+ lastThis = undefined;
76
+ }
77
+ }
78
+ function leadingEdge(time) {
79
+ lastInvokeTime = time;
80
+ startTimer(timerExpired, wait);
81
+ if (leading) {
82
+ invokeFunc(time);
83
+ }
84
+ }
85
+ function debounced(...args) {
86
+ const time = Date.now();
87
+ const isInvoking = shouldInvoke(time);
88
+ lastArgs = args;
89
+ lastThis = this;
90
+ lastCallTime = time;
91
+ if (isInvoking) {
92
+ if (timerId === undefined) {
93
+ leadingEdge(time);
94
+ return result;
95
+ }
96
+ if (maxing) {
97
+ // Handle invocations in a tight loop with maxWait
98
+ cancelTimer();
99
+ startTimer(timerExpired, wait);
100
+ invokeFunc(time);
101
+ return result;
102
+ }
103
+ }
104
+ if (timerId === undefined) {
105
+ startTimer(timerExpired, wait);
106
+ }
107
+ return result;
108
+ }
109
+ debounced.cancel = function cancel() {
110
+ cancelTimer();
111
+ lastInvokeTime = 0;
112
+ lastArgs = undefined;
113
+ lastCallTime = undefined;
114
+ lastThis = undefined;
115
+ };
116
+ debounced.flush = function flush() {
117
+ if (timerId === undefined) {
118
+ return result;
119
+ }
120
+ trailingEdge(Date.now());
121
+ return result;
122
+ };
123
+ return debounced;
124
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Flattens array a single level deep.
3
+ * Drop-in replacement for lodash/flatten.
4
+ */
5
+ export default function flatten<T>(array: (T | T[])[]): T[];
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = flatten;
4
+ /**
5
+ * Flattens array a single level deep.
6
+ * Drop-in replacement for lodash/flatten.
7
+ */
8
+ function flatten(array) {
9
+ return array.flat();
10
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Recursively flattens array.
3
+ * Drop-in replacement for lodash/flattenDeep.
4
+ */
5
+ export default function flattenDeep<T>(array: any[]): T[];
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = flattenDeep;
4
+ /**
5
+ * Recursively flattens array.
6
+ * Drop-in replacement for lodash/flattenDeep.
7
+ */
8
+ function flattenDeep(array) {
9
+ return array.flat(Infinity);
10
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Gets the value at path of object. If the resolved value is undefined,
3
+ * the defaultValue is returned in its place.
4
+ * Drop-in replacement for lodash/get.
5
+ */
6
+ export default function get(object: any, path: string | string[], defaultValue?: any): any;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * Gets the value at path of object. If the resolved value is undefined,
4
+ * the defaultValue is returned in its place.
5
+ * Drop-in replacement for lodash/get.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.default = get;
9
+ const rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
10
+ function toPath(path) {
11
+ if (Array.isArray(path)) {
12
+ return path;
13
+ }
14
+ const result = [];
15
+ const str = String(path);
16
+ str.replace(rePropName, (match, number, quote, subString) => {
17
+ result.push(quote ? subString.replace(/\\(\\)?/g, '$1') : number || match);
18
+ return match;
19
+ });
20
+ return result;
21
+ }
22
+ function get(object, path, defaultValue) {
23
+ if (typeof path === 'string' && path === '') {
24
+ return defaultValue;
25
+ }
26
+ const keys = toPath(path);
27
+ if (keys.length === 0) {
28
+ return defaultValue;
29
+ }
30
+ let result = object;
31
+ for (const key of keys) {
32
+ if (result == null) {
33
+ return defaultValue;
34
+ }
35
+ result = result[key];
36
+ }
37
+ return result === undefined ? defaultValue : result;
38
+ }
@@ -0,0 +1,22 @@
1
+ export { default as chunk } from './chunk';
2
+ export { default as clamp } from './clamp';
3
+ export { default as cloneDeepWith } from './cloneDeepWith';
4
+ export { default as debounce } from './debounce';
5
+ export { default as flatten } from './flatten';
6
+ export { default as flattenDeep } from './flattenDeep';
7
+ export { default as get } from './get';
8
+ export { default as isArray } from './isArray';
9
+ export { default as isEqual } from './isEqual';
10
+ export { default as isObject } from './isObject';
11
+ export { default as isPlainObject } from './isPlainObject';
12
+ export { default as kebabCase } from './kebabCase';
13
+ export { default as merge } from './merge';
14
+ export { default as mergeWith } from './mergeWith';
15
+ export { default as orderBy } from './orderBy';
16
+ export { default as parseInt } from './parseInt';
17
+ export { default as sentenceCase } from './sentenceCase';
18
+ export { default as startCase } from './startCase';
19
+ export { default as throttle } from './throttle';
20
+ export { default as toNumber } from './toNumber';
21
+ export { default as uniq } from './uniq';
22
+ export { default as uniqBy } from './uniqBy';
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.uniqBy = exports.uniq = exports.toNumber = exports.throttle = exports.startCase = exports.sentenceCase = exports.parseInt = exports.orderBy = exports.mergeWith = exports.merge = exports.kebabCase = exports.isPlainObject = exports.isObject = exports.isEqual = exports.isArray = exports.get = exports.flattenDeep = exports.flatten = exports.debounce = exports.cloneDeepWith = exports.clamp = exports.chunk = void 0;
4
+ const tslib_1 = require("tslib");
5
+ var chunk_1 = require("./chunk");
6
+ Object.defineProperty(exports, "chunk", { enumerable: true, get: function () { return tslib_1.__importDefault(chunk_1).default; } });
7
+ var clamp_1 = require("./clamp");
8
+ Object.defineProperty(exports, "clamp", { enumerable: true, get: function () { return tslib_1.__importDefault(clamp_1).default; } });
9
+ var cloneDeepWith_1 = require("./cloneDeepWith");
10
+ Object.defineProperty(exports, "cloneDeepWith", { enumerable: true, get: function () { return tslib_1.__importDefault(cloneDeepWith_1).default; } });
11
+ var debounce_1 = require("./debounce");
12
+ Object.defineProperty(exports, "debounce", { enumerable: true, get: function () { return tslib_1.__importDefault(debounce_1).default; } });
13
+ var flatten_1 = require("./flatten");
14
+ Object.defineProperty(exports, "flatten", { enumerable: true, get: function () { return tslib_1.__importDefault(flatten_1).default; } });
15
+ var flattenDeep_1 = require("./flattenDeep");
16
+ Object.defineProperty(exports, "flattenDeep", { enumerable: true, get: function () { return tslib_1.__importDefault(flattenDeep_1).default; } });
17
+ var get_1 = require("./get");
18
+ Object.defineProperty(exports, "get", { enumerable: true, get: function () { return tslib_1.__importDefault(get_1).default; } });
19
+ var isArray_1 = require("./isArray");
20
+ Object.defineProperty(exports, "isArray", { enumerable: true, get: function () { return tslib_1.__importDefault(isArray_1).default; } });
21
+ var isEqual_1 = require("./isEqual");
22
+ Object.defineProperty(exports, "isEqual", { enumerable: true, get: function () { return tslib_1.__importDefault(isEqual_1).default; } });
23
+ var isObject_1 = require("./isObject");
24
+ Object.defineProperty(exports, "isObject", { enumerable: true, get: function () { return tslib_1.__importDefault(isObject_1).default; } });
25
+ var isPlainObject_1 = require("./isPlainObject");
26
+ Object.defineProperty(exports, "isPlainObject", { enumerable: true, get: function () { return tslib_1.__importDefault(isPlainObject_1).default; } });
27
+ var kebabCase_1 = require("./kebabCase");
28
+ Object.defineProperty(exports, "kebabCase", { enumerable: true, get: function () { return tslib_1.__importDefault(kebabCase_1).default; } });
29
+ var merge_1 = require("./merge");
30
+ Object.defineProperty(exports, "merge", { enumerable: true, get: function () { return tslib_1.__importDefault(merge_1).default; } });
31
+ var mergeWith_1 = require("./mergeWith");
32
+ Object.defineProperty(exports, "mergeWith", { enumerable: true, get: function () { return tslib_1.__importDefault(mergeWith_1).default; } });
33
+ var orderBy_1 = require("./orderBy");
34
+ Object.defineProperty(exports, "orderBy", { enumerable: true, get: function () { return tslib_1.__importDefault(orderBy_1).default; } });
35
+ var parseInt_1 = require("./parseInt");
36
+ Object.defineProperty(exports, "parseInt", { enumerable: true, get: function () { return tslib_1.__importDefault(parseInt_1).default; } });
37
+ var sentenceCase_1 = require("./sentenceCase");
38
+ Object.defineProperty(exports, "sentenceCase", { enumerable: true, get: function () { return tslib_1.__importDefault(sentenceCase_1).default; } });
39
+ var startCase_1 = require("./startCase");
40
+ Object.defineProperty(exports, "startCase", { enumerable: true, get: function () { return tslib_1.__importDefault(startCase_1).default; } });
41
+ var throttle_1 = require("./throttle");
42
+ Object.defineProperty(exports, "throttle", { enumerable: true, get: function () { return tslib_1.__importDefault(throttle_1).default; } });
43
+ var toNumber_1 = require("./toNumber");
44
+ Object.defineProperty(exports, "toNumber", { enumerable: true, get: function () { return tslib_1.__importDefault(toNumber_1).default; } });
45
+ var uniq_1 = require("./uniq");
46
+ Object.defineProperty(exports, "uniq", { enumerable: true, get: function () { return tslib_1.__importDefault(uniq_1).default; } });
47
+ var uniqBy_1 = require("./uniqBy");
48
+ Object.defineProperty(exports, "uniqBy", { enumerable: true, get: function () { return tslib_1.__importDefault(uniqBy_1).default; } });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Checks if value is classified as an Array object.
3
+ * Drop-in replacement for lodash/isArray.
4
+ */
5
+ declare const isArray: (value: any) => value is any[];
6
+ export default isArray;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * Checks if value is classified as an Array object.
5
+ * Drop-in replacement for lodash/isArray.
6
+ */
7
+ const isArray = Array.isArray;
8
+ exports.default = isArray;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Performs a deep comparison between two values to determine if they are equivalent.
3
+ * Drop-in replacement for lodash/isEqual.
4
+ */
5
+ export default function isEqual(value: any, other: any): boolean;