@roxyapi/ui 0.18.2 → 0.18.3
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/components-catalog.json +109 -109
- package/dist/cdn/components/dasha-timeline.js +1 -1
- package/dist/cdn/components/dasha-timeline.js.map +3 -3
- package/dist/cdn/components/endpoint-form.js +1 -1
- package/dist/cdn/components/endpoint-form.js.map +1 -1
- package/dist/cdn/roxy-ui.js +2 -2
- package/dist/cdn/roxy-ui.js.map +3 -3
- package/dist/components/dasha-timeline.d.ts +13 -3
- package/dist/components/dasha-timeline.d.ts.map +1 -1
- package/dist/components/dasha-timeline.js +1 -1
- package/dist/components/dasha-timeline.js.map +3 -3
- package/dist/components/endpoint-form.js +1 -1
- package/dist/components/endpoint-form.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/dasha-timeline.ts +19 -14
- package/src/version.ts +1 -1
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ROXY_UI_VERSION = "0.18.
|
|
1
|
+
export declare const ROXY_UI_VERSION = "0.18.3";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roxyapi/ui",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.3",
|
|
4
4
|
"description": "Web components for the RoxyAPI catalog. Drop-in charts, tables, cards, forms for astrology, tarot, numerology, biorhythm, I Ching, crystals, dreams, angel numbers, and more. One key, beautiful in 30 minutes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -239,7 +239,8 @@ export class RoxyDashaTimeline extends RoxyDataElement<DashaData> {
|
|
|
239
239
|
* Which dasha endpoint fed this element. `sub`, `antara` and `sookshma` are the
|
|
240
240
|
* three drill-down levels and render identically; they stay distinct because
|
|
241
241
|
* each maps one-to-one onto its endpoint binding, which is what lets a widget
|
|
242
|
-
* pick a level. The LABELS come from the payload, not
|
|
242
|
+
* pick a level. The heading and the level LABELS come from the payload, not
|
|
243
|
+
* from here, so a host that cannot set attributes still renders correctly.
|
|
243
244
|
*/
|
|
244
245
|
@property({ type: String, reflect: true })
|
|
245
246
|
period: 'current' | 'major' | 'sub' | 'antara' | 'sookshma' = 'current';
|
|
@@ -248,11 +249,6 @@ export class RoxyDashaTimeline extends RoxyDataElement<DashaData> {
|
|
|
248
249
|
@state()
|
|
249
250
|
private view: 'timeline' | 'readings' | 'frame' = 'timeline';
|
|
250
251
|
|
|
251
|
-
/** True for any of the drill-down levels, which share one layout. */
|
|
252
|
-
private get isDrillDown(): boolean {
|
|
253
|
-
return this.period !== 'current' && this.period !== 'major';
|
|
254
|
-
}
|
|
255
|
-
|
|
256
252
|
protected renderEmpty() {
|
|
257
253
|
return html`<div class="roxy-empty" role="status">No dasha data</div>`;
|
|
258
254
|
}
|
|
@@ -412,16 +408,25 @@ export class RoxyDashaTimeline extends RoxyDataElement<DashaData> {
|
|
|
412
408
|
</dl>`;
|
|
413
409
|
}
|
|
414
410
|
|
|
411
|
+
/**
|
|
412
|
+
* Heading, decided by the PAYLOAD first and the `period` attribute only as a
|
|
413
|
+
* tie-break.
|
|
414
|
+
*
|
|
415
|
+
* Not every host can set the attribute. The WordPress plugin maps an
|
|
416
|
+
* operationId to a bare component tag with no attrs, so every dasha shortcode
|
|
417
|
+
* arrives with the default `period="current"`; keying off the attribute alone
|
|
418
|
+
* titled an antardasha list "Active dashas" there. A drill-down response is
|
|
419
|
+
* self-identifying (it carries a parent period), so the markup does not need
|
|
420
|
+
* to be told.
|
|
421
|
+
*/
|
|
415
422
|
private heading(d: DashaData): string {
|
|
416
|
-
|
|
417
|
-
if (
|
|
418
|
-
|
|
419
|
-
const level = levelOf(d);
|
|
420
|
-
return parent
|
|
421
|
-
? `${level}s in ${parent.period.planet} ${parent.label}`
|
|
422
|
-
: `${level}s`;
|
|
423
|
+
const parent = parentOf(d);
|
|
424
|
+
if (parent) {
|
|
425
|
+
return `${levelOf(d)}s in ${parent.period.planet} ${parent.label}`;
|
|
423
426
|
}
|
|
424
|
-
return '
|
|
427
|
+
if ('mahadashas' in d) return 'Vimshottari Mahadasha';
|
|
428
|
+
if ('mahadasha' in d) return 'Active dashas';
|
|
429
|
+
return this.period === 'major' ? 'Vimshottari Mahadasha' : 'Active dashas';
|
|
425
430
|
}
|
|
426
431
|
|
|
427
432
|
/**
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by scripts/sync-version.ts. Do not edit.
|
|
2
|
-
export const ROXY_UI_VERSION = '0.18.
|
|
2
|
+
export const ROXY_UI_VERSION = '0.18.3';
|