@pnp/spfx-property-controls 3.4.0-beta.1766339 → 3.4.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/CHANGELOG.json +2 -1
- package/CHANGELOG.md +1 -0
- package/lib/common/telemetry/version.d.ts.map +1 -1
- package/lib/common/telemetry/version.js +1 -1
- package/lib/common/telemetry/version.js.map +1 -1
- package/lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.d.ts.map +1 -1
- package/lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js +0 -7
- package/lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js.map +1 -1
- package/lib/propertyFields/filePicker/IPropertyFieldFilePicker.d.ts +1 -1
- package/lib/propertyFields/filePicker/IPropertyFieldFilePicker.d.ts.map +1 -1
- package/lib/propertyFields/filePicker/PropertyFieldFilePicker.js +2 -2
- package/lib/propertyFields/filePicker/PropertyFieldFilePicker.js.map +1 -1
- package/lib/propertyFields/filePicker/PropertyFieldFilePickerHost.js +1 -1
- package/lib/propertyFields/filePicker/PropertyFieldFilePickerHost.js.map +1 -1
- package/lib/propertyFields/filePicker/filePickerControls/FilePicker.js +2 -2
- package/lib/propertyFields/filePicker/filePickerControls/FilePicker.js.map +1 -1
- package/lib/propertyFields/filePicker/filePickerControls/IFilePickerProps.d.ts +1 -1
- package/lib/propertyFields/filePicker/filePickerControls/IFilePickerProps.d.ts.map +1 -1
- package/lib/propertyFields/filePicker/filePickerControls/SiteFilePickerTab/ISiteFilePickerTabProps.d.ts +1 -1
- package/lib/propertyFields/filePicker/filePickerControls/SiteFilePickerTab/ISiteFilePickerTabProps.d.ts.map +1 -1
- package/lib/propertyFields/filePicker/filePickerControls/SiteFilePickerTab/SiteFilePickerTab.js +1 -1
- package/lib/propertyFields/filePicker/filePickerControls/SiteFilePickerTab/SiteFilePickerTab.js.map +1 -1
- package/lib/propertyFields/filePicker/filePickerControls/controls/DocumentLibraryBrowser/DocumentLibraryBrowser.js +1 -1
- package/lib/propertyFields/filePicker/filePickerControls/controls/DocumentLibraryBrowser/DocumentLibraryBrowser.js.map +1 -1
- package/lib/propertyFields/filePicker/filePickerControls/controls/DocumentLibraryBrowser/IDocumentLibraryBrowserProps.d.ts +1 -1
- package/lib/propertyFields/filePicker/filePickerControls/controls/DocumentLibraryBrowser/IDocumentLibraryBrowserProps.d.ts.map +1 -1
- package/package.json +2 -2
- package/release/webpack-stats/sp-dev-fx-property-controls.stats.json +61 -79
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"errors": [],
|
|
3
3
|
"warnings": [],
|
|
4
4
|
"version": "4.44.2",
|
|
5
|
-
"hash": "
|
|
6
|
-
"time":
|
|
7
|
-
"builtAt":
|
|
5
|
+
"hash": "c55927c2820edaa6b427",
|
|
6
|
+
"time": 11047,
|
|
7
|
+
"builtAt": 1644686742318,
|
|
8
8
|
"publicPath": "",
|
|
9
9
|
"outputPath": "/home/runner/work/sp-dev-fx-property-controls/sp-dev-fx-property-controls/dist",
|
|
10
10
|
"assetsByChunkName": {
|
|
@@ -264,7 +264,7 @@
|
|
|
264
264
|
},
|
|
265
265
|
{
|
|
266
266
|
"name": "property-controls-test-web-part.js",
|
|
267
|
-
"size":
|
|
267
|
+
"size": 9117278,
|
|
268
268
|
"chunks": [
|
|
269
269
|
"property-controls-test-web-part"
|
|
270
270
|
],
|
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
},
|
|
278
278
|
{
|
|
279
279
|
"name": "property-controls-test-web-part.js.map",
|
|
280
|
-
"size":
|
|
280
|
+
"size": 8539163,
|
|
281
281
|
"chunks": [
|
|
282
282
|
"property-controls-test-web-part"
|
|
283
283
|
],
|
|
@@ -325,7 +325,7 @@
|
|
|
325
325
|
"rendered": true,
|
|
326
326
|
"initial": true,
|
|
327
327
|
"entry": true,
|
|
328
|
-
"size":
|
|
328
|
+
"size": 6931030,
|
|
329
329
|
"names": [
|
|
330
330
|
"property-controls-test-web-part"
|
|
331
331
|
],
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
"property-controls-test-web-part.js",
|
|
334
334
|
"property-controls-test-web-part.js.map"
|
|
335
335
|
],
|
|
336
|
-
"hash": "
|
|
336
|
+
"hash": "e8cae6634cd844f63ad8",
|
|
337
337
|
"siblings": [],
|
|
338
338
|
"parents": [],
|
|
339
339
|
"children": [],
|
|
@@ -3616,7 +3616,7 @@
|
|
|
3616
3616
|
"name": "./lib/propertyFields/filePicker/filePickerControls/controls/DocumentLibraryBrowser/DocumentLibraryBrowser.js",
|
|
3617
3617
|
"index": 1392,
|
|
3618
3618
|
"index2": 1385,
|
|
3619
|
-
"size":
|
|
3619
|
+
"size": 7486,
|
|
3620
3620
|
"cacheable": true,
|
|
3621
3621
|
"built": true,
|
|
3622
3622
|
"optional": false,
|
|
@@ -3705,7 +3705,7 @@
|
|
|
3705
3705
|
],
|
|
3706
3706
|
"optimizationBailout": [],
|
|
3707
3707
|
"depth": 9,
|
|
3708
|
-
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as React from 'react';\nimport { FocusZone } from 'office-ui-fabric-react/lib/FocusZone';\nimport { List } from 'office-ui-fabric-react/lib/List';\nimport { Spinner } from 'office-ui-fabric-react/lib/Spinner';\nimport { Image, ImageFit } from 'office-ui-fabric-react/lib/Image';\nimport { DefaultButton } from 'office-ui-fabric-react/lib/Button';\nimport styles from './DocumentLibraryBrowser.module.scss';\nimport * as strings from 'PropertyControlStrings';\n/**\n * Rows per page\n */\nexport var ROWS_PER_PAGE = 3;\n/**\n * Maximum row height\n */\nexport var MAX_ROW_HEIGHT = 250;\n/**\n * This would have been better done as an Office Fabric TileList, but it isn't available yet for production use\n */\nvar DocumentLibraryBrowser = /** @class */ (function (_super) {\n __extends(DocumentLibraryBrowser, _super);\n function DocumentLibraryBrowser(props) {\n var _this = _super.call(this, props) || this;\n /**\n * Calculates how many items there should be in the page\n */\n _this._getItemCountForPage = function (itemIndex, surfaceRect) {\n if (itemIndex === 0) {\n _this._columnCount = Math.ceil(surfaceRect.width / MAX_ROW_HEIGHT);\n _this._columnWidth = Math.floor(surfaceRect.width / _this._columnCount);\n _this._rowHeight = _this._columnWidth;\n }\n return _this._columnCount * ROWS_PER_PAGE;\n };\n /**\n * Gets the height of a list \"page\"\n */\n _this._getPageHeight = function () {\n return _this._rowHeight * ROWS_PER_PAGE;\n };\n /**\n * Renders a cell for search suggestions\n */\n _this._onRenderLibraryTile = function (item, index) {\n var imgSrc = item.iconPath ? item.iconPath : \"\";\n return (React.createElement(\"div\", { className: styles.filePickerFolderCardTile, \"data-is-focusable\": true, style: {\n width: 100 / _this._columnCount + '%'\n } },\n React.createElement(\"div\", { className: styles.filePickerFolderCardSizer },\n React.createElement(\"div\", { className: styles.filePickerFolderCardPadder },\n React.createElement(Image, { src: imgSrc, className: styles.filePickerFolderCardImage, imageFit: ImageFit.cover }),\n React.createElement(DefaultButton, { className: styles.filePickerFolderCardLabel, onClick: function (_event) { return _this._handleOpenLibrary(item); } }, item.title)))));\n };\n /**\n * Calls parent when library is opened\n */\n _this._handleOpenLibrary = function (library) {\n _this.props.onOpenLibrary(library);\n };\n _this.state = {\n isLoading: true,\n lists: []\n };\n return _this;\n }\n DocumentLibraryBrowser.prototype.componentDidMount = function () {\n return __awaiter(this, void 0, void 0, function () {\n var includePageLibraries, lists;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n includePageLibraries = this.props.
|
|
3708
|
+
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as React from 'react';\nimport { FocusZone } from 'office-ui-fabric-react/lib/FocusZone';\nimport { List } from 'office-ui-fabric-react/lib/List';\nimport { Spinner } from 'office-ui-fabric-react/lib/Spinner';\nimport { Image, ImageFit } from 'office-ui-fabric-react/lib/Image';\nimport { DefaultButton } from 'office-ui-fabric-react/lib/Button';\nimport styles from './DocumentLibraryBrowser.module.scss';\nimport * as strings from 'PropertyControlStrings';\n/**\n * Rows per page\n */\nexport var ROWS_PER_PAGE = 3;\n/**\n * Maximum row height\n */\nexport var MAX_ROW_HEIGHT = 250;\n/**\n * This would have been better done as an Office Fabric TileList, but it isn't available yet for production use\n */\nvar DocumentLibraryBrowser = /** @class */ (function (_super) {\n __extends(DocumentLibraryBrowser, _super);\n function DocumentLibraryBrowser(props) {\n var _this = _super.call(this, props) || this;\n /**\n * Calculates how many items there should be in the page\n */\n _this._getItemCountForPage = function (itemIndex, surfaceRect) {\n if (itemIndex === 0) {\n _this._columnCount = Math.ceil(surfaceRect.width / MAX_ROW_HEIGHT);\n _this._columnWidth = Math.floor(surfaceRect.width / _this._columnCount);\n _this._rowHeight = _this._columnWidth;\n }\n return _this._columnCount * ROWS_PER_PAGE;\n };\n /**\n * Gets the height of a list \"page\"\n */\n _this._getPageHeight = function () {\n return _this._rowHeight * ROWS_PER_PAGE;\n };\n /**\n * Renders a cell for search suggestions\n */\n _this._onRenderLibraryTile = function (item, index) {\n var imgSrc = item.iconPath ? item.iconPath : \"\";\n return (React.createElement(\"div\", { className: styles.filePickerFolderCardTile, \"data-is-focusable\": true, style: {\n width: 100 / _this._columnCount + '%'\n } },\n React.createElement(\"div\", { className: styles.filePickerFolderCardSizer },\n React.createElement(\"div\", { className: styles.filePickerFolderCardPadder },\n React.createElement(Image, { src: imgSrc, className: styles.filePickerFolderCardImage, imageFit: ImageFit.cover }),\n React.createElement(DefaultButton, { className: styles.filePickerFolderCardLabel, onClick: function (_event) { return _this._handleOpenLibrary(item); } }, item.title)))));\n };\n /**\n * Calls parent when library is opened\n */\n _this._handleOpenLibrary = function (library) {\n _this.props.onOpenLibrary(library);\n };\n _this.state = {\n isLoading: true,\n lists: []\n };\n return _this;\n }\n DocumentLibraryBrowser.prototype.componentDidMount = function () {\n return __awaiter(this, void 0, void 0, function () {\n var includePageLibraries, lists;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n includePageLibraries = this.props.includePageLibraries ? this.props.includePageLibraries : false;\n return [4 /*yield*/, this.props.fileBrowserService.getSiteMediaLibraries(includePageLibraries)];\n case 1:\n lists = _a.sent();\n this.setState({\n lists: lists,\n isLoading: false\n });\n return [2 /*return*/];\n }\n });\n });\n };\n DocumentLibraryBrowser.prototype.render = function () {\n if (this.state.isLoading) {\n return (React.createElement(Spinner, { label: strings.Loading }));\n }\n var libraries = this.state.lists;\n return (React.createElement(\"div\", { className: styles.documentLibraryBrowserContainer },\n React.createElement(FocusZone, null,\n React.createElement(List, { className: styles.filePickerFolderCardGrid, items: libraries, getItemCountForPage: this._getItemCountForPage, getPageHeight: this._getPageHeight, renderedWindowsAhead: 4, onRenderCell: this._onRenderLibraryTile }))));\n };\n return DocumentLibraryBrowser;\n}(React.Component));\nexport { DocumentLibraryBrowser };\n"
|
|
3709
3709
|
},
|
|
3710
3710
|
{
|
|
3711
3711
|
"id": "/b11",
|
|
@@ -24834,7 +24834,7 @@
|
|
|
24834
24834
|
"name": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
24835
24835
|
"index": 773,
|
|
24836
24836
|
"index2": 777,
|
|
24837
|
-
"size":
|
|
24837
|
+
"size": 2056,
|
|
24838
24838
|
"cacheable": true,
|
|
24839
24839
|
"built": true,
|
|
24840
24840
|
"optional": false,
|
|
@@ -24909,7 +24909,7 @@
|
|
|
24909
24909
|
],
|
|
24910
24910
|
"optimizationBailout": [],
|
|
24911
24911
|
"depth": 3,
|
|
24912
|
-
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport omit from 'lodash/omit';\nimport PropertyFieldHeader from '../../common/propertyFieldHeader/PropertyFieldHeader';\nimport * as telemetry from '../../common/telemetry';\nimport { ChoiceGroup } from 'office-ui-fabric-react/lib/components/ChoiceGroup';\nvar PropertyFieldToggleWithCalloutHost = /** @class */ (function (_super) {\n __extends(PropertyFieldToggleWithCalloutHost, _super);\n function PropertyFieldToggleWithCalloutHost(props) {\n var _this = _super.call(this, props) || this;\n telemetry.track('PropertyFieldToggleWithCallout', {\n disabled: props.disabled\n });\n return _this;\n }\n PropertyFieldToggleWithCalloutHost.prototype.render = function () {\n
|
|
24912
|
+
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport omit from 'lodash/omit';\nimport PropertyFieldHeader from '../../common/propertyFieldHeader/PropertyFieldHeader';\nimport * as telemetry from '../../common/telemetry';\nimport { ChoiceGroup } from 'office-ui-fabric-react/lib/components/ChoiceGroup';\nvar PropertyFieldToggleWithCalloutHost = /** @class */ (function (_super) {\n __extends(PropertyFieldToggleWithCalloutHost, _super);\n function PropertyFieldToggleWithCalloutHost(props) {\n var _this = _super.call(this, props) || this;\n telemetry.track('PropertyFieldToggleWithCallout', {\n disabled: props.disabled\n });\n return _this;\n }\n PropertyFieldToggleWithCalloutHost.prototype.render = function () {\n return (React.createElement(\"div\", null,\n React.createElement(PropertyFieldHeader, __assign({}, this.props)),\n React.createElement(ChoiceGroup, __assign({}, omit(this.props, ['label'])))));\n };\n return PropertyFieldToggleWithCalloutHost;\n}(React.Component));\nexport default PropertyFieldToggleWithCalloutHost;\n"
|
|
24913
24913
|
},
|
|
24914
24914
|
{
|
|
24915
24915
|
"id": "5yGh",
|
|
@@ -27384,7 +27384,7 @@
|
|
|
27384
27384
|
"name": "./lib/propertyFields/filePicker/filePickerControls/FilePicker.js",
|
|
27385
27385
|
"index": 1356,
|
|
27386
27386
|
"index2": 1434,
|
|
27387
|
-
"size":
|
|
27387
|
+
"size": 15242,
|
|
27388
27388
|
"cacheable": true,
|
|
27389
27389
|
"built": true,
|
|
27390
27390
|
"optional": false,
|
|
@@ -27451,7 +27451,7 @@
|
|
|
27451
27451
|
],
|
|
27452
27452
|
"optimizationBailout": [],
|
|
27453
27453
|
"depth": 5,
|
|
27454
|
-
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as React from 'react';\nimport { PrimaryButton, ActionButton } from 'office-ui-fabric-react/lib/components/Button';\nimport { Panel, PanelType } from 'office-ui-fabric-react/lib/components/Panel';\nimport { Label } from 'office-ui-fabric-react/lib/components/Label';\nimport { Nav } from 'office-ui-fabric-react/lib/Nav';\nimport { css } from \"@uifabric/utilities/lib/css\";\n// Localization\nimport * as strings from 'PropertyControlStrings';\nimport LinkFilePickerTab from './LinkFilePickerTab/LinkFilePickerTab';\nimport UploadFilePickerTab from './UploadFilePickerTab/UploadFilePickerTab';\nimport SiteFilePickerTab from './SiteFilePickerTab/SiteFilePickerTab';\nimport WebSearchTab from './WebSearchTab/WebSearchTab';\nimport RecentFilesTab from './RecentFilesTab/RecentFilesTab';\nimport styles from './FilePicker.module.scss';\nimport { FileBrowserService } from '../../../services/FileBrowserService';\nimport { OneDriveFilesTab } from './OneDriveFilesTab';\nimport { OneDriveService } from '../../../services/OneDriveService';\nimport { OrgAssetsService } from '../../../services/OrgAssetsService';\nimport { FilePickerTabType } from './FilePicker.types';\nimport { FilesSearchService } from '../../../services/FilesSearchService';\nimport { StockImages } from './StockImagesTab';\nvar FilePicker = /** @class */ (function (_super) {\n __extends(FilePicker, _super);\n function FilePicker(props) {\n var _this = _super.call(this, props) || this;\n /**\n * Renders the panel header\n */\n _this._renderHeader = function () {\n return React.createElement(\"div\", { className: \"ms-Panel-header\" },\n React.createElement(\"p\", { className: css(\"ms-Panel-headerText\", styles.header), role: \"heading\" }, strings.FilePickerHeader));\n };\n /**\n * Open the panel\n */\n _this._handleOpenPanel = function () {\n _this.setState({\n panelOpen: true,\n selectedTab: _this.props.defaultSelectedTab ? _this.props.defaultSelectedTab : FilePickerTabType.RecentTab\n });\n };\n /**\n * Closes the panel\n */\n _this._handleClosePanel = function () {\n _this.props.onCancel();\n _this.setState({\n panelOpen: false\n });\n };\n /**\n * On save action\n */\n _this._handleSave = function (filePickerResult) {\n _this.props.onSave(filePickerResult);\n _this.setState({\n panelOpen: false\n });\n };\n /**\n * Changes the selected tab when a link is selected\n */\n _this._handleLinkClick = function (ev, item) {\n _this.setState({ selectedTab: item.key });\n };\n /**\n * Prepares navigation panel options\n */\n _this._getNavPanelOptions = function () {\n var addUrl = _this.props.storeLastActiveTab !== false;\n var links = [];\n if (!_this.props.hideRecentTab) {\n links.push({\n name: strings.RecentLinkLabel,\n url: addUrl ? '#recent' : undefined,\n icon: 'Recent',\n key: FilePickerTabType.RecentTab,\n });\n }\n if (!_this.props.hideStockImages) {\n links.push({\n name: strings.StockImagesLinkLabel,\n url: addUrl ? '#stockImages' : undefined,\n key: FilePickerTabType.StockImagesTab,\n icon: 'ImageSearch',\n });\n }\n if (_this.props.bingAPIKey && !_this.props.hideWebSearchTab) {\n links.push({\n name: strings.WebSearchLinkLabel,\n url: addUrl ? '#search' : undefined,\n key: FilePickerTabType.WebSearchTab,\n icon: 'Search',\n });\n }\n if (!_this.props.hideOrganisationalAssetTab && _this.state.organisationAssetsEnabled) {\n links.push({\n name: 'Your organisation',\n url: addUrl ? '#orgAssets' : undefined,\n icon: 'FabricFolderConfirm',\n key: FilePickerTabType.OrganisationalAssetTab,\n });\n }\n if (!_this.props.hideOneDriveTab) {\n links.push({\n name: \"OneDrive\",\n url: addUrl ? '#onedrive' : undefined,\n key: FilePickerTabType.OneDriveTab,\n icon: 'OneDrive',\n });\n }\n if (!_this.props.hideSiteFilesTab) {\n links.push({\n name: strings.SiteLinkLabel,\n url: addUrl ? '#globe' : undefined,\n key: FilePickerTabType.SiteFilesTab,\n icon: 'Globe',\n });\n }\n if (!_this.props.hideLocalUploadTab) {\n links.push({\n name: strings.UploadLinkLabel,\n url: addUrl ? '#upload' : undefined,\n key: FilePickerTabType.LocalUploadTab,\n icon: 'System'\n });\n }\n if (!_this.props.hideLinkUploadTab) {\n links.push({\n name: strings.FromLinkLinkLabel,\n url: addUrl ? '#link' : undefined,\n key: FilePickerTabType.LinkUploadTab,\n icon: 'Link'\n });\n }\n var groups = [{ links: links }];\n return groups;\n };\n // Initialize file browser services\n _this.fileBrowserService = new FileBrowserService(props.context, _this.props.itemsCountQueryLimit);\n _this.oneDriveService = new OneDriveService(props.context, _this.props.itemsCountQueryLimit);\n _this.orgAssetsService = new OrgAssetsService(props.context, _this.props.itemsCountQueryLimit);\n _this.fileSearchService = new FilesSearchService(props.context, _this.props.bingAPIKey);\n _this.state = {\n panelOpen: false,\n selectedTab: _this.props.defaultSelectedTab ? _this.props.defaultSelectedTab : FilePickerTabType.RecentTab,\n organisationAssetsEnabled: false,\n showFullNav: true\n };\n return _this;\n }\n FilePicker.prototype.componentDidMount = function () {\n return __awaiter(this, void 0, void 0, function () {\n var orgAssetsEnabled, orgAssetsLibraries;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n orgAssetsEnabled = false;\n if (!!this.props.hideOrganisationalAssetTab) return [3 /*break*/, 2];\n return [4 /*yield*/, this.orgAssetsService.getSiteMediaLibraries()];\n case 1:\n orgAssetsLibraries = _a.sent();\n orgAssetsEnabled = orgAssetsLibraries ? true : false;\n _a.label = 2;\n case 2:\n this.setState({\n organisationAssetsEnabled: orgAssetsEnabled\n });\n return [2 /*return*/];\n }\n });\n });\n };\n FilePicker.prototype.render = function () {\n var _this = this;\n // If no acceptable file type was passed, and we're expecting images, set the default image filter\n var accepts = this.props.accepts;\n var buttonClassName = this.props.buttonClassName ? this.props.buttonClassName : '';\n var panelClassName = this.props.panelClassName ? this.props.panelClassName : '';\n var linkTabProps = {\n accepts: accepts,\n context: this.props.context,\n onClose: function () { return _this._handleClosePanel(); },\n onSave: function (value) { _this._handleSave(value); }\n };\n var buttonProps = {\n text: this.props.buttonLabel,\n disabled: this.props.disabled,\n onClick: this._handleOpenPanel,\n className: \"pnp__file-picker__button \" + buttonClassName\n };\n return (React.createElement(\"div\", { className: \"pnp__file-picker\" },\n this.props.label && React.createElement(Label, { required: this.props.required }, this.props.label),\n this.props.buttonIcon ?\n React.createElement(ActionButton, __assign({ iconProps: { iconName: this.props.buttonIcon } }, buttonProps)) :\n React.createElement(PrimaryButton, __assign({}, buttonProps)),\n React.createElement(Panel, { isOpen: this.state.panelOpen, isBlocking: true, hasCloseButton: true, className: \"pnp__file-picker__panel \" + styles.filePicker + \" \" + panelClassName, onDismiss: this._handleClosePanel, type: PanelType.extraLarge, isFooterAtBottom: true, onRenderNavigation: function () { return undefined; }, headerText: strings.FilePickerHeader, isLightDismiss: true, onRenderHeader: function () { return _this._renderHeader(); } },\n React.createElement(\"div\", { className: styles.nav },\n React.createElement(Nav, { groups: this._getNavPanelOptions(), selectedKey: this.state.selectedTab, onLinkClick: function (ev, item) { return _this._handleLinkClick(ev, item); } })),\n React.createElement(\"div\", { className: styles.tabsContainer },\n this.state.selectedTab === FilePickerTabType.LinkUploadTab &&\n React.createElement(LinkFilePickerTab, __assign({ fileSearchService: this.fileSearchService, allowExternalLinks: this.props.allowExternalLinks, checkIfFileExists: this.props.checkIfFileExists }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.StockImagesTab &&\n React.createElement(StockImages, __assign({ language: this.props.context.pageContext.cultureInfo.currentCultureName, fileSearchService: this.fileSearchService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.LocalUploadTab &&\n React.createElement(UploadFilePickerTab, __assign({}, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.SiteFilesTab &&\n React.createElement(SiteFilePickerTab, __assign({ fileBrowserService: this.fileBrowserService, displaySitePages: this.props.displaySitePages }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.OrganisationalAssetTab &&\n React.createElement(SiteFilePickerTab, __assign({ breadcrumbFirstNode: {\n isCurrentItem: true,\n text: strings.OrgAssetsTabLabel,\n key: FilePickerTabType.OrganisationalAssetTab\n }, fileBrowserService: this.orgAssetsService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.WebSearchTab &&\n React.createElement(WebSearchTab, __assign({ bingSearchService: this.fileSearchService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.OneDriveTab &&\n React.createElement(OneDriveFilesTab, __assign({ oneDriveService: this.oneDriveService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.RecentTab &&\n React.createElement(RecentFilesTab, __assign({ fileSearchService: this.fileSearchService }, linkTabProps))))));\n };\n return FilePicker;\n}(React.Component));\nexport { FilePicker };\n"
|
|
27454
|
+
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as React from 'react';\nimport { PrimaryButton, ActionButton } from 'office-ui-fabric-react/lib/components/Button';\nimport { Panel, PanelType } from 'office-ui-fabric-react/lib/components/Panel';\nimport { Label } from 'office-ui-fabric-react/lib/components/Label';\nimport { Nav } from 'office-ui-fabric-react/lib/Nav';\nimport { css } from \"@uifabric/utilities/lib/css\";\n// Localization\nimport * as strings from 'PropertyControlStrings';\nimport LinkFilePickerTab from './LinkFilePickerTab/LinkFilePickerTab';\nimport UploadFilePickerTab from './UploadFilePickerTab/UploadFilePickerTab';\nimport SiteFilePickerTab from './SiteFilePickerTab/SiteFilePickerTab';\nimport WebSearchTab from './WebSearchTab/WebSearchTab';\nimport RecentFilesTab from './RecentFilesTab/RecentFilesTab';\nimport styles from './FilePicker.module.scss';\nimport { FileBrowserService } from '../../../services/FileBrowserService';\nimport { OneDriveFilesTab } from './OneDriveFilesTab';\nimport { OneDriveService } from '../../../services/OneDriveService';\nimport { OrgAssetsService } from '../../../services/OrgAssetsService';\nimport { FilePickerTabType } from './FilePicker.types';\nimport { FilesSearchService } from '../../../services/FilesSearchService';\nimport { StockImages } from './StockImagesTab';\nvar FilePicker = /** @class */ (function (_super) {\n __extends(FilePicker, _super);\n function FilePicker(props) {\n var _this = _super.call(this, props) || this;\n /**\n * Renders the panel header\n */\n _this._renderHeader = function () {\n return React.createElement(\"div\", { className: \"ms-Panel-header\" },\n React.createElement(\"p\", { className: css(\"ms-Panel-headerText\", styles.header), role: \"heading\" }, strings.FilePickerHeader));\n };\n /**\n * Open the panel\n */\n _this._handleOpenPanel = function () {\n _this.setState({\n panelOpen: true,\n selectedTab: _this.props.defaultSelectedTab ? _this.props.defaultSelectedTab : FilePickerTabType.RecentTab\n });\n };\n /**\n * Closes the panel\n */\n _this._handleClosePanel = function () {\n _this.props.onCancel();\n _this.setState({\n panelOpen: false\n });\n };\n /**\n * On save action\n */\n _this._handleSave = function (filePickerResult) {\n _this.props.onSave(filePickerResult);\n _this.setState({\n panelOpen: false\n });\n };\n /**\n * Changes the selected tab when a link is selected\n */\n _this._handleLinkClick = function (ev, item) {\n _this.setState({ selectedTab: item.key });\n };\n /**\n * Prepares navigation panel options\n */\n _this._getNavPanelOptions = function () {\n var addUrl = _this.props.storeLastActiveTab !== false;\n var links = [];\n if (!_this.props.hideRecentTab) {\n links.push({\n name: strings.RecentLinkLabel,\n url: addUrl ? '#recent' : undefined,\n icon: 'Recent',\n key: FilePickerTabType.RecentTab,\n });\n }\n if (!_this.props.hideStockImages) {\n links.push({\n name: strings.StockImagesLinkLabel,\n url: addUrl ? '#stockImages' : undefined,\n key: FilePickerTabType.StockImagesTab,\n icon: 'ImageSearch',\n });\n }\n if (_this.props.bingAPIKey && !_this.props.hideWebSearchTab) {\n links.push({\n name: strings.WebSearchLinkLabel,\n url: addUrl ? '#search' : undefined,\n key: FilePickerTabType.WebSearchTab,\n icon: 'Search',\n });\n }\n if (!_this.props.hideOrganisationalAssetTab && _this.state.organisationAssetsEnabled) {\n links.push({\n name: 'Your organisation',\n url: addUrl ? '#orgAssets' : undefined,\n icon: 'FabricFolderConfirm',\n key: FilePickerTabType.OrganisationalAssetTab,\n });\n }\n if (!_this.props.hideOneDriveTab) {\n links.push({\n name: \"OneDrive\",\n url: addUrl ? '#onedrive' : undefined,\n key: FilePickerTabType.OneDriveTab,\n icon: 'OneDrive',\n });\n }\n if (!_this.props.hideSiteFilesTab) {\n links.push({\n name: strings.SiteLinkLabel,\n url: addUrl ? '#globe' : undefined,\n key: FilePickerTabType.SiteFilesTab,\n icon: 'Globe',\n });\n }\n if (!_this.props.hideLocalUploadTab) {\n links.push({\n name: strings.UploadLinkLabel,\n url: addUrl ? '#upload' : undefined,\n key: FilePickerTabType.LocalUploadTab,\n icon: 'System'\n });\n }\n if (!_this.props.hideLinkUploadTab) {\n links.push({\n name: strings.FromLinkLinkLabel,\n url: addUrl ? '#link' : undefined,\n key: FilePickerTabType.LinkUploadTab,\n icon: 'Link'\n });\n }\n var groups = [{ links: links }];\n return groups;\n };\n // Initialize file browser services\n _this.fileBrowserService = new FileBrowserService(props.context, _this.props.itemsCountQueryLimit);\n _this.oneDriveService = new OneDriveService(props.context, _this.props.itemsCountQueryLimit);\n _this.orgAssetsService = new OrgAssetsService(props.context, _this.props.itemsCountQueryLimit);\n _this.fileSearchService = new FilesSearchService(props.context, _this.props.bingAPIKey);\n _this.state = {\n panelOpen: false,\n selectedTab: _this.props.defaultSelectedTab ? _this.props.defaultSelectedTab : FilePickerTabType.RecentTab,\n organisationAssetsEnabled: false,\n showFullNav: true\n };\n return _this;\n }\n FilePicker.prototype.componentDidMount = function () {\n return __awaiter(this, void 0, void 0, function () {\n var orgAssetsEnabled, orgAssetsLibraries;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n orgAssetsEnabled = false;\n if (!!this.props.hideOrganisationalAssetTab) return [3 /*break*/, 2];\n return [4 /*yield*/, this.orgAssetsService.getSiteMediaLibraries()];\n case 1:\n orgAssetsLibraries = _a.sent();\n orgAssetsEnabled = orgAssetsLibraries ? true : false;\n _a.label = 2;\n case 2:\n this.setState({\n organisationAssetsEnabled: orgAssetsEnabled\n });\n return [2 /*return*/];\n }\n });\n });\n };\n FilePicker.prototype.render = function () {\n var _this = this;\n // If no acceptable file type was passed, and we're expecting images, set the default image filter\n var accepts = this.props.accepts;\n var buttonClassName = this.props.buttonClassName ? this.props.buttonClassName : '';\n var panelClassName = this.props.panelClassName ? this.props.panelClassName : '';\n var linkTabProps = {\n accepts: accepts,\n context: this.props.context,\n onClose: function () { return _this._handleClosePanel(); },\n onSave: function (value) { _this._handleSave(value); }\n };\n var buttonProps = {\n text: this.props.buttonLabel,\n disabled: this.props.disabled,\n onClick: this._handleOpenPanel,\n className: \"pnp__file-picker__button \" + buttonClassName\n };\n return (React.createElement(\"div\", { className: \"pnp__file-picker\" },\n this.props.label && React.createElement(Label, { required: this.props.required }, this.props.label),\n this.props.buttonIcon ?\n React.createElement(ActionButton, __assign({ iconProps: { iconName: this.props.buttonIcon } }, buttonProps)) :\n React.createElement(PrimaryButton, __assign({}, buttonProps)),\n React.createElement(Panel, { isOpen: this.state.panelOpen, isBlocking: true, hasCloseButton: true, className: \"pnp__file-picker__panel \" + styles.filePicker + \" \" + panelClassName, onDismiss: this._handleClosePanel, type: PanelType.extraLarge, isFooterAtBottom: true, onRenderNavigation: function () { return undefined; }, headerText: strings.FilePickerHeader, isLightDismiss: true, onRenderHeader: function () { return _this._renderHeader(); } },\n React.createElement(\"div\", { className: styles.nav },\n React.createElement(Nav, { groups: this._getNavPanelOptions(), selectedKey: this.state.selectedTab, onLinkClick: function (ev, item) { return _this._handleLinkClick(ev, item); } })),\n React.createElement(\"div\", { className: styles.tabsContainer },\n this.state.selectedTab === FilePickerTabType.LinkUploadTab &&\n React.createElement(LinkFilePickerTab, __assign({ fileSearchService: this.fileSearchService, allowExternalLinks: this.props.allowExternalLinks, checkIfFileExists: this.props.checkIfFileExists !== false }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.StockImagesTab &&\n React.createElement(StockImages, __assign({ language: this.props.context.pageContext.cultureInfo.currentCultureName, fileSearchService: this.fileSearchService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.LocalUploadTab &&\n React.createElement(UploadFilePickerTab, __assign({}, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.SiteFilesTab &&\n React.createElement(SiteFilePickerTab, __assign({ fileBrowserService: this.fileBrowserService, includePageLibraries: this.props.includePageLibraries }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.OrganisationalAssetTab &&\n React.createElement(SiteFilePickerTab, __assign({ breadcrumbFirstNode: {\n isCurrentItem: true,\n text: strings.OrgAssetsTabLabel,\n key: FilePickerTabType.OrganisationalAssetTab\n }, fileBrowserService: this.orgAssetsService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.WebSearchTab &&\n React.createElement(WebSearchTab, __assign({ bingSearchService: this.fileSearchService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.OneDriveTab &&\n React.createElement(OneDriveFilesTab, __assign({ oneDriveService: this.oneDriveService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.RecentTab &&\n React.createElement(RecentFilesTab, __assign({ fileSearchService: this.fileSearchService }, linkTabProps))))));\n };\n return FilePicker;\n}(React.Component));\nexport { FilePicker };\n"
|
|
27455
27455
|
},
|
|
27456
27456
|
{
|
|
27457
27457
|
"id": "6lyR",
|
|
@@ -39499,7 +39499,7 @@
|
|
|
39499
39499
|
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
39500
39500
|
"type": "harmony import specifier",
|
|
39501
39501
|
"userRequest": "../../common/propertyFieldHeader/PropertyFieldHeader",
|
|
39502
|
-
"loc": "
|
|
39502
|
+
"loc": "41:32-51"
|
|
39503
39503
|
},
|
|
39504
39504
|
{
|
|
39505
39505
|
"moduleId": "A8vW",
|
|
@@ -52608,7 +52608,7 @@
|
|
|
52608
52608
|
"name": "./lib/propertyFields/filePicker/filePickerControls/SiteFilePickerTab/SiteFilePickerTab.js",
|
|
52609
52609
|
"index": 1365,
|
|
52610
52610
|
"index2": 1393,
|
|
52611
|
-
"size":
|
|
52611
|
+
"size": 8878,
|
|
52612
52612
|
"cacheable": true,
|
|
52613
52613
|
"built": true,
|
|
52614
52614
|
"optional": false,
|
|
@@ -52689,7 +52689,7 @@
|
|
|
52689
52689
|
],
|
|
52690
52690
|
"optimizationBailout": [],
|
|
52691
52691
|
"depth": 6,
|
|
52692
|
-
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as React from 'react';\nimport { findIndex } from '@microsoft/sp-lodash-subset';\nimport { DocumentLibraryBrowser, FileBrowser } from '../controls';\nimport { PrimaryButton, DefaultButton } from 'office-ui-fabric-react/lib/components/Button';\nimport { Breadcrumb } from 'office-ui-fabric-react/lib/Breadcrumb';\nimport { Link } from 'office-ui-fabric-react/lib/Link';\nimport styles from './SiteFilePickerTab.module.scss';\nimport * as strings from 'PropertyControlStrings';\nvar SiteFilePickerTab = /** @class */ (function (_super) {\n __extends(SiteFilePickerTab, _super);\n function SiteFilePickerTab(props) {\n var _this = _super.call(this, props) || this;\n _this.renderBreadcrumbItem = function (item) {\n return (React.createElement(Link, { href: item.href, onClick: item.onClick, key: item.key, className: \"ms-Link ms-Breadcrumb-itemLink \" + styles.breadcrumbNavItem }, item.text));\n };\n /**\n * Handles breadcrump item click\n */\n _this.onBreadcrumpItemClick = function (node) {\n var breadcrumbItems = _this.state.breadcrumbItems;\n var breadcrumbClickedItemIndx = 0;\n // Site node clicked\n if (!node.libraryData && !node.folderData) {\n _this.setState({\n libraryAbsolutePath: undefined,\n libraryPath: undefined,\n folderName: undefined\n });\n }\n // Check if it is folder item\n else if (node.folderData) {\n _this._handleOpenFolder(node.folderData, false);\n // select which node has been clicked\n breadcrumbClickedItemIndx = findIndex(breadcrumbItems, function (item) { return item.folderData && item.folderData.absoluteUrl === node.key; });\n }\n // Check if it is library node\n else if (node.libraryData) {\n _this._handleOpenLibrary(node.libraryData, false);\n // select which node has been clicked\n breadcrumbClickedItemIndx = findIndex(breadcrumbItems, function (item) { return item.libraryData && item.libraryData.serverRelativeUrl === node.key; });\n }\n // Trim nodes array\n breadcrumbItems = breadcrumbItems.slice(0, breadcrumbClickedItemIndx + 1);\n // Set new current node\n breadcrumbItems[breadcrumbItems.length - 1].isCurrentItem = true;\n _this.setState({\n breadcrumbItems: breadcrumbItems,\n filePickerResult: undefined\n });\n };\n /**\n * Is called when user selects a different file\n */\n _this._handleSelectionChange = function (filePickerResult) {\n if (filePickerResult) {\n filePickerResult.downloadFileContent = function () { return _this.props.fileBrowserService.downloadSPFileContent(filePickerResult.fileAbsoluteUrl, filePickerResult.fileName); };\n }\n // this.props.fileBrowserService\n _this.setState({\n filePickerResult: filePickerResult\n });\n };\n /**\n * Called when user saves\n */\n _this._handleSave = function () {\n _this.props.onSave(_this.state.filePickerResult);\n };\n /**\n * Called when user closes tab\n */\n _this._handleClose = function () {\n _this.props.onClose();\n };\n /**\n * Triggered when user opens a file folder\n */\n _this._handleOpenFolder = function (folder, addBreadcrumbNode) {\n var breadcrumbItems = _this.state.breadcrumbItems;\n if (addBreadcrumbNode) {\n breadcrumbItems.map(function (item) { return item.isCurrentItem = false; });\n var breadcrumbNode_1 = {\n folderData: folder,\n isCurrentItem: true,\n text: folder.name,\n key: folder.absoluteUrl\n };\n breadcrumbNode_1.onClick = function () { _this.onBreadcrumpItemClick(breadcrumbNode_1); };\n breadcrumbItems.push(breadcrumbNode_1);\n }\n _this.setState({\n filePickerResult: null,\n libraryPath: folder.serverRelativeUrl,\n folderName: folder.name,\n libraryAbsolutePath: folder.absoluteUrl,\n breadcrumbItems: breadcrumbItems\n });\n };\n /**\n * Triggered when user opens a top-level document library\n */\n _this._handleOpenLibrary = function (library, addBreadcrumbNode) {\n var breadcrumbItems = _this.state.breadcrumbItems;\n if (addBreadcrumbNode) {\n breadcrumbItems.map(function (item) { return item.isCurrentItem = false; });\n var breadcrumbNode_2 = {\n libraryData: library,\n isCurrentItem: true,\n text: library.title,\n key: library.serverRelativeUrl\n };\n breadcrumbNode_2.onClick = function () { _this.onBreadcrumpItemClick(breadcrumbNode_2); };\n breadcrumbItems.push(breadcrumbNode_2);\n }\n _this.setState({\n libraryAbsolutePath: library.absoluteUrl,\n libraryTitle: library.title,\n libraryId: library.id,\n libraryPath: library.serverRelativeUrl,\n breadcrumbItems: breadcrumbItems\n });\n };\n // Add current site to the breadcrumb or the provided node\n var breadcrumbSiteNode = _this.props.breadcrumbFirstNode ? _this.props.breadcrumbFirstNode : {\n isCurrentItem: true,\n text: props.context.pageContext.web.title,\n key: props.context.pageContext.web.id.toString()\n };\n breadcrumbSiteNode.onClick = function () { _this.onBreadcrumpItemClick(breadcrumbSiteNode); };\n _this.state = {\n filePickerResult: null,\n libraryAbsolutePath: undefined,\n libraryTitle: strings.DocumentLibraries,\n libraryId: '',\n libraryPath: undefined,\n folderName: strings.DocumentLibraries,\n breadcrumbItems: [breadcrumbSiteNode]\n };\n return _this;\n }\n SiteFilePickerTab.prototype.render = function () {\n var _this = this;\n return (React.createElement(\"div\", { className: styles.tabContainer },\n React.createElement(\"div\", { className: styles.tabHeaderContainer },\n React.createElement(Breadcrumb, { items: this.state.breadcrumbItems, className: styles.breadcrumbNav })),\n React.createElement(\"div\", { className: styles.tabFiles },\n this.state.libraryAbsolutePath === undefined &&\n React.createElement(DocumentLibraryBrowser, { fileBrowserService: this.props.fileBrowserService, onOpenLibrary: function (selectedLibrary) { return _this._handleOpenLibrary(selectedLibrary, true); },
|
|
52692
|
+
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as React from 'react';\nimport { findIndex } from '@microsoft/sp-lodash-subset';\nimport { DocumentLibraryBrowser, FileBrowser } from '../controls';\nimport { PrimaryButton, DefaultButton } from 'office-ui-fabric-react/lib/components/Button';\nimport { Breadcrumb } from 'office-ui-fabric-react/lib/Breadcrumb';\nimport { Link } from 'office-ui-fabric-react/lib/Link';\nimport styles from './SiteFilePickerTab.module.scss';\nimport * as strings from 'PropertyControlStrings';\nvar SiteFilePickerTab = /** @class */ (function (_super) {\n __extends(SiteFilePickerTab, _super);\n function SiteFilePickerTab(props) {\n var _this = _super.call(this, props) || this;\n _this.renderBreadcrumbItem = function (item) {\n return (React.createElement(Link, { href: item.href, onClick: item.onClick, key: item.key, className: \"ms-Link ms-Breadcrumb-itemLink \" + styles.breadcrumbNavItem }, item.text));\n };\n /**\n * Handles breadcrump item click\n */\n _this.onBreadcrumpItemClick = function (node) {\n var breadcrumbItems = _this.state.breadcrumbItems;\n var breadcrumbClickedItemIndx = 0;\n // Site node clicked\n if (!node.libraryData && !node.folderData) {\n _this.setState({\n libraryAbsolutePath: undefined,\n libraryPath: undefined,\n folderName: undefined\n });\n }\n // Check if it is folder item\n else if (node.folderData) {\n _this._handleOpenFolder(node.folderData, false);\n // select which node has been clicked\n breadcrumbClickedItemIndx = findIndex(breadcrumbItems, function (item) { return item.folderData && item.folderData.absoluteUrl === node.key; });\n }\n // Check if it is library node\n else if (node.libraryData) {\n _this._handleOpenLibrary(node.libraryData, false);\n // select which node has been clicked\n breadcrumbClickedItemIndx = findIndex(breadcrumbItems, function (item) { return item.libraryData && item.libraryData.serverRelativeUrl === node.key; });\n }\n // Trim nodes array\n breadcrumbItems = breadcrumbItems.slice(0, breadcrumbClickedItemIndx + 1);\n // Set new current node\n breadcrumbItems[breadcrumbItems.length - 1].isCurrentItem = true;\n _this.setState({\n breadcrumbItems: breadcrumbItems,\n filePickerResult: undefined\n });\n };\n /**\n * Is called when user selects a different file\n */\n _this._handleSelectionChange = function (filePickerResult) {\n if (filePickerResult) {\n filePickerResult.downloadFileContent = function () { return _this.props.fileBrowserService.downloadSPFileContent(filePickerResult.fileAbsoluteUrl, filePickerResult.fileName); };\n }\n // this.props.fileBrowserService\n _this.setState({\n filePickerResult: filePickerResult\n });\n };\n /**\n * Called when user saves\n */\n _this._handleSave = function () {\n _this.props.onSave(_this.state.filePickerResult);\n };\n /**\n * Called when user closes tab\n */\n _this._handleClose = function () {\n _this.props.onClose();\n };\n /**\n * Triggered when user opens a file folder\n */\n _this._handleOpenFolder = function (folder, addBreadcrumbNode) {\n var breadcrumbItems = _this.state.breadcrumbItems;\n if (addBreadcrumbNode) {\n breadcrumbItems.map(function (item) { return item.isCurrentItem = false; });\n var breadcrumbNode_1 = {\n folderData: folder,\n isCurrentItem: true,\n text: folder.name,\n key: folder.absoluteUrl\n };\n breadcrumbNode_1.onClick = function () { _this.onBreadcrumpItemClick(breadcrumbNode_1); };\n breadcrumbItems.push(breadcrumbNode_1);\n }\n _this.setState({\n filePickerResult: null,\n libraryPath: folder.serverRelativeUrl,\n folderName: folder.name,\n libraryAbsolutePath: folder.absoluteUrl,\n breadcrumbItems: breadcrumbItems\n });\n };\n /**\n * Triggered when user opens a top-level document library\n */\n _this._handleOpenLibrary = function (library, addBreadcrumbNode) {\n var breadcrumbItems = _this.state.breadcrumbItems;\n if (addBreadcrumbNode) {\n breadcrumbItems.map(function (item) { return item.isCurrentItem = false; });\n var breadcrumbNode_2 = {\n libraryData: library,\n isCurrentItem: true,\n text: library.title,\n key: library.serverRelativeUrl\n };\n breadcrumbNode_2.onClick = function () { _this.onBreadcrumpItemClick(breadcrumbNode_2); };\n breadcrumbItems.push(breadcrumbNode_2);\n }\n _this.setState({\n libraryAbsolutePath: library.absoluteUrl,\n libraryTitle: library.title,\n libraryId: library.id,\n libraryPath: library.serverRelativeUrl,\n breadcrumbItems: breadcrumbItems\n });\n };\n // Add current site to the breadcrumb or the provided node\n var breadcrumbSiteNode = _this.props.breadcrumbFirstNode ? _this.props.breadcrumbFirstNode : {\n isCurrentItem: true,\n text: props.context.pageContext.web.title,\n key: props.context.pageContext.web.id.toString()\n };\n breadcrumbSiteNode.onClick = function () { _this.onBreadcrumpItemClick(breadcrumbSiteNode); };\n _this.state = {\n filePickerResult: null,\n libraryAbsolutePath: undefined,\n libraryTitle: strings.DocumentLibraries,\n libraryId: '',\n libraryPath: undefined,\n folderName: strings.DocumentLibraries,\n breadcrumbItems: [breadcrumbSiteNode]\n };\n return _this;\n }\n SiteFilePickerTab.prototype.render = function () {\n var _this = this;\n return (React.createElement(\"div\", { className: styles.tabContainer },\n React.createElement(\"div\", { className: styles.tabHeaderContainer },\n React.createElement(Breadcrumb, { items: this.state.breadcrumbItems, className: styles.breadcrumbNav })),\n React.createElement(\"div\", { className: styles.tabFiles },\n this.state.libraryAbsolutePath === undefined &&\n React.createElement(DocumentLibraryBrowser, { fileBrowserService: this.props.fileBrowserService, onOpenLibrary: function (selectedLibrary) { return _this._handleOpenLibrary(selectedLibrary, true); }, includePageLibraries: this.props.includePageLibraries }),\n this.state.libraryAbsolutePath !== undefined &&\n React.createElement(FileBrowser, { onChange: function (filePickerResult) { return _this._handleSelectionChange(filePickerResult); }, onOpenFolder: function (folder) { return _this._handleOpenFolder(folder, true); }, fileBrowserService: this.props.fileBrowserService, libraryName: this.state.libraryTitle, libraryId: this.state.libraryId, folderPath: this.state.libraryPath, accepts: this.props.accepts })),\n React.createElement(\"div\", { className: styles.actionButtonsContainer },\n React.createElement(\"div\", { className: styles.actionButtons },\n React.createElement(PrimaryButton, { disabled: !this.state.filePickerResult, onClick: function () { return _this._handleSave(); }, className: styles.actionButton }, strings.OpenButtonLabel),\n React.createElement(DefaultButton, { onClick: function () { return _this._handleClose(); }, className: styles.actionButton }, strings.CancelButtonLabel)))));\n };\n return SiteFilePickerTab;\n}(React.Component));\nexport default SiteFilePickerTab;\n"
|
|
52693
52693
|
},
|
|
52694
52694
|
{
|
|
52695
52695
|
"id": "FznD",
|
|
@@ -63245,7 +63245,7 @@
|
|
|
63245
63245
|
"name": "./lib/propertyFields/filePicker/PropertyFieldFilePicker.js",
|
|
63246
63246
|
"index": 1353,
|
|
63247
63247
|
"index2": 1442,
|
|
63248
|
-
"size":
|
|
63248
|
+
"size": 6465,
|
|
63249
63249
|
"cacheable": true,
|
|
63250
63250
|
"built": true,
|
|
63251
63251
|
"optional": false,
|
|
@@ -63302,7 +63302,7 @@
|
|
|
63302
63302
|
],
|
|
63303
63303
|
"optimizationBailout": [],
|
|
63304
63304
|
"depth": 3,
|
|
63305
|
-
"source": "var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport * as ReactDom from 'react-dom';\nimport { PropertyPaneFieldType } from '@microsoft/sp-property-pane';\nimport PropertyPaneFilePickerHost from './PropertyFieldFilePickerHost';\n/**\n * Represents a PropertyFieldFilePicker object\n */\nvar PropertyFieldFilePickerBuilder = /** @class */ (function () {\n function PropertyFieldFilePickerBuilder(_targetProperty, _properties) {\n var _this = this;\n this.type = PropertyPaneFieldType.Custom;\n this.disabled = false;\n this.required = false;\n this.storeLastActiveTab = true;\n this.render = function (elem, ctx, changeCallback) {\n var element = React.createElement(PropertyPaneFilePickerHost, {\n label: _this.label,\n buttonLabel: _this.buttonLabel,\n context: _this.context,\n buttonIcon: _this.buttonIcon,\n buttonClassName: _this.buttonClassName,\n panelClassName: _this.panelClassName,\n required: _this.required,\n bingAPIKey: _this.bingAPIKey,\n onSave: _this.onSave,\n onChanged: _this.onChanged,\n onCancel: _this.onCancel,\n itemsCountQueryLimit: _this.itemsCountQueryLimit,\n accepts: _this.accepts,\n filePickerResult: _this.filePickerResult,\n hideWebSearchTab: _this.hideWebSearchTab,\n hideRecentTab: _this.hideRecentTab,\n hideSiteFilesTab: _this.hideSiteFilesTab,\n hideLocalUploadTab: _this.hideLocalUploadTab,\n hideLinkUploadTab: _this.hideLinkUploadTab,\n hideOrganisationalAssetTab: _this.hideOrganisationalAssetTab,\n hideOneDriveTab: _this.hideOneDriveTab,\n storeLastActiveTab: _this.storeLastActiveTab,\n defaultSelectedTab: _this.defaultSelectedTab,\n hideStockImages: _this.hideStockImages,\n targetProperty: _this.targetProperty,\n allowExternalLinks: _this.allowExternalLinks,\n checkIfFileExists: _this.checkIfFileExists,\n
|
|
63305
|
+
"source": "var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport * as ReactDom from 'react-dom';\nimport { PropertyPaneFieldType } from '@microsoft/sp-property-pane';\nimport PropertyPaneFilePickerHost from './PropertyFieldFilePickerHost';\n/**\n * Represents a PropertyFieldFilePicker object\n */\nvar PropertyFieldFilePickerBuilder = /** @class */ (function () {\n function PropertyFieldFilePickerBuilder(_targetProperty, _properties) {\n var _this = this;\n this.type = PropertyPaneFieldType.Custom;\n this.disabled = false;\n this.required = false;\n this.storeLastActiveTab = true;\n this.render = function (elem, ctx, changeCallback) {\n var element = React.createElement(PropertyPaneFilePickerHost, {\n label: _this.label,\n buttonLabel: _this.buttonLabel,\n context: _this.context,\n buttonIcon: _this.buttonIcon,\n buttonClassName: _this.buttonClassName,\n panelClassName: _this.panelClassName,\n required: _this.required,\n bingAPIKey: _this.bingAPIKey,\n onSave: _this.onSave,\n onChanged: _this.onChanged,\n onCancel: _this.onCancel,\n itemsCountQueryLimit: _this.itemsCountQueryLimit,\n accepts: _this.accepts,\n filePickerResult: _this.filePickerResult,\n hideWebSearchTab: _this.hideWebSearchTab,\n hideRecentTab: _this.hideRecentTab,\n hideSiteFilesTab: _this.hideSiteFilesTab,\n hideLocalUploadTab: _this.hideLocalUploadTab,\n hideLinkUploadTab: _this.hideLinkUploadTab,\n hideOrganisationalAssetTab: _this.hideOrganisationalAssetTab,\n hideOneDriveTab: _this.hideOneDriveTab,\n storeLastActiveTab: _this.storeLastActiveTab,\n defaultSelectedTab: _this.defaultSelectedTab,\n hideStockImages: _this.hideStockImages,\n targetProperty: _this.targetProperty,\n allowExternalLinks: _this.allowExternalLinks,\n checkIfFileExists: _this.checkIfFileExists,\n includePageLibraries: _this.includePageLibraries,\n properties: _this.customProperties,\n key: _this.key,\n disabled: _this.disabled,\n onDispose: _this.dispose,\n onRender: _this.render,\n onChange: changeCallback,\n onPropertyChange: _this.onPropertyChange\n });\n ReactDom.render(element, elem);\n };\n this.targetProperty = _targetProperty;\n this.properties = _properties;\n this.properties.onDispose = this.dispose;\n this.properties.onRender = this.render;\n this.label = _properties.label;\n this.buttonLabel = _properties.buttonLabel;\n this.context = _properties.context;\n this.buttonIcon = _properties.buttonIcon;\n this.buttonClassName = _properties.buttonClassName;\n this.panelClassName = _properties.panelClassName;\n this.accepts = _properties.accepts;\n this.filePickerResult = _properties.filePickerResult;\n this.required = _properties.required;\n this.bingAPIKey = _properties.bingAPIKey;\n this.onSave = _properties.onSave;\n this.onChanged = _properties.onChanged;\n this.onCancel = _properties.onCancel;\n this.itemsCountQueryLimit = _properties.itemsCountQueryLimit !== undefined ? _properties.itemsCountQueryLimit : 100;\n this.hideWebSearchTab = _properties.hideWebSearchTab !== undefined ? _properties.hideWebSearchTab : true;\n this.hideRecentTab = _properties.hideRecentTab !== undefined ? _properties.hideRecentTab : false;\n this.hideSiteFilesTab = _properties.hideSiteFilesTab !== undefined ? _properties.hideSiteFilesTab : false;\n this.hideLocalUploadTab = _properties.hideLocalUploadTab !== undefined ? _properties.hideLocalUploadTab : false;\n this.hideLinkUploadTab = _properties.hideLinkUploadTab !== undefined ? _properties.hideLinkUploadTab : false;\n this.hideOrganisationalAssetTab = _properties.hideOrganisationalAssetTab !== undefined ? _properties.hideOrganisationalAssetTab : false;\n this.hideOneDriveTab = _properties.hideOneDriveTab !== undefined ? _properties.hideOneDriveTab : false;\n this.storeLastActiveTab = _properties.storeLastActiveTab !== undefined ? _properties.storeLastActiveTab : true;\n this.defaultSelectedTab = _properties.defaultSelectedTab;\n this.hideStockImages = _properties.hideStockImages !== undefined ? _properties.hideStockImages : false;\n this.allowExternalLinks = _properties.allowExternalLinks !== undefined ? _properties.allowExternalLinks : true;\n this.checkIfFileExists = _properties.checkIfFileExists !== undefined ? _properties.checkIfFileExists : true;\n this.includePageLibraries = _properties.includePageLibraries !== undefined ? _properties.includePageLibraries : false;\n this.onPropertyChange = _properties.onPropertyChange;\n this.customProperties = _properties.properties;\n this.key = _properties.key;\n this.context = _properties.context;\n if (_properties.disabled === true) {\n this.disabled = _properties.disabled;\n }\n }\n PropertyFieldFilePickerBuilder.prototype.dispose = function (elem) {\n };\n PropertyFieldFilePickerBuilder.prototype.onPropertyChange = function (propertyPath, oldValue, newValue) {\n };\n return PropertyFieldFilePickerBuilder;\n}());\n/**\n * Helper method to create a File Picker component on the PropertyPane.\n * @param targetProperty - Target property the File Picker component is associated to.\n * @param properties - Strongly typed File Picker component properties.\n */\nexport function PropertyFieldFilePicker(targetProperty, properties) {\n return new PropertyFieldFilePickerBuilder(targetProperty, __assign(__assign({}, properties), { targetProperty: targetProperty, onRender: null, onDispose: null }));\n}\n"
|
|
63306
63306
|
},
|
|
63307
63307
|
{
|
|
63308
63308
|
"id": "KVSy",
|
|
@@ -81421,9 +81421,9 @@
|
|
|
81421
81421
|
"chunks": [
|
|
81422
81422
|
"property-controls-test-web-part"
|
|
81423
81423
|
],
|
|
81424
|
-
"issuer": "/home/runner/work/sp-dev-fx-property-controls/sp-dev-fx-property-controls/node_modules/@uifabric/foundation/lib/
|
|
81425
|
-
"issuerId": "
|
|
81426
|
-
"issuerName": "./node_modules/@uifabric/foundation/lib/
|
|
81424
|
+
"issuer": "/home/runner/work/sp-dev-fx-property-controls/sp-dev-fx-property-controls/node_modules/@uifabric/foundation/lib/createComponent.js",
|
|
81425
|
+
"issuerId": "mVcb",
|
|
81426
|
+
"issuerName": "./node_modules/@uifabric/foundation/lib/createComponent.js",
|
|
81427
81427
|
"issuerPath": [
|
|
81428
81428
|
{
|
|
81429
81429
|
"id": "fd0V",
|
|
@@ -81476,9 +81476,9 @@
|
|
|
81476
81476
|
"name": "./node_modules/@uifabric/foundation/lib/index.js"
|
|
81477
81477
|
},
|
|
81478
81478
|
{
|
|
81479
|
-
"id": "
|
|
81480
|
-
"identifier": "/home/runner/work/sp-dev-fx-property-controls/sp-dev-fx-property-controls/node_modules/@uifabric/foundation/lib/
|
|
81481
|
-
"name": "./node_modules/@uifabric/foundation/lib/
|
|
81479
|
+
"id": "mVcb",
|
|
81480
|
+
"identifier": "/home/runner/work/sp-dev-fx-property-controls/sp-dev-fx-property-controls/node_modules/@uifabric/foundation/lib/createComponent.js",
|
|
81481
|
+
"name": "./node_modules/@uifabric/foundation/lib/createComponent.js"
|
|
81482
81482
|
}
|
|
81483
81483
|
],
|
|
81484
81484
|
"failed": false,
|
|
@@ -99848,16 +99848,7 @@
|
|
|
99848
99848
|
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
99849
99849
|
"type": "harmony import specifier",
|
|
99850
99850
|
"userRequest": "lodash/omit",
|
|
99851
|
-
"loc": "
|
|
99852
|
-
},
|
|
99853
|
-
{
|
|
99854
|
-
"moduleId": "5xb7",
|
|
99855
|
-
"moduleIdentifier": "/home/runner/work/sp-dev-fx-property-controls/sp-dev-fx-property-controls/node_modules/source-map-loader/index.js!/home/runner/work/sp-dev-fx-property-controls/sp-dev-fx-property-controls/lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
99856
|
-
"module": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
99857
|
-
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
99858
|
-
"type": "harmony import specifier",
|
|
99859
|
-
"userRequest": "lodash/omit",
|
|
99860
|
-
"loc": "49:58-62"
|
|
99851
|
+
"loc": "42:58-62"
|
|
99861
99852
|
},
|
|
99862
99853
|
{
|
|
99863
99854
|
"moduleId": "A8vW",
|
|
@@ -131798,7 +131789,7 @@
|
|
|
131798
131789
|
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
131799
131790
|
"type": "harmony import specifier",
|
|
131800
131791
|
"userRequest": "react",
|
|
131801
|
-
"loc": "
|
|
131792
|
+
"loc": "40:16-35"
|
|
131802
131793
|
},
|
|
131803
131794
|
{
|
|
131804
131795
|
"moduleId": "5xb7",
|
|
@@ -131807,7 +131798,7 @@
|
|
|
131807
131798
|
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
131808
131799
|
"type": "harmony import specifier",
|
|
131809
131800
|
"userRequest": "react",
|
|
131810
|
-
"loc": "
|
|
131801
|
+
"loc": "41:12-31"
|
|
131811
131802
|
},
|
|
131812
131803
|
{
|
|
131813
131804
|
"moduleId": "5xb7",
|
|
@@ -131816,7 +131807,7 @@
|
|
|
131816
131807
|
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
131817
131808
|
"type": "harmony import specifier",
|
|
131818
131809
|
"userRequest": "react",
|
|
131819
|
-
"loc": "
|
|
131810
|
+
"loc": "42:12-31"
|
|
131820
131811
|
},
|
|
131821
131812
|
{
|
|
131822
131813
|
"moduleId": "5xb7",
|
|
@@ -131825,7 +131816,7 @@
|
|
|
131825
131816
|
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
131826
131817
|
"type": "harmony import specifier",
|
|
131827
131818
|
"userRequest": "react",
|
|
131828
|
-
"loc": "
|
|
131819
|
+
"loc": "45:2-17"
|
|
131829
131820
|
},
|
|
131830
131821
|
{
|
|
131831
131822
|
"moduleId": "64bn",
|
|
@@ -151371,7 +151362,7 @@
|
|
|
151371
151362
|
"name": "./lib/common/telemetry/version.js",
|
|
151372
151363
|
"index": 348,
|
|
151373
151364
|
"index2": 342,
|
|
151374
|
-
"size":
|
|
151365
|
+
"size": 30,
|
|
151375
151366
|
"cacheable": true,
|
|
151376
151367
|
"built": true,
|
|
151377
151368
|
"optional": false,
|
|
@@ -151433,7 +151424,7 @@
|
|
|
151433
151424
|
],
|
|
151434
151425
|
"optimizationBailout": [],
|
|
151435
151426
|
"depth": 4,
|
|
151436
|
-
"source": "export var version = \"3.4.0
|
|
151427
|
+
"source": "export var version = \"3.4.0\";\n"
|
|
151437
151428
|
},
|
|
151438
151429
|
{
|
|
151439
151430
|
"id": "cLrF",
|
|
@@ -153427,7 +153418,7 @@
|
|
|
153427
153418
|
"name": "./lib/propertyFields/filePicker/PropertyFieldFilePickerHost.js",
|
|
153428
153419
|
"index": 1354,
|
|
153429
153420
|
"index2": 1441,
|
|
153430
|
-
"size":
|
|
153421
|
+
"size": 7774,
|
|
153431
153422
|
"cacheable": true,
|
|
153432
153423
|
"built": true,
|
|
153433
153424
|
"optional": false,
|
|
@@ -153502,7 +153493,7 @@
|
|
|
153502
153493
|
],
|
|
153503
153494
|
"optimizationBailout": [],
|
|
153504
153495
|
"depth": 3,
|
|
153505
|
-
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as React from 'react';\nimport { FilePicker } from './filePickerControls';\nimport styles from './PropertyFieldFilePickerHost.module.scss';\nimport { GeneralHelper, setPropertyValue } from '../../helpers/GeneralHelper';\nimport * as telemetry from '../../common/telemetry';\n/**\n* Renders the control for PropertyFieldFilePicker component\n*/\nvar PropertyFieldFilePickerHost = /** @class */ (function (_super) {\n __extends(PropertyFieldFilePickerHost, _super);\n function PropertyFieldFilePickerHost(props) {\n var _this = _super.call(this, props) || this;\n _this.handleFileSave = function (filePickerResult) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.props.onSave(filePickerResult);\n setPropertyValue(this.props.properties, this.props.targetProperty, filePickerResult);\n this.props.onPropertyChange(this.props.targetProperty, this.props.filePickerResult, filePickerResult);\n if (typeof this.props.onChange !== 'undefined' && this.props.onChange !== null) {\n this.props.onChange(this.props.targetProperty, filePickerResult);\n }\n return [2 /*return*/];\n });\n }); };\n _this.handleFileChange = function (filePickerResult) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.props.onChanged(filePickerResult);\n if (typeof this.props.onChange !== 'undefined' && this.props.onChange !== null) {\n this.props.onChange(this.props.targetProperty, filePickerResult);\n }\n return [2 /*return*/];\n });\n }); };\n _this.handleCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel();\n }\n };\n telemetry.track('PropertyFieldFilePicker', {\n disabled: props.disabled\n });\n return _this;\n }\n PropertyFieldFilePickerHost.prototype.render = function () {\n var _this = this;\n return (React.createElement(\"div\", null,\n this.props.filePickerResult && this.props.filePickerResult.fileAbsoluteUrl && (React.createElement(\"div\", { className: styles.filePreview },\n GeneralHelper.isImage(this.props.filePickerResult.fileName) &&\n React.createElement(\"img\", { className: styles.filePreviewImage, src: this.props.filePickerResult.fileAbsoluteUrl, alt: this.props.filePickerResult.fileName }),\n React.createElement(\"div\", null, this.props.filePickerResult.fileName))),\n React.createElement(FilePicker, { required: this.props.required, disabled: this.props.disabled, bingAPIKey: this.props.bingAPIKey, accepts: this.props.accepts ? this.props.accepts : [], buttonIcon: this.props.buttonIcon ? this.props.buttonIcon : \"FileImage\", onSave: function (filePickerResult) { _this.handleFileSave(filePickerResult); }, onChanged: function (filePickerResult) { _this.handleFileChange(filePickerResult); }, onCancel: this.handleCancel, context: this.props.context, filePickerResult: this.props.filePickerResult, buttonClassName: this.props.buttonClassName, buttonLabel: this.props.buttonLabel, label: this.props.label, key: this.props.key, itemsCountQueryLimit: this.props.itemsCountQueryLimit !== undefined ? this.props.itemsCountQueryLimit : 100, hideWebSearchTab: this.props.hideWebSearchTab !== undefined ? this.props.hideWebSearchTab : true, hideRecentTab: this.props.hideRecentTab !== undefined ? this.props.hideRecentTab : false, hideSiteFilesTab: this.props.hideSiteFilesTab !== undefined ? this.props.hideSiteFilesTab : false, hideLocalUploadTab: this.props.hideLocalUploadTab !== undefined ? this.props.hideLocalUploadTab : false, hideLinkUploadTab: this.props.hideLinkUploadTab !== undefined ? this.props.hideLinkUploadTab : false, hideOneDriveTab: this.props.hideOneDriveTab !== undefined ? this.props.hideOneDriveTab : false, hideOrganisationalAssetTab: this.props.hideOrganisationalAssetTab !== undefined ? this.props.hideOrganisationalAssetTab : false, hideStockImages: this.props.hideStockImages !== undefined ? this.props.hideStockImages : false, panelClassName: this.props.panelClassName, storeLastActiveTab: this.props.storeLastActiveTab, defaultSelectedTab: this.props.defaultSelectedTab, allowExternalLinks: this.props.allowExternalLinks, checkIfFileExists: this.props.checkIfFileExists,
|
|
153496
|
+
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as React from 'react';\nimport { FilePicker } from './filePickerControls';\nimport styles from './PropertyFieldFilePickerHost.module.scss';\nimport { GeneralHelper, setPropertyValue } from '../../helpers/GeneralHelper';\nimport * as telemetry from '../../common/telemetry';\n/**\n* Renders the control for PropertyFieldFilePicker component\n*/\nvar PropertyFieldFilePickerHost = /** @class */ (function (_super) {\n __extends(PropertyFieldFilePickerHost, _super);\n function PropertyFieldFilePickerHost(props) {\n var _this = _super.call(this, props) || this;\n _this.handleFileSave = function (filePickerResult) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.props.onSave(filePickerResult);\n setPropertyValue(this.props.properties, this.props.targetProperty, filePickerResult);\n this.props.onPropertyChange(this.props.targetProperty, this.props.filePickerResult, filePickerResult);\n if (typeof this.props.onChange !== 'undefined' && this.props.onChange !== null) {\n this.props.onChange(this.props.targetProperty, filePickerResult);\n }\n return [2 /*return*/];\n });\n }); };\n _this.handleFileChange = function (filePickerResult) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.props.onChanged(filePickerResult);\n if (typeof this.props.onChange !== 'undefined' && this.props.onChange !== null) {\n this.props.onChange(this.props.targetProperty, filePickerResult);\n }\n return [2 /*return*/];\n });\n }); };\n _this.handleCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel();\n }\n };\n telemetry.track('PropertyFieldFilePicker', {\n disabled: props.disabled\n });\n return _this;\n }\n PropertyFieldFilePickerHost.prototype.render = function () {\n var _this = this;\n return (React.createElement(\"div\", null,\n this.props.filePickerResult && this.props.filePickerResult.fileAbsoluteUrl && (React.createElement(\"div\", { className: styles.filePreview },\n GeneralHelper.isImage(this.props.filePickerResult.fileName) &&\n React.createElement(\"img\", { className: styles.filePreviewImage, src: this.props.filePickerResult.fileAbsoluteUrl, alt: this.props.filePickerResult.fileName }),\n React.createElement(\"div\", null, this.props.filePickerResult.fileName))),\n React.createElement(FilePicker, { required: this.props.required, disabled: this.props.disabled, bingAPIKey: this.props.bingAPIKey, accepts: this.props.accepts ? this.props.accepts : [], buttonIcon: this.props.buttonIcon ? this.props.buttonIcon : \"FileImage\", onSave: function (filePickerResult) { _this.handleFileSave(filePickerResult); }, onChanged: function (filePickerResult) { _this.handleFileChange(filePickerResult); }, onCancel: this.handleCancel, context: this.props.context, filePickerResult: this.props.filePickerResult, buttonClassName: this.props.buttonClassName, buttonLabel: this.props.buttonLabel, label: this.props.label, key: this.props.key, itemsCountQueryLimit: this.props.itemsCountQueryLimit !== undefined ? this.props.itemsCountQueryLimit : 100, hideWebSearchTab: this.props.hideWebSearchTab !== undefined ? this.props.hideWebSearchTab : true, hideRecentTab: this.props.hideRecentTab !== undefined ? this.props.hideRecentTab : false, hideSiteFilesTab: this.props.hideSiteFilesTab !== undefined ? this.props.hideSiteFilesTab : false, hideLocalUploadTab: this.props.hideLocalUploadTab !== undefined ? this.props.hideLocalUploadTab : false, hideLinkUploadTab: this.props.hideLinkUploadTab !== undefined ? this.props.hideLinkUploadTab : false, hideOneDriveTab: this.props.hideOneDriveTab !== undefined ? this.props.hideOneDriveTab : false, hideOrganisationalAssetTab: this.props.hideOrganisationalAssetTab !== undefined ? this.props.hideOrganisationalAssetTab : false, hideStockImages: this.props.hideStockImages !== undefined ? this.props.hideStockImages : false, panelClassName: this.props.panelClassName, storeLastActiveTab: this.props.storeLastActiveTab, defaultSelectedTab: this.props.defaultSelectedTab, allowExternalLinks: this.props.allowExternalLinks, checkIfFileExists: this.props.checkIfFileExists, includePageLibraries: this.props.includePageLibraries })));\n };\n return PropertyFieldFilePickerHost;\n}(React.Component));\nexport default PropertyFieldFilePickerHost;\n"
|
|
153506
153497
|
},
|
|
153507
153498
|
{
|
|
153508
153499
|
"id": "d6Sr",
|
|
@@ -203625,7 +203616,7 @@
|
|
|
203625
203616
|
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
203626
203617
|
"type": "harmony import specifier",
|
|
203627
203618
|
"userRequest": "office-ui-fabric-react/lib/components/ChoiceGroup",
|
|
203628
|
-
"loc": "
|
|
203619
|
+
"loc": "42:32-43"
|
|
203629
203620
|
},
|
|
203630
203621
|
{
|
|
203631
203622
|
"moduleId": "wYsl",
|
|
@@ -235245,7 +235236,7 @@
|
|
|
235245
235236
|
"name": "./lib/propertyFields/filePicker/filePickerControls/controls/DocumentLibraryBrowser/DocumentLibraryBrowser.js",
|
|
235246
235237
|
"index": 1392,
|
|
235247
235238
|
"index2": 1385,
|
|
235248
|
-
"size":
|
|
235239
|
+
"size": 7486,
|
|
235249
235240
|
"cacheable": true,
|
|
235250
235241
|
"built": true,
|
|
235251
235242
|
"optional": false,
|
|
@@ -235334,7 +235325,7 @@
|
|
|
235334
235325
|
],
|
|
235335
235326
|
"optimizationBailout": [],
|
|
235336
235327
|
"depth": 9,
|
|
235337
|
-
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as React from 'react';\nimport { FocusZone } from 'office-ui-fabric-react/lib/FocusZone';\nimport { List } from 'office-ui-fabric-react/lib/List';\nimport { Spinner } from 'office-ui-fabric-react/lib/Spinner';\nimport { Image, ImageFit } from 'office-ui-fabric-react/lib/Image';\nimport { DefaultButton } from 'office-ui-fabric-react/lib/Button';\nimport styles from './DocumentLibraryBrowser.module.scss';\nimport * as strings from 'PropertyControlStrings';\n/**\n * Rows per page\n */\nexport var ROWS_PER_PAGE = 3;\n/**\n * Maximum row height\n */\nexport var MAX_ROW_HEIGHT = 250;\n/**\n * This would have been better done as an Office Fabric TileList, but it isn't available yet for production use\n */\nvar DocumentLibraryBrowser = /** @class */ (function (_super) {\n __extends(DocumentLibraryBrowser, _super);\n function DocumentLibraryBrowser(props) {\n var _this = _super.call(this, props) || this;\n /**\n * Calculates how many items there should be in the page\n */\n _this._getItemCountForPage = function (itemIndex, surfaceRect) {\n if (itemIndex === 0) {\n _this._columnCount = Math.ceil(surfaceRect.width / MAX_ROW_HEIGHT);\n _this._columnWidth = Math.floor(surfaceRect.width / _this._columnCount);\n _this._rowHeight = _this._columnWidth;\n }\n return _this._columnCount * ROWS_PER_PAGE;\n };\n /**\n * Gets the height of a list \"page\"\n */\n _this._getPageHeight = function () {\n return _this._rowHeight * ROWS_PER_PAGE;\n };\n /**\n * Renders a cell for search suggestions\n */\n _this._onRenderLibraryTile = function (item, index) {\n var imgSrc = item.iconPath ? item.iconPath : \"\";\n return (React.createElement(\"div\", { className: styles.filePickerFolderCardTile, \"data-is-focusable\": true, style: {\n width: 100 / _this._columnCount + '%'\n } },\n React.createElement(\"div\", { className: styles.filePickerFolderCardSizer },\n React.createElement(\"div\", { className: styles.filePickerFolderCardPadder },\n React.createElement(Image, { src: imgSrc, className: styles.filePickerFolderCardImage, imageFit: ImageFit.cover }),\n React.createElement(DefaultButton, { className: styles.filePickerFolderCardLabel, onClick: function (_event) { return _this._handleOpenLibrary(item); } }, item.title)))));\n };\n /**\n * Calls parent when library is opened\n */\n _this._handleOpenLibrary = function (library) {\n _this.props.onOpenLibrary(library);\n };\n _this.state = {\n isLoading: true,\n lists: []\n };\n return _this;\n }\n DocumentLibraryBrowser.prototype.componentDidMount = function () {\n return __awaiter(this, void 0, void 0, function () {\n var includePageLibraries, lists;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n includePageLibraries = this.props.
|
|
235328
|
+
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as React from 'react';\nimport { FocusZone } from 'office-ui-fabric-react/lib/FocusZone';\nimport { List } from 'office-ui-fabric-react/lib/List';\nimport { Spinner } from 'office-ui-fabric-react/lib/Spinner';\nimport { Image, ImageFit } from 'office-ui-fabric-react/lib/Image';\nimport { DefaultButton } from 'office-ui-fabric-react/lib/Button';\nimport styles from './DocumentLibraryBrowser.module.scss';\nimport * as strings from 'PropertyControlStrings';\n/**\n * Rows per page\n */\nexport var ROWS_PER_PAGE = 3;\n/**\n * Maximum row height\n */\nexport var MAX_ROW_HEIGHT = 250;\n/**\n * This would have been better done as an Office Fabric TileList, but it isn't available yet for production use\n */\nvar DocumentLibraryBrowser = /** @class */ (function (_super) {\n __extends(DocumentLibraryBrowser, _super);\n function DocumentLibraryBrowser(props) {\n var _this = _super.call(this, props) || this;\n /**\n * Calculates how many items there should be in the page\n */\n _this._getItemCountForPage = function (itemIndex, surfaceRect) {\n if (itemIndex === 0) {\n _this._columnCount = Math.ceil(surfaceRect.width / MAX_ROW_HEIGHT);\n _this._columnWidth = Math.floor(surfaceRect.width / _this._columnCount);\n _this._rowHeight = _this._columnWidth;\n }\n return _this._columnCount * ROWS_PER_PAGE;\n };\n /**\n * Gets the height of a list \"page\"\n */\n _this._getPageHeight = function () {\n return _this._rowHeight * ROWS_PER_PAGE;\n };\n /**\n * Renders a cell for search suggestions\n */\n _this._onRenderLibraryTile = function (item, index) {\n var imgSrc = item.iconPath ? item.iconPath : \"\";\n return (React.createElement(\"div\", { className: styles.filePickerFolderCardTile, \"data-is-focusable\": true, style: {\n width: 100 / _this._columnCount + '%'\n } },\n React.createElement(\"div\", { className: styles.filePickerFolderCardSizer },\n React.createElement(\"div\", { className: styles.filePickerFolderCardPadder },\n React.createElement(Image, { src: imgSrc, className: styles.filePickerFolderCardImage, imageFit: ImageFit.cover }),\n React.createElement(DefaultButton, { className: styles.filePickerFolderCardLabel, onClick: function (_event) { return _this._handleOpenLibrary(item); } }, item.title)))));\n };\n /**\n * Calls parent when library is opened\n */\n _this._handleOpenLibrary = function (library) {\n _this.props.onOpenLibrary(library);\n };\n _this.state = {\n isLoading: true,\n lists: []\n };\n return _this;\n }\n DocumentLibraryBrowser.prototype.componentDidMount = function () {\n return __awaiter(this, void 0, void 0, function () {\n var includePageLibraries, lists;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n includePageLibraries = this.props.includePageLibraries ? this.props.includePageLibraries : false;\n return [4 /*yield*/, this.props.fileBrowserService.getSiteMediaLibraries(includePageLibraries)];\n case 1:\n lists = _a.sent();\n this.setState({\n lists: lists,\n isLoading: false\n });\n return [2 /*return*/];\n }\n });\n });\n };\n DocumentLibraryBrowser.prototype.render = function () {\n if (this.state.isLoading) {\n return (React.createElement(Spinner, { label: strings.Loading }));\n }\n var libraries = this.state.lists;\n return (React.createElement(\"div\", { className: styles.documentLibraryBrowserContainer },\n React.createElement(FocusZone, null,\n React.createElement(List, { className: styles.filePickerFolderCardGrid, items: libraries, getItemCountForPage: this._getItemCountForPage, getPageHeight: this._getPageHeight, renderedWindowsAhead: 4, onRenderCell: this._onRenderLibraryTile }))));\n };\n return DocumentLibraryBrowser;\n}(React.Component));\nexport { DocumentLibraryBrowser };\n"
|
|
235338
235329
|
},
|
|
235339
235330
|
{
|
|
235340
235331
|
"id": "/b11",
|
|
@@ -256463,7 +256454,7 @@
|
|
|
256463
256454
|
"name": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
256464
256455
|
"index": 773,
|
|
256465
256456
|
"index2": 777,
|
|
256466
|
-
"size":
|
|
256457
|
+
"size": 2056,
|
|
256467
256458
|
"cacheable": true,
|
|
256468
256459
|
"built": true,
|
|
256469
256460
|
"optional": false,
|
|
@@ -256538,7 +256529,7 @@
|
|
|
256538
256529
|
],
|
|
256539
256530
|
"optimizationBailout": [],
|
|
256540
256531
|
"depth": 3,
|
|
256541
|
-
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport omit from 'lodash/omit';\nimport PropertyFieldHeader from '../../common/propertyFieldHeader/PropertyFieldHeader';\nimport * as telemetry from '../../common/telemetry';\nimport { ChoiceGroup } from 'office-ui-fabric-react/lib/components/ChoiceGroup';\nvar PropertyFieldToggleWithCalloutHost = /** @class */ (function (_super) {\n __extends(PropertyFieldToggleWithCalloutHost, _super);\n function PropertyFieldToggleWithCalloutHost(props) {\n var _this = _super.call(this, props) || this;\n telemetry.track('PropertyFieldToggleWithCallout', {\n disabled: props.disabled\n });\n return _this;\n }\n PropertyFieldToggleWithCalloutHost.prototype.render = function () {\n
|
|
256532
|
+
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport omit from 'lodash/omit';\nimport PropertyFieldHeader from '../../common/propertyFieldHeader/PropertyFieldHeader';\nimport * as telemetry from '../../common/telemetry';\nimport { ChoiceGroup } from 'office-ui-fabric-react/lib/components/ChoiceGroup';\nvar PropertyFieldToggleWithCalloutHost = /** @class */ (function (_super) {\n __extends(PropertyFieldToggleWithCalloutHost, _super);\n function PropertyFieldToggleWithCalloutHost(props) {\n var _this = _super.call(this, props) || this;\n telemetry.track('PropertyFieldToggleWithCallout', {\n disabled: props.disabled\n });\n return _this;\n }\n PropertyFieldToggleWithCalloutHost.prototype.render = function () {\n return (React.createElement(\"div\", null,\n React.createElement(PropertyFieldHeader, __assign({}, this.props)),\n React.createElement(ChoiceGroup, __assign({}, omit(this.props, ['label'])))));\n };\n return PropertyFieldToggleWithCalloutHost;\n}(React.Component));\nexport default PropertyFieldToggleWithCalloutHost;\n"
|
|
256542
256533
|
},
|
|
256543
256534
|
{
|
|
256544
256535
|
"id": "5yGh",
|
|
@@ -259013,7 +259004,7 @@
|
|
|
259013
259004
|
"name": "./lib/propertyFields/filePicker/filePickerControls/FilePicker.js",
|
|
259014
259005
|
"index": 1356,
|
|
259015
259006
|
"index2": 1434,
|
|
259016
|
-
"size":
|
|
259007
|
+
"size": 15242,
|
|
259017
259008
|
"cacheable": true,
|
|
259018
259009
|
"built": true,
|
|
259019
259010
|
"optional": false,
|
|
@@ -259080,7 +259071,7 @@
|
|
|
259080
259071
|
],
|
|
259081
259072
|
"optimizationBailout": [],
|
|
259082
259073
|
"depth": 5,
|
|
259083
|
-
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as React from 'react';\nimport { PrimaryButton, ActionButton } from 'office-ui-fabric-react/lib/components/Button';\nimport { Panel, PanelType } from 'office-ui-fabric-react/lib/components/Panel';\nimport { Label } from 'office-ui-fabric-react/lib/components/Label';\nimport { Nav } from 'office-ui-fabric-react/lib/Nav';\nimport { css } from \"@uifabric/utilities/lib/css\";\n// Localization\nimport * as strings from 'PropertyControlStrings';\nimport LinkFilePickerTab from './LinkFilePickerTab/LinkFilePickerTab';\nimport UploadFilePickerTab from './UploadFilePickerTab/UploadFilePickerTab';\nimport SiteFilePickerTab from './SiteFilePickerTab/SiteFilePickerTab';\nimport WebSearchTab from './WebSearchTab/WebSearchTab';\nimport RecentFilesTab from './RecentFilesTab/RecentFilesTab';\nimport styles from './FilePicker.module.scss';\nimport { FileBrowserService } from '../../../services/FileBrowserService';\nimport { OneDriveFilesTab } from './OneDriveFilesTab';\nimport { OneDriveService } from '../../../services/OneDriveService';\nimport { OrgAssetsService } from '../../../services/OrgAssetsService';\nimport { FilePickerTabType } from './FilePicker.types';\nimport { FilesSearchService } from '../../../services/FilesSearchService';\nimport { StockImages } from './StockImagesTab';\nvar FilePicker = /** @class */ (function (_super) {\n __extends(FilePicker, _super);\n function FilePicker(props) {\n var _this = _super.call(this, props) || this;\n /**\n * Renders the panel header\n */\n _this._renderHeader = function () {\n return React.createElement(\"div\", { className: \"ms-Panel-header\" },\n React.createElement(\"p\", { className: css(\"ms-Panel-headerText\", styles.header), role: \"heading\" }, strings.FilePickerHeader));\n };\n /**\n * Open the panel\n */\n _this._handleOpenPanel = function () {\n _this.setState({\n panelOpen: true,\n selectedTab: _this.props.defaultSelectedTab ? _this.props.defaultSelectedTab : FilePickerTabType.RecentTab\n });\n };\n /**\n * Closes the panel\n */\n _this._handleClosePanel = function () {\n _this.props.onCancel();\n _this.setState({\n panelOpen: false\n });\n };\n /**\n * On save action\n */\n _this._handleSave = function (filePickerResult) {\n _this.props.onSave(filePickerResult);\n _this.setState({\n panelOpen: false\n });\n };\n /**\n * Changes the selected tab when a link is selected\n */\n _this._handleLinkClick = function (ev, item) {\n _this.setState({ selectedTab: item.key });\n };\n /**\n * Prepares navigation panel options\n */\n _this._getNavPanelOptions = function () {\n var addUrl = _this.props.storeLastActiveTab !== false;\n var links = [];\n if (!_this.props.hideRecentTab) {\n links.push({\n name: strings.RecentLinkLabel,\n url: addUrl ? '#recent' : undefined,\n icon: 'Recent',\n key: FilePickerTabType.RecentTab,\n });\n }\n if (!_this.props.hideStockImages) {\n links.push({\n name: strings.StockImagesLinkLabel,\n url: addUrl ? '#stockImages' : undefined,\n key: FilePickerTabType.StockImagesTab,\n icon: 'ImageSearch',\n });\n }\n if (_this.props.bingAPIKey && !_this.props.hideWebSearchTab) {\n links.push({\n name: strings.WebSearchLinkLabel,\n url: addUrl ? '#search' : undefined,\n key: FilePickerTabType.WebSearchTab,\n icon: 'Search',\n });\n }\n if (!_this.props.hideOrganisationalAssetTab && _this.state.organisationAssetsEnabled) {\n links.push({\n name: 'Your organisation',\n url: addUrl ? '#orgAssets' : undefined,\n icon: 'FabricFolderConfirm',\n key: FilePickerTabType.OrganisationalAssetTab,\n });\n }\n if (!_this.props.hideOneDriveTab) {\n links.push({\n name: \"OneDrive\",\n url: addUrl ? '#onedrive' : undefined,\n key: FilePickerTabType.OneDriveTab,\n icon: 'OneDrive',\n });\n }\n if (!_this.props.hideSiteFilesTab) {\n links.push({\n name: strings.SiteLinkLabel,\n url: addUrl ? '#globe' : undefined,\n key: FilePickerTabType.SiteFilesTab,\n icon: 'Globe',\n });\n }\n if (!_this.props.hideLocalUploadTab) {\n links.push({\n name: strings.UploadLinkLabel,\n url: addUrl ? '#upload' : undefined,\n key: FilePickerTabType.LocalUploadTab,\n icon: 'System'\n });\n }\n if (!_this.props.hideLinkUploadTab) {\n links.push({\n name: strings.FromLinkLinkLabel,\n url: addUrl ? '#link' : undefined,\n key: FilePickerTabType.LinkUploadTab,\n icon: 'Link'\n });\n }\n var groups = [{ links: links }];\n return groups;\n };\n // Initialize file browser services\n _this.fileBrowserService = new FileBrowserService(props.context, _this.props.itemsCountQueryLimit);\n _this.oneDriveService = new OneDriveService(props.context, _this.props.itemsCountQueryLimit);\n _this.orgAssetsService = new OrgAssetsService(props.context, _this.props.itemsCountQueryLimit);\n _this.fileSearchService = new FilesSearchService(props.context, _this.props.bingAPIKey);\n _this.state = {\n panelOpen: false,\n selectedTab: _this.props.defaultSelectedTab ? _this.props.defaultSelectedTab : FilePickerTabType.RecentTab,\n organisationAssetsEnabled: false,\n showFullNav: true\n };\n return _this;\n }\n FilePicker.prototype.componentDidMount = function () {\n return __awaiter(this, void 0, void 0, function () {\n var orgAssetsEnabled, orgAssetsLibraries;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n orgAssetsEnabled = false;\n if (!!this.props.hideOrganisationalAssetTab) return [3 /*break*/, 2];\n return [4 /*yield*/, this.orgAssetsService.getSiteMediaLibraries()];\n case 1:\n orgAssetsLibraries = _a.sent();\n orgAssetsEnabled = orgAssetsLibraries ? true : false;\n _a.label = 2;\n case 2:\n this.setState({\n organisationAssetsEnabled: orgAssetsEnabled\n });\n return [2 /*return*/];\n }\n });\n });\n };\n FilePicker.prototype.render = function () {\n var _this = this;\n // If no acceptable file type was passed, and we're expecting images, set the default image filter\n var accepts = this.props.accepts;\n var buttonClassName = this.props.buttonClassName ? this.props.buttonClassName : '';\n var panelClassName = this.props.panelClassName ? this.props.panelClassName : '';\n var linkTabProps = {\n accepts: accepts,\n context: this.props.context,\n onClose: function () { return _this._handleClosePanel(); },\n onSave: function (value) { _this._handleSave(value); }\n };\n var buttonProps = {\n text: this.props.buttonLabel,\n disabled: this.props.disabled,\n onClick: this._handleOpenPanel,\n className: \"pnp__file-picker__button \" + buttonClassName\n };\n return (React.createElement(\"div\", { className: \"pnp__file-picker\" },\n this.props.label && React.createElement(Label, { required: this.props.required }, this.props.label),\n this.props.buttonIcon ?\n React.createElement(ActionButton, __assign({ iconProps: { iconName: this.props.buttonIcon } }, buttonProps)) :\n React.createElement(PrimaryButton, __assign({}, buttonProps)),\n React.createElement(Panel, { isOpen: this.state.panelOpen, isBlocking: true, hasCloseButton: true, className: \"pnp__file-picker__panel \" + styles.filePicker + \" \" + panelClassName, onDismiss: this._handleClosePanel, type: PanelType.extraLarge, isFooterAtBottom: true, onRenderNavigation: function () { return undefined; }, headerText: strings.FilePickerHeader, isLightDismiss: true, onRenderHeader: function () { return _this._renderHeader(); } },\n React.createElement(\"div\", { className: styles.nav },\n React.createElement(Nav, { groups: this._getNavPanelOptions(), selectedKey: this.state.selectedTab, onLinkClick: function (ev, item) { return _this._handleLinkClick(ev, item); } })),\n React.createElement(\"div\", { className: styles.tabsContainer },\n this.state.selectedTab === FilePickerTabType.LinkUploadTab &&\n React.createElement(LinkFilePickerTab, __assign({ fileSearchService: this.fileSearchService, allowExternalLinks: this.props.allowExternalLinks, checkIfFileExists: this.props.checkIfFileExists }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.StockImagesTab &&\n React.createElement(StockImages, __assign({ language: this.props.context.pageContext.cultureInfo.currentCultureName, fileSearchService: this.fileSearchService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.LocalUploadTab &&\n React.createElement(UploadFilePickerTab, __assign({}, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.SiteFilesTab &&\n React.createElement(SiteFilePickerTab, __assign({ fileBrowserService: this.fileBrowserService, displaySitePages: this.props.displaySitePages }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.OrganisationalAssetTab &&\n React.createElement(SiteFilePickerTab, __assign({ breadcrumbFirstNode: {\n isCurrentItem: true,\n text: strings.OrgAssetsTabLabel,\n key: FilePickerTabType.OrganisationalAssetTab\n }, fileBrowserService: this.orgAssetsService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.WebSearchTab &&\n React.createElement(WebSearchTab, __assign({ bingSearchService: this.fileSearchService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.OneDriveTab &&\n React.createElement(OneDriveFilesTab, __assign({ oneDriveService: this.oneDriveService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.RecentTab &&\n React.createElement(RecentFilesTab, __assign({ fileSearchService: this.fileSearchService }, linkTabProps))))));\n };\n return FilePicker;\n}(React.Component));\nexport { FilePicker };\n"
|
|
259074
|
+
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as React from 'react';\nimport { PrimaryButton, ActionButton } from 'office-ui-fabric-react/lib/components/Button';\nimport { Panel, PanelType } from 'office-ui-fabric-react/lib/components/Panel';\nimport { Label } from 'office-ui-fabric-react/lib/components/Label';\nimport { Nav } from 'office-ui-fabric-react/lib/Nav';\nimport { css } from \"@uifabric/utilities/lib/css\";\n// Localization\nimport * as strings from 'PropertyControlStrings';\nimport LinkFilePickerTab from './LinkFilePickerTab/LinkFilePickerTab';\nimport UploadFilePickerTab from './UploadFilePickerTab/UploadFilePickerTab';\nimport SiteFilePickerTab from './SiteFilePickerTab/SiteFilePickerTab';\nimport WebSearchTab from './WebSearchTab/WebSearchTab';\nimport RecentFilesTab from './RecentFilesTab/RecentFilesTab';\nimport styles from './FilePicker.module.scss';\nimport { FileBrowserService } from '../../../services/FileBrowserService';\nimport { OneDriveFilesTab } from './OneDriveFilesTab';\nimport { OneDriveService } from '../../../services/OneDriveService';\nimport { OrgAssetsService } from '../../../services/OrgAssetsService';\nimport { FilePickerTabType } from './FilePicker.types';\nimport { FilesSearchService } from '../../../services/FilesSearchService';\nimport { StockImages } from './StockImagesTab';\nvar FilePicker = /** @class */ (function (_super) {\n __extends(FilePicker, _super);\n function FilePicker(props) {\n var _this = _super.call(this, props) || this;\n /**\n * Renders the panel header\n */\n _this._renderHeader = function () {\n return React.createElement(\"div\", { className: \"ms-Panel-header\" },\n React.createElement(\"p\", { className: css(\"ms-Panel-headerText\", styles.header), role: \"heading\" }, strings.FilePickerHeader));\n };\n /**\n * Open the panel\n */\n _this._handleOpenPanel = function () {\n _this.setState({\n panelOpen: true,\n selectedTab: _this.props.defaultSelectedTab ? _this.props.defaultSelectedTab : FilePickerTabType.RecentTab\n });\n };\n /**\n * Closes the panel\n */\n _this._handleClosePanel = function () {\n _this.props.onCancel();\n _this.setState({\n panelOpen: false\n });\n };\n /**\n * On save action\n */\n _this._handleSave = function (filePickerResult) {\n _this.props.onSave(filePickerResult);\n _this.setState({\n panelOpen: false\n });\n };\n /**\n * Changes the selected tab when a link is selected\n */\n _this._handleLinkClick = function (ev, item) {\n _this.setState({ selectedTab: item.key });\n };\n /**\n * Prepares navigation panel options\n */\n _this._getNavPanelOptions = function () {\n var addUrl = _this.props.storeLastActiveTab !== false;\n var links = [];\n if (!_this.props.hideRecentTab) {\n links.push({\n name: strings.RecentLinkLabel,\n url: addUrl ? '#recent' : undefined,\n icon: 'Recent',\n key: FilePickerTabType.RecentTab,\n });\n }\n if (!_this.props.hideStockImages) {\n links.push({\n name: strings.StockImagesLinkLabel,\n url: addUrl ? '#stockImages' : undefined,\n key: FilePickerTabType.StockImagesTab,\n icon: 'ImageSearch',\n });\n }\n if (_this.props.bingAPIKey && !_this.props.hideWebSearchTab) {\n links.push({\n name: strings.WebSearchLinkLabel,\n url: addUrl ? '#search' : undefined,\n key: FilePickerTabType.WebSearchTab,\n icon: 'Search',\n });\n }\n if (!_this.props.hideOrganisationalAssetTab && _this.state.organisationAssetsEnabled) {\n links.push({\n name: 'Your organisation',\n url: addUrl ? '#orgAssets' : undefined,\n icon: 'FabricFolderConfirm',\n key: FilePickerTabType.OrganisationalAssetTab,\n });\n }\n if (!_this.props.hideOneDriveTab) {\n links.push({\n name: \"OneDrive\",\n url: addUrl ? '#onedrive' : undefined,\n key: FilePickerTabType.OneDriveTab,\n icon: 'OneDrive',\n });\n }\n if (!_this.props.hideSiteFilesTab) {\n links.push({\n name: strings.SiteLinkLabel,\n url: addUrl ? '#globe' : undefined,\n key: FilePickerTabType.SiteFilesTab,\n icon: 'Globe',\n });\n }\n if (!_this.props.hideLocalUploadTab) {\n links.push({\n name: strings.UploadLinkLabel,\n url: addUrl ? '#upload' : undefined,\n key: FilePickerTabType.LocalUploadTab,\n icon: 'System'\n });\n }\n if (!_this.props.hideLinkUploadTab) {\n links.push({\n name: strings.FromLinkLinkLabel,\n url: addUrl ? '#link' : undefined,\n key: FilePickerTabType.LinkUploadTab,\n icon: 'Link'\n });\n }\n var groups = [{ links: links }];\n return groups;\n };\n // Initialize file browser services\n _this.fileBrowserService = new FileBrowserService(props.context, _this.props.itemsCountQueryLimit);\n _this.oneDriveService = new OneDriveService(props.context, _this.props.itemsCountQueryLimit);\n _this.orgAssetsService = new OrgAssetsService(props.context, _this.props.itemsCountQueryLimit);\n _this.fileSearchService = new FilesSearchService(props.context, _this.props.bingAPIKey);\n _this.state = {\n panelOpen: false,\n selectedTab: _this.props.defaultSelectedTab ? _this.props.defaultSelectedTab : FilePickerTabType.RecentTab,\n organisationAssetsEnabled: false,\n showFullNav: true\n };\n return _this;\n }\n FilePicker.prototype.componentDidMount = function () {\n return __awaiter(this, void 0, void 0, function () {\n var orgAssetsEnabled, orgAssetsLibraries;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n orgAssetsEnabled = false;\n if (!!this.props.hideOrganisationalAssetTab) return [3 /*break*/, 2];\n return [4 /*yield*/, this.orgAssetsService.getSiteMediaLibraries()];\n case 1:\n orgAssetsLibraries = _a.sent();\n orgAssetsEnabled = orgAssetsLibraries ? true : false;\n _a.label = 2;\n case 2:\n this.setState({\n organisationAssetsEnabled: orgAssetsEnabled\n });\n return [2 /*return*/];\n }\n });\n });\n };\n FilePicker.prototype.render = function () {\n var _this = this;\n // If no acceptable file type was passed, and we're expecting images, set the default image filter\n var accepts = this.props.accepts;\n var buttonClassName = this.props.buttonClassName ? this.props.buttonClassName : '';\n var panelClassName = this.props.panelClassName ? this.props.panelClassName : '';\n var linkTabProps = {\n accepts: accepts,\n context: this.props.context,\n onClose: function () { return _this._handleClosePanel(); },\n onSave: function (value) { _this._handleSave(value); }\n };\n var buttonProps = {\n text: this.props.buttonLabel,\n disabled: this.props.disabled,\n onClick: this._handleOpenPanel,\n className: \"pnp__file-picker__button \" + buttonClassName\n };\n return (React.createElement(\"div\", { className: \"pnp__file-picker\" },\n this.props.label && React.createElement(Label, { required: this.props.required }, this.props.label),\n this.props.buttonIcon ?\n React.createElement(ActionButton, __assign({ iconProps: { iconName: this.props.buttonIcon } }, buttonProps)) :\n React.createElement(PrimaryButton, __assign({}, buttonProps)),\n React.createElement(Panel, { isOpen: this.state.panelOpen, isBlocking: true, hasCloseButton: true, className: \"pnp__file-picker__panel \" + styles.filePicker + \" \" + panelClassName, onDismiss: this._handleClosePanel, type: PanelType.extraLarge, isFooterAtBottom: true, onRenderNavigation: function () { return undefined; }, headerText: strings.FilePickerHeader, isLightDismiss: true, onRenderHeader: function () { return _this._renderHeader(); } },\n React.createElement(\"div\", { className: styles.nav },\n React.createElement(Nav, { groups: this._getNavPanelOptions(), selectedKey: this.state.selectedTab, onLinkClick: function (ev, item) { return _this._handleLinkClick(ev, item); } })),\n React.createElement(\"div\", { className: styles.tabsContainer },\n this.state.selectedTab === FilePickerTabType.LinkUploadTab &&\n React.createElement(LinkFilePickerTab, __assign({ fileSearchService: this.fileSearchService, allowExternalLinks: this.props.allowExternalLinks, checkIfFileExists: this.props.checkIfFileExists !== false }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.StockImagesTab &&\n React.createElement(StockImages, __assign({ language: this.props.context.pageContext.cultureInfo.currentCultureName, fileSearchService: this.fileSearchService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.LocalUploadTab &&\n React.createElement(UploadFilePickerTab, __assign({}, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.SiteFilesTab &&\n React.createElement(SiteFilePickerTab, __assign({ fileBrowserService: this.fileBrowserService, includePageLibraries: this.props.includePageLibraries }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.OrganisationalAssetTab &&\n React.createElement(SiteFilePickerTab, __assign({ breadcrumbFirstNode: {\n isCurrentItem: true,\n text: strings.OrgAssetsTabLabel,\n key: FilePickerTabType.OrganisationalAssetTab\n }, fileBrowserService: this.orgAssetsService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.WebSearchTab &&\n React.createElement(WebSearchTab, __assign({ bingSearchService: this.fileSearchService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.OneDriveTab &&\n React.createElement(OneDriveFilesTab, __assign({ oneDriveService: this.oneDriveService }, linkTabProps)),\n this.state.selectedTab === FilePickerTabType.RecentTab &&\n React.createElement(RecentFilesTab, __assign({ fileSearchService: this.fileSearchService }, linkTabProps))))));\n };\n return FilePicker;\n}(React.Component));\nexport { FilePicker };\n"
|
|
259084
259075
|
},
|
|
259085
259076
|
{
|
|
259086
259077
|
"id": "6lyR",
|
|
@@ -271128,7 +271119,7 @@
|
|
|
271128
271119
|
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
271129
271120
|
"type": "harmony import specifier",
|
|
271130
271121
|
"userRequest": "../../common/propertyFieldHeader/PropertyFieldHeader",
|
|
271131
|
-
"loc": "
|
|
271122
|
+
"loc": "41:32-51"
|
|
271132
271123
|
},
|
|
271133
271124
|
{
|
|
271134
271125
|
"moduleId": "A8vW",
|
|
@@ -284237,7 +284228,7 @@
|
|
|
284237
284228
|
"name": "./lib/propertyFields/filePicker/filePickerControls/SiteFilePickerTab/SiteFilePickerTab.js",
|
|
284238
284229
|
"index": 1365,
|
|
284239
284230
|
"index2": 1393,
|
|
284240
|
-
"size":
|
|
284231
|
+
"size": 8878,
|
|
284241
284232
|
"cacheable": true,
|
|
284242
284233
|
"built": true,
|
|
284243
284234
|
"optional": false,
|
|
@@ -284318,7 +284309,7 @@
|
|
|
284318
284309
|
],
|
|
284319
284310
|
"optimizationBailout": [],
|
|
284320
284311
|
"depth": 6,
|
|
284321
|
-
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as React from 'react';\nimport { findIndex } from '@microsoft/sp-lodash-subset';\nimport { DocumentLibraryBrowser, FileBrowser } from '../controls';\nimport { PrimaryButton, DefaultButton } from 'office-ui-fabric-react/lib/components/Button';\nimport { Breadcrumb } from 'office-ui-fabric-react/lib/Breadcrumb';\nimport { Link } from 'office-ui-fabric-react/lib/Link';\nimport styles from './SiteFilePickerTab.module.scss';\nimport * as strings from 'PropertyControlStrings';\nvar SiteFilePickerTab = /** @class */ (function (_super) {\n __extends(SiteFilePickerTab, _super);\n function SiteFilePickerTab(props) {\n var _this = _super.call(this, props) || this;\n _this.renderBreadcrumbItem = function (item) {\n return (React.createElement(Link, { href: item.href, onClick: item.onClick, key: item.key, className: \"ms-Link ms-Breadcrumb-itemLink \" + styles.breadcrumbNavItem }, item.text));\n };\n /**\n * Handles breadcrump item click\n */\n _this.onBreadcrumpItemClick = function (node) {\n var breadcrumbItems = _this.state.breadcrumbItems;\n var breadcrumbClickedItemIndx = 0;\n // Site node clicked\n if (!node.libraryData && !node.folderData) {\n _this.setState({\n libraryAbsolutePath: undefined,\n libraryPath: undefined,\n folderName: undefined\n });\n }\n // Check if it is folder item\n else if (node.folderData) {\n _this._handleOpenFolder(node.folderData, false);\n // select which node has been clicked\n breadcrumbClickedItemIndx = findIndex(breadcrumbItems, function (item) { return item.folderData && item.folderData.absoluteUrl === node.key; });\n }\n // Check if it is library node\n else if (node.libraryData) {\n _this._handleOpenLibrary(node.libraryData, false);\n // select which node has been clicked\n breadcrumbClickedItemIndx = findIndex(breadcrumbItems, function (item) { return item.libraryData && item.libraryData.serverRelativeUrl === node.key; });\n }\n // Trim nodes array\n breadcrumbItems = breadcrumbItems.slice(0, breadcrumbClickedItemIndx + 1);\n // Set new current node\n breadcrumbItems[breadcrumbItems.length - 1].isCurrentItem = true;\n _this.setState({\n breadcrumbItems: breadcrumbItems,\n filePickerResult: undefined\n });\n };\n /**\n * Is called when user selects a different file\n */\n _this._handleSelectionChange = function (filePickerResult) {\n if (filePickerResult) {\n filePickerResult.downloadFileContent = function () { return _this.props.fileBrowserService.downloadSPFileContent(filePickerResult.fileAbsoluteUrl, filePickerResult.fileName); };\n }\n // this.props.fileBrowserService\n _this.setState({\n filePickerResult: filePickerResult\n });\n };\n /**\n * Called when user saves\n */\n _this._handleSave = function () {\n _this.props.onSave(_this.state.filePickerResult);\n };\n /**\n * Called when user closes tab\n */\n _this._handleClose = function () {\n _this.props.onClose();\n };\n /**\n * Triggered when user opens a file folder\n */\n _this._handleOpenFolder = function (folder, addBreadcrumbNode) {\n var breadcrumbItems = _this.state.breadcrumbItems;\n if (addBreadcrumbNode) {\n breadcrumbItems.map(function (item) { return item.isCurrentItem = false; });\n var breadcrumbNode_1 = {\n folderData: folder,\n isCurrentItem: true,\n text: folder.name,\n key: folder.absoluteUrl\n };\n breadcrumbNode_1.onClick = function () { _this.onBreadcrumpItemClick(breadcrumbNode_1); };\n breadcrumbItems.push(breadcrumbNode_1);\n }\n _this.setState({\n filePickerResult: null,\n libraryPath: folder.serverRelativeUrl,\n folderName: folder.name,\n libraryAbsolutePath: folder.absoluteUrl,\n breadcrumbItems: breadcrumbItems\n });\n };\n /**\n * Triggered when user opens a top-level document library\n */\n _this._handleOpenLibrary = function (library, addBreadcrumbNode) {\n var breadcrumbItems = _this.state.breadcrumbItems;\n if (addBreadcrumbNode) {\n breadcrumbItems.map(function (item) { return item.isCurrentItem = false; });\n var breadcrumbNode_2 = {\n libraryData: library,\n isCurrentItem: true,\n text: library.title,\n key: library.serverRelativeUrl\n };\n breadcrumbNode_2.onClick = function () { _this.onBreadcrumpItemClick(breadcrumbNode_2); };\n breadcrumbItems.push(breadcrumbNode_2);\n }\n _this.setState({\n libraryAbsolutePath: library.absoluteUrl,\n libraryTitle: library.title,\n libraryId: library.id,\n libraryPath: library.serverRelativeUrl,\n breadcrumbItems: breadcrumbItems\n });\n };\n // Add current site to the breadcrumb or the provided node\n var breadcrumbSiteNode = _this.props.breadcrumbFirstNode ? _this.props.breadcrumbFirstNode : {\n isCurrentItem: true,\n text: props.context.pageContext.web.title,\n key: props.context.pageContext.web.id.toString()\n };\n breadcrumbSiteNode.onClick = function () { _this.onBreadcrumpItemClick(breadcrumbSiteNode); };\n _this.state = {\n filePickerResult: null,\n libraryAbsolutePath: undefined,\n libraryTitle: strings.DocumentLibraries,\n libraryId: '',\n libraryPath: undefined,\n folderName: strings.DocumentLibraries,\n breadcrumbItems: [breadcrumbSiteNode]\n };\n return _this;\n }\n SiteFilePickerTab.prototype.render = function () {\n var _this = this;\n return (React.createElement(\"div\", { className: styles.tabContainer },\n React.createElement(\"div\", { className: styles.tabHeaderContainer },\n React.createElement(Breadcrumb, { items: this.state.breadcrumbItems, className: styles.breadcrumbNav })),\n React.createElement(\"div\", { className: styles.tabFiles },\n this.state.libraryAbsolutePath === undefined &&\n React.createElement(DocumentLibraryBrowser, { fileBrowserService: this.props.fileBrowserService, onOpenLibrary: function (selectedLibrary) { return _this._handleOpenLibrary(selectedLibrary, true); },
|
|
284312
|
+
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport * as React from 'react';\nimport { findIndex } from '@microsoft/sp-lodash-subset';\nimport { DocumentLibraryBrowser, FileBrowser } from '../controls';\nimport { PrimaryButton, DefaultButton } from 'office-ui-fabric-react/lib/components/Button';\nimport { Breadcrumb } from 'office-ui-fabric-react/lib/Breadcrumb';\nimport { Link } from 'office-ui-fabric-react/lib/Link';\nimport styles from './SiteFilePickerTab.module.scss';\nimport * as strings from 'PropertyControlStrings';\nvar SiteFilePickerTab = /** @class */ (function (_super) {\n __extends(SiteFilePickerTab, _super);\n function SiteFilePickerTab(props) {\n var _this = _super.call(this, props) || this;\n _this.renderBreadcrumbItem = function (item) {\n return (React.createElement(Link, { href: item.href, onClick: item.onClick, key: item.key, className: \"ms-Link ms-Breadcrumb-itemLink \" + styles.breadcrumbNavItem }, item.text));\n };\n /**\n * Handles breadcrump item click\n */\n _this.onBreadcrumpItemClick = function (node) {\n var breadcrumbItems = _this.state.breadcrumbItems;\n var breadcrumbClickedItemIndx = 0;\n // Site node clicked\n if (!node.libraryData && !node.folderData) {\n _this.setState({\n libraryAbsolutePath: undefined,\n libraryPath: undefined,\n folderName: undefined\n });\n }\n // Check if it is folder item\n else if (node.folderData) {\n _this._handleOpenFolder(node.folderData, false);\n // select which node has been clicked\n breadcrumbClickedItemIndx = findIndex(breadcrumbItems, function (item) { return item.folderData && item.folderData.absoluteUrl === node.key; });\n }\n // Check if it is library node\n else if (node.libraryData) {\n _this._handleOpenLibrary(node.libraryData, false);\n // select which node has been clicked\n breadcrumbClickedItemIndx = findIndex(breadcrumbItems, function (item) { return item.libraryData && item.libraryData.serverRelativeUrl === node.key; });\n }\n // Trim nodes array\n breadcrumbItems = breadcrumbItems.slice(0, breadcrumbClickedItemIndx + 1);\n // Set new current node\n breadcrumbItems[breadcrumbItems.length - 1].isCurrentItem = true;\n _this.setState({\n breadcrumbItems: breadcrumbItems,\n filePickerResult: undefined\n });\n };\n /**\n * Is called when user selects a different file\n */\n _this._handleSelectionChange = function (filePickerResult) {\n if (filePickerResult) {\n filePickerResult.downloadFileContent = function () { return _this.props.fileBrowserService.downloadSPFileContent(filePickerResult.fileAbsoluteUrl, filePickerResult.fileName); };\n }\n // this.props.fileBrowserService\n _this.setState({\n filePickerResult: filePickerResult\n });\n };\n /**\n * Called when user saves\n */\n _this._handleSave = function () {\n _this.props.onSave(_this.state.filePickerResult);\n };\n /**\n * Called when user closes tab\n */\n _this._handleClose = function () {\n _this.props.onClose();\n };\n /**\n * Triggered when user opens a file folder\n */\n _this._handleOpenFolder = function (folder, addBreadcrumbNode) {\n var breadcrumbItems = _this.state.breadcrumbItems;\n if (addBreadcrumbNode) {\n breadcrumbItems.map(function (item) { return item.isCurrentItem = false; });\n var breadcrumbNode_1 = {\n folderData: folder,\n isCurrentItem: true,\n text: folder.name,\n key: folder.absoluteUrl\n };\n breadcrumbNode_1.onClick = function () { _this.onBreadcrumpItemClick(breadcrumbNode_1); };\n breadcrumbItems.push(breadcrumbNode_1);\n }\n _this.setState({\n filePickerResult: null,\n libraryPath: folder.serverRelativeUrl,\n folderName: folder.name,\n libraryAbsolutePath: folder.absoluteUrl,\n breadcrumbItems: breadcrumbItems\n });\n };\n /**\n * Triggered when user opens a top-level document library\n */\n _this._handleOpenLibrary = function (library, addBreadcrumbNode) {\n var breadcrumbItems = _this.state.breadcrumbItems;\n if (addBreadcrumbNode) {\n breadcrumbItems.map(function (item) { return item.isCurrentItem = false; });\n var breadcrumbNode_2 = {\n libraryData: library,\n isCurrentItem: true,\n text: library.title,\n key: library.serverRelativeUrl\n };\n breadcrumbNode_2.onClick = function () { _this.onBreadcrumpItemClick(breadcrumbNode_2); };\n breadcrumbItems.push(breadcrumbNode_2);\n }\n _this.setState({\n libraryAbsolutePath: library.absoluteUrl,\n libraryTitle: library.title,\n libraryId: library.id,\n libraryPath: library.serverRelativeUrl,\n breadcrumbItems: breadcrumbItems\n });\n };\n // Add current site to the breadcrumb or the provided node\n var breadcrumbSiteNode = _this.props.breadcrumbFirstNode ? _this.props.breadcrumbFirstNode : {\n isCurrentItem: true,\n text: props.context.pageContext.web.title,\n key: props.context.pageContext.web.id.toString()\n };\n breadcrumbSiteNode.onClick = function () { _this.onBreadcrumpItemClick(breadcrumbSiteNode); };\n _this.state = {\n filePickerResult: null,\n libraryAbsolutePath: undefined,\n libraryTitle: strings.DocumentLibraries,\n libraryId: '',\n libraryPath: undefined,\n folderName: strings.DocumentLibraries,\n breadcrumbItems: [breadcrumbSiteNode]\n };\n return _this;\n }\n SiteFilePickerTab.prototype.render = function () {\n var _this = this;\n return (React.createElement(\"div\", { className: styles.tabContainer },\n React.createElement(\"div\", { className: styles.tabHeaderContainer },\n React.createElement(Breadcrumb, { items: this.state.breadcrumbItems, className: styles.breadcrumbNav })),\n React.createElement(\"div\", { className: styles.tabFiles },\n this.state.libraryAbsolutePath === undefined &&\n React.createElement(DocumentLibraryBrowser, { fileBrowserService: this.props.fileBrowserService, onOpenLibrary: function (selectedLibrary) { return _this._handleOpenLibrary(selectedLibrary, true); }, includePageLibraries: this.props.includePageLibraries }),\n this.state.libraryAbsolutePath !== undefined &&\n React.createElement(FileBrowser, { onChange: function (filePickerResult) { return _this._handleSelectionChange(filePickerResult); }, onOpenFolder: function (folder) { return _this._handleOpenFolder(folder, true); }, fileBrowserService: this.props.fileBrowserService, libraryName: this.state.libraryTitle, libraryId: this.state.libraryId, folderPath: this.state.libraryPath, accepts: this.props.accepts })),\n React.createElement(\"div\", { className: styles.actionButtonsContainer },\n React.createElement(\"div\", { className: styles.actionButtons },\n React.createElement(PrimaryButton, { disabled: !this.state.filePickerResult, onClick: function () { return _this._handleSave(); }, className: styles.actionButton }, strings.OpenButtonLabel),\n React.createElement(DefaultButton, { onClick: function () { return _this._handleClose(); }, className: styles.actionButton }, strings.CancelButtonLabel)))));\n };\n return SiteFilePickerTab;\n}(React.Component));\nexport default SiteFilePickerTab;\n"
|
|
284322
284313
|
},
|
|
284323
284314
|
{
|
|
284324
284315
|
"id": "FznD",
|
|
@@ -294898,7 +294889,7 @@
|
|
|
294898
294889
|
"name": "./lib/propertyFields/filePicker/PropertyFieldFilePicker.js",
|
|
294899
294890
|
"index": 1353,
|
|
294900
294891
|
"index2": 1442,
|
|
294901
|
-
"size":
|
|
294892
|
+
"size": 6465,
|
|
294902
294893
|
"cacheable": true,
|
|
294903
294894
|
"built": true,
|
|
294904
294895
|
"optional": false,
|
|
@@ -294955,7 +294946,7 @@
|
|
|
294955
294946
|
],
|
|
294956
294947
|
"optimizationBailout": [],
|
|
294957
294948
|
"depth": 3,
|
|
294958
|
-
"source": "var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport * as ReactDom from 'react-dom';\nimport { PropertyPaneFieldType } from '@microsoft/sp-property-pane';\nimport PropertyPaneFilePickerHost from './PropertyFieldFilePickerHost';\n/**\n * Represents a PropertyFieldFilePicker object\n */\nvar PropertyFieldFilePickerBuilder = /** @class */ (function () {\n function PropertyFieldFilePickerBuilder(_targetProperty, _properties) {\n var _this = this;\n this.type = PropertyPaneFieldType.Custom;\n this.disabled = false;\n this.required = false;\n this.storeLastActiveTab = true;\n this.render = function (elem, ctx, changeCallback) {\n var element = React.createElement(PropertyPaneFilePickerHost, {\n label: _this.label,\n buttonLabel: _this.buttonLabel,\n context: _this.context,\n buttonIcon: _this.buttonIcon,\n buttonClassName: _this.buttonClassName,\n panelClassName: _this.panelClassName,\n required: _this.required,\n bingAPIKey: _this.bingAPIKey,\n onSave: _this.onSave,\n onChanged: _this.onChanged,\n onCancel: _this.onCancel,\n itemsCountQueryLimit: _this.itemsCountQueryLimit,\n accepts: _this.accepts,\n filePickerResult: _this.filePickerResult,\n hideWebSearchTab: _this.hideWebSearchTab,\n hideRecentTab: _this.hideRecentTab,\n hideSiteFilesTab: _this.hideSiteFilesTab,\n hideLocalUploadTab: _this.hideLocalUploadTab,\n hideLinkUploadTab: _this.hideLinkUploadTab,\n hideOrganisationalAssetTab: _this.hideOrganisationalAssetTab,\n hideOneDriveTab: _this.hideOneDriveTab,\n storeLastActiveTab: _this.storeLastActiveTab,\n defaultSelectedTab: _this.defaultSelectedTab,\n hideStockImages: _this.hideStockImages,\n targetProperty: _this.targetProperty,\n allowExternalLinks: _this.allowExternalLinks,\n checkIfFileExists: _this.checkIfFileExists,\n
|
|
294949
|
+
"source": "var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport * as React from 'react';\nimport * as ReactDom from 'react-dom';\nimport { PropertyPaneFieldType } from '@microsoft/sp-property-pane';\nimport PropertyPaneFilePickerHost from './PropertyFieldFilePickerHost';\n/**\n * Represents a PropertyFieldFilePicker object\n */\nvar PropertyFieldFilePickerBuilder = /** @class */ (function () {\n function PropertyFieldFilePickerBuilder(_targetProperty, _properties) {\n var _this = this;\n this.type = PropertyPaneFieldType.Custom;\n this.disabled = false;\n this.required = false;\n this.storeLastActiveTab = true;\n this.render = function (elem, ctx, changeCallback) {\n var element = React.createElement(PropertyPaneFilePickerHost, {\n label: _this.label,\n buttonLabel: _this.buttonLabel,\n context: _this.context,\n buttonIcon: _this.buttonIcon,\n buttonClassName: _this.buttonClassName,\n panelClassName: _this.panelClassName,\n required: _this.required,\n bingAPIKey: _this.bingAPIKey,\n onSave: _this.onSave,\n onChanged: _this.onChanged,\n onCancel: _this.onCancel,\n itemsCountQueryLimit: _this.itemsCountQueryLimit,\n accepts: _this.accepts,\n filePickerResult: _this.filePickerResult,\n hideWebSearchTab: _this.hideWebSearchTab,\n hideRecentTab: _this.hideRecentTab,\n hideSiteFilesTab: _this.hideSiteFilesTab,\n hideLocalUploadTab: _this.hideLocalUploadTab,\n hideLinkUploadTab: _this.hideLinkUploadTab,\n hideOrganisationalAssetTab: _this.hideOrganisationalAssetTab,\n hideOneDriveTab: _this.hideOneDriveTab,\n storeLastActiveTab: _this.storeLastActiveTab,\n defaultSelectedTab: _this.defaultSelectedTab,\n hideStockImages: _this.hideStockImages,\n targetProperty: _this.targetProperty,\n allowExternalLinks: _this.allowExternalLinks,\n checkIfFileExists: _this.checkIfFileExists,\n includePageLibraries: _this.includePageLibraries,\n properties: _this.customProperties,\n key: _this.key,\n disabled: _this.disabled,\n onDispose: _this.dispose,\n onRender: _this.render,\n onChange: changeCallback,\n onPropertyChange: _this.onPropertyChange\n });\n ReactDom.render(element, elem);\n };\n this.targetProperty = _targetProperty;\n this.properties = _properties;\n this.properties.onDispose = this.dispose;\n this.properties.onRender = this.render;\n this.label = _properties.label;\n this.buttonLabel = _properties.buttonLabel;\n this.context = _properties.context;\n this.buttonIcon = _properties.buttonIcon;\n this.buttonClassName = _properties.buttonClassName;\n this.panelClassName = _properties.panelClassName;\n this.accepts = _properties.accepts;\n this.filePickerResult = _properties.filePickerResult;\n this.required = _properties.required;\n this.bingAPIKey = _properties.bingAPIKey;\n this.onSave = _properties.onSave;\n this.onChanged = _properties.onChanged;\n this.onCancel = _properties.onCancel;\n this.itemsCountQueryLimit = _properties.itemsCountQueryLimit !== undefined ? _properties.itemsCountQueryLimit : 100;\n this.hideWebSearchTab = _properties.hideWebSearchTab !== undefined ? _properties.hideWebSearchTab : true;\n this.hideRecentTab = _properties.hideRecentTab !== undefined ? _properties.hideRecentTab : false;\n this.hideSiteFilesTab = _properties.hideSiteFilesTab !== undefined ? _properties.hideSiteFilesTab : false;\n this.hideLocalUploadTab = _properties.hideLocalUploadTab !== undefined ? _properties.hideLocalUploadTab : false;\n this.hideLinkUploadTab = _properties.hideLinkUploadTab !== undefined ? _properties.hideLinkUploadTab : false;\n this.hideOrganisationalAssetTab = _properties.hideOrganisationalAssetTab !== undefined ? _properties.hideOrganisationalAssetTab : false;\n this.hideOneDriveTab = _properties.hideOneDriveTab !== undefined ? _properties.hideOneDriveTab : false;\n this.storeLastActiveTab = _properties.storeLastActiveTab !== undefined ? _properties.storeLastActiveTab : true;\n this.defaultSelectedTab = _properties.defaultSelectedTab;\n this.hideStockImages = _properties.hideStockImages !== undefined ? _properties.hideStockImages : false;\n this.allowExternalLinks = _properties.allowExternalLinks !== undefined ? _properties.allowExternalLinks : true;\n this.checkIfFileExists = _properties.checkIfFileExists !== undefined ? _properties.checkIfFileExists : true;\n this.includePageLibraries = _properties.includePageLibraries !== undefined ? _properties.includePageLibraries : false;\n this.onPropertyChange = _properties.onPropertyChange;\n this.customProperties = _properties.properties;\n this.key = _properties.key;\n this.context = _properties.context;\n if (_properties.disabled === true) {\n this.disabled = _properties.disabled;\n }\n }\n PropertyFieldFilePickerBuilder.prototype.dispose = function (elem) {\n };\n PropertyFieldFilePickerBuilder.prototype.onPropertyChange = function (propertyPath, oldValue, newValue) {\n };\n return PropertyFieldFilePickerBuilder;\n}());\n/**\n * Helper method to create a File Picker component on the PropertyPane.\n * @param targetProperty - Target property the File Picker component is associated to.\n * @param properties - Strongly typed File Picker component properties.\n */\nexport function PropertyFieldFilePicker(targetProperty, properties) {\n return new PropertyFieldFilePickerBuilder(targetProperty, __assign(__assign({}, properties), { targetProperty: targetProperty, onRender: null, onDispose: null }));\n}\n"
|
|
294959
294950
|
},
|
|
294960
294951
|
{
|
|
294961
294952
|
"id": "KVSy",
|
|
@@ -313074,9 +313065,9 @@
|
|
|
313074
313065
|
"chunks": [
|
|
313075
313066
|
"property-controls-test-web-part"
|
|
313076
313067
|
],
|
|
313077
|
-
"issuer": "/home/runner/work/sp-dev-fx-property-controls/sp-dev-fx-property-controls/node_modules/@uifabric/foundation/lib/
|
|
313078
|
-
"issuerId": "
|
|
313079
|
-
"issuerName": "./node_modules/@uifabric/foundation/lib/
|
|
313068
|
+
"issuer": "/home/runner/work/sp-dev-fx-property-controls/sp-dev-fx-property-controls/node_modules/@uifabric/foundation/lib/createComponent.js",
|
|
313069
|
+
"issuerId": "mVcb",
|
|
313070
|
+
"issuerName": "./node_modules/@uifabric/foundation/lib/createComponent.js",
|
|
313080
313071
|
"issuerPath": [
|
|
313081
313072
|
{
|
|
313082
313073
|
"id": "fd0V",
|
|
@@ -313129,9 +313120,9 @@
|
|
|
313129
313120
|
"name": "./node_modules/@uifabric/foundation/lib/index.js"
|
|
313130
313121
|
},
|
|
313131
313122
|
{
|
|
313132
|
-
"id": "
|
|
313133
|
-
"identifier": "/home/runner/work/sp-dev-fx-property-controls/sp-dev-fx-property-controls/node_modules/@uifabric/foundation/lib/
|
|
313134
|
-
"name": "./node_modules/@uifabric/foundation/lib/
|
|
313123
|
+
"id": "mVcb",
|
|
313124
|
+
"identifier": "/home/runner/work/sp-dev-fx-property-controls/sp-dev-fx-property-controls/node_modules/@uifabric/foundation/lib/createComponent.js",
|
|
313125
|
+
"name": "./node_modules/@uifabric/foundation/lib/createComponent.js"
|
|
313135
313126
|
}
|
|
313136
313127
|
],
|
|
313137
313128
|
"failed": false,
|
|
@@ -331501,16 +331492,7 @@
|
|
|
331501
331492
|
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
331502
331493
|
"type": "harmony import specifier",
|
|
331503
331494
|
"userRequest": "lodash/omit",
|
|
331504
|
-
"loc": "
|
|
331505
|
-
},
|
|
331506
|
-
{
|
|
331507
|
-
"moduleId": "5xb7",
|
|
331508
|
-
"moduleIdentifier": "/home/runner/work/sp-dev-fx-property-controls/sp-dev-fx-property-controls/node_modules/source-map-loader/index.js!/home/runner/work/sp-dev-fx-property-controls/sp-dev-fx-property-controls/lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
331509
|
-
"module": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
331510
|
-
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
331511
|
-
"type": "harmony import specifier",
|
|
331512
|
-
"userRequest": "lodash/omit",
|
|
331513
|
-
"loc": "49:58-62"
|
|
331495
|
+
"loc": "42:58-62"
|
|
331514
331496
|
},
|
|
331515
331497
|
{
|
|
331516
331498
|
"moduleId": "A8vW",
|
|
@@ -363451,7 +363433,7 @@
|
|
|
363451
363433
|
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
363452
363434
|
"type": "harmony import specifier",
|
|
363453
363435
|
"userRequest": "react",
|
|
363454
|
-
"loc": "
|
|
363436
|
+
"loc": "40:16-35"
|
|
363455
363437
|
},
|
|
363456
363438
|
{
|
|
363457
363439
|
"moduleId": "5xb7",
|
|
@@ -363460,7 +363442,7 @@
|
|
|
363460
363442
|
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
363461
363443
|
"type": "harmony import specifier",
|
|
363462
363444
|
"userRequest": "react",
|
|
363463
|
-
"loc": "
|
|
363445
|
+
"loc": "41:12-31"
|
|
363464
363446
|
},
|
|
363465
363447
|
{
|
|
363466
363448
|
"moduleId": "5xb7",
|
|
@@ -363469,7 +363451,7 @@
|
|
|
363469
363451
|
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
363470
363452
|
"type": "harmony import specifier",
|
|
363471
363453
|
"userRequest": "react",
|
|
363472
|
-
"loc": "
|
|
363454
|
+
"loc": "42:12-31"
|
|
363473
363455
|
},
|
|
363474
363456
|
{
|
|
363475
363457
|
"moduleId": "5xb7",
|
|
@@ -363478,7 +363460,7 @@
|
|
|
363478
363460
|
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
363479
363461
|
"type": "harmony import specifier",
|
|
363480
363462
|
"userRequest": "react",
|
|
363481
|
-
"loc": "
|
|
363463
|
+
"loc": "45:2-17"
|
|
363482
363464
|
},
|
|
363483
363465
|
{
|
|
363484
363466
|
"moduleId": "64bn",
|
|
@@ -383024,7 +383006,7 @@
|
|
|
383024
383006
|
"name": "./lib/common/telemetry/version.js",
|
|
383025
383007
|
"index": 348,
|
|
383026
383008
|
"index2": 342,
|
|
383027
|
-
"size":
|
|
383009
|
+
"size": 30,
|
|
383028
383010
|
"cacheable": true,
|
|
383029
383011
|
"built": true,
|
|
383030
383012
|
"optional": false,
|
|
@@ -383086,7 +383068,7 @@
|
|
|
383086
383068
|
],
|
|
383087
383069
|
"optimizationBailout": [],
|
|
383088
383070
|
"depth": 4,
|
|
383089
|
-
"source": "export var version = \"3.4.0
|
|
383071
|
+
"source": "export var version = \"3.4.0\";\n"
|
|
383090
383072
|
},
|
|
383091
383073
|
{
|
|
383092
383074
|
"id": "cLrF",
|
|
@@ -385080,7 +385062,7 @@
|
|
|
385080
385062
|
"name": "./lib/propertyFields/filePicker/PropertyFieldFilePickerHost.js",
|
|
385081
385063
|
"index": 1354,
|
|
385082
385064
|
"index2": 1441,
|
|
385083
|
-
"size":
|
|
385065
|
+
"size": 7774,
|
|
385084
385066
|
"cacheable": true,
|
|
385085
385067
|
"built": true,
|
|
385086
385068
|
"optional": false,
|
|
@@ -385155,7 +385137,7 @@
|
|
|
385155
385137
|
],
|
|
385156
385138
|
"optimizationBailout": [],
|
|
385157
385139
|
"depth": 3,
|
|
385158
|
-
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as React from 'react';\nimport { FilePicker } from './filePickerControls';\nimport styles from './PropertyFieldFilePickerHost.module.scss';\nimport { GeneralHelper, setPropertyValue } from '../../helpers/GeneralHelper';\nimport * as telemetry from '../../common/telemetry';\n/**\n* Renders the control for PropertyFieldFilePicker component\n*/\nvar PropertyFieldFilePickerHost = /** @class */ (function (_super) {\n __extends(PropertyFieldFilePickerHost, _super);\n function PropertyFieldFilePickerHost(props) {\n var _this = _super.call(this, props) || this;\n _this.handleFileSave = function (filePickerResult) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.props.onSave(filePickerResult);\n setPropertyValue(this.props.properties, this.props.targetProperty, filePickerResult);\n this.props.onPropertyChange(this.props.targetProperty, this.props.filePickerResult, filePickerResult);\n if (typeof this.props.onChange !== 'undefined' && this.props.onChange !== null) {\n this.props.onChange(this.props.targetProperty, filePickerResult);\n }\n return [2 /*return*/];\n });\n }); };\n _this.handleFileChange = function (filePickerResult) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.props.onChanged(filePickerResult);\n if (typeof this.props.onChange !== 'undefined' && this.props.onChange !== null) {\n this.props.onChange(this.props.targetProperty, filePickerResult);\n }\n return [2 /*return*/];\n });\n }); };\n _this.handleCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel();\n }\n };\n telemetry.track('PropertyFieldFilePicker', {\n disabled: props.disabled\n });\n return _this;\n }\n PropertyFieldFilePickerHost.prototype.render = function () {\n var _this = this;\n return (React.createElement(\"div\", null,\n this.props.filePickerResult && this.props.filePickerResult.fileAbsoluteUrl && (React.createElement(\"div\", { className: styles.filePreview },\n GeneralHelper.isImage(this.props.filePickerResult.fileName) &&\n React.createElement(\"img\", { className: styles.filePreviewImage, src: this.props.filePickerResult.fileAbsoluteUrl, alt: this.props.filePickerResult.fileName }),\n React.createElement(\"div\", null, this.props.filePickerResult.fileName))),\n React.createElement(FilePicker, { required: this.props.required, disabled: this.props.disabled, bingAPIKey: this.props.bingAPIKey, accepts: this.props.accepts ? this.props.accepts : [], buttonIcon: this.props.buttonIcon ? this.props.buttonIcon : \"FileImage\", onSave: function (filePickerResult) { _this.handleFileSave(filePickerResult); }, onChanged: function (filePickerResult) { _this.handleFileChange(filePickerResult); }, onCancel: this.handleCancel, context: this.props.context, filePickerResult: this.props.filePickerResult, buttonClassName: this.props.buttonClassName, buttonLabel: this.props.buttonLabel, label: this.props.label, key: this.props.key, itemsCountQueryLimit: this.props.itemsCountQueryLimit !== undefined ? this.props.itemsCountQueryLimit : 100, hideWebSearchTab: this.props.hideWebSearchTab !== undefined ? this.props.hideWebSearchTab : true, hideRecentTab: this.props.hideRecentTab !== undefined ? this.props.hideRecentTab : false, hideSiteFilesTab: this.props.hideSiteFilesTab !== undefined ? this.props.hideSiteFilesTab : false, hideLocalUploadTab: this.props.hideLocalUploadTab !== undefined ? this.props.hideLocalUploadTab : false, hideLinkUploadTab: this.props.hideLinkUploadTab !== undefined ? this.props.hideLinkUploadTab : false, hideOneDriveTab: this.props.hideOneDriveTab !== undefined ? this.props.hideOneDriveTab : false, hideOrganisationalAssetTab: this.props.hideOrganisationalAssetTab !== undefined ? this.props.hideOrganisationalAssetTab : false, hideStockImages: this.props.hideStockImages !== undefined ? this.props.hideStockImages : false, panelClassName: this.props.panelClassName, storeLastActiveTab: this.props.storeLastActiveTab, defaultSelectedTab: this.props.defaultSelectedTab, allowExternalLinks: this.props.allowExternalLinks, checkIfFileExists: this.props.checkIfFileExists,
|
|
385140
|
+
"source": "var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport * as React from 'react';\nimport { FilePicker } from './filePickerControls';\nimport styles from './PropertyFieldFilePickerHost.module.scss';\nimport { GeneralHelper, setPropertyValue } from '../../helpers/GeneralHelper';\nimport * as telemetry from '../../common/telemetry';\n/**\n* Renders the control for PropertyFieldFilePicker component\n*/\nvar PropertyFieldFilePickerHost = /** @class */ (function (_super) {\n __extends(PropertyFieldFilePickerHost, _super);\n function PropertyFieldFilePickerHost(props) {\n var _this = _super.call(this, props) || this;\n _this.handleFileSave = function (filePickerResult) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.props.onSave(filePickerResult);\n setPropertyValue(this.props.properties, this.props.targetProperty, filePickerResult);\n this.props.onPropertyChange(this.props.targetProperty, this.props.filePickerResult, filePickerResult);\n if (typeof this.props.onChange !== 'undefined' && this.props.onChange !== null) {\n this.props.onChange(this.props.targetProperty, filePickerResult);\n }\n return [2 /*return*/];\n });\n }); };\n _this.handleFileChange = function (filePickerResult) { return __awaiter(_this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.props.onChanged(filePickerResult);\n if (typeof this.props.onChange !== 'undefined' && this.props.onChange !== null) {\n this.props.onChange(this.props.targetProperty, filePickerResult);\n }\n return [2 /*return*/];\n });\n }); };\n _this.handleCancel = function () {\n if (_this.props.onCancel) {\n _this.props.onCancel();\n }\n };\n telemetry.track('PropertyFieldFilePicker', {\n disabled: props.disabled\n });\n return _this;\n }\n PropertyFieldFilePickerHost.prototype.render = function () {\n var _this = this;\n return (React.createElement(\"div\", null,\n this.props.filePickerResult && this.props.filePickerResult.fileAbsoluteUrl && (React.createElement(\"div\", { className: styles.filePreview },\n GeneralHelper.isImage(this.props.filePickerResult.fileName) &&\n React.createElement(\"img\", { className: styles.filePreviewImage, src: this.props.filePickerResult.fileAbsoluteUrl, alt: this.props.filePickerResult.fileName }),\n React.createElement(\"div\", null, this.props.filePickerResult.fileName))),\n React.createElement(FilePicker, { required: this.props.required, disabled: this.props.disabled, bingAPIKey: this.props.bingAPIKey, accepts: this.props.accepts ? this.props.accepts : [], buttonIcon: this.props.buttonIcon ? this.props.buttonIcon : \"FileImage\", onSave: function (filePickerResult) { _this.handleFileSave(filePickerResult); }, onChanged: function (filePickerResult) { _this.handleFileChange(filePickerResult); }, onCancel: this.handleCancel, context: this.props.context, filePickerResult: this.props.filePickerResult, buttonClassName: this.props.buttonClassName, buttonLabel: this.props.buttonLabel, label: this.props.label, key: this.props.key, itemsCountQueryLimit: this.props.itemsCountQueryLimit !== undefined ? this.props.itemsCountQueryLimit : 100, hideWebSearchTab: this.props.hideWebSearchTab !== undefined ? this.props.hideWebSearchTab : true, hideRecentTab: this.props.hideRecentTab !== undefined ? this.props.hideRecentTab : false, hideSiteFilesTab: this.props.hideSiteFilesTab !== undefined ? this.props.hideSiteFilesTab : false, hideLocalUploadTab: this.props.hideLocalUploadTab !== undefined ? this.props.hideLocalUploadTab : false, hideLinkUploadTab: this.props.hideLinkUploadTab !== undefined ? this.props.hideLinkUploadTab : false, hideOneDriveTab: this.props.hideOneDriveTab !== undefined ? this.props.hideOneDriveTab : false, hideOrganisationalAssetTab: this.props.hideOrganisationalAssetTab !== undefined ? this.props.hideOrganisationalAssetTab : false, hideStockImages: this.props.hideStockImages !== undefined ? this.props.hideStockImages : false, panelClassName: this.props.panelClassName, storeLastActiveTab: this.props.storeLastActiveTab, defaultSelectedTab: this.props.defaultSelectedTab, allowExternalLinks: this.props.allowExternalLinks, checkIfFileExists: this.props.checkIfFileExists, includePageLibraries: this.props.includePageLibraries })));\n };\n return PropertyFieldFilePickerHost;\n}(React.Component));\nexport default PropertyFieldFilePickerHost;\n"
|
|
385159
385141
|
},
|
|
385160
385142
|
{
|
|
385161
385143
|
"id": "d6Sr",
|
|
@@ -435278,7 +435260,7 @@
|
|
|
435278
435260
|
"moduleName": "./lib/propertyFields/choiceGroupWithCallout/PropertyFieldChoiceGroupWithCalloutHost.js",
|
|
435279
435261
|
"type": "harmony import specifier",
|
|
435280
435262
|
"userRequest": "office-ui-fabric-react/lib/components/ChoiceGroup",
|
|
435281
|
-
"loc": "
|
|
435263
|
+
"loc": "42:32-43"
|
|
435282
435264
|
},
|
|
435283
435265
|
{
|
|
435284
435266
|
"moduleId": "wYsl",
|