@orangelogic/orange-dam-content-browser-sdk 2.1.53 → 2.1.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/.env +1 -0
  2. package/.eslintignore +2 -0
  3. package/.eslintrc.json +82 -0
  4. package/.releaserc +17 -0
  5. package/.travis.yml +20 -0
  6. package/CBSDKdemo.html +315 -0
  7. package/GitVersion.yml +18 -0
  8. package/azure-pipeline.yaml +93 -0
  9. package/clientlib.config.js +36 -0
  10. package/config/env.js +105 -0
  11. package/config/getHttpsConfig.js +67 -0
  12. package/config/jest/babelTransform.js +30 -0
  13. package/config/jest/cssTransform.js +14 -0
  14. package/config/jest/fileTransform.js +41 -0
  15. package/config/modules.js +135 -0
  16. package/config/paths.js +79 -0
  17. package/config/webpack/persistentCache/createEnvironmentHash.js +10 -0
  18. package/config/webpack.config.js +762 -0
  19. package/config/webpackDevServer.config.js +128 -0
  20. package/config-overrides.js +8 -0
  21. package/gab_extension/GAB.html +85 -0
  22. package/gab_extension/GoogleChrome/manifest.json +28 -0
  23. package/gab_extension/GoogleChrome/src/assets/icon48.png +0 -0
  24. package/gab_extension/GoogleChrome/src/background/index.js +6 -0
  25. package/gab_extension/GoogleChrome/src/scripts/index.js +347 -0
  26. package/gab_extension/MozillaFirefox/manifest.json +20 -0
  27. package/gab_extension/MozillaFirefox/src/assets/icon.png +0 -0
  28. package/gab_extension/MozillaFirefox/src/background/index.js +5 -0
  29. package/gab_extension/MozillaFirefox/src/scripts/index.js +347 -0
  30. package/gab_extension/README.md +11 -0
  31. package/gab_extension/Safari/Orange DAM Asset Browser Extension/Orange DAM Asset Browser Extension.xcodeproj/project.pbxproj +927 -0
  32. package/gab_extension/Safari/Orange DAM Asset Browser Extension/Orange DAM Asset Browser Extension.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  33. package/gab_extension/Safari/Orange DAM Asset Browser Extension/Orange DAM Asset Browser Extension.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  34. package/gab_extension/Safari/Orange DAM Asset Browser Extension/Orange DAM Asset Browser Extension.xcodeproj/project.xcworkspace/xcuserdata/oldevmac01.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  35. package/gab_extension/Safari/Orange DAM Asset Browser Extension/Orange DAM Asset Browser Extension.xcodeproj/xcuserdata/oldevmac01.xcuserdatad/xcschemes/xcschememanagement.plist +19 -0
  36. package/gab_extension/Safari/Orange DAM Asset Browser Extension/Shared (App)/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
  37. package/gab_extension/Safari/Orange DAM Asset Browser Extension/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json +63 -0
  38. package/gab_extension/Safari/Orange DAM Asset Browser Extension/Shared (App)/Assets.xcassets/Contents.json +6 -0
  39. package/gab_extension/Safari/Orange DAM Asset Browser Extension/Shared (App)/Assets.xcassets/LargeIcon.imageset/Contents.json +20 -0
  40. package/gab_extension/Safari/Orange DAM Asset Browser Extension/Shared (App)/Base.lproj/Main.html +23 -0
  41. package/gab_extension/Safari/Orange DAM Asset Browser Extension/Shared (App)/Resources/Icon.png +0 -0
  42. package/gab_extension/Safari/Orange DAM Asset Browser Extension/Shared (App)/Resources/Script.js +24 -0
  43. package/gab_extension/Safari/Orange DAM Asset Browser Extension/Shared (App)/Resources/Style.css +61 -0
  44. package/gab_extension/Safari/Orange DAM Asset Browser Extension/Shared (App)/ViewController.swift +81 -0
  45. package/gab_extension/Safari/Orange DAM Asset Browser Extension/Shared (Extension)/SafariWebExtensionHandler.swift +26 -0
  46. package/gab_extension/Safari/Orange DAM Asset Browser Extension/iOS (App)/AppDelegate.swift +24 -0
  47. package/gab_extension/Safari/Orange DAM Asset Browser Extension/iOS (App)/Base.lproj/LaunchScreen.storyboard +36 -0
  48. package/gab_extension/Safari/Orange DAM Asset Browser Extension/iOS (App)/Base.lproj/Main.storyboard +38 -0
  49. package/gab_extension/Safari/Orange DAM Asset Browser Extension/iOS (App)/Info.plist +27 -0
  50. package/gab_extension/Safari/Orange DAM Asset Browser Extension/iOS (App)/SceneDelegate.swift +18 -0
  51. package/gab_extension/Safari/Orange DAM Asset Browser Extension/iOS (Extension)/Info.plist +13 -0
  52. package/gab_extension/Safari/Orange DAM Asset Browser Extension/macOS (App)/AppDelegate.swift +21 -0
  53. package/gab_extension/Safari/Orange DAM Asset Browser Extension/macOS (App)/Base.lproj/Main.storyboard +125 -0
  54. package/gab_extension/Safari/Orange DAM Asset Browser Extension/macOS (App)/Info.plist +8 -0
  55. package/gab_extension/Safari/Orange DAM Asset Browser Extension/macOS (App)/Orange DAM Asset Browser Extension.entitlements +12 -0
  56. package/gab_extension/Safari/Orange DAM Asset Browser Extension/macOS (Extension)/Info.plist +13 -0
  57. package/gab_extension/Safari/Orange DAM Asset Browser Extension/macOS (Extension)/Orange DAM Asset Browser Extension.entitlements +10 -0
  58. package/package.json +8 -49
  59. package/public/index.html +92 -0
  60. package/scripts/build.js +218 -0
  61. package/scripts/start.js +154 -0
  62. package/scripts/test.js +53 -0
  63. package/src/App.tsx +98 -0
  64. package/src/AppContext.ts +18 -0
  65. package/src/GlobalConfigContext.ts +46 -0
  66. package/src/components/ArrayClamp/ArrayClamp.styled.ts +42 -0
  67. package/src/components/ArrayClamp/ArrayClamp.tsx +167 -0
  68. package/src/components/ArrayClamp/index.ts +1 -0
  69. package/src/components/Browser/Browser.styled.ts +82 -0
  70. package/src/components/Browser/Browser.tsx +284 -0
  71. package/src/components/Browser/BrowserItem.tsx +98 -0
  72. package/src/components/ControlBar/ControlBar.constants.tsx +66 -0
  73. package/src/components/ControlBar/ControlBar.styled.ts +82 -0
  74. package/src/components/ControlBar/ControlBar.tsx +528 -0
  75. package/src/components/ControlBar/Facet/Facet.tsx +113 -0
  76. package/src/components/ControlBar/Facet/index.ts +1 -0
  77. package/src/components/FormatDialog/CropPreviewer/CropPreviewer.tsx +224 -0
  78. package/{build/components/FormatDialog/CropPreviewer/index.d.ts → src/components/FormatDialog/CropPreviewer/index.ts} +1 -1
  79. package/src/components/FormatDialog/CustomRendition/CustomRendition.constants.ts +24 -0
  80. package/src/components/FormatDialog/CustomRendition/CustomRendition.styled.ts +57 -0
  81. package/src/components/FormatDialog/CustomRendition/CustomRendition.tsx +178 -0
  82. package/src/components/FormatDialog/CustomRendition/index.ts +1 -0
  83. package/src/components/FormatDialog/CustomRendition/transformations/Crop.tsx +249 -0
  84. package/src/components/FormatDialog/CustomRendition/transformations/Extension.tsx +54 -0
  85. package/src/components/FormatDialog/CustomRendition/transformations/Format.tsx +86 -0
  86. package/src/components/FormatDialog/CustomRendition/transformations/Resize.tsx +176 -0
  87. package/src/components/FormatDialog/CustomRendition/transformations/Rotate.tsx +101 -0
  88. package/{build/components/FormatDialog/CustomRendition/transformations/index.d.ts → src/components/FormatDialog/CustomRendition/transformations/index.ts} +1 -3
  89. package/src/components/FormatDialog/FormatDialog.styled.ts +137 -0
  90. package/src/components/FormatDialog/FormatDialog.tsx +1533 -0
  91. package/src/components/FormatDialog/Previewer/Previewer.styled.ts +31 -0
  92. package/src/components/FormatDialog/Previewer/Previewer.tsx +143 -0
  93. package/src/components/FormatDialog/Previewer/index.ts +1 -0
  94. package/src/components/FormatDialog/ProxyMenu/ProxyMenu.styled.ts +88 -0
  95. package/src/components/FormatDialog/ProxyMenu/ProxyMenu.tsx +74 -0
  96. package/src/components/FormatDialog/ProxyMenu/index.ts +1 -0
  97. package/src/components/FormatDialog/TrackingParameters/TrackingParameters.tsx +59 -0
  98. package/src/components/FormatDialog/TrackingParameters/index.ts +1 -0
  99. package/src/components/FormatDialog/index.ts +1 -0
  100. package/src/components/Header/Header.styled.ts +51 -0
  101. package/src/components/Header/Header.tsx +118 -0
  102. package/src/components/Loader/Loader.tsx +37 -0
  103. package/src/components/Loader/index.ts +1 -0
  104. package/src/components/NoResult/NoResult.tsx +37 -0
  105. package/src/components/NoResult/index.tsx +1 -0
  106. package/src/components/Result/AssetCard/AssetCard.styled.ts +120 -0
  107. package/src/components/Result/AssetCard/AssetCard.tsx +192 -0
  108. package/src/components/Result/AssetCard/AssetCardWrapper.styled.ts +35 -0
  109. package/src/components/Result/AssetCard/AssetCardWrapper.tsx +165 -0
  110. package/src/components/Result/AssetCard/index.ts +1 -0
  111. package/src/components/Result/AssetPreview/AssetPreview.styled.ts +108 -0
  112. package/src/components/Result/AssetPreview/AssetPreview.tsx +78 -0
  113. package/src/components/Result/AssetPreview/ImagePreview/ImagePreview.tsx +42 -0
  114. package/src/components/Result/AssetPreview/ImagePreview/index.ts +1 -0
  115. package/src/components/Result/AssetPreview/OtherPreview/OtherPreview.styled.ts +23 -0
  116. package/src/components/Result/AssetPreview/OtherPreview/OtherPreview.tsx +28 -0
  117. package/src/components/Result/AssetPreview/OtherPreview/index.ts +1 -0
  118. package/src/components/Result/AssetPreview/VideoPreview/VideoPreview.tsx +132 -0
  119. package/src/components/Result/AssetPreview/VideoPreview/index.ts +1 -0
  120. package/src/components/Result/AssetPreview/index.ts +1 -0
  121. package/src/consts/asset.ts +16 -0
  122. package/src/consts/data.ts +17 -0
  123. package/src/index.tsx +305 -0
  124. package/src/page/Authenticate/Authenticate.tsx +232 -0
  125. package/src/page/Authenticate/ConnectingBackground.tsx +44 -0
  126. package/src/page/Authenticate/index.tsx +94 -0
  127. package/src/page/Home/Home.styled.ts +46 -0
  128. package/src/page/Home/Home.tsx +941 -0
  129. package/src/react-web-component.d.ts +4617 -0
  130. package/src/store/assets/assets.api.ts +167 -0
  131. package/src/store/assets/assets.service.ts +223 -0
  132. package/src/store/assets/assets.slice.ts +104 -0
  133. package/src/store/auth/auth.service.ts +71 -0
  134. package/src/store/auth/auth.slice.ts +295 -0
  135. package/src/store/index.ts +27 -0
  136. package/src/store/search/search.api.ts +319 -0
  137. package/src/store/search/search.slice.ts +28 -0
  138. package/src/store/user/user.api.ts +29 -0
  139. package/src/styles.css +42 -0
  140. package/src/types/assets.ts +71 -0
  141. package/src/types/auth.ts +42 -0
  142. package/src/types/common.ts +11 -0
  143. package/src/types/download.ts +8 -0
  144. package/src/types/navigation.ts +3 -0
  145. package/src/types/search.ts +116 -0
  146. package/{build/types/storage.d.ts → src/types/storage.ts} +1 -1
  147. package/src/types/user.ts +6 -0
  148. package/src/utils/api.ts +186 -0
  149. package/src/utils/array.ts +25 -0
  150. package/src/utils/constants.ts +12 -0
  151. package/src/utils/fetch.ts +116 -0
  152. package/src/utils/getRequestUrl.ts +15 -0
  153. package/src/utils/hooks.ts +36 -0
  154. package/src/utils/icon.ts +22 -0
  155. package/src/utils/image.ts +157 -0
  156. package/src/utils/number.ts +11 -0
  157. package/src/utils/rotate.ts +23 -0
  158. package/src/utils/storage.ts +184 -0
  159. package/src/utils/string.ts +24 -0
  160. package/src/view/AssetsPicker.tsx +24 -0
  161. package/src/web-component.d.ts +8151 -0
  162. package/tsconfig.eslint.json +10 -0
  163. package/tsconfig.json +37 -0
  164. package/build/ApiService.d.ts +0 -15
  165. package/build/App.d.ts +0 -62
  166. package/build/AppContext.d.ts +0 -18
  167. package/build/GlobalConfigContext.d.ts +0 -32
  168. package/build/OrangeDAMContentBrowserSDK.min.css +0 -2
  169. package/build/OrangeDAMContentBrowserSDK.min.css.map +0 -1
  170. package/build/OrangeDAMContentBrowserSDK.min.js +0 -11468
  171. package/build/OrangeDAMContentBrowserSDK.min.js.map +0 -1
  172. package/build/asset-manifest.json +0 -13
  173. package/build/components/ArrayClamp/ArrayClamp.d.ts +0 -10
  174. package/build/components/ArrayClamp/ArrayClamp.styled.d.ts +0 -1
  175. package/build/components/ArrayClamp/index.d.ts +0 -1
  176. package/build/components/Browser/Browser.constants.d.ts +0 -3
  177. package/build/components/Browser/Browser.d.ts +0 -21
  178. package/build/components/Browser/Browser.styled.d.ts +0 -2
  179. package/build/components/Browser/BrowserItem.d.ts +0 -13
  180. package/build/components/Browser/LoadMoreButton.d.ts +0 -9
  181. package/build/components/ControlBar/ControlBar.constants.d.ts +0 -10
  182. package/build/components/ControlBar/ControlBar.d.ts +0 -23
  183. package/build/components/ControlBar/ControlBar.styled.d.ts +0 -1
  184. package/build/components/ControlBar/Facet/Facet.d.ts +0 -14
  185. package/build/components/ControlBar/Facet/index.d.ts +0 -1
  186. package/build/components/FormatDialog/CropPreviewer/CropPreviewer.d.ts +0 -41
  187. package/build/components/FormatDialog/CustomRendition/CustomRendition.constants.d.ts +0 -5
  188. package/build/components/FormatDialog/CustomRendition/CustomRendition.d.ts +0 -56
  189. package/build/components/FormatDialog/CustomRendition/CustomRendition.styled.d.ts +0 -1
  190. package/build/components/FormatDialog/CustomRendition/index.d.ts +0 -1
  191. package/build/components/FormatDialog/CustomRendition/transformations/Crop.d.ts +0 -26
  192. package/build/components/FormatDialog/CustomRendition/transformations/Extension.d.ts +0 -11
  193. package/build/components/FormatDialog/CustomRendition/transformations/Format.d.ts +0 -10
  194. package/build/components/FormatDialog/CustomRendition/transformations/Metadata.d.ts +0 -7
  195. package/build/components/FormatDialog/CustomRendition/transformations/Quality.d.ts +0 -7
  196. package/build/components/FormatDialog/CustomRendition/transformations/Resize.d.ts +0 -18
  197. package/build/components/FormatDialog/CustomRendition/transformations/Rotate.d.ts +0 -8
  198. package/build/components/FormatDialog/FormatDialog.d.ts +0 -49
  199. package/build/components/FormatDialog/FormatDialog.styled.d.ts +0 -3
  200. package/build/components/FormatDialog/Previewer/Previewer.d.ts +0 -17
  201. package/build/components/FormatDialog/Previewer/Previewer.styled.d.ts +0 -1
  202. package/build/components/FormatDialog/Previewer/index.d.ts +0 -1
  203. package/build/components/FormatDialog/ProxyMenu/ProxyMenu.d.ts +0 -20
  204. package/build/components/FormatDialog/ProxyMenu/ProxyMenu.styled.d.ts +0 -2
  205. package/build/components/FormatDialog/ProxyMenu/index.d.ts +0 -1
  206. package/build/components/FormatDialog/TrackingParameters/TrackingParameters.d.ts +0 -13
  207. package/build/components/FormatDialog/TrackingParameters/index.d.ts +0 -1
  208. package/build/components/FormatDialog/VersionHistory/VersionHistory.d.ts +0 -6
  209. package/build/components/FormatDialog/VersionHistory/VersionHistory.styled.d.ts +0 -1
  210. package/build/components/FormatDialog/VersionHistory/index.d.ts +0 -1
  211. package/build/components/FormatDialog/index.d.ts +0 -1
  212. package/build/components/Header/Header.d.ts +0 -15
  213. package/build/components/Header/Header.styled.d.ts +0 -5
  214. package/build/components/Loader/Loader.d.ts +0 -7
  215. package/build/components/Loader/index.d.ts +0 -1
  216. package/build/components/NoResult/NoResult.d.ts +0 -7
  217. package/build/components/NoResult/index.d.ts +0 -1
  218. package/build/components/Result/AssetCard/AssetCard.d.ts +0 -15
  219. package/build/components/Result/AssetCard/AssetCard.styled.d.ts +0 -2
  220. package/build/components/Result/AssetCard/AssetCardWrapper.d.ts +0 -18
  221. package/build/components/Result/AssetCard/AssetCardWrapper.styled.d.ts +0 -1
  222. package/build/components/Result/AssetCard/index.d.ts +0 -1
  223. package/build/components/Result/AssetPreview/AssetPreview.d.ts +0 -11
  224. package/build/components/Result/AssetPreview/AssetPreview.styled.d.ts +0 -1
  225. package/build/components/Result/AssetPreview/ImagePreview/ImagePreview.d.ts +0 -11
  226. package/build/components/Result/AssetPreview/ImagePreview/index.d.ts +0 -1
  227. package/build/components/Result/AssetPreview/OtherPreview/OtherPreview.d.ts +0 -9
  228. package/build/components/Result/AssetPreview/OtherPreview/OtherPreview.styled.d.ts +0 -1
  229. package/build/components/Result/AssetPreview/OtherPreview/index.d.ts +0 -1
  230. package/build/components/Result/AssetPreview/VideoPreview/VideoPreview.d.ts +0 -11
  231. package/build/components/Result/AssetPreview/VideoPreview/index.d.ts +0 -1
  232. package/build/components/Result/AssetPreview/index.d.ts +0 -1
  233. package/build/consts/asset.d.ts +0 -14
  234. package/build/consts/auth.d.ts +0 -4
  235. package/build/consts/data.d.ts +0 -21
  236. package/build/index.d.ts +0 -225
  237. package/build/index.html +0 -1
  238. package/build/page/Authenticate/Authenticate.d.ts +0 -2
  239. package/build/page/Authenticate/ConnectingBackground.d.ts +0 -8
  240. package/build/page/Authenticate/index.d.ts +0 -2
  241. package/build/page/Home/Home.d.ts +0 -6
  242. package/build/page/Home/Home.styled.d.ts +0 -2
  243. package/build/setupTests.d.ts +0 -1
  244. package/build/store/assets/assets.api.d.ts +0 -66
  245. package/build/store/assets/assets.service.d.ts +0 -23
  246. package/build/store/assets/assets.slice.d.ts +0 -65
  247. package/build/store/auth/auth.service.d.ts +0 -10
  248. package/build/store/auth/auth.slice.d.ts +0 -76
  249. package/build/store/index.d.ts +0 -368
  250. package/build/store/search/search.api.d.ts +0 -39
  251. package/build/store/search/search.slice.d.ts +0 -12
  252. package/build/store/user/user.api.d.ts +0 -5
  253. package/build/types/assets.d.ts +0 -68
  254. package/build/types/auth.d.ts +0 -35
  255. package/build/types/common.d.ts +0 -11
  256. package/build/types/download.d.ts +0 -8
  257. package/build/types/navigation.d.ts +0 -3
  258. package/build/types/search.d.ts +0 -148
  259. package/build/types/user.d.ts +0 -7
  260. package/build/utils/api.d.ts +0 -27
  261. package/build/utils/array.d.ts +0 -13
  262. package/build/utils/constants.d.ts +0 -11
  263. package/build/utils/function.d.ts +0 -1
  264. package/build/utils/getRequestUrl.d.ts +0 -1
  265. package/build/utils/hooks.d.ts +0 -1
  266. package/build/utils/icon.d.ts +0 -3
  267. package/build/utils/image.d.ts +0 -24
  268. package/build/utils/number.d.ts +0 -4
  269. package/build/utils/rotate.d.ts +0 -4
  270. package/build/utils/storage.d.ts +0 -23
  271. package/build/utils/string.d.ts +0 -12
  272. package/build/view/AssetsPicker.d.ts +0 -6
  273. /package/{build → public}/favicon.ico +0 -0
  274. /package/{build → public}/logo192.png +0 -0
  275. /package/{build → public}/logo512.png +0 -0
  276. /package/{build → public}/manifest.json +0 -0
  277. /package/{build → public}/robots.txt +0 -0
  278. /package/{build/components/Browser/index.d.ts → src/components/Browser/index.ts} +0 -0
  279. /package/{build/components/ControlBar/index.d.ts → src/components/ControlBar/index.ts} +0 -0
  280. /package/{build/components/Header/index.d.ts → src/components/Header/index.ts} +0 -0
  281. /package/{build/page/Home/index.d.ts → src/page/Home/index.ts} +0 -0
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "self:">
6
+ </FileRef>
7
+ </Workspace>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>IDEDidComputeMac32BitWarning</key>
6
+ <true/>
7
+ </dict>
8
+ </plist>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>SchemeUserState</key>
6
+ <dict>
7
+ <key>Orange DAM Asset Browser Extension (iOS).xcscheme_^#shared#^_</key>
8
+ <dict>
9
+ <key>orderHint</key>
10
+ <integer>1</integer>
11
+ </dict>
12
+ <key>Orange DAM Asset Browser Extension (macOS).xcscheme_^#shared#^_</key>
13
+ <dict>
14
+ <key>orderHint</key>
15
+ <integer>0</integer>
16
+ </dict>
17
+ </dict>
18
+ </dict>
19
+ </plist>
@@ -0,0 +1,11 @@
1
+ {
2
+ "colors" : [
3
+ {
4
+ "idiom" : "universal"
5
+ }
6
+ ],
7
+ "info" : {
8
+ "author" : "xcode",
9
+ "version" : 1
10
+ }
11
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "images" : [
3
+ {
4
+ "idiom" : "universal",
5
+ "platform" : "ios",
6
+ "size" : "1024x1024"
7
+ },
8
+ {
9
+ "idiom" : "mac",
10
+ "scale" : "1x",
11
+ "size" : "16x16"
12
+ },
13
+ {
14
+ "idiom" : "mac",
15
+ "scale" : "2x",
16
+ "size" : "16x16"
17
+ },
18
+ {
19
+ "idiom" : "mac",
20
+ "scale" : "1x",
21
+ "size" : "32x32"
22
+ },
23
+ {
24
+ "idiom" : "mac",
25
+ "scale" : "2x",
26
+ "size" : "32x32"
27
+ },
28
+ {
29
+ "idiom" : "mac",
30
+ "scale" : "1x",
31
+ "size" : "128x128"
32
+ },
33
+ {
34
+ "idiom" : "mac",
35
+ "scale" : "2x",
36
+ "size" : "128x128"
37
+ },
38
+ {
39
+ "idiom" : "mac",
40
+ "scale" : "1x",
41
+ "size" : "256x256"
42
+ },
43
+ {
44
+ "idiom" : "mac",
45
+ "scale" : "2x",
46
+ "size" : "256x256"
47
+ },
48
+ {
49
+ "idiom" : "mac",
50
+ "scale" : "1x",
51
+ "size" : "512x512"
52
+ },
53
+ {
54
+ "idiom" : "mac",
55
+ "scale" : "2x",
56
+ "size" : "512x512"
57
+ }
58
+ ],
59
+ "info" : {
60
+ "author" : "xcode",
61
+ "version" : 1
62
+ }
63
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "info" : {
3
+ "author" : "xcode",
4
+ "version" : 1
5
+ }
6
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "images" : [
3
+ {
4
+ "idiom" : "universal",
5
+ "scale" : "1x"
6
+ },
7
+ {
8
+ "idiom" : "universal",
9
+ "scale" : "2x"
10
+ },
11
+ {
12
+ "idiom" : "universal",
13
+ "scale" : "3x"
14
+ }
15
+ ],
16
+ "info" : {
17
+ "author" : "xcode",
18
+ "version" : 1
19
+ }
20
+ }
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
+ <meta http-equiv="Content-Security-Policy"
6
+ content=" default-src 'self';
7
+ "
8
+ >
9
+
10
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
11
+
12
+ <link rel="stylesheet" href="../Style.css">
13
+ <script src="../Script.js" defer></script>
14
+ </head>
15
+ <body>
16
+ <img src="../Icon.png" width="128" height="128" alt="Orange DAM Asset Browser Extension Icon">
17
+ <p class="platform-ios">You can turn on Orange DAM Asset Browser Extension’s Safari extension in Settings.</p>
18
+ <p class="platform-mac state-unknown">You can turn on Orange DAM Asset Browser Extension’s extension in Safari Extensions preferences.</p>
19
+ <p class="platform-mac state-on">Orange DAM Asset Browser Extension’s extension is currently on. You can turn it off in Safari Extensions preferences.</p>
20
+ <p class="platform-mac state-off">Orange DAM Asset Browser Extension’s extension is currently off. You can turn it on in Safari Extensions preferences.</p>
21
+ <button class="platform-mac open-preferences">Quit and Open Safari Extensions Preferences…</button>
22
+ </body>
23
+ </html>
@@ -0,0 +1,24 @@
1
+ function show(platform, enabled, useSettingsInsteadOfPreferences) {
2
+ document.body.classList.add(`platform-${platform}`);
3
+
4
+ if (useSettingsInsteadOfPreferences) {
5
+ document.getElementsByClassName('platform-mac state-on')[0].innerText = "Orange DAM Asset Browser Extension’s extension is currently on. You can turn it off in the Extensions section of Safari Settings.";
6
+ document.getElementsByClassName('platform-mac state-off')[0].innerText = "Orange DAM Asset Browser Extension’s extension is currently off. You can turn it on in the Extensions section of Safari Settings.";
7
+ document.getElementsByClassName('platform-mac state-unknown')[0].innerText = "You can turn on Orange DAM Asset Browser Extension’s extension in the Extensions section of Safari Settings.";
8
+ document.getElementsByClassName('platform-mac open-preferences')[0].innerText = "Quit and Open Safari Settings…";
9
+ }
10
+
11
+ if (typeof enabled === "boolean") {
12
+ document.body.classList.toggle(`state-on`, enabled);
13
+ document.body.classList.toggle(`state-off`, !enabled);
14
+ } else {
15
+ document.body.classList.remove(`state-on`);
16
+ document.body.classList.remove(`state-off`);
17
+ }
18
+ }
19
+
20
+ function openPreferences() {
21
+ webkit.messageHandlers.controller.postMessage("open-preferences");
22
+ }
23
+
24
+ document.querySelector("button.open-preferences").addEventListener("click", openPreferences);
@@ -0,0 +1,61 @@
1
+ * {
2
+ -webkit-user-select: none;
3
+ -webkit-user-drag: none;
4
+ cursor: default;
5
+ }
6
+
7
+ :root {
8
+ color-scheme: light dark;
9
+
10
+ --spacing: 20px;
11
+ }
12
+
13
+ html {
14
+ height: 100%;
15
+ }
16
+
17
+ body {
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ flex-direction: column;
22
+
23
+ gap: var(--spacing);
24
+ margin: 0 calc(var(--spacing) * 2);
25
+ height: 100%;
26
+
27
+ font: -apple-system-short-body;
28
+ text-align: center;
29
+ }
30
+
31
+ body:not(.platform-mac, .platform-ios) :is(.platform-mac, .platform-ios) {
32
+ display: none;
33
+ }
34
+
35
+ body.platform-ios .platform-mac {
36
+ display: none;
37
+ }
38
+
39
+ body.platform-mac .platform-ios {
40
+ display: none;
41
+ }
42
+
43
+ body.platform-ios .platform-mac {
44
+ display: none;
45
+ }
46
+
47
+ body:not(.state-on, .state-off) :is(.state-on, .state-off) {
48
+ display: none;
49
+ }
50
+
51
+ body.state-on :is(.state-off, .state-unknown) {
52
+ display: none;
53
+ }
54
+
55
+ body.state-off :is(.state-on, .state-unknown) {
56
+ display: none;
57
+ }
58
+
59
+ button {
60
+ font-size: 1em;
61
+ }
@@ -0,0 +1,81 @@
1
+ //
2
+ // ViewController.swift
3
+ // Shared (App)
4
+ //
5
+ // Created by OL Dev mac 01 on 10/03/2025.
6
+ //
7
+
8
+ import WebKit
9
+
10
+ #if os(iOS)
11
+ import UIKit
12
+ typealias PlatformViewController = UIViewController
13
+ #elseif os(macOS)
14
+ import Cocoa
15
+ import SafariServices
16
+ typealias PlatformViewController = NSViewController
17
+ #endif
18
+
19
+ let extensionBundleIdentifier = "com.yourCompany.Orange-DAM-Asset-Browser-Extension.Extension"
20
+
21
+ class ViewController: PlatformViewController, WKNavigationDelegate, WKScriptMessageHandler {
22
+
23
+ @IBOutlet var webView: WKWebView!
24
+
25
+ override func viewDidLoad() {
26
+ super.viewDidLoad()
27
+
28
+ self.webView.navigationDelegate = self
29
+
30
+ #if os(iOS)
31
+ self.webView.scrollView.isScrollEnabled = false
32
+ #endif
33
+
34
+ self.webView.configuration.userContentController.add(self, name: "controller")
35
+
36
+ self.webView.loadFileURL(Bundle.main.url(forResource: "Main", withExtension: "html")!, allowingReadAccessTo: Bundle.main.resourceURL!)
37
+ }
38
+
39
+ func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
40
+ #if os(iOS)
41
+ webView.evaluateJavaScript("show('ios')")
42
+ #elseif os(macOS)
43
+ webView.evaluateJavaScript("show('mac')")
44
+
45
+ SFSafariExtensionManager.getStateOfSafariExtension(withIdentifier: extensionBundleIdentifier) { (state, error) in
46
+ guard let state = state, error == nil else {
47
+ // Insert code to inform the user that something went wrong.
48
+ return
49
+ }
50
+
51
+ DispatchQueue.main.async {
52
+ if #available(macOS 13, *) {
53
+ webView.evaluateJavaScript("show('mac', \(state.isEnabled), true)")
54
+ } else {
55
+ webView.evaluateJavaScript("show('mac', \(state.isEnabled), false)")
56
+ }
57
+ }
58
+ }
59
+ #endif
60
+ }
61
+
62
+ func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
63
+ #if os(macOS)
64
+ if (message.body as! String != "open-preferences") {
65
+ return;
66
+ }
67
+
68
+ SFSafariApplication.showPreferencesForExtension(withIdentifier: extensionBundleIdentifier) { error in
69
+ guard error == nil else {
70
+ // Insert code to inform the user that something went wrong.
71
+ return
72
+ }
73
+
74
+ DispatchQueue.main.async {
75
+ NSApplication.shared.terminate(nil)
76
+ }
77
+ }
78
+ #endif
79
+ }
80
+
81
+ }
@@ -0,0 +1,26 @@
1
+ //
2
+ // SafariWebExtensionHandler.swift
3
+ // Shared (Extension)
4
+ //
5
+ // Created by OL Dev mac 01 on 10/03/2025.
6
+ //
7
+
8
+ import SafariServices
9
+ import os.log
10
+
11
+ let SFExtensionMessageKey = "message"
12
+
13
+ class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling {
14
+
15
+ func beginRequest(with context: NSExtensionContext) {
16
+ let item = context.inputItems[0] as! NSExtensionItem
17
+ let message = item.userInfo?[SFExtensionMessageKey]
18
+ os_log(.default, "Received message from browser.runtime.sendNativeMessage: %@", message as! CVarArg)
19
+
20
+ let response = NSExtensionItem()
21
+ response.userInfo = [ SFExtensionMessageKey: [ "Response to": message ] ]
22
+
23
+ context.completeRequest(returningItems: [response], completionHandler: nil)
24
+ }
25
+
26
+ }
@@ -0,0 +1,24 @@
1
+ //
2
+ // AppDelegate.swift
3
+ // iOS (App)
4
+ //
5
+ // Created by OL Dev mac 01 on 10/03/2025.
6
+ //
7
+
8
+ import UIKit
9
+
10
+ @main
11
+ class AppDelegate: UIResponder, UIApplicationDelegate {
12
+
13
+ var window: UIWindow?
14
+
15
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
16
+ // Override point for customization after application launch.
17
+ return true
18
+ }
19
+
20
+ func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
21
+ return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
22
+ }
23
+
24
+ }
@@ -0,0 +1,36 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19085" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3
+ <dependencies>
4
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19082"/>
5
+ <capability name="Image references" minToolsVersion="12.0"/>
6
+ <capability name="Safe area layout guides" minToolsVersion="9.0"/>
7
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
8
+ </dependencies>
9
+ <scenes>
10
+ <!--View Controller-->
11
+ <scene sceneID="EHf-IW-A2E">
12
+ <objects>
13
+ <viewController id="01J-lp-oVM" sceneMemberID="viewController">
14
+ <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
15
+ <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
16
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
17
+ <subviews>
18
+ <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6HG-Um-bch">
19
+ <rect key="frame" x="142" y="385" width="128" height="128"/>
20
+ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
21
+ <imageReference key="image" image="LargeIcon"/>
22
+ </imageView>
23
+ </subviews>
24
+ <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
25
+ <color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
26
+ </view>
27
+ </viewController>
28
+ <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
29
+ </objects>
30
+ <point key="canvasLocation" x="53" y="375"/>
31
+ </scene>
32
+ </scenes>
33
+ <resources>
34
+ <image name="LargeIcon" width="128" height="128"/>
35
+ </resources>
36
+ </document>
@@ -0,0 +1,38 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
3
+ <device id="retina6_1" orientation="portrait" appearance="light"/>
4
+ <dependencies>
5
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
6
+ <capability name="Safe area layout guides" minToolsVersion="9.0"/>
7
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
8
+ </dependencies>
9
+ <scenes>
10
+ <!--View Controller-->
11
+ <scene sceneID="tne-QT-ifu">
12
+ <objects>
13
+ <viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
14
+ <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
15
+ <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
16
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
17
+ <subviews>
18
+ <wkWebView contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="RDB-ib-igF">
19
+ <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
20
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
21
+ <wkWebViewConfiguration key="configuration">
22
+ <audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
23
+ <wkPreferences key="preferences"/>
24
+ </wkWebViewConfiguration>
25
+ </wkWebView>
26
+ </subviews>
27
+ <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
28
+ </view>
29
+ <connections>
30
+ <outlet property="webView" destination="RDB-ib-igF" id="avx-RC-qRB"/>
31
+ </connections>
32
+ </viewController>
33
+ <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
34
+ </objects>
35
+ <point key="canvasLocation" x="53" y="375"/>
36
+ </scene>
37
+ </scenes>
38
+ </document>
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>SFSafariWebExtensionConverterVersion</key>
6
+ <string>14.2</string>
7
+ <key>UIApplicationSceneManifest</key>
8
+ <dict>
9
+ <key>UIApplicationSupportsMultipleScenes</key>
10
+ <false/>
11
+ <key>UISceneConfigurations</key>
12
+ <dict>
13
+ <key>UIWindowSceneSessionRoleApplication</key>
14
+ <array>
15
+ <dict>
16
+ <key>UISceneConfigurationName</key>
17
+ <string>Default Configuration</string>
18
+ <key>UISceneDelegateClassName</key>
19
+ <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
20
+ <key>UISceneStoryboardFile</key>
21
+ <string>Main</string>
22
+ </dict>
23
+ </array>
24
+ </dict>
25
+ </dict>
26
+ </dict>
27
+ </plist>
@@ -0,0 +1,18 @@
1
+ //
2
+ // SceneDelegate.swift
3
+ // iOS (App)
4
+ //
5
+ // Created by OL Dev mac 01 on 10/03/2025.
6
+ //
7
+
8
+ import UIKit
9
+
10
+ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
11
+
12
+ var window: UIWindow?
13
+
14
+ func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
15
+ guard let _ = (scene as? UIWindowScene) else { return }
16
+ }
17
+
18
+ }
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>NSExtension</key>
6
+ <dict>
7
+ <key>NSExtensionPointIdentifier</key>
8
+ <string>com.apple.Safari.web-extension</string>
9
+ <key>NSExtensionPrincipalClass</key>
10
+ <string>$(PRODUCT_MODULE_NAME).SafariWebExtensionHandler</string>
11
+ </dict>
12
+ </dict>
13
+ </plist>
@@ -0,0 +1,21 @@
1
+ //
2
+ // AppDelegate.swift
3
+ // macOS (App)
4
+ //
5
+ // Created by OL Dev mac 01 on 10/03/2025.
6
+ //
7
+
8
+ import Cocoa
9
+
10
+ @main
11
+ class AppDelegate: NSObject, NSApplicationDelegate {
12
+
13
+ func applicationDidFinishLaunching(_ notification: Notification) {
14
+ // Override point for customization after application launch.
15
+ }
16
+
17
+ func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
18
+ return true
19
+ }
20
+
21
+ }