@airtable/blocks 1.8.0 → 1.9.0-experimental
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/CHANGELOG.md +16 -2
- package/dist/cjs/error_utils.js +17 -0
- 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/grouped_record_query_result.js +5 -14
- package/dist/cjs/models/linked_records_query_result.js +75 -27
- package/dist/cjs/models/mutation_constants.js +3 -1
- package/dist/cjs/models/mutations.js +67 -176
- package/dist/cjs/models/query_manager.js +327 -0
- package/dist/cjs/models/record.js +308 -55
- package/dist/cjs/models/record_query_result.js +4 -1
- package/dist/cjs/models/record_store.js +554 -765
- package/dist/cjs/models/table.js +22 -13
- package/dist/cjs/models/table_or_view_query_result.js +480 -414
- package/dist/cjs/models/view_data_store.js +243 -295
- package/dist/cjs/private_utils.js +50 -0
- package/dist/cjs/sdk.js +12 -2
- package/dist/cjs/testing/{mock_airtable_interface.js → abstract_mock_airtable_interface.js} +71 -22
- package/dist/cjs/types/block_query_spec.js +85 -0
- 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/ui/use_records.js +5 -1
- package/dist/cjs/unstable_testing_utils.js +2 -2
- package/dist/cjs/watchable.js +123 -71
- 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/grouped_record_query_result.d.ts +3 -3
- package/dist/types/src/models/grouped_record_query_result.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/query_manager.d.ts +2 -0
- package/dist/types/src/models/query_manager.d.ts.map +1 -0
- package/dist/types/src/models/record.d.ts +12 -3
- package/dist/types/src/models/record.d.ts.map +1 -1
- package/dist/types/src/models/record_query_result.d.ts +3 -2
- package/dist/types/src/models/record_query_result.d.ts.map +1 -1
- package/dist/types/src/models/record_store.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/models/table_or_view_query_result.d.ts +3 -5
- package/dist/types/src/models/table_or_view_query_result.d.ts.map +1 -1
- package/dist/types/src/models/view_data_store.d.ts +0 -1
- package/dist/types/src/models/view_data_store.d.ts.map +1 -1
- package/dist/types/src/models/view_metadata_query_result.d.ts +1 -1
- package/dist/types/src/models/view_metadata_query_result.d.ts.map +1 -1
- package/dist/types/src/private_utils.d.ts +30 -1
- package/dist/types/src/private_utils.d.ts.map +1 -1
- package/dist/types/src/sdk.d.ts.map +1 -1
- package/dist/types/src/testing/{mock_airtable_interface.d.ts → abstract_mock_airtable_interface.d.ts} +20 -15
- package/dist/types/src/testing/abstract_mock_airtable_interface.d.ts.map +1 -0
- package/dist/types/src/types/airtable_interface.d.ts +43 -19
- package/dist/types/src/types/airtable_interface.d.ts.map +1 -1
- package/dist/types/src/types/block_query_spec.d.ts +139 -0
- package/dist/types/src/types/block_query_spec.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/types/table.d.ts +0 -2
- package/dist/types/src/types/table.d.ts.map +1 -1
- package/dist/types/src/types/view.d.ts +3 -8
- package/dist/types/src/types/view.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 +121 -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} +26 -18
- package/dist/types/test/airtable_interface_mocks/mock_airtable_interface.d.ts.map +1 -0
- package/dist/types/test/airtable_interface_mocks/mock_base_data_stores.d.ts +51 -0
- package/dist/types/test/airtable_interface_mocks/mock_base_data_stores.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/dist/types/test/test_helpers.d.ts +2 -0
- package/dist/types/test/test_helpers.d.ts.map +1 -1
- package/package.json +3 -1
- 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
|
@@ -22,6 +22,10 @@ require("core-js/modules/es.object.to-string");
|
|
|
22
22
|
|
|
23
23
|
require("core-js/modules/es.object.values");
|
|
24
24
|
|
|
25
|
+
require("core-js/modules/es.regexp.constructor");
|
|
26
|
+
|
|
27
|
+
require("core-js/modules/es.regexp.to-string");
|
|
28
|
+
|
|
25
29
|
require("core-js/modules/es.set");
|
|
26
30
|
|
|
27
31
|
require("core-js/modules/es.weak-map");
|
|
@@ -50,12 +54,14 @@ exports.compact = compact;
|
|
|
50
54
|
exports.clamp = clamp;
|
|
51
55
|
exports.flattenDeep = flattenDeep;
|
|
52
56
|
exports.keyBy = keyBy;
|
|
57
|
+
exports.getId = getId;
|
|
53
58
|
exports.uniqBy = uniqBy;
|
|
54
59
|
exports.getLocallyUniqueId = getLocallyUniqueId;
|
|
55
60
|
exports.getValueAtOwnPath = getValueAtOwnPath;
|
|
56
61
|
exports.arrayDifference = arrayDifference;
|
|
57
62
|
exports.debounce = debounce;
|
|
58
63
|
exports.isBlockDevelopmentRestrictionEnabled = isBlockDevelopmentRestrictionEnabled;
|
|
64
|
+
exports.isFieldId = isFieldId;
|
|
59
65
|
Object.defineProperty(exports, "isDeepEqual", {
|
|
60
66
|
enumerable: true,
|
|
61
67
|
get: function get() {
|
|
@@ -139,10 +145,16 @@ function cast(x) {
|
|
|
139
145
|
return x;
|
|
140
146
|
}
|
|
141
147
|
/**
|
|
148
|
+
* Used to turn a readonly type into a mutable copy: https://stackoverflow.com/a/50769802
|
|
149
|
+
* (used in the cloneDeep function)
|
|
150
|
+
*
|
|
142
151
|
* @hidden
|
|
143
152
|
*/
|
|
144
153
|
|
|
145
154
|
|
|
155
|
+
/**
|
|
156
|
+
* @hidden
|
|
157
|
+
*/
|
|
146
158
|
function cloneDeep(obj) {
|
|
147
159
|
var jsonString = JSON.stringify(obj);
|
|
148
160
|
|
|
@@ -411,6 +423,15 @@ function keyBy(array, getKey) {
|
|
|
411
423
|
*/
|
|
412
424
|
|
|
413
425
|
|
|
426
|
+
function getId(_ref) {
|
|
427
|
+
var id = _ref.id;
|
|
428
|
+
return id;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* @hidden
|
|
432
|
+
*/
|
|
433
|
+
|
|
434
|
+
|
|
414
435
|
function uniqBy(array, getKey) {
|
|
415
436
|
var usedKeys = new Set();
|
|
416
437
|
var result = [];
|
|
@@ -543,4 +564,33 @@ function debounce(fn, timeoutMs) {
|
|
|
543
564
|
|
|
544
565
|
function isBlockDevelopmentRestrictionEnabled() {
|
|
545
566
|
return (0, _airtable_interface.default)().sdkInitData.baseData.isBlockDevelopmentRestrictionEnabled;
|
|
567
|
+
} // This is copied from hyper_id_generator in hyperbase
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* Airtable id format. All object ids to have this format:
|
|
571
|
+
* <3 char prefix (lower-case)> + <14 random chars (upper/lower-case & numbers)>
|
|
572
|
+
* e.g. app4iu8QmuwcCbWCE
|
|
573
|
+
*
|
|
574
|
+
* We call it an "objectId" rather than "modelId" because not everything with an id is a model,
|
|
575
|
+
* e.g. worker access tokens.
|
|
576
|
+
*/
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
var ALPHA_NUMERIC_CHAR_PATTERN = '[A-Za-z0-9]';
|
|
580
|
+
var OBJECT_ID_PREFIX_LENGTH = 3; // We allow shorter objectIds because our tests use non-standard AirtableIds
|
|
581
|
+
|
|
582
|
+
var OBJECT_ID_MIN_SUFFIX_LENGTH = 1;
|
|
583
|
+
var OBJECT_ID_SUFFIX_LENGTH = 14;
|
|
584
|
+
var OBJECT_ID_SUFFIX_PATTERN = ALPHA_NUMERIC_CHAR_PATTERN + '{' + OBJECT_ID_MIN_SUFFIX_LENGTH + ',' + OBJECT_ID_SUFFIX_LENGTH + '}';
|
|
585
|
+
var OBJECT_ID_PATTERN = '[a-z]{' + OBJECT_ID_PREFIX_LENGTH + '}' + OBJECT_ID_SUFFIX_PATTERN;
|
|
586
|
+
var OBJECT_ID_REGEX = new RegExp('^' + OBJECT_ID_PATTERN + '$');
|
|
587
|
+
|
|
588
|
+
function _isStringAnObjectId(str) {
|
|
589
|
+
return OBJECT_ID_REGEX.test(str);
|
|
590
|
+
}
|
|
591
|
+
/** @internal */
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
function isFieldId(str) {
|
|
595
|
+
return typeof str === 'string' && _isStringAnObjectId(str) && str.substr(0, 3) === 'fld';
|
|
546
596
|
}
|
package/dist/cjs/sdk.js
CHANGED
|
@@ -45,6 +45,8 @@ var _undo_redo = _interopRequireDefault(require("./undo_redo"));
|
|
|
45
45
|
|
|
46
46
|
var _perform_record_action = require("./perform_record_action");
|
|
47
47
|
|
|
48
|
+
var _query_manager = require("./models/query_manager");
|
|
49
|
+
|
|
48
50
|
/** @hidden */
|
|
49
51
|
|
|
50
52
|
/** */
|
|
@@ -101,6 +103,12 @@ function () {
|
|
|
101
103
|
|
|
102
104
|
/** Represents the current Airtable {@link Base}. */
|
|
103
105
|
|
|
106
|
+
/**
|
|
107
|
+
* Represents active queries and their state
|
|
108
|
+
*
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
|
|
104
112
|
/** Contains information about the current session. */
|
|
105
113
|
|
|
106
114
|
/** @internal */
|
|
@@ -152,6 +160,7 @@ function () {
|
|
|
152
160
|
(0, _defineProperty2.default)(this, "__airtableInterface", void 0);
|
|
153
161
|
(0, _defineProperty2.default)(this, "globalConfig", void 0);
|
|
154
162
|
(0, _defineProperty2.default)(this, "base", void 0);
|
|
163
|
+
(0, _defineProperty2.default)(this, "_queryManager", void 0);
|
|
155
164
|
(0, _defineProperty2.default)(this, "session", void 0);
|
|
156
165
|
(0, _defineProperty2.default)(this, "__mutations", void 0);
|
|
157
166
|
(0, _defineProperty2.default)(this, "installationId", void 0);
|
|
@@ -167,6 +176,7 @@ function () {
|
|
|
167
176
|
var sdkInitData = airtableInterface.sdkInitData;
|
|
168
177
|
this.globalConfig = new _global_config.default(sdkInitData.initialKvValuesByKey, this);
|
|
169
178
|
this.base = new _base.default(this);
|
|
179
|
+
this._queryManager = new _query_manager.QueryManager(this);
|
|
170
180
|
this.installationId = sdkInitData.blockInstallationId; // Bind the public methods on this class so users can import
|
|
171
181
|
// just the method, e.g.
|
|
172
182
|
// import {reload} from '@airtable/blocks';
|
|
@@ -176,7 +186,7 @@ function () {
|
|
|
176
186
|
this.viewport = new _viewport.default(sdkInitData.isFullscreen, airtableInterface);
|
|
177
187
|
this.cursor = new _cursor.default(this);
|
|
178
188
|
this.session = new _session.default(this);
|
|
179
|
-
this.__mutations = new _mutations.default(this, this.session, this.base,
|
|
189
|
+
this.__mutations = new _mutations.default(this, this.session, this.base, updates => this.__applyGlobalConfigUpdates(updates));
|
|
180
190
|
this.settingsButton = new _settings_button.default(airtableInterface);
|
|
181
191
|
this.undoRedo = new _undo_redo.default(airtableInterface);
|
|
182
192
|
this.performRecordAction = new _perform_record_action.PerformRecordAction(this, airtableInterface);
|
|
@@ -330,4 +340,4 @@ function () {
|
|
|
330
340
|
}();
|
|
331
341
|
|
|
332
342
|
exports.default = BlockSdk;
|
|
333
|
-
(0, _defineProperty2.default)(BlockSdk, "VERSION", "1.
|
|
343
|
+
(0, _defineProperty2.default)(BlockSdk, "VERSION", "1.9.0-experimental");
|
|
@@ -4,16 +4,22 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
|
|
5
5
|
require("core-js/modules/es.array.concat");
|
|
6
6
|
|
|
7
|
-
require("core-js/modules/es.array.
|
|
7
|
+
require("core-js/modules/es.array.iterator");
|
|
8
8
|
|
|
9
9
|
require("core-js/modules/es.object.to-string");
|
|
10
10
|
|
|
11
11
|
require("core-js/modules/es.promise");
|
|
12
12
|
|
|
13
|
+
require("core-js/modules/web.dom-collections.iterator");
|
|
14
|
+
|
|
13
15
|
Object.defineProperty(exports, "__esModule", {
|
|
14
16
|
value: true
|
|
15
17
|
});
|
|
16
|
-
exports.
|
|
18
|
+
exports.AbstractMockAirtableInterface = void 0;
|
|
19
|
+
|
|
20
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
21
|
+
|
|
22
|
+
require("regenerator-runtime/runtime");
|
|
17
23
|
|
|
18
24
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
19
25
|
|
|
@@ -157,18 +163,23 @@ var idGenerator = {
|
|
|
157
163
|
generateFieldId: () => 'fldGeneratedMockId',
|
|
158
164
|
generateTableId: () => 'tblGeneratedMockId'
|
|
159
165
|
};
|
|
160
|
-
/**
|
|
161
|
-
|
|
162
|
-
|
|
166
|
+
/**
|
|
167
|
+
* An abstract base class with a common interface exposed to both Blocks SDK's
|
|
168
|
+
* internal automated test suite and the blocks-testing public repo.
|
|
169
|
+
*
|
|
170
|
+
* @hidden
|
|
171
|
+
*/
|
|
172
|
+
|
|
173
|
+
var AbstractMockAirtableInterface =
|
|
163
174
|
/*#__PURE__*/
|
|
164
175
|
function (_EventEmitter) {
|
|
165
|
-
(0, _inherits2.default)(
|
|
176
|
+
(0, _inherits2.default)(AbstractMockAirtableInterface, _EventEmitter);
|
|
166
177
|
|
|
167
|
-
function
|
|
178
|
+
function AbstractMockAirtableInterface(initData) {
|
|
168
179
|
var _this;
|
|
169
180
|
|
|
170
|
-
(0, _classCallCheck2.default)(this,
|
|
171
|
-
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(
|
|
181
|
+
(0, _classCallCheck2.default)(this, AbstractMockAirtableInterface);
|
|
182
|
+
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(AbstractMockAirtableInterface).call(this));
|
|
172
183
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sdkInitData", void 0);
|
|
173
184
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_initData", void 0);
|
|
174
185
|
_this._initData = (0, _private_utils.cloneDeep)(initData);
|
|
@@ -185,7 +196,7 @@ function (_EventEmitter) {
|
|
|
185
196
|
*/
|
|
186
197
|
|
|
187
198
|
|
|
188
|
-
(0, _createClass2.default)(
|
|
199
|
+
(0, _createClass2.default)(AbstractMockAirtableInterface, [{
|
|
189
200
|
key: "reset",
|
|
190
201
|
value: function reset() {
|
|
191
202
|
this.removeAllListeners();
|
|
@@ -209,18 +220,15 @@ function (_EventEmitter) {
|
|
|
209
220
|
};
|
|
210
221
|
}
|
|
211
222
|
}, {
|
|
212
|
-
key: "
|
|
213
|
-
value: function
|
|
223
|
+
key: "createVisListWithRecordIds",
|
|
224
|
+
value: function createVisListWithRecordIds(recordIds, fieldDatas, sorts, tableId) {
|
|
214
225
|
return {
|
|
215
|
-
removeRecordIds(
|
|
226
|
+
removeRecordIds(removedRecordIds) {},
|
|
216
227
|
|
|
217
|
-
|
|
228
|
+
addRecordIds(addedRecordIds) {},
|
|
218
229
|
|
|
219
230
|
getOrderedRecordIds() {
|
|
220
|
-
return
|
|
221
|
-
var id = _ref.id;
|
|
222
|
-
return id;
|
|
223
|
-
});
|
|
231
|
+
return [...recordIds];
|
|
224
232
|
}
|
|
225
233
|
|
|
226
234
|
};
|
|
@@ -232,7 +240,49 @@ function (_EventEmitter) {
|
|
|
232
240
|
}
|
|
233
241
|
}, {
|
|
234
242
|
key: "setActiveViewOrTable",
|
|
235
|
-
value: function setActiveViewOrTable(tableId, viewId) {}
|
|
243
|
+
value: function setActiveViewOrTable(tableId, viewId) {}
|
|
244
|
+
}, {
|
|
245
|
+
key: "subscribeToQueryAndPopulateStoresAsync",
|
|
246
|
+
value: function subscribeToQueryAndPopulateStoresAsync(query, options) {
|
|
247
|
+
return _regenerator.default.async(function subscribeToQueryAndPopulateStoresAsync$(_context) {
|
|
248
|
+
while (1) {
|
|
249
|
+
switch (_context.prev = _context.next) {
|
|
250
|
+
case 0:
|
|
251
|
+
throw (0, _error_utils.spawnError)('subscribeToQueryAndPopulateStoresAsync unimplemented');
|
|
252
|
+
|
|
253
|
+
case 1:
|
|
254
|
+
case "end":
|
|
255
|
+
return _context.stop();
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
}, {
|
|
261
|
+
key: "unsubscribeFromQueryIdsAsync",
|
|
262
|
+
value: function unsubscribeFromQueryIdsAsync(querySpecIds) {
|
|
263
|
+
return _regenerator.default.async(function unsubscribeFromQueryIdsAsync$(_context2) {
|
|
264
|
+
while (1) {
|
|
265
|
+
switch (_context2.prev = _context2.next) {
|
|
266
|
+
case 0:
|
|
267
|
+
throw (0, _error_utils.spawnError)('unsubscribeFromQueryIdsAsync unimplemented');
|
|
268
|
+
|
|
269
|
+
case 1:
|
|
270
|
+
case "end":
|
|
271
|
+
return _context2.stop();
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
}, {
|
|
277
|
+
key: "getTableRecordStoreIfExists",
|
|
278
|
+
value: function getTableRecordStoreIfExists(tableId) {
|
|
279
|
+
throw (0, _error_utils.spawnError)('getTableRecordStoreIfExists unimplemented');
|
|
280
|
+
}
|
|
281
|
+
}, {
|
|
282
|
+
key: "getViewMetadataStoreIfExists",
|
|
283
|
+
value: function getViewMetadataStoreIfExists(tableId, viewId) {
|
|
284
|
+
throw (0, _error_utils.spawnError)('getViewMetadataStoreIfExists unimplemented');
|
|
285
|
+
} // TODO(jugglinmike): Implement
|
|
236
286
|
|
|
237
287
|
}, {
|
|
238
288
|
key: "subscribeToGlobalConfigUpdates",
|
|
@@ -310,8 +360,7 @@ function (_EventEmitter) {
|
|
|
310
360
|
return idGenerator;
|
|
311
361
|
}
|
|
312
362
|
}]);
|
|
313
|
-
return
|
|
363
|
+
return AbstractMockAirtableInterface;
|
|
314
364
|
}(EventEmitter);
|
|
315
365
|
|
|
316
|
-
|
|
317
|
-
exports.default = _default;
|
|
366
|
+
exports.AbstractMockAirtableInterface = AbstractMockAirtableInterface;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BlockQuerySubscriptionChangeType = exports.BlockFieldSelectionSpecType = exports.BlockQuerySourceType = void 0;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Specification for data needed by both the Blocks SDK and the blocks iframe
|
|
10
|
+
* that spans across a few repos and run environments:
|
|
11
|
+
* +--------------------+--------------------+--------------------+
|
|
12
|
+
* | airtable.com | blocks iframe | blocks sdk |
|
|
13
|
+
* +--------------------+--------------------+--------------------+
|
|
14
|
+
* | repo: hyperbase | repo: hyperbase | repo: blocks-sdk |
|
|
15
|
+
* | run: airtable.com | run: iframe | run: iframe |
|
|
16
|
+
* +--------------------+--------------------+--------------------+
|
|
17
|
+
*
|
|
18
|
+
* A BlockQuerySpec has a required `source` and one or more `selection`s.
|
|
19
|
+
* The `source` is a top-level concept that defines where the data comes
|
|
20
|
+
* from, while the `selection`s define desired properties from the data.
|
|
21
|
+
* In other words, think of the data as a tree, the `source` defines the
|
|
22
|
+
* root, and the `selection`s define the branches and leaves.
|
|
23
|
+
*
|
|
24
|
+
* Note that instead of a sub-object `source`, we use `source`-prefixed
|
|
25
|
+
* properties for the same effect. This works around a TypeScript limitation
|
|
26
|
+
* of not being able to discriminate between the unions for BlockQuerySpec.
|
|
27
|
+
*
|
|
28
|
+
* The specification will be used for two parts of the data lifecycle:
|
|
29
|
+
* 1. An initial response, via BlockQuerySpecResponseForAirtableInterface
|
|
30
|
+
* 2. Subsequent updates to keep the date updated, via BlockQueryUpdate
|
|
31
|
+
*
|
|
32
|
+
* NOTE: Keep this in sync with the hyperbase repo's block_query_spec.tsx file!
|
|
33
|
+
*
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/** @hidden */
|
|
38
|
+
|
|
39
|
+
/** @hidden */
|
|
40
|
+
|
|
41
|
+
/** @hidden */
|
|
42
|
+
var BlockQuerySourceType;
|
|
43
|
+
/** @hidden */
|
|
44
|
+
|
|
45
|
+
exports.BlockQuerySourceType = BlockQuerySourceType;
|
|
46
|
+
|
|
47
|
+
(function (BlockQuerySourceType) {
|
|
48
|
+
BlockQuerySourceType["TABLE"] = "table";
|
|
49
|
+
BlockQuerySourceType["VIEW"] = "view";
|
|
50
|
+
})(BlockQuerySourceType || (exports.BlockQuerySourceType = BlockQuerySourceType = {}));
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The different ways fields can be queried
|
|
54
|
+
*
|
|
55
|
+
* @hidden
|
|
56
|
+
*/
|
|
57
|
+
var BlockFieldSelectionSpecType;
|
|
58
|
+
/**
|
|
59
|
+
* Allows querying for all fields, or a specified set of fields. In the latter
|
|
60
|
+
* case, we also allow specifying properties of a record like commentCount and
|
|
61
|
+
* recordCreatedTime that don't have fieldIds (ALL_FIELDS implies including all
|
|
62
|
+
* of these properties).
|
|
63
|
+
*
|
|
64
|
+
* @hidden
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
exports.BlockFieldSelectionSpecType = BlockFieldSelectionSpecType;
|
|
68
|
+
|
|
69
|
+
(function (BlockFieldSelectionSpecType) {
|
|
70
|
+
BlockFieldSelectionSpecType["SPECIFIED_FIELDS"] = "specifiedFields";
|
|
71
|
+
BlockFieldSelectionSpecType["ALL_FIELDS_FROM_TABLE"] = "allFieldsFromTable";
|
|
72
|
+
})(BlockFieldSelectionSpecType || (exports.BlockFieldSelectionSpecType = BlockFieldSelectionSpecType = {}));
|
|
73
|
+
|
|
74
|
+
/** @hidden */
|
|
75
|
+
var BlockQuerySubscriptionChangeType;
|
|
76
|
+
/** @hidden */
|
|
77
|
+
|
|
78
|
+
exports.BlockQuerySubscriptionChangeType = BlockQuerySubscriptionChangeType;
|
|
79
|
+
|
|
80
|
+
(function (BlockQuerySubscriptionChangeType) {
|
|
81
|
+
BlockQuerySubscriptionChangeType["ADDED_RECORD_IDS"] = "addedRecordIds";
|
|
82
|
+
BlockQuerySubscriptionChangeType["REMOVED_RECORD_IDS"] = "removedRecordIds";
|
|
83
|
+
BlockQuerySubscriptionChangeType["MODIFIED_CELL_VALUES_FOR_TABLE"] = "modifiedCellValuesForTable";
|
|
84
|
+
BlockQuerySubscriptionChangeType["CHANGED_COLORS_BY_RECORD_ID_FOR_VIEW"] = "changedColorsByRecordIdForView";
|
|
85
|
+
})(BlockQuerySubscriptionChangeType || (exports.BlockQuerySubscriptionChangeType = BlockQuerySubscriptionChangeType = {}));
|
|
@@ -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
|
* }
|
|
@@ -4,6 +4,10 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
4
4
|
|
|
5
5
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
6
|
|
|
7
|
+
require("core-js/modules/es.array.iterator");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/web.dom-collections.iterator");
|
|
10
|
+
|
|
7
11
|
Object.defineProperty(exports, "__esModule", {
|
|
8
12
|
value: true
|
|
9
13
|
});
|
|
@@ -104,7 +108,7 @@ function useRecordIds(tableOrViewOrQueryResult, opts) {
|
|
|
104
108
|
var queryResult = _useUnwatchedRecordQueryResult(tableOrViewOrQueryResult, 'useRecordIds', generatedOpts);
|
|
105
109
|
|
|
106
110
|
(0, _use_watchable.default)(queryResult, ['recordIds']);
|
|
107
|
-
return queryResult ? queryResult.recordIds : null;
|
|
111
|
+
return queryResult ? [...queryResult.recordIds] : null;
|
|
108
112
|
}
|
|
109
113
|
/** */
|
|
110
114
|
|
|
@@ -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");
|