@scaleflex/widget-instagram 4.1.0 → 4.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.md +24 -0
- package/package.json +6 -6
- package/lib/common.slice.js +0 -35
- package/lib/index.js +0 -94
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [4.4.0](https://code.scaleflex.cloud/scaleflex/widget/compare/v4.1.0...v4.4.0) (2025-10-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @scaleflex/widget-instagram
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [4.3.0](https://code.scaleflex.cloud/scaleflex/widget/compare/v4.1.0...v4.3.0) (2025-10-02)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @scaleflex/widget-instagram
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [4.2.0](https://code.scaleflex.cloud/scaleflex/widget/compare/v4.1.0...v4.2.0) (2025-10-02)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @scaleflex/widget-instagram
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
# [4.1.0](https://code.scaleflex.cloud/scaleflex/widget/compare/v4.0.8...v4.1.0) (2025-10-02)
|
|
7
31
|
|
|
8
32
|
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleflex/widget-instagram",
|
|
3
3
|
"description": "Import photos and videos from Instagram, into Scaleflex.",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.4.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "types/index.d.ts",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@scaleflex/widget-companion-client": "^4.
|
|
10
|
-
"@scaleflex/widget-icons": "^4.
|
|
11
|
-
"@scaleflex/widget-provider-views": "^4.
|
|
12
|
-
"@scaleflex/widget-utils": "^4.
|
|
9
|
+
"@scaleflex/widget-companion-client": "^4.4.0",
|
|
10
|
+
"@scaleflex/widget-icons": "^4.4.0",
|
|
11
|
+
"@scaleflex/widget-provider-views": "^4.4.0",
|
|
12
|
+
"@scaleflex/widget-utils": "^4.4.0"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"react": "^19.0.0",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "04b8ec545c4f10be89f5a44eed954acf8433360c"
|
|
35
35
|
}
|
package/lib/common.slice.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
8
|
-
import { PLUGINS_IDS } from '@scaleflex/widget-utils/lib/constants';
|
|
9
|
-
|
|
10
|
-
// If the plugin instantiates a Provider, then we must have a common slice for it, as it will get updated through the provider.
|
|
11
|
-
var initialState = {
|
|
12
|
-
authenticated: false,
|
|
13
|
-
files: [],
|
|
14
|
-
folders: [],
|
|
15
|
-
openedFolders: [],
|
|
16
|
-
selectedFolders: {},
|
|
17
|
-
activeRow: -1,
|
|
18
|
-
filterInput: '',
|
|
19
|
-
isSearchVisible: false
|
|
20
|
-
};
|
|
21
|
-
var commonSlice = createSlice({
|
|
22
|
-
name: PLUGINS_IDS.INSTAGRAM,
|
|
23
|
-
initialState: initialState,
|
|
24
|
-
reducers: {
|
|
25
|
-
instagramCommonStateUpdated: function instagramCommonStateUpdated(state, action) {
|
|
26
|
-
return _objectSpread(_objectSpread({}, state), action.payload);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
var instagramCommonStateUpdated = commonSlice.actions.instagramCommonStateUpdated;
|
|
31
|
-
export { instagramCommonStateUpdated };
|
|
32
|
-
export var selectInstagramCommonState = function selectInstagramCommonState(state) {
|
|
33
|
-
return state[PLUGINS_IDS.INSTAGRAM];
|
|
34
|
-
};
|
|
35
|
-
export default commonSlice.reducer;
|
package/lib/index.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
9
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
10
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
12
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
13
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
14
|
-
import { Plugin } from '@scaleflex/widget-core';
|
|
15
|
-
import Explorer from '@scaleflex/widget-explorer';
|
|
16
|
-
import { Provider } from '@scaleflex/widget-companion-client';
|
|
17
|
-
import ProviderViews from '@scaleflex/widget-provider-views';
|
|
18
|
-
import { InstagramIcon } from '@scaleflex/widget-icons';
|
|
19
|
-
import { PLUGINS_IDS } from '@scaleflex/widget-utils/lib/constants';
|
|
20
|
-
import instagramReducer, { instagramCommonStateUpdated } from './common.slice';
|
|
21
|
-
// TODO: find a way to show version of the current plugin
|
|
22
|
-
// why solution below isn't good?
|
|
23
|
-
// first import doesn't work with webpack 5 as it was deprecated
|
|
24
|
-
// second import fixes webpack 5 issue as it was mentioned in their docs
|
|
25
|
-
// but it exposes our package.json to the client and it is mentioned as security rist in mutiple places
|
|
26
|
-
// https://github.com/axelpale/genversion
|
|
27
|
-
// https://stackoverflow.com/questions/64993118/error-should-not-import-the-named-export-version-imported-as-version
|
|
28
|
-
// https://stackoverflow.com/questions/9153571/is-there-a-way-to-get-version-from-package-json-in-nodejs-code/10855054#10855054
|
|
29
|
-
// import { version } from '../package.json'
|
|
30
|
-
// import packageInfo from '../package.json'
|
|
31
|
-
var Instagram = /*#__PURE__*/function (_Plugin) {
|
|
32
|
-
// static VERSION = packageInfo.version
|
|
33
|
-
|
|
34
|
-
function Instagram(filerobot) {
|
|
35
|
-
var _this;
|
|
36
|
-
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
37
|
-
_classCallCheck(this, Instagram);
|
|
38
|
-
_this = _callSuper(this, Instagram, [filerobot, opts]);
|
|
39
|
-
_this.id = PLUGINS_IDS.INSTAGRAM;
|
|
40
|
-
Provider.initPlugin(_this, opts);
|
|
41
|
-
_this.title = _this.opts.title || 'Instagram';
|
|
42
|
-
_this.icon = InstagramIcon;
|
|
43
|
-
_this.provider = new Provider(filerobot, {
|
|
44
|
-
companionHeaders: _this.opts.companionHeaders,
|
|
45
|
-
provider: 'instagram',
|
|
46
|
-
pluginId: _this.id
|
|
47
|
-
});
|
|
48
|
-
_this.onFirstRender = _this.onFirstRender.bind(_this);
|
|
49
|
-
_this.render = _this.render.bind(_this);
|
|
50
|
-
return _this;
|
|
51
|
-
}
|
|
52
|
-
_inherits(Instagram, _Plugin);
|
|
53
|
-
return _createClass(Instagram, [{
|
|
54
|
-
key: "install",
|
|
55
|
-
value: function install() {
|
|
56
|
-
this.view = new ProviderViews(this, {
|
|
57
|
-
provider: this.provider,
|
|
58
|
-
layoutType: 'grid',
|
|
59
|
-
showTitles: false,
|
|
60
|
-
showFilter: false,
|
|
61
|
-
showBreadcrumbs: false
|
|
62
|
-
});
|
|
63
|
-
if (Explorer) {
|
|
64
|
-
this.mount(Explorer, this);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}, {
|
|
68
|
-
key: "uninstall",
|
|
69
|
-
value: function uninstall() {
|
|
70
|
-
this.unmount();
|
|
71
|
-
}
|
|
72
|
-
}, {
|
|
73
|
-
key: "setPluginCommonState",
|
|
74
|
-
value: function setPluginCommonState(update) {
|
|
75
|
-
return this.dispatch(instagramCommonStateUpdated(update));
|
|
76
|
-
}
|
|
77
|
-
}, {
|
|
78
|
-
key: "getPluginReducer",
|
|
79
|
-
value: function getPluginReducer() {
|
|
80
|
-
return instagramReducer;
|
|
81
|
-
}
|
|
82
|
-
}, {
|
|
83
|
-
key: "onFirstRender",
|
|
84
|
-
value: function onFirstRender() {
|
|
85
|
-
this.view.getFolder('recent');
|
|
86
|
-
}
|
|
87
|
-
}, {
|
|
88
|
-
key: "render",
|
|
89
|
-
value: function render(state) {
|
|
90
|
-
return this.view.render(state);
|
|
91
|
-
}
|
|
92
|
-
}]);
|
|
93
|
-
}(Plugin);
|
|
94
|
-
export { Instagram as default };
|