@airtable/blocks 1.8.0 → 1.10.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.
- package/dist/cjs/models/base.js +16 -5
- package/dist/cjs/models/cursor.js +2 -0
- package/dist/cjs/models/field.js +146 -27
- package/dist/cjs/models/linked_records_query_result.js +1 -1
- package/dist/cjs/models/mutation_constants.js +3 -1
- package/dist/cjs/models/mutations.js +58 -23
- package/dist/cjs/models/table.js +16 -7
- package/dist/cjs/private_utils.js +10 -0
- package/dist/cjs/sdk.js +1 -1
- package/dist/cjs/testing/{mock_airtable_interface.js → abstract_mock_airtable_interface.js} +16 -12
- package/dist/cjs/types/mutations.js +1 -0
- package/dist/cjs/ui/icon_config.js +4 -2
- package/dist/cjs/ui/use_global_config.js +1 -1
- package/dist/cjs/unstable_testing_utils.js +2 -2
- package/dist/cjs/watchable.js +108 -70
- package/dist/types/src/models/base.d.ts +10 -3
- package/dist/types/src/models/base.d.ts.map +1 -1
- package/dist/types/src/models/cursor.d.ts +2 -0
- package/dist/types/src/models/cursor.d.ts.map +1 -1
- package/dist/types/src/models/field.d.ts +65 -1
- package/dist/types/src/models/field.d.ts.map +1 -1
- package/dist/types/src/models/linked_records_query_result.d.ts.map +1 -1
- package/dist/types/src/models/mutation_constants.d.ts +1 -0
- package/dist/types/src/models/mutation_constants.d.ts.map +1 -1
- package/dist/types/src/models/mutations.d.ts.map +1 -1
- package/dist/types/src/models/table.d.ts +8 -4
- package/dist/types/src/models/table.d.ts.map +1 -1
- package/dist/types/src/private_utils.d.ts +6 -0
- package/dist/types/src/private_utils.d.ts.map +1 -1
- package/dist/types/src/testing/{mock_airtable_interface.d.ts → abstract_mock_airtable_interface.d.ts} +9 -4
- package/dist/types/src/testing/abstract_mock_airtable_interface.d.ts.map +1 -0
- package/dist/types/src/types/field.d.ts +80 -44
- package/dist/types/src/types/field.d.ts.map +1 -1
- package/dist/types/src/types/mutations.d.ts +31 -3
- package/dist/types/src/types/mutations.d.ts.map +1 -1
- package/dist/types/src/ui/icon_config.d.ts +5 -3
- package/dist/types/src/ui/icon_config.d.ts.map +1 -1
- package/dist/types/src/ui/link.d.ts +1 -1
- package/dist/types/src/ui/link.d.ts.map +1 -1
- package/dist/types/src/ui/use_global_config.d.ts +1 -1
- package/dist/types/src/unstable_testing_utils.d.ts +1 -1
- package/dist/types/src/unstable_testing_utils.d.ts.map +1 -1
- package/dist/types/src/watchable.d.ts.map +1 -1
- package/dist/types/test/airtable_interface_mocks/fixture_data.d.ts +119 -0
- package/dist/types/test/airtable_interface_mocks/fixture_data.d.ts.map +1 -0
- package/dist/types/test/airtable_interface_mocks/linked_records.d.ts +2 -2
- package/dist/types/test/airtable_interface_mocks/linked_records.d.ts.map +1 -1
- package/dist/types/test/airtable_interface_mocks/{mock_airtable_interface_internal.d.ts → mock_airtable_interface.d.ts} +9 -8
- package/dist/types/test/airtable_interface_mocks/mock_airtable_interface.d.ts.map +1 -0
- package/dist/types/test/airtable_interface_mocks/project_tracker.d.ts +2 -2
- package/dist/types/test/airtable_interface_mocks/project_tracker.d.ts.map +1 -1
- package/package.json +1 -1
- package/CHANGELOG.md +0 -455
- package/dist/types/src/testing/mock_airtable_interface.d.ts.map +0 -1
- package/dist/types/test/airtable_interface_mocks/mock_airtable_interface_internal.d.ts.map +0 -1
|
@@ -13,7 +13,7 @@ require("core-js/modules/es.promise");
|
|
|
13
13
|
Object.defineProperty(exports, "__esModule", {
|
|
14
14
|
value: true
|
|
15
15
|
});
|
|
16
|
-
exports.
|
|
16
|
+
exports.AbstractMockAirtableInterface = void 0;
|
|
17
17
|
|
|
18
18
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
19
19
|
|
|
@@ -157,18 +157,23 @@ var idGenerator = {
|
|
|
157
157
|
generateFieldId: () => 'fldGeneratedMockId',
|
|
158
158
|
generateTableId: () => 'tblGeneratedMockId'
|
|
159
159
|
};
|
|
160
|
-
/**
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
/**
|
|
161
|
+
* An abstract base class with a common interface exposed to both Blocks SDK's
|
|
162
|
+
* internal automated test suite and the blocks-testing public repo.
|
|
163
|
+
*
|
|
164
|
+
* @hidden
|
|
165
|
+
*/
|
|
166
|
+
|
|
167
|
+
var AbstractMockAirtableInterface =
|
|
163
168
|
/*#__PURE__*/
|
|
164
169
|
function (_EventEmitter) {
|
|
165
|
-
(0, _inherits2.default)(
|
|
170
|
+
(0, _inherits2.default)(AbstractMockAirtableInterface, _EventEmitter);
|
|
166
171
|
|
|
167
|
-
function
|
|
172
|
+
function AbstractMockAirtableInterface(initData) {
|
|
168
173
|
var _this;
|
|
169
174
|
|
|
170
|
-
(0, _classCallCheck2.default)(this,
|
|
171
|
-
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(
|
|
175
|
+
(0, _classCallCheck2.default)(this, AbstractMockAirtableInterface);
|
|
176
|
+
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(AbstractMockAirtableInterface).call(this));
|
|
172
177
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sdkInitData", void 0);
|
|
173
178
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_initData", void 0);
|
|
174
179
|
_this._initData = (0, _private_utils.cloneDeep)(initData);
|
|
@@ -185,7 +190,7 @@ function (_EventEmitter) {
|
|
|
185
190
|
*/
|
|
186
191
|
|
|
187
192
|
|
|
188
|
-
(0, _createClass2.default)(
|
|
193
|
+
(0, _createClass2.default)(AbstractMockAirtableInterface, [{
|
|
189
194
|
key: "reset",
|
|
190
195
|
value: function reset() {
|
|
191
196
|
this.removeAllListeners();
|
|
@@ -310,8 +315,7 @@ function (_EventEmitter) {
|
|
|
310
315
|
return idGenerator;
|
|
311
316
|
}
|
|
312
317
|
}]);
|
|
313
|
-
return
|
|
318
|
+
return AbstractMockAirtableInterface;
|
|
314
319
|
}(EventEmitter);
|
|
315
320
|
|
|
316
|
-
|
|
317
|
-
exports.default = _default;
|
|
321
|
+
exports.AbstractMockAirtableInterface = AbstractMockAirtableInterface;
|
|
@@ -17,6 +17,7 @@ var MutationTypes = Object.freeze({
|
|
|
17
17
|
SET_MULTIPLE_GLOBAL_CONFIG_PATHS: 'setMultipleGlobalConfigPaths',
|
|
18
18
|
CREATE_SINGLE_FIELD: 'createSingleField',
|
|
19
19
|
UPDATE_SINGLE_FIELD_CONFIG: 'updateSingleFieldConfig',
|
|
20
|
+
UPDATE_SINGLE_FIELD_DESCRIPTION: 'updateSingleFieldDescription',
|
|
20
21
|
CREATE_SINGLE_TABLE: 'createSingleTable',
|
|
21
22
|
UPDATE_VIEW_METADATA: 'updateViewMetadata'
|
|
22
23
|
});
|
|
@@ -39,7 +39,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
39
39
|
// In the UI kit we need more specific types to allow proper autocomplete and prop types.
|
|
40
40
|
// To achieve this we run the original `iconConfig` object from Hyperbase through an utility.
|
|
41
41
|
// You can find the utility here: https://codesandbox.io/s/winter-sound-f4p2l?fontsize=14
|
|
42
|
-
var iconNamesArray = ['android', 'apple', 'apps', 'ascending', 'attachment', 'automations', 'autonumber', 'barcode', 'bell', 'blocks', 'bold', 'bolt', 'boltList', 'book', 'calendar', 'caret', 'chart', 'chat', 'check', 'checkbox', 'checkboxChecked', 'checkboxUnchecked', 'checklist', 'chevronDown', 'chevronLeft', 'chevronRight', 'chevronUp', 'clipboard', 'code', 'cog', 'collapse', 'collapseSidebar', 'contacts', 'count', 'count1', 'cube', 'cursor', 'day', 'dayAuto', 'dedent', 'descending', 'dollar', 'down', 'download', 'dragHandle', 'drive', 'duplicate', 'edit', 'envelope', 'envelope1', 'expand', 'expand1', 'expandSidebar', 'feed', 'file', 'filter', 'flag', 'form', 'formula', 'fullscreen', 'gallery', 'gantt', 'gift', 'grid', 'grid1', 'group', 'heart', 'help', 'hide', 'hide1', 'history', 'home', 'hyperlink', 'hyperlinkCancel', 'indent', 'info', 'italic', 'kanban', 'laptop', 'left', 'lightbulb', 'link', 'link1', 'lock', 'logout', 'lookup', 'mapPin', 'markdown', 'megaphone', 'menu', 'minus', 'mobile', 'multicollaborator', 'multiselect', 'number', 'ol', 'overflow', 'paint', 'paragraph', 'paragraph1', 'pause', 'percent', 'personal', 'personalAuto', 'phone', 'pivot', 'play', 'plus', 'plusFilled', 'premium', 'print', 'public', 'publish', 'quote', 'quote1', 'radio', 'radioSelected', 'redo', 'redo1', 'richText', 'right', 'rollup', 'rollup1', 'rowHeightSmall', 'rowHeightMedium', 'rowHeightLarge', 'rowHeightExtraLarge', 'search', 'select', 'selectCaret', 'settings', 'shapes', 'share', 'share1', 'shareWithBolt', 'show', 'show1', 'slack', 'smiley', 'sort', 'stack', 'star', 'strikethrough', 'switcher', 'tabs', 'team', 'teamLocked', 'text', 'thumbsUp', 'time', 'timeline', 'toggle', 'trash', 'twitter', 'ul', 'underline', 'undo', 'up', 'upload', 'video', 'view', 'warning', 'windows', 'x'];
|
|
42
|
+
var iconNamesArray = ['android', 'apple', 'apps', 'ascending', 'attachment', 'automations', 'autonumber', 'barcode', 'bell', 'blocks', 'bold', 'bolt', 'boltList', 'book', 'calendar', 'calendarDay', 'caret', 'chart', 'chat', 'check', 'checkbox', 'checkboxChecked', 'checkboxUnchecked', 'checklist', 'chevronDown', 'chevronLeft', 'chevronRight', 'chevronUp', 'clipboard', 'code', 'cog', 'collapse', 'collapseSidebar', 'contacts', 'count', 'count1', 'cube', 'cursor', 'day', 'dayAuto', 'dedent', 'descending', 'dollar', 'down', 'download', 'dragHandle', 'drive', 'duplicate', 'edit', 'envelope', 'envelope1', 'expand', 'expand1', 'expandSidebar', 'feed', 'file', 'filter', 'flag', 'form', 'formula', 'fullscreen', 'gallery', 'gantt', 'gift', 'grid', 'grid1', 'group', 'heart', 'help', 'hide', 'hide1', 'history', 'home', 'hyperlink', 'hyperlinkCancel', 'indent', 'info', 'italic', 'kanban', 'laptop', 'left', 'lightbulb', 'link', 'link1', 'lock', 'logout', 'lookup', 'mapPin', 'markdown', 'megaphone', 'menu', 'minus', 'mobile', 'multicollaborator', 'multiselect', 'number', 'ol', 'overflow', 'paint', 'paragraph', 'paragraph1', 'pause', 'percent', 'personal', 'personalAuto', 'phone', 'pivot', 'play', 'plus', 'plusFilled', 'premium', 'print', 'public', 'publish', 'quote', 'quote1', 'radio', 'radioSelected', 'redo', 'redo1', 'richText', 'right', 'rollup', 'rollup1', 'rowHeightSmall', 'rowHeightMedium', 'rowHeightLarge', 'rowHeightExtraLarge', 'search', 'select', 'selectCaret', 'settings', 'shapes', 'share', 'share1', 'shareWithBolt', 'show', 'show1', 'slack', 'smiley', 'sort', 'stack', 'star', 'strikethrough', 'switcher', 'tabs', 'team', 'teamLocked', 'text', 'thumbsUp', 'time', 'timeline', 'toggle', 'trash', 'twitter', 'ul', 'underline', 'undo', 'up', 'upload', 'video', 'view', 'warning', 'windows', 'x'];
|
|
43
43
|
exports.iconNamesArray = iconNamesArray;
|
|
44
44
|
var iconNames = (0, _private_utils.createEnum)(...iconNamesArray);
|
|
45
45
|
exports.iconNames = iconNames;
|
|
@@ -53,7 +53,7 @@ var deprecatedIconNameToReplacementName = new Map([['blocks', 'apps']]);
|
|
|
53
53
|
exports.deprecatedIconNameToReplacementName = deprecatedIconNameToReplacementName;
|
|
54
54
|
var iconNamePropType = (0, _private_utils.createPropTypeFromEnum)(iconNames);
|
|
55
55
|
exports.iconNamePropType = iconNamePropType;
|
|
56
|
-
var microIconNamesArray = ['androidMicro', 'appleMicro', 'appsMicro', 'ascendingMicro', 'attachmentMicro', 'automationsMicro', 'autonumberMicro', 'barcodeMicro', 'bellMicro', 'blocksMicro', 'boldMicro', 'boltMicro', 'boltListMicro', 'bookMicro', 'calendarMicro', 'caretMicro', 'chartMicro', 'chatMicro', 'checkMicro', 'checkboxCheckedMicro', 'checkboxMicro', 'checkboxUncheckedMicro', 'checklistMicro', 'chevronDownMicro', 'chevronLeftMicro', 'chevronRightMicro', 'chevronUpMicro', 'clipboardMicro', 'codeMicro', 'cogMicro', 'collapseMicro', 'collapseSidebarMicro', 'contactsMicro', 'countMicro', 'count1Micro', 'cubeMicro', 'cursorMicro', 'dayMicro', 'dayAutoMicro', 'dedentMicro', 'descendingMicro', 'dollarMicro', 'downMicro', 'downloadMicro', 'dragHandleMicro', 'driveMicro', 'duplicateMicro', 'editMicro', 'envelopeMicro', 'envelope1Micro', 'expandMicro', 'expand1Micro', 'expandSidebarMicro', 'feedMicro', 'fileMicro', 'filterMicro', 'flagMicro', 'formMicro', 'formulaMicro', 'fullscreenMicro', 'galleryMicro', 'ganttMicro', 'giftMicro', 'gridMicro', 'grid1Micro', 'groupMicro', 'heartMicro', 'helpMicro', 'hideMicro', 'hide1Micro', 'historyMicro', 'homeMicro', 'hyperlinkMicro', 'hyperlinkCancelMicro', 'indentMicro', 'infoMicro', 'italicMicro', 'kanbanMicro', 'laptopMicro', 'leftMicro', 'lightbulbMicro', 'link1Micro', 'linkMicro', 'lockMicro', 'logoutMicro', 'lookupMicro', 'mapPinMicro', 'markdownMicro', 'megaphoneMicro', 'menuMicro', 'minusMicro', 'mobileMicro', 'multicollaboratorMicro', 'multiselectMicro', 'numberMicro', 'olMicro', 'overflowMicro', 'paintMicro', 'paragraphMicro', 'paragraph1Micro', 'pauseMicro', 'percentMicro', 'personalMicro', 'personalAutoMicro', 'phoneMicro', 'pivotMicro', 'playMicro', 'plusFilledMicro', 'plusMicro', 'premiumMicro', 'printMicro', 'publicMicro', 'publishMicro', 'quoteMicro', 'quote1Micro', 'radioMicro', 'radioSelectedMicro', 'redoMicro', 'redo1Micro', 'richTextMicro', 'rightMicro', 'rollupMicro', 'rollup1Micro', 'rowHeightSmallMicro', 'rowHeightMediumMicro', 'rowHeightLargeMicro', 'rowHeightExtraLargeMicro', 'searchMicro', 'selectMicro', 'selectCaretMicro', 'settingsMicro', 'shapesMicro', 'share1Micro', 'shareMicro', 'showMicro', 'show1Micro', 'slackMicro', 'smileyMicro', 'sortMicro', 'stackMicro', 'starMicro', 'strikethroughMicro', 'switcherMicro', 'tabsMicro', 'teamMicro', 'teamLockedMicro', 'textMicro', 'thumbsUpMicro', 'timeMicro', 'timelineMicro', 'toggleMicro', 'trashMicro', 'twitterMicro', 'ulMicro', 'underlineMicro', 'undoMicro', 'upMicro', 'uploadMicro', 'videoMicro', 'viewMicro', 'warningMicro', 'windowsMicro', 'xMicro'];
|
|
56
|
+
var microIconNamesArray = ['androidMicro', 'appleMicro', 'appsMicro', 'ascendingMicro', 'attachmentMicro', 'automationsMicro', 'autonumberMicro', 'barcodeMicro', 'bellMicro', 'blocksMicro', 'boldMicro', 'boltMicro', 'boltListMicro', 'bookMicro', 'calendarMicro', 'calendarDayMicro', 'caretMicro', 'chartMicro', 'chatMicro', 'checkMicro', 'checkboxCheckedMicro', 'checkboxMicro', 'checkboxUncheckedMicro', 'checklistMicro', 'chevronDownMicro', 'chevronLeftMicro', 'chevronRightMicro', 'chevronUpMicro', 'clipboardMicro', 'codeMicro', 'cogMicro', 'collapseMicro', 'collapseSidebarMicro', 'contactsMicro', 'countMicro', 'count1Micro', 'cubeMicro', 'cursorMicro', 'dayMicro', 'dayAutoMicro', 'dedentMicro', 'descendingMicro', 'dollarMicro', 'downMicro', 'downloadMicro', 'dragHandleMicro', 'driveMicro', 'duplicateMicro', 'editMicro', 'envelopeMicro', 'envelope1Micro', 'expandMicro', 'expand1Micro', 'expandSidebarMicro', 'feedMicro', 'fileMicro', 'filterMicro', 'flagMicro', 'formMicro', 'formulaMicro', 'fullscreenMicro', 'galleryMicro', 'ganttMicro', 'giftMicro', 'gridMicro', 'grid1Micro', 'groupMicro', 'heartMicro', 'helpMicro', 'hideMicro', 'hide1Micro', 'historyMicro', 'homeMicro', 'hyperlinkMicro', 'hyperlinkCancelMicro', 'indentMicro', 'infoMicro', 'italicMicro', 'kanbanMicro', 'laptopMicro', 'leftMicro', 'lightbulbMicro', 'link1Micro', 'linkMicro', 'lockMicro', 'logoutMicro', 'lookupMicro', 'mapPinMicro', 'markdownMicro', 'megaphoneMicro', 'menuMicro', 'minusMicro', 'mobileMicro', 'multicollaboratorMicro', 'multiselectMicro', 'numberMicro', 'olMicro', 'overflowMicro', 'paintMicro', 'paragraphMicro', 'paragraph1Micro', 'pauseMicro', 'percentMicro', 'personalMicro', 'personalAutoMicro', 'phoneMicro', 'pivotMicro', 'playMicro', 'plusFilledMicro', 'plusMicro', 'premiumMicro', 'printMicro', 'publicMicro', 'publishMicro', 'quoteMicro', 'quote1Micro', 'radioMicro', 'radioSelectedMicro', 'redoMicro', 'redo1Micro', 'richTextMicro', 'rightMicro', 'rollupMicro', 'rollup1Micro', 'rowHeightSmallMicro', 'rowHeightMediumMicro', 'rowHeightLargeMicro', 'rowHeightExtraLargeMicro', 'searchMicro', 'selectMicro', 'selectCaretMicro', 'settingsMicro', 'shapesMicro', 'share1Micro', 'shareMicro', 'showMicro', 'show1Micro', 'slackMicro', 'smileyMicro', 'sortMicro', 'stackMicro', 'starMicro', 'strikethroughMicro', 'switcherMicro', 'tabsMicro', 'teamMicro', 'teamLockedMicro', 'textMicro', 'thumbsUpMicro', 'timeMicro', 'timelineMicro', 'toggleMicro', 'trashMicro', 'twitterMicro', 'ulMicro', 'underlineMicro', 'undoMicro', 'upMicro', 'uploadMicro', 'videoMicro', 'viewMicro', 'warningMicro', 'windowsMicro', 'xMicro'];
|
|
57
57
|
var microIconNames = (0, _private_utils.createEnum)(...microIconNamesArray);
|
|
58
58
|
/** @hidden */
|
|
59
59
|
|
|
@@ -76,6 +76,7 @@ var iconPaths = Object.freeze({
|
|
|
76
76
|
[iconNames.boltList]: 'M5.24609 2.52356C5.24609 1.91879 4.967 1.81926 4.60718 2.323L0.0879582 8.64991C-0.0877211 8.89586 0.00616482 9.09525 0.312436 9.09525H2.51303C2.81268 9.09525 3.0556 9.33055 3.0556 9.64035V13.4764C3.0556 14.0812 3.3347 14.1807 3.69451 13.677L8.21374 7.35009C8.38942 7.10414 8.29553 6.90475 7.98926 6.90475H5.78867C5.48901 6.90475 5.24609 6.66945 5.24609 6.35965V2.52356Z M9.99993 7.99708C9.99993 7.44533 10.4378 6.99805 11.0029 6.99805H13.997C14.5509 6.99805 14.9999 7.44149 14.9999 7.99708C14.9999 8.54883 14.5621 8.99611 13.997 8.99611H11.0029C10.449 8.99611 9.99993 8.55267 9.99993 7.99708ZM6.50146 12.999C6.50146 12.4473 6.94895 12 7.49997 12H14.0014C14.5529 12 14.9999 12.4434 14.9999 12.999C14.9999 13.5508 14.5524 13.9981 14.0014 13.9981H7.49997C6.94851 13.9981 6.50146 13.5546 6.50146 12.999ZM7.49997 2.99903C7.49997 2.44728 7.94746 2 8.49847 2H14.0014C14.5529 2 14.9999 2.44343 14.9999 2.99903C14.9999 3.55077 14.5524 3.99805 14.0014 3.99805H8.49847C7.94701 3.99805 7.49997 3.55462 7.49997 2.99903 Z',
|
|
77
77
|
[iconNames.book]: 'M4.80174958,2.56642553 L6.86021296,1.19411658 C6.96034005,1.12736519 7.17754804,1.10399495 7.28797443,1.14646664 L12.8530465,3.28687901 C12.9135034,3.31013166 13,3.43615143 13,3.50643687 L13,13.5 C13,13.7761424 13.2238576,14 13.5,14 C13.7761424,14 14,13.7761424 14,13.5 L14,3.50643687 C14,3.02249465 13.6587819,2.52536277 13.2120256,2.35353341 L7.64695351,0.213121038 C7.23469471,0.0545599575 6.67672037,0.114594545 6.30551275,0.362066294 L3.7226499,2.0839749 L3.3887068,2.30660363 L3.39124028,2.31313598 C3.15415362,2.42018545 3,2.66652877 3,2.99998686 L3,12.0487316 C3,12.6010091 3.41815763,13.2032369 3.93181341,13.3930439 L10.0549429,15.6556745 C10.5695692,15.8458402 10.9867563,15.5496113 10.9867563,15.0005108 L10.9867563,5.51032795 C10.9867563,4.95832531 10.5573536,4.37584515 10.039207,4.21295267 L4.80174958,2.56642553 Z',
|
|
78
78
|
[iconNames.calendar]: 'M12 2c0-.556-.448-1-1-1-.556 0-1 .448-1 1H6c0-.556-.448-1-1-1-.556 0-1 .448-1 1h-.998C2.456 2 2 2.449 2 3.002v9.996C2 13.544 2.449 14 3.002 14h9.996c.546 0 1.002-.449 1.002-1.002V3.002C14 2.456 13.551 2 12.998 2H12zm2.006-2C15.107 0 16 .895 16 1.994v12.012A1.995 1.995 0 0 1 14.006 16H1.994A1.995 1.995 0 0 1 0 14.006V1.994C0 .893.895 0 1.994 0h12.012zM7.505 4h.99c.279 0 .505.214.505.505v.99A.497.497 0 0 1 8.495 6h-.99A.497.497 0 0 1 7 5.495v-.99C7 4.226 7.214 4 7.505 4zm3 0h.99c.279 0 .505.214.505.505v.99a.497.497 0 0 1-.505.505h-.99A.497.497 0 0 1 10 5.495v-.99c0-.279.214-.505.505-.505zm-6 3h.99c.279 0 .505.214.505.505v.99A.497.497 0 0 1 5.495 9h-.99A.497.497 0 0 1 4 8.495v-.99C4 7.226 4.214 7 4.505 7zm3 0h.99c.279 0 .505.214.505.505v.99A.497.497 0 0 1 8.495 9h-.99A.497.497 0 0 1 7 8.495v-.99C7 7.226 7.214 7 7.505 7zm3 0h.99c.279 0 .505.214.505.505v.99a.497.497 0 0 1-.505.505h-.99A.497.497 0 0 1 10 8.495v-.99c0-.279.214-.505.505-.505zm-6 3h.99c.279 0 .505.214.505.505v.99a.497.497 0 0 1-.505.505h-.99A.497.497 0 0 1 4 11.495v-.99c0-.279.214-.505.505-.505zm3 0h.99c.279 0 .505.214.505.505v.99a.497.497 0 0 1-.505.505h-.99A.497.497 0 0 1 7 11.495v-.99c0-.279.214-.505.505-.505z',
|
|
79
|
+
[iconNames.calendarDay]: 'M12 2C12 1.444 11.552 1 11 1C10.444 1 10 1.448 10 2H6C6 1.444 5.552 1 5 1C4.444 1 4 1.448 4 2H3.002C2.456 2 2 2.449 2 3.002V12.998C2 13.544 2.449 14 3.002 14H12.998C13.544 14 14 13.551 14 12.998V3.002C14 2.456 13.551 2 12.998 2H12ZM14.006 0C15.107 0 16 0.895 16 1.994V14.006C15.9997 14.5348 15.7896 15.0418 15.4157 15.4157C15.0418 15.7896 14.5348 15.9997 14.006 16H1.994C1.46524 15.9997 0.958212 15.7896 0.584322 15.4157C0.210432 15.0418 0.000264976 14.5348 0 14.006L0 1.994C0 0.893 0.895 0 1.994 0H14.006ZM10.505 7H11.495C11.774 7 12 7.214 12 7.505V8.495C12.0011 8.56162 11.9888 8.62777 11.9638 8.68953C11.9388 8.75128 11.9016 8.80739 11.8545 8.8545C11.8074 8.90161 11.7513 8.93877 11.6895 8.96376C11.6278 8.98876 11.5616 9.00108 11.495 9H10.505C10.4384 9.00108 10.3722 8.98876 10.3105 8.96376C10.2487 8.93877 10.1926 8.90161 10.1455 8.8545C10.0984 8.80739 10.0612 8.75128 10.0362 8.68953C10.0112 8.62777 9.99892 8.56162 10 8.495V7.505C10 7.226 10.214 7 10.505 7Z',
|
|
79
80
|
[iconNames.caret]: 'M4.80153237,6.00002 L11.1984676,6.00002 C11.8579881,6.00002 12.2338734,6.76912179 11.8387119,7.30861993 L8.64024427,11.6724979 C8.3194337,12.1091674 7.6805663,12.1091674 7.3611326,11.6724979 L4.1612881,7.30861993 C3.76612658,6.76912179 4.14201193,6.00002 4.80153237,6.00002',
|
|
80
81
|
[iconNames.chart]: 'M2.5 12v-1a1.5 1.5 0 0 1 3 0v1a1.5 1.5 0 0 1-3 0zm4 0V8.5a1.5 1.5 0 0 1 3 0V12a1.5 1.5 0 0 1-3 0zm4 0V4a1.5 1.5 0 0 1 3 0v8a1.5 1.5 0 0 1-3 0z',
|
|
81
82
|
[iconNames.chat]: 'M8.33409987,12 L11.9914698,12 C13.0980496,12 14,11.1057373 14,10.0026083 L14,4.9973917 C14,3.89585781 13.1007504,3 11.9914698,3 L4.0085302,3 C2.90195036,3 2,3.89426273 2,4.9973917 L2,10.0026083 C2,11.1013173 2.89464321,11.9954037 4,11.9999823 L4,13.9906311 C4,14.5566468 4.37069082,14.7434133 4.82796112,14.4268975 L8.33409987,12 Z',
|
|
@@ -242,6 +243,7 @@ var microIconPaths = Object.freeze({
|
|
|
242
243
|
[microIconNames.boltListMicro]: 'M8.49697 5.99708C8.49697 5.44533 8.93485 4.99805 9.4999 4.99805H10.997C11.5509 4.99805 11.9999 5.44149 11.9999 5.99708C11.9999 6.54883 11.562 6.99611 10.997 6.99611H9.4999C8.946 6.99611 8.49697 6.55267 8.49697 5.99708ZM5.503 9.99903C5.503 9.44728 5.95048 9 6.5015 9H11.0014C11.5529 9 11.9999 9.44343 11.9999 9.99903C11.9999 10.5508 11.5524 10.9981 11.0014 10.9981H6.5015C5.95004 10.9981 5.503 10.5546 5.503 9.99903ZM6.5014 1.99903C6.5014 1.44728 6.94889 1 7.4999 1H11.0014C11.5529 1 11.9999 1.44343 11.9999 1.99903C11.9999 2.55077 11.5524 2.99805 11.0014 2.99805H7.4999C6.94844 2.99805 6.5014 2.55462 6.5014 1.99903Z M4.37174 1.4363C4.37174 0.932322 4.13916 0.849381 3.83932 1.26917L0.0732985 6.54159C-0.0731009 6.74655 0.00513732 6.9127 0.260363 6.9127H2.09419C2.3439 6.9127 2.54633 7.10879 2.54633 7.36696V10.5637C2.54633 11.0677 2.77891 11.1506 3.07876 10.7308L6.84478 5.45841C6.99118 5.25345 6.91294 5.08729 6.65772 5.08729H4.82389C4.57418 5.08729 4.37174 4.89121 4.37174 4.63304V1.4363 Z',
|
|
243
244
|
[microIconNames.bookMicro]: 'M2.00496559,2.57085198 C2.00168282,2.60427476 2,2.6389821 2,2.67492473 L2,8.10042709 C2,8.65379807 2.40207146,9.31078259 2.88586767,9.56152824 L6.70486157,11.540866 C7.19411277,11.7944389 7.59072924,11.5567585 7.59072924,11.0087 L7.59072924,5.16425827 C7.59072924,4.61677821 7.18865778,3.9931641 6.68003918,3.76572571 L3.49727483,2.34249261 L4.92172253,1.20293441 C4.98966163,1.14858313 5.17170735,1.12347315 5.24485967,1.15598529 L8.84900186,2.75782629 C8.91304855,2.78629148 9,2.91980273 9,2.99209597 L9,10 C9,10.2761424 9.22385763,10.5 9.5,10.5 C9.77614237,10.5 10,10.2761424 10,10 L10,2.99209597 C10,2.52422963 9.67996486,2.03282565 9.25514033,1.84401474 L5.65099814,0.242173747 C5.23323363,0.0565006263 4.65413885,0.136376505 4.29702747,0.422065615 L2.18765247,2.10956567 C2.04440363,2.22416475 1.98088937,2.40149459 2.00496559,2.57085198 Z',
|
|
244
245
|
[microIconNames.calendarMicro]: 'M9.991 0A2.01 2.01 0 0 1 12 2.009V9.99A2.01 2.01 0 0 1 9.991 12H2.01A2.01 2.01 0 0 1 0 9.991V2.01A2.01 2.01 0 0 1 2.009 0H9.99zM5.505 2h.99c.279 0 .505.214.505.505v.99A.497.497 0 0 1 6.495 4h-.99A.497.497 0 0 1 5 3.495v-.99C5 2.226 5.214 2 5.505 2zm3 0h.99c.279 0 .505.214.505.505v.99A.497.497 0 0 1 9.495 4h-.99A.497.497 0 0 1 8 3.495v-.99C8 2.226 8.214 2 8.505 2zm-6 3h.99c.279 0 .505.214.505.505v.99A.497.497 0 0 1 3.495 7h-.99A.497.497 0 0 1 2 6.495v-.99C2 5.226 2.214 5 2.505 5zm3 0h.99c.279 0 .505.214.505.505v.99A.497.497 0 0 1 6.495 7h-.99A.497.497 0 0 1 5 6.495v-.99C5 5.226 5.214 5 5.505 5zm3 0h.99c.279 0 .505.214.505.505v.99A.497.497 0 0 1 9.495 7h-.99A.497.497 0 0 1 8 6.495v-.99C8 5.226 8.214 5 8.505 5zm-6 3h.99c.279 0 .505.214.505.505v.99a.497.497 0 0 1-.505.505h-.99A.497.497 0 0 1 2 9.495v-.99C2 8.226 2.214 8 2.505 8zm3 0h.99c.279 0 .505.214.505.505v.99a.497.497 0 0 1-.505.505h-.99A.497.497 0 0 1 5 9.495v-.99C5 8.226 5.214 8 5.505 8z',
|
|
246
|
+
[microIconNames.calendarDayMicro]: 'M9.991 0C10.5237 0.000264978 11.0346 0.212012 11.4113 0.588715C11.788 0.965418 11.9997 1.47626 12 2.009V9.99C12 10.5229 11.7884 11.034 11.4116 11.4109C11.0349 11.7879 10.5239 11.9997 9.991 12H2.01C1.47709 12 0.965988 11.7884 0.589069 11.4116C0.212149 11.0349 0.00026513 10.5239 0 9.991L0 2.01C-6.59528e-08 1.47709 0.21163 0.965988 0.588362 0.589069C0.965094 0.212149 1.47609 0.00026513 2.009 0L9.99 0H9.991ZM9.495 5H8.505C8.214 5 8 5.226 8 5.505V6.495C7.99892 6.56162 8.01124 6.62777 8.03624 6.68953C8.06123 6.75128 8.09839 6.80739 8.1455 6.8545C8.19261 6.90161 8.24872 6.93877 8.31047 6.96376C8.37223 6.98876 8.43838 7.00108 8.505 7H9.495C9.56162 7.00108 9.62777 6.98876 9.68953 6.96376C9.75128 6.93877 9.80739 6.90161 9.8545 6.8545C9.90161 6.80739 9.93877 6.75128 9.96376 6.68953C9.98876 6.62777 10.0011 6.56162 10 6.495V5.505C10 5.214 9.774 5 9.495 5Z',
|
|
245
247
|
[microIconNames.caretMicro]: 'M3.6011,4.00002 L8.4011,4.00002 C8.8951,4.00002 9.1771,4.56402 8.8811,4.96002 L6.4811,8.16002 C6.2411,8.48002 5.7611,8.48002 5.5211,8.16002 L3.1211,4.96002 C2.8241,4.56402 3.1071,4.00002 3.6011,4.00002',
|
|
246
248
|
[microIconNames.chartMicro]: 'M1.5 10V9a.5.5 0 0 1 1 0v1a.5.5 0 0 1-1 0zm2 0V8a.5.5 0 0 1 1 0v2a.5.5 0 0 1-1 0zm2 0V7a.5.5 0 0 1 1 0v3a.5.5 0 0 1-1 0zm2 0V5a.5.5 0 0 1 1 0v5a.5.5 0 0 1-1 0zm2 0V2a.5.5 0 1 1 1 0v8a.5.5 0 1 1-1 0z',
|
|
247
249
|
[microIconNames.chatMicro]: 'M6.39274127,8.96435524 L8.75349189,8.96435524 C9.85030808,8.96435524 10.7500973,8.07084781 10.7500973,6.96865054 L10.7500973,3.9957047 C10.7500973,2.89621022 9.85618663,2 8.75349189,2 L2.99660544,2 C1.89978926,2 1,2.89350743 1,3.9957047 L1,6.96865054 C1,8.06814502 1.8939107,8.96435524 2.99660544,8.96435524 L3,8.96435524 L3,10.0010434 C3,10.5573397 3.38482498,10.769105 3.85953064,10.4842816 L6.39274127,8.96435524 Z',
|
|
@@ -35,7 +35,7 @@ var _sdk_context = require("./sdk_context");
|
|
|
35
35
|
* <React.Fragment>
|
|
36
36
|
* <Button icon="minus" onClick={decrement} disabled={!isEnabled} ariaLabel="decrease"/>
|
|
37
37
|
* {count}
|
|
38
|
-
* <Button icon="plus" onClick={increment} disabled={!isEnabled}
|
|
38
|
+
* <Button icon="plus" onClick={increment} disabled={!isEnabled} ariaLabel="increase"/>
|
|
39
39
|
* </React.Fragment>
|
|
40
40
|
* );
|
|
41
41
|
* }
|
|
@@ -134,7 +134,7 @@ Object.defineProperty(exports, "Sdk", {
|
|
|
134
134
|
Object.defineProperty(exports, "AbstractMockAirtableInterface", {
|
|
135
135
|
enumerable: true,
|
|
136
136
|
get: function get() {
|
|
137
|
-
return
|
|
137
|
+
return _abstract_mock_airtable_interface.AbstractMockAirtableInterface;
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
140
|
|
|
@@ -160,4 +160,4 @@ var _backend_fetch_types = require("./types/backend_fetch_types");
|
|
|
160
160
|
|
|
161
161
|
var _sdk = _interopRequireDefault(require("./sdk"));
|
|
162
162
|
|
|
163
|
-
var
|
|
163
|
+
var _abstract_mock_airtable_interface = require("./testing/abstract_mock_airtable_interface");
|
package/dist/cjs/watchable.js
CHANGED
|
@@ -86,20 +86,15 @@ function () {
|
|
|
86
86
|
return "".concat(this._watchableId, " ").concat(this._changeCount);
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* Every call to `.watch` should have a matching call to `.unwatch`.
|
|
92
|
-
*
|
|
93
|
-
* Returns the array of keys that were watched.
|
|
89
|
+
* Helper method to get only the valid watchable keys - or throw if a key is invalid
|
|
94
90
|
*
|
|
95
|
-
* @param keys
|
|
96
|
-
* @
|
|
97
|
-
* @param context an optional context for `this` in `callback`.
|
|
91
|
+
* @param keys
|
|
92
|
+
* @internal
|
|
98
93
|
*/
|
|
99
94
|
|
|
100
95
|
}, {
|
|
101
|
-
key: "
|
|
102
|
-
value: function
|
|
96
|
+
key: "_getWatchableValidKeysOrThrow",
|
|
97
|
+
value: function _getWatchableValidKeysOrThrow(keys, errorMethodName, shouldWarnInsteadOfThrow) {
|
|
103
98
|
var arrayKeys = Array.isArray(keys) ? keys : [keys];
|
|
104
99
|
var validKeys = [];
|
|
105
100
|
var _iteratorNormalCompletion = true;
|
|
@@ -112,24 +107,16 @@ function () {
|
|
|
112
107
|
|
|
113
108
|
if (this.constructor._isWatchableKey(_key2)) {
|
|
114
109
|
validKeys.push(_key2);
|
|
115
|
-
|
|
116
|
-
if (!this._changeWatchersByKey[_key2]) {
|
|
117
|
-
this._changeWatchersByKey[_key2] = [];
|
|
118
|
-
} // Rather than pushing onto this array, we initialize a new array.
|
|
119
|
-
// This is necessary since watches can change as a result of an
|
|
120
|
-
// event getting triggered. It would be bad if as we iterate over
|
|
121
|
-
// our watchers, new watchers get pushed onto the array that we
|
|
122
|
-
// are iterating over.
|
|
123
|
-
// TODO(jb): as a perf optimization, we *could* push onto this array
|
|
124
|
-
// as long as we are not in the middle of iterating over it.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
this._changeWatchersByKey[_key2] = [...this._changeWatchersByKey[_key2], {
|
|
128
|
-
callback,
|
|
129
|
-
context
|
|
130
|
-
}];
|
|
131
110
|
} else {
|
|
132
|
-
|
|
111
|
+
var className = this.constructor._className;
|
|
112
|
+
var errorString = "Invalid key to ".concat(errorMethodName, " for ").concat(className, ": ").concat(_key2);
|
|
113
|
+
|
|
114
|
+
if (shouldWarnInsteadOfThrow) {
|
|
115
|
+
// eslint-disable-next-line no-console
|
|
116
|
+
console.warn(errorString);
|
|
117
|
+
} else {
|
|
118
|
+
throw (0, _error_utils.spawnError)(errorString);
|
|
119
|
+
}
|
|
133
120
|
}
|
|
134
121
|
}
|
|
135
122
|
} catch (err) {
|
|
@@ -150,49 +137,45 @@ function () {
|
|
|
150
137
|
return validKeys;
|
|
151
138
|
}
|
|
152
139
|
/**
|
|
153
|
-
*
|
|
140
|
+
* Get notified of changes to the model.
|
|
154
141
|
*
|
|
155
|
-
*
|
|
142
|
+
* Every call to `.watch` should have a matching call to `.unwatch`.
|
|
156
143
|
*
|
|
157
|
-
* Returns the array of keys that were
|
|
144
|
+
* Returns the array of keys that were watched.
|
|
158
145
|
*
|
|
159
|
-
* @param keys the keys to
|
|
160
|
-
* @param callback
|
|
161
|
-
* @param context
|
|
146
|
+
* @param keys the keys to watch
|
|
147
|
+
* @param callback a function to call when those keys change
|
|
148
|
+
* @param context an optional context for `this` in `callback`.
|
|
162
149
|
*/
|
|
163
150
|
|
|
164
151
|
}, {
|
|
165
|
-
key: "
|
|
166
|
-
value: function
|
|
167
|
-
var
|
|
168
|
-
|
|
152
|
+
key: "watch",
|
|
153
|
+
value: function watch(keys, callback, context) {
|
|
154
|
+
var validKeys = this._getWatchableValidKeysOrThrow(keys, 'watch');
|
|
155
|
+
|
|
169
156
|
var _iteratorNormalCompletion2 = true;
|
|
170
157
|
var _didIteratorError2 = false;
|
|
171
158
|
var _iteratorError2 = undefined;
|
|
172
159
|
|
|
173
160
|
try {
|
|
174
|
-
for (var _iterator2 =
|
|
161
|
+
for (var _iterator2 = validKeys[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
175
162
|
var _key3 = _step2.value;
|
|
176
163
|
|
|
177
|
-
if (this.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
} else {
|
|
193
|
-
// eslint-disable-next-line no-console
|
|
194
|
-
console.warn("Invalid key to unwatch for ".concat(this.constructor._className, ": ").concat(_key3));
|
|
195
|
-
}
|
|
164
|
+
if (!this._changeWatchersByKey[_key3]) {
|
|
165
|
+
this._changeWatchersByKey[_key3] = [];
|
|
166
|
+
} // Rather than pushing onto this array, we initialize a new array.
|
|
167
|
+
// This is necessary since watches can change as a result of an
|
|
168
|
+
// event getting triggered. It would be bad if as we iterate over
|
|
169
|
+
// our watchers, new watchers get pushed onto the array that we
|
|
170
|
+
// are iterating over.
|
|
171
|
+
// TODO(jb): as a perf optimization, we *could* push onto this array
|
|
172
|
+
// as long as we are not in the middle of iterating over it.
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
this._changeWatchersByKey[_key3] = [...this._changeWatchersByKey[_key3], {
|
|
176
|
+
callback,
|
|
177
|
+
context
|
|
178
|
+
}];
|
|
196
179
|
}
|
|
197
180
|
} catch (err) {
|
|
198
181
|
_didIteratorError2 = true;
|
|
@@ -211,6 +194,61 @@ function () {
|
|
|
211
194
|
|
|
212
195
|
return validKeys;
|
|
213
196
|
}
|
|
197
|
+
/**
|
|
198
|
+
* Unwatch keys watched with `.watch`.
|
|
199
|
+
*
|
|
200
|
+
* Should be called with the same arguments given to `.watch`.
|
|
201
|
+
*
|
|
202
|
+
* Returns the array of keys that were unwatched.
|
|
203
|
+
*
|
|
204
|
+
* @param keys the keys to unwatch
|
|
205
|
+
* @param callback the function passed to `.watch` for these keys
|
|
206
|
+
* @param context the context that was passed to `.watch` for this `callback`
|
|
207
|
+
*/
|
|
208
|
+
|
|
209
|
+
}, {
|
|
210
|
+
key: "unwatch",
|
|
211
|
+
value: function unwatch(keys, callback, context) {
|
|
212
|
+
var validKeys = this._getWatchableValidKeysOrThrow(keys, 'unwatch', true);
|
|
213
|
+
|
|
214
|
+
var _iteratorNormalCompletion3 = true;
|
|
215
|
+
var _didIteratorError3 = false;
|
|
216
|
+
var _iteratorError3 = undefined;
|
|
217
|
+
|
|
218
|
+
try {
|
|
219
|
+
for (var _iterator3 = validKeys[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
|
220
|
+
var _key4 = _step3.value;
|
|
221
|
+
var watchers = this._changeWatchersByKey[_key4];
|
|
222
|
+
|
|
223
|
+
if (watchers) {
|
|
224
|
+
var filteredWatchers = watchers.filter(watcher => {
|
|
225
|
+
return watcher.callback !== callback || watcher.context !== context;
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
if (filteredWatchers.length > 0) {
|
|
229
|
+
this._changeWatchersByKey[_key4] = filteredWatchers;
|
|
230
|
+
} else {
|
|
231
|
+
delete this._changeWatchersByKey[_key4];
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
} catch (err) {
|
|
236
|
+
_didIteratorError3 = true;
|
|
237
|
+
_iteratorError3 = err;
|
|
238
|
+
} finally {
|
|
239
|
+
try {
|
|
240
|
+
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
|
|
241
|
+
_iterator3.return();
|
|
242
|
+
}
|
|
243
|
+
} finally {
|
|
244
|
+
if (_didIteratorError3) {
|
|
245
|
+
throw _iteratorError3;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return validKeys;
|
|
251
|
+
}
|
|
214
252
|
/**
|
|
215
253
|
* @internal
|
|
216
254
|
*/
|
|
@@ -222,30 +260,30 @@ function () {
|
|
|
222
260
|
var watchers = this._changeWatchersByKey[key];
|
|
223
261
|
|
|
224
262
|
if (watchers) {
|
|
225
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0),
|
|
226
|
-
args[
|
|
263
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key5 = 1; _key5 < _len; _key5++) {
|
|
264
|
+
args[_key5 - 1] = arguments[_key5];
|
|
227
265
|
}
|
|
228
266
|
|
|
229
|
-
var
|
|
230
|
-
var
|
|
231
|
-
var
|
|
267
|
+
var _iteratorNormalCompletion4 = true;
|
|
268
|
+
var _didIteratorError4 = false;
|
|
269
|
+
var _iteratorError4 = undefined;
|
|
232
270
|
|
|
233
271
|
try {
|
|
234
|
-
for (var
|
|
235
|
-
var watcher =
|
|
272
|
+
for (var _iterator4 = watchers[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {
|
|
273
|
+
var watcher = _step4.value;
|
|
236
274
|
watcher.callback.call(watcher.context, this, key, ...args);
|
|
237
275
|
}
|
|
238
276
|
} catch (err) {
|
|
239
|
-
|
|
240
|
-
|
|
277
|
+
_didIteratorError4 = true;
|
|
278
|
+
_iteratorError4 = err;
|
|
241
279
|
} finally {
|
|
242
280
|
try {
|
|
243
|
-
if (!
|
|
244
|
-
|
|
281
|
+
if (!_iteratorNormalCompletion4 && _iterator4.return != null) {
|
|
282
|
+
_iterator4.return();
|
|
245
283
|
}
|
|
246
284
|
} finally {
|
|
247
|
-
if (
|
|
248
|
-
throw
|
|
285
|
+
if (_didIteratorError4) {
|
|
286
|
+
throw _iteratorError4;
|
|
249
287
|
}
|
|
250
288
|
}
|
|
251
289
|
}
|
|
@@ -194,6 +194,7 @@ declare class Base extends AbstractModel<BaseData, WatchableBaseKey> {
|
|
|
194
194
|
options?: {
|
|
195
195
|
[key: string]: unknown;
|
|
196
196
|
} | null;
|
|
197
|
+
description?: string | null;
|
|
197
198
|
}>): PermissionCheckResult;
|
|
198
199
|
/**
|
|
199
200
|
* An alias for `checkPermissionsForCreateTable(name, fields).hasPermission`.
|
|
@@ -220,12 +221,14 @@ declare class Base extends AbstractModel<BaseData, WatchableBaseKey> {
|
|
|
220
221
|
options?: {
|
|
221
222
|
[key: string]: unknown;
|
|
222
223
|
} | null;
|
|
224
|
+
description?: string | null;
|
|
223
225
|
}>): boolean;
|
|
224
226
|
/**
|
|
225
227
|
* Creates a new table.
|
|
226
228
|
*
|
|
227
229
|
* Throws an error if the user does not have permission to create a table, if an invalid
|
|
228
|
-
* table name is provided, or if invalid fields are provided (invalid name, type or
|
|
230
|
+
* table name is provided, or if invalid fields are provided (invalid name, type, options or
|
|
231
|
+
* description).
|
|
229
232
|
*
|
|
230
233
|
* Refer to {@link FieldType} for supported field types, the write format for field options, and
|
|
231
234
|
* other specifics for certain field types.
|
|
@@ -242,7 +245,10 @@ declare class Base extends AbstractModel<BaseData, WatchableBaseKey> {
|
|
|
242
245
|
* table in your app.
|
|
243
246
|
*
|
|
244
247
|
* @param name name for the table. must be case-insensitive unique
|
|
245
|
-
* @param fields array of fields to create in the table: see below for
|
|
248
|
+
* @param fields array of fields to create in the table: see below for an example. `name` and
|
|
249
|
+
* `type` must be specified for all fields, while `options` is only required for fields that
|
|
250
|
+
* have field options. `description` is optional and will be `''` if not specified or if
|
|
251
|
+
* specified as `null`.
|
|
246
252
|
*
|
|
247
253
|
* @example
|
|
248
254
|
* ```js
|
|
@@ -250,7 +256,7 @@ declare class Base extends AbstractModel<BaseData, WatchableBaseKey> {
|
|
|
250
256
|
* const name = 'My new table';
|
|
251
257
|
* const fields = [
|
|
252
258
|
* // Name will be the primary field of the table.
|
|
253
|
-
* {name: 'Name', type: FieldType.SINGLE_LINE_TEXT},
|
|
259
|
+
* {name: 'Name', type: FieldType.SINGLE_LINE_TEXT, description: 'This is the primary field'},
|
|
254
260
|
* {name: 'Notes', type: FieldType.RICH_TEXT},
|
|
255
261
|
* {name: 'Attachments', type: FieldType.MULTIPLE_ATTACHMENTS},
|
|
256
262
|
* {name: 'Number', type: FieldType.NUMBER, options: {
|
|
@@ -276,6 +282,7 @@ declare class Base extends AbstractModel<BaseData, WatchableBaseKey> {
|
|
|
276
282
|
options?: {
|
|
277
283
|
[key: string]: unknown;
|
|
278
284
|
} | null;
|
|
285
|
+
description?: string | null;
|
|
279
286
|
}>): Promise<Table>;
|
|
280
287
|
/**
|
|
281
288
|
* Returns the maximum number of records allowed in each table of this base.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,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AC;KAC/B,CAAC,GACH,OAAO,CAAC,KAAK,CAAC;IA4BjB;;OAEG;IACH,qBAAqB,IAAI,MAAM;CAsHlC;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -47,6 +47,7 @@ interface CursorData {
|
|
|
47
47
|
* return (
|
|
48
48
|
* <div>
|
|
49
49
|
* Active table: {cursor.activeTableId}
|
|
50
|
+
* <br />
|
|
50
51
|
* Active view: {cursor.activeViewId}
|
|
51
52
|
* </div>
|
|
52
53
|
* );
|
|
@@ -67,6 +68,7 @@ interface CursorData {
|
|
|
67
68
|
* return (
|
|
68
69
|
* <div>
|
|
69
70
|
* Selected records: {cursor.selectedRecordIds.join(', ')}
|
|
71
|
+
* <br />
|
|
70
72
|
* Selected fields: {cursor.selectedFieldIds.join(', ')}
|
|
71
73
|
* </div>
|
|
72
74
|
* );
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../../src/models/cursor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AACrC,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAuB,YAAY,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAE/E,OAAO,0BAA0B,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,QAAA,MAAM,mBAAmB;;;;;;EAMvB,CAAC;AAEH;;;;;;;GAOG;AACH,aAAK,kBAAkB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEnE,cAAc;AACd,UAAU,UAAU;IAChB,mBAAmB,EAAE,SAAS,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C,UAAU,EAAE,kBAAkB,CAAC;IAiE3E;;;;;;;OAOG;IACH,IAAI,iBAAiB,IAAI,KAAK,CAAC,QAAQ,CAAC,CAKvC;IACD;;;;;;;OAOG;IACH,IAAI,gBAAgB,IAAI,KAAK,CAAC,QAAQ,CAAC,CAKtC;IACD;;;;;;;OAOG;IACH,gBAAgB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO;IAW5D;;;;;;;;OAQG;IACH,IAAI,aAAa,IAAI,OAAO,GAAG,IAAI,CAElC;IACD;;;;;;;;;OASG;IACH,IAAI,YAAY,IAAI,MAAM,GAAG,IAAI,CAEhC;IACD;;;;;;OAMG;IACH,cAAc,CAAC,cAAc,EAAE,KAAK,GAAG,OAAO,GAAG,IAAI;IAIrD;;;;;;;OAOG;IACH,aAAa,CAAC,cAAc,EAAE,KAAK,GAAG,OAAO,EAAE,YAAY,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI;CA+EpF;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { AggregatorKey } from '../types/aggregators';
|
|
|
3
3
|
import { PermissionCheckResult, UpdateFieldOptionsOpts } from '../types/mutations';
|
|
4
4
|
import { FieldData, FieldType, FieldOptions, FieldConfig } from '../types/field';
|
|
5
5
|
import { ObjectValues } from '../private_utils';
|
|
6
|
+
import { FieldTypeConfig } from '../types/airtable_interface';
|
|
6
7
|
import AbstractModel from './abstract_model';
|
|
7
8
|
import { Aggregator } from './create_aggregators';
|
|
8
9
|
declare const WatchableFieldKeys: Readonly<{
|
|
@@ -72,6 +73,8 @@ declare class Field extends AbstractModel<FieldData, WatchableFieldKey> {
|
|
|
72
73
|
* ```
|
|
73
74
|
*/
|
|
74
75
|
get options(): FieldOptions | null;
|
|
76
|
+
_getCachedConfigFromFieldTypeProvider(): FieldTypeConfig;
|
|
77
|
+
_clearCachedConfig(): void;
|
|
75
78
|
/**
|
|
76
79
|
* The type and options of the field to make type narrowing `FieldOptions` easier.
|
|
77
80
|
*
|
|
@@ -93,7 +96,7 @@ declare class Field extends AbstractModel<FieldData, WatchableFieldKey> {
|
|
|
93
96
|
*
|
|
94
97
|
* Accepts partial input, in the same format as {@link updateOptionsAsync}.
|
|
95
98
|
*
|
|
96
|
-
* Returns `{hasPermission: true}` if the current user can update the specified
|
|
99
|
+
* Returns `{hasPermission: true}` if the current user can update the specified field,
|
|
97
100
|
* `{hasPermission: false, reasonDisplayString: string}` otherwise. `reasonDisplayString` may be
|
|
98
101
|
* used to display an error message to the user.
|
|
99
102
|
*
|
|
@@ -165,6 +168,67 @@ declare class Field extends AbstractModel<FieldData, WatchableFieldKey> {
|
|
|
165
168
|
* ```
|
|
166
169
|
*/
|
|
167
170
|
updateOptionsAsync(options: FieldOptions, opts?: UpdateFieldOptionsOpts): Promise<void>;
|
|
171
|
+
/**
|
|
172
|
+
* Checks whether the current user has permission to perform the given description update.
|
|
173
|
+
*
|
|
174
|
+
* Accepts partial input, in the same format as {@link updateDescriptionAsync}.
|
|
175
|
+
*
|
|
176
|
+
* Returns `{hasPermission: true}` if the current user can update the specified field,
|
|
177
|
+
* `{hasPermission: false, reasonDisplayString: string}` otherwise. `reasonDisplayString` may be
|
|
178
|
+
* used to display an error message to the user.
|
|
179
|
+
*
|
|
180
|
+
* @param description new description for the field
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* ```js
|
|
184
|
+
* const updateFieldCheckResult = field.checkPermissionsForUpdateDescription();
|
|
185
|
+
*
|
|
186
|
+
* if (!updateFieldCheckResult.hasPermission) {
|
|
187
|
+
* alert(updateFieldCheckResult.reasonDisplayString);
|
|
188
|
+
* }
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
checkPermissionsForUpdateDescription(description?: string | null): PermissionCheckResult;
|
|
192
|
+
/**
|
|
193
|
+
* An alias for `checkPermissionsForUpdateDescription(options).hasPermission`.
|
|
194
|
+
*
|
|
195
|
+
* Checks whether the current user has permission to perform the description update.
|
|
196
|
+
*
|
|
197
|
+
* Accepts partial input, in the same format as {@link updateDescriptionAsync}.
|
|
198
|
+
*
|
|
199
|
+
* @param description new description for the field
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```js
|
|
203
|
+
* const canUpdateField = field.hasPermissionToUpdateDescription();
|
|
204
|
+
*
|
|
205
|
+
* if (!canUpdateField) {
|
|
206
|
+
* alert('not allowed!');
|
|
207
|
+
* }
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
hasPermissionToUpdateDescription(description?: string | null): boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Updates the description for this field.
|
|
213
|
+
*
|
|
214
|
+
* To remove an existing description, pass `''` as the new description.
|
|
215
|
+
* `null` is also accepted and will be coerced to `''` for consistency with field creation.
|
|
216
|
+
*
|
|
217
|
+
* Throws an error if the user does not have permission to update the field, or if an invalid
|
|
218
|
+
* description is provided.
|
|
219
|
+
*
|
|
220
|
+
* This action is asynchronous. Unlike updates to cell values, updates to field descriptions are
|
|
221
|
+
* **not** applied optimistically locally. You must `await` the returned promise before
|
|
222
|
+
* relying on the change in your app.
|
|
223
|
+
*
|
|
224
|
+
* @param description new description for the field
|
|
225
|
+
*
|
|
226
|
+
* @example
|
|
227
|
+
* ```js
|
|
228
|
+
* await myTextField.updateDescriptionAsync('This is a text field');
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
updateDescriptionAsync(description: string | null): Promise<void>;
|
|
168
232
|
/**
|
|
169
233
|
* `true` if this field is computed, `false` otherwise. A field is
|
|
170
234
|
* "computed" if it's value is not set by user input (e.g. autoNumber, formula,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/models/field.ts"],"names":[],"mappings":"AAAA,6CAA6C,CAAC,MAAM;AACpD,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAgB,qBAAqB,EAAE,sBAAsB,EAAC,MAAM,o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,UAAU,GAAG,aAAa,GAAG,OAAO;IAUtE;;;;;;;;;;;;OAYG;IACH,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;CAwDpD;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linked_records_query_result.d.ts","sourceRoot":"","sources":["../../../../src/models/linked_records_query_result.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,eAAe,EAAE,aAAa,EAAY,MAAM,kBAAkB,CAAC;AAG3E,OAAO,iBAAiB,EAAE,EACtB,6BAA6B,EAEhC,MAAM,uBAAuB,CAAC;AAI/B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,UAAU,CAAC;AAG9B,eAAO,MAAM,gBAAgB,0BAM5B,CAAC;AAEF,eAAe;AACf,UAAU,4BAA4B;CAAG;AAEzC;;;;;;;;GAQG;AACH,cAAM,wBAAyB,SAAQ,iBAAiB,CAAC,4BAA4B,CAAC;IA2ElF;;;;;;;;OAQG;IACH,IAAI,OAAO,IAAI,OAAO,CAErB;IAYD;;OAEG;IACH,IAAI,SAAS,IAAI,KAAK,CAAC,MAAM,CAAC,CAS7B;IAED;;OAEG;IACH,IAAI,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,CAQ3B;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAIhC;IAED,kBAAkB;IAClB,KAAK,CACD,IAAI,EAAE,6BAA6B,GAAG,aAAa,CAAC,6BAA6B,CAAC,EAClF,QAAQ,EAAE,eAAe,EACzB,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,GAC/B,KAAK,CAAC,6BAA6B,CAAC;IAmBvC,kBAAkB;IAClB,OAAO,CACH,IAAI,EAAE,6BAA6B,GAAG,aAAa,CAAC,6BAA6B,CAAC,EAClF,QAAQ,EAAE,eAAe,EACzB,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,GAC/B,KAAK,CAAC,6BAA6B,CAAC;IAqBvC,kBAAkB;IACZ,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"linked_records_query_result.d.ts","sourceRoot":"","sources":["../../../../src/models/linked_records_query_result.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,eAAe,EAAE,aAAa,EAAY,MAAM,kBAAkB,CAAC;AAG3E,OAAO,iBAAiB,EAAE,EACtB,6BAA6B,EAEhC,MAAM,uBAAuB,CAAC;AAI/B,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,UAAU,CAAC;AAG9B,eAAO,MAAM,gBAAgB,0BAM5B,CAAC;AAEF,eAAe;AACf,UAAU,4BAA4B;CAAG;AAEzC;;;;;;;;GAQG;AACH,cAAM,wBAAyB,SAAQ,iBAAiB,CAAC,4BAA4B,CAAC;IA2ElF;;;;;;;;OAQG;IACH,IAAI,OAAO,IAAI,OAAO,CAErB;IAYD;;OAEG;IACH,IAAI,SAAS,IAAI,KAAK,CAAC,MAAM,CAAC,CAS7B;IAED;;OAEG;IACH,IAAI,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,CAQ3B;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAIhC;IAED,kBAAkB;IAClB,KAAK,CACD,IAAI,EAAE,6BAA6B,GAAG,aAAa,CAAC,6BAA6B,CAAC,EAClF,QAAQ,EAAE,eAAe,EACzB,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,GAC/B,KAAK,CAAC,6BAA6B,CAAC;IAmBvC,kBAAkB;IAClB,OAAO,CACH,IAAI,EAAE,6BAA6B,GAAG,aAAa,CAAC,6BAA6B,CAAC,EAClF,QAAQ,EAAE,eAAe,EACzB,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,GAC/B,KAAK,CAAC,6BAA6B,CAAC;IAqBvC,kBAAkB;IACZ,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAuEpC;;;;OAIG;IACH,IAAI,SAAS,WAEZ;CAsWJ;AAED,eAAe,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation_constants.d.ts","sourceRoot":"","sources":["../../../../src/models/mutation_constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,wBAAwB,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"mutation_constants.d.ts","sourceRoot":"","sources":["../../../../src/models/mutation_constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,4BAA4B,QAAQ,CAAC;AAClD,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,wBAAwB,MAAM,CAAC"}
|