@swiftwc/ui 1.0.1-canary.5 → 1.0.1-canary.6
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/generated/client/index.js +2 -0
- package/generated/components/confirmation-dialog.js +1 -0
- package/generated/components/content-unavailable.js +96 -47
- package/generated/components/date-picker.d.ts +0 -1
- package/generated/components/date-picker.js +476 -440
- package/generated/components/disclosure-group.js +0 -5
- package/generated/components/image-view.js +106 -56
- package/generated/components/label-view.js +111 -59
- package/generated/components/labeled-content.js +158 -109
- package/generated/components/menu-view.js +156 -108
- package/generated/components/navigation-large-title.js +1 -0
- package/generated/components/navigation-title.js +83 -43
- package/generated/components/picker-view.d.ts +0 -1
- package/generated/components/picker-view.js +896 -955
- package/generated/components/progress-view.d.ts +0 -1
- package/generated/components/progress-view.js +138 -117
- package/generated/components/scroll-view.js +251 -200
- package/generated/components/section-view.js +84 -34
- package/generated/components/tab-item.js +2 -0
- package/generated/components/tab-view.js +2 -0
- package/generated/components/table-view.js +149 -99
- package/generated/components/text-field.js +531 -474
- package/generated/components/toggle-view.js +385 -329
- package/generated/components/tool-bar-item-group.js +61 -21
- package/generated/components/tool-bar-item.js +93 -53
- package/generated/components/tool-bar.js +98 -49
- package/generated/components/v-keyboard.js +1 -0
- package/generated/events/alert-dialog.js +0 -1
- package/generated/events/confirmation-dialog.js +0 -1
- package/generated/events/date-picker.js +0 -1
- package/generated/events/lifecycle-observer.js +1 -1
- package/generated/events/picker-view.js +0 -1
- package/generated/events/scroll-view.js +1 -1
- package/generated/events/tab-view.js +2 -1
- package/generated/events/text-field.js +0 -1
- package/generated/events/toggle-view.js +0 -1
- package/generated/internal/class/cleanup-registry.js +0 -5
- package/generated/internal/class/form-associated-base.d.ts +1 -2
- package/generated/internal/class/form-associated-base.js +109 -57
- package/generated/internal/class/navigation-path.js +1 -0
- package/generated/internal/decorators/custom-element.d.ts +2 -5
- package/generated/internal/decorators/custom-element.js +37 -3
- package/generated/internal/decorators/index.d.ts +2 -0
- package/generated/internal/decorators/index.js +2 -0
- package/generated/internal/decorators/internals.d.ts +1 -0
- package/generated/internal/decorators/internals.js +8 -0
- package/generated/internal/utils/$.js +1 -0
- package/generated/namespace-browser/event.js +0 -1
- package/generated/namespace-browser/index.js +0 -1
- package/html-data/en.json +3 -3
- package/package.json +4 -1
|
@@ -5,6 +5,7 @@ import { NavigationPath } from '../internal/class/navigation-path';
|
|
|
5
5
|
import devFlags from '../internal/dev-flags';
|
|
6
6
|
import { queryInsertPosition, startViewTransition } from '../internal/privateNamespace';
|
|
7
7
|
import { $, debug, kebabCase, onoff } from '../internal/utils';
|
|
8
|
+
import {} from '../namespace-browser';
|
|
8
9
|
import { Snapshot } from '../snapshot';
|
|
9
10
|
import { html, render } from '../tpl';
|
|
10
11
|
debug(devFlags);
|
|
@@ -278,4 +279,5 @@ export const confirmationDialog = async (trigger, title, message, actions, optio
|
|
|
278
279
|
void Snapshot.waitReady;
|
|
279
280
|
//#region exports
|
|
280
281
|
export { I18n, lifecycleObserver, NavigationPath, queryInsertPosition, Snapshot, startViewTransition };
|
|
282
|
+
export {};
|
|
281
283
|
//#endregion
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { confirmationDialog } from '../buses';
|
|
2
|
+
import {} from '../events';
|
|
2
3
|
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
3
4
|
import { debug, isInside, onoff, touchGlass } from '../internal/utils';
|
|
4
5
|
import { DialogBase } from '../namespace-browser/base';
|
|
@@ -1,5 +1,40 @@
|
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
34
|
+
};
|
|
1
35
|
import { I18n } from '../i18n';
|
|
2
36
|
import { CleanupRegistry } from '../internal/class/cleanup-registry';
|
|
37
|
+
import { shadowRoot } from '../internal/decorators';
|
|
3
38
|
import { $, debug, onoff } from '../internal/utils';
|
|
4
39
|
import { html } from '../tpl';
|
|
5
40
|
/**
|
|
@@ -18,13 +53,24 @@ import { html } from '../tpl';
|
|
|
18
53
|
* @slot actions
|
|
19
54
|
*
|
|
20
55
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
56
|
+
let ContentUnavailable = (() => {
|
|
57
|
+
let _classSuper = HTMLElement;
|
|
58
|
+
let _private_shadowRoot_decorators;
|
|
59
|
+
let _private_shadowRoot_initializers = [];
|
|
60
|
+
let _private_shadowRoot_extraInitializers = [];
|
|
61
|
+
return class ContentUnavailable extends _classSuper {
|
|
62
|
+
static {
|
|
63
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
64
|
+
_private_shadowRoot_decorators = [shadowRoot()];
|
|
65
|
+
__esDecorate(null, null, _private_shadowRoot_decorators, { kind: "field", name: "#shadowRoot", static: false, private: true, access: { has: obj => #shadowRoot in obj, get: obj => obj.#shadowRoot, set: (obj, value) => { obj.#shadowRoot = value; } }, metadata: _metadata }, _private_shadowRoot_initializers, _private_shadowRoot_extraInitializers);
|
|
66
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
67
|
+
}
|
|
68
|
+
static get observedAttributes() {
|
|
69
|
+
return ['search'];
|
|
70
|
+
}
|
|
71
|
+
static #template;
|
|
72
|
+
static get template() {
|
|
73
|
+
return (this.#template ??= $(html `<div part="root content-unavailable-title-stack">
|
|
28
74
|
<slot></slot>
|
|
29
75
|
</div>
|
|
30
76
|
<div part="root content-unavailable-description-stack">
|
|
@@ -33,47 +79,50 @@ export class ContentUnavailable extends HTMLElement {
|
|
|
33
79
|
<div part="root content-unavailable-actions-stack">
|
|
34
80
|
<slot name="actions"></slot>
|
|
35
81
|
</div>`));
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
82
|
+
}
|
|
83
|
+
// #shadowRoot
|
|
84
|
+
// #slots
|
|
85
|
+
#shadowRoot = __runInitializers(this, _private_shadowRoot_initializers, undefined);
|
|
86
|
+
constructor() {
|
|
87
|
+
super();
|
|
88
|
+
// this.#shadowRoot = this.attachShadow({ mode: 'closed' })
|
|
89
|
+
this.#shadowRoot.appendChild(document.importNode(this.constructor.template, true));
|
|
90
|
+
// this.#slots = {
|
|
91
|
+
// '': this.#shadowRoot.querySelector('slot:not([name])') ?? undefined,
|
|
92
|
+
// description: this.#shadowRoot.querySelector('slot[name="description"]') ?? undefined,
|
|
93
|
+
// actions: this.#shadowRoot.querySelector('slot[name="actions"]') ?? undefined,
|
|
94
|
+
// } as const
|
|
95
|
+
}
|
|
96
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
97
|
+
debug(`${ContentUnavailable.name} ⚡️ attr-change [${name}] ("${oldValue}" → "${newValue}")`);
|
|
98
|
+
switch (name) {
|
|
99
|
+
case 'search':
|
|
100
|
+
if (oldValue === newValue)
|
|
101
|
+
break;
|
|
102
|
+
this.#renderSearch(newValue);
|
|
103
|
+
CleanupRegistry.unregister(this, 'i18n');
|
|
104
|
+
CleanupRegistry.register(this, onoff('localechange', () => {
|
|
105
|
+
this.#renderSearch(this.getAttribute('search'));
|
|
106
|
+
}, I18n.on).on(), 'i18n');
|
|
54
107
|
break;
|
|
55
|
-
|
|
56
|
-
CleanupRegistry.unregister(this, 'i18n');
|
|
57
|
-
CleanupRegistry.register(this, onoff('localechange', () => {
|
|
58
|
-
this.#renderSearch(this.getAttribute('search'));
|
|
59
|
-
}, I18n.on).on(), 'i18n');
|
|
60
|
-
break;
|
|
108
|
+
}
|
|
61
109
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
debug(`${ContentUnavailable.name} ⚡️ connect`);
|
|
68
|
-
}
|
|
69
|
-
#renderSearch = (search) => {
|
|
70
|
-
const titleLabel = this.querySelector(':scope>:not([slot])') ?? this.appendChild($(html `<label-view><i class="ph ph-magnifying-glass" slot="icon" foreground="secondary"></i></label-view>`, '>1')), descText = this.querySelector(':scope>[slot=description]') ?? this.appendChild($(html `<label-view foreground="secondary" slot="description"></label-view>`, '>1'));
|
|
71
|
-
if (search) {
|
|
72
|
-
const interpolate = (text, vars) => text.replaceAll(/\{(\w+)\}/g, (_, key) => vars[key] ?? '');
|
|
73
|
-
titleLabel.setAttribute('title', interpolate(I18n.t('SearchUnavailableContent').Label, { search }));
|
|
110
|
+
disconnectedCallback() {
|
|
111
|
+
debug(`${ContentUnavailable.name} ⚡️ disconnect`);
|
|
112
|
+
}
|
|
113
|
+
connectedCallback() {
|
|
114
|
+
debug(`${ContentUnavailable.name} ⚡️ connect`);
|
|
74
115
|
}
|
|
75
|
-
|
|
76
|
-
titleLabel
|
|
77
|
-
|
|
116
|
+
#renderSearch = (__runInitializers(this, _private_shadowRoot_extraInitializers), (search) => {
|
|
117
|
+
const titleLabel = this.querySelector(':scope>:not([slot])') ?? this.appendChild($(html `<label-view><i class="ph ph-magnifying-glass" slot="icon" foreground="secondary"></i></label-view>`, '>1')), descText = this.querySelector(':scope>[slot=description]') ?? this.appendChild($(html `<label-view foreground="secondary" slot="description"></label-view>`, '>1'));
|
|
118
|
+
if (search) {
|
|
119
|
+
const interpolate = (text, vars) => text.replaceAll(/\{(\w+)\}/g, (_, key) => vars[key] ?? '');
|
|
120
|
+
titleLabel.setAttribute('title', interpolate(I18n.t('SearchUnavailableContent').Label, { search }));
|
|
121
|
+
}
|
|
122
|
+
else
|
|
123
|
+
titleLabel?.setAttribute('title', I18n.t('SearchUnavailableContent').NoLabel);
|
|
124
|
+
descText.setAttribute('title', I18n.t('SearchUnavailableContent').Description);
|
|
125
|
+
});
|
|
78
126
|
};
|
|
79
|
-
}
|
|
127
|
+
})();
|
|
128
|
+
export { ContentUnavailable };
|
|
@@ -10,7 +10,6 @@ export declare class DatePicker extends FormAssociatedBase {
|
|
|
10
10
|
#private;
|
|
11
11
|
static get observedAttributes(): string[];
|
|
12
12
|
get template(): DocumentFragment;
|
|
13
|
-
constructor();
|
|
14
13
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
15
14
|
disconnectedCallback(): void;
|
|
16
15
|
connectedCallback(): void;
|