@twintag/twintag-core 0.2.279-fix-ocr-scanner-update-ec42ca951c4f16b77ca0afa9f41095303b05aeea → 0.2.280-fix-viewId-invalid-28ad22be11e07adb732bc1ec319b070e707b0f6a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/twintag-offline-support.cjs.entry.js +2 -2
- package/dist/cjs/view-b991bc58.js +31 -0
- package/dist/collection/services/view/view.js +9 -5
- package/dist/collection/version.js +1 -1
- package/dist/components/twintag-offline-support.js +10 -6
- package/dist/esm/index.js +1 -1
- package/dist/esm/twintag-offline-support.entry.js +2 -2
- package/dist/esm/view-a251c1a9.js +29 -0
- package/dist/stencil-web-components/index.esm.js +1 -1
- package/dist/stencil-web-components/p-6d5b977c.js +1 -0
- package/dist/stencil-web-components/p-87632f07.entry.js +1 -0
- package/dist/stencil-web-components/stencil-web-components.esm.js +1 -1
- package/dist/types/drone/src/libs/stencil-web-components/.stencil/libs/twintag-sdk/src/lib/version.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/twintag-sdk/src/lib/version.js +1 -1
- package/dist/cjs/view-5688de88.js +0 -27
- package/dist/esm/view-3c7635c8.js +0 -25
- package/dist/stencil-web-components/p-bc276703.entry.js +0 -1
- package/dist/stencil-web-components/p-e6fa1a51.js +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2c25b2e9.js');
|
|
6
|
-
const view = require('./view-
|
|
6
|
+
const view = require('./view-b991bc58.js');
|
|
7
7
|
const _commonjsHelpers = require('./_commonjsHelpers-206db00d.js');
|
|
8
8
|
require('./utils-c573638e.js');
|
|
9
9
|
|
|
@@ -206,7 +206,7 @@ class IndexedDbService {
|
|
|
206
206
|
/**
|
|
207
207
|
* The SDK version.
|
|
208
208
|
*/
|
|
209
|
-
const VERSION = '0.
|
|
209
|
+
const VERSION = '0.0.0-VERSION';
|
|
210
210
|
|
|
211
211
|
class TwintagErrorValue {
|
|
212
212
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const utils = require('./utils-c573638e.js');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The view object represents the current active view.
|
|
7
|
+
* A common use is to figure out the QID of the active view, E.g:
|
|
8
|
+
* ```js
|
|
9
|
+
* let viewId = View.getId()
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
class View {
|
|
13
|
+
/**
|
|
14
|
+
* Get view id for current twintag
|
|
15
|
+
* @returns string view id
|
|
16
|
+
*/
|
|
17
|
+
static getId() {
|
|
18
|
+
const url = new URL(window.location.href);
|
|
19
|
+
const path_segments = url.pathname.split('/').filter((x) => x.length > 0);
|
|
20
|
+
const views_segment_idx = path_segments.indexOf('views');
|
|
21
|
+
return path_segments.length > 0
|
|
22
|
+
? utils.inIframe() && views_segment_idx > -1
|
|
23
|
+
? path_segments[views_segment_idx + 1]
|
|
24
|
+
// Assuming the `id` is the first segment and there could be
|
|
25
|
+
// additional segments available. Example: `<base_url>/<view_id>/onboard`
|
|
26
|
+
: path_segments[0]
|
|
27
|
+
: '';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
exports.View = View;
|
|
@@ -12,11 +12,15 @@ export class View {
|
|
|
12
12
|
* @returns string view id
|
|
13
13
|
*/
|
|
14
14
|
static getId() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
const url = new URL(window.location.href);
|
|
16
|
+
const path_segments = url.pathname.split('/').filter((x) => x.length > 0);
|
|
17
|
+
const views_segment_idx = path_segments.indexOf('views');
|
|
18
|
+
return path_segments.length > 0
|
|
19
|
+
? inIframe() && views_segment_idx > -1
|
|
20
|
+
? path_segments[views_segment_idx + 1]
|
|
21
|
+
// Assuming the `id` is the first segment and there could be
|
|
22
|
+
// additional segments available. Example: `<base_url>/<view_id>/onboard`
|
|
23
|
+
: path_segments[0]
|
|
20
24
|
: '';
|
|
21
25
|
}
|
|
22
26
|
}
|
|
@@ -15,11 +15,15 @@ class View$1 {
|
|
|
15
15
|
* @returns string view id
|
|
16
16
|
*/
|
|
17
17
|
static getId() {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
const url = new URL(window.location.href);
|
|
19
|
+
const path_segments = url.pathname.split('/').filter((x) => x.length > 0);
|
|
20
|
+
const views_segment_idx = path_segments.indexOf('views');
|
|
21
|
+
return path_segments.length > 0
|
|
22
|
+
? inIframe() && views_segment_idx > -1
|
|
23
|
+
? path_segments[views_segment_idx + 1]
|
|
24
|
+
// Assuming the `id` is the first segment and there could be
|
|
25
|
+
// additional segments available. Example: `<base_url>/<view_id>/onboard`
|
|
26
|
+
: path_segments[0]
|
|
23
27
|
: '';
|
|
24
28
|
}
|
|
25
29
|
}
|
|
@@ -223,7 +227,7 @@ class IndexedDbService {
|
|
|
223
227
|
/**
|
|
224
228
|
* The SDK version.
|
|
225
229
|
*/
|
|
226
|
-
const VERSION = '0.
|
|
230
|
+
const VERSION = '0.0.0-VERSION';
|
|
227
231
|
|
|
228
232
|
class TwintagErrorValue {
|
|
229
233
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent } from './index-174285a2.js';
|
|
2
|
-
import { V as View$1 } from './view-
|
|
2
|
+
import { V as View$1 } from './view-a251c1a9.js';
|
|
3
3
|
import { c as createCommonjsModule, g as getAugmentedNamespace } from './_commonjsHelpers-27f122dd.js';
|
|
4
4
|
import './utils-c73229be.js';
|
|
5
5
|
|
|
@@ -202,7 +202,7 @@ class IndexedDbService {
|
|
|
202
202
|
/**
|
|
203
203
|
* The SDK version.
|
|
204
204
|
*/
|
|
205
|
-
const VERSION = '0.
|
|
205
|
+
const VERSION = '0.0.0-VERSION';
|
|
206
206
|
|
|
207
207
|
class TwintagErrorValue {
|
|
208
208
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { i as inIframe } from './utils-c73229be.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The view object represents the current active view.
|
|
5
|
+
* A common use is to figure out the QID of the active view, E.g:
|
|
6
|
+
* ```js
|
|
7
|
+
* let viewId = View.getId()
|
|
8
|
+
* ```
|
|
9
|
+
*/
|
|
10
|
+
class View {
|
|
11
|
+
/**
|
|
12
|
+
* Get view id for current twintag
|
|
13
|
+
* @returns string view id
|
|
14
|
+
*/
|
|
15
|
+
static getId() {
|
|
16
|
+
const url = new URL(window.location.href);
|
|
17
|
+
const path_segments = url.pathname.split('/').filter((x) => x.length > 0);
|
|
18
|
+
const views_segment_idx = path_segments.indexOf('views');
|
|
19
|
+
return path_segments.length > 0
|
|
20
|
+
? inIframe() && views_segment_idx > -1
|
|
21
|
+
? path_segments[views_segment_idx + 1]
|
|
22
|
+
// Assuming the `id` is the first segment and there could be
|
|
23
|
+
// additional segments available. Example: `<base_url>/<view_id>/onboard`
|
|
24
|
+
: path_segments[0]
|
|
25
|
+
: '';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { View as V };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as Auth,a as AuthConfigTemplate}from"./p-2c603989.js";export{V as View}from"./p-
|
|
1
|
+
export{A as Auth,a as AuthConfigTemplate}from"./p-2c603989.js";export{V as View}from"./p-6d5b977c.js";import"./p-2e4c78ca.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as s}from"./p-2e4c78ca.js";class t{static getId(){const t=new URL(window.location.href).pathname.split("/").filter((s=>s.length>0)),e=t.indexOf("views");return t.length>0?s()&&e>-1?t[e+1]:t[0]:""}}export{t as V}
|