Skip to content

Commit 990f03b

Browse files
authored
Merge pull request #770 from lowcoder-org/cherry-release
Cherry release - hotfix
2 parents 33d8210 + dafdd3a commit 990f03b

File tree

5 files changed

+111
-19
lines changed

5 files changed

+111
-19
lines changed

client/packages/lowcoder/src/app.tsx

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -111,21 +111,16 @@ class AppIndex extends React.Component<AppIndexProps, any> {
111111
{<title>{this.props.brandName}</title>}
112112
{<link rel="icon" href={this.props.favicon} />}
113113
<meta name="description" content={trans("productDesc")} />
114-
115-
{isLowCoderDomain && (
116-
<>
117-
{/* setting Meta Attributes to be able for embedding via iframely */}
118-
<meta property="iframely:title" content="Lowcoder" />
119-
<meta property="iframely:description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />
120-
121-
<link rel="preconnect" href="https://fonts.googleapis.com"/>
122-
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous"/>
123-
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,700;1,400&display=swap" rel="stylesheet"/>
124-
{/* embedding analytics of Cleabits */}
125-
<script src="https://tag.clearbitscripts.com/v1/pk_931b51e405557300e6a7c470e8247d5f/tags.js" referrerPolicy="strict-origin-when-cross-origin"></script>
126-
</>
127-
)}
128-
114+
{isLowCoderDomain && [
115+
// Adding Support for iframely to be able to embedd the component explorer in the docu
116+
<meta key="iframely:title" property="iframely:title" content="Lowcoder" />,
117+
<meta key="iframely:description" property="iframely:description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />,
118+
<link key="preconnect-googleapis" rel="preconnect" href="https://fonts.googleapis.com" />,
119+
<link key="preconnect-gstatic" rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />,
120+
<link key="font-ubuntu" href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,700;1,400&display=swap" rel="stylesheet" />,
121+
// adding Clearbit Support for Analytics
122+
<script key="clearbit-script" src="https://tag.clearbitscripts.com/v1/pk_931b51e405557300e6a7c470e8247d5f/tags.js" referrerPolicy="strict-origin-when-cross-origin" type="text/javascript"></script>
123+
]}
129124
</Helmet>
130125
<SystemWarning />
131126
<Router history={history}>

client/packages/lowcoder/src/components/CompName.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export const CompName = (props: Iprops) => {
8383

8484
const items: EditPopoverItemType[] = [];
8585

86+
// Falk: TODO - Implement upgrade for individual Version functionality
8687
const handleUpgrade = async () => {
8788
if (upgrading) {
8889
return;

client/packages/lowcoder/src/comps/comps/remoteComp/loaders.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ import {
1010
async function npmLoader(
1111
remoteInfo: RemoteCompInfo
1212
): Promise<CompConstructor | null> {
13-
const { packageName, packageVersion = "latest", compName } = remoteInfo;
13+
14+
console.log("remoteInfo: ", remoteInfo);
15+
16+
// Falk: removed "packageVersion = "latest" as default value fir packageVersion - to ensure no automatic version jumping.
17+
18+
const { packageName, packageVersion, compName } = remoteInfo;
1419
const entry = `${NPM_PLUGIN_ASSETS_BASE_URL}/${packageName}@${packageVersion}/index.js`;
1520
// const entry = `../../../../../public/package/index.js`;
1621
// console.log("Entry", entry);
1722
try {
1823
const module = await import(/* webpackIgnore: true */ entry);
19-
// console.log("Entry 1", module);
2024
const comp = module.default?.[compName];
2125
if (!comp) {
2226
throw new Error(trans("npm.compNotFound", { compName }));

client/packages/lowcoder/src/pages/editor/editorView.tsx

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,9 @@ function EditorView(props: EditorViewProps) {
329329

330330
const hideBodyHeader = useTemplateViewMode();
331331

332+
// we check if we are on the public cloud
333+
const isLowCoderDomain = window.location.hostname === 'app.lowcoder.cloud';
334+
332335
if (readOnly && hideHeader) {
333336
return (
334337
<CustomShortcutWrapper>
@@ -341,7 +344,19 @@ function EditorView(props: EditorViewProps) {
341344
if (readOnly && !showAppSnapshot) {
342345
return (
343346
<CustomShortcutWrapper>
344-
<Helmet>{application && <title>{application.name}</title>}</Helmet>
347+
<Helmet>
348+
{application && <title>{application.name}</title>}
349+
{isLowCoderDomain && [
350+
// Adding Support for iframely to be able to embedd the component explorer in the docu
351+
<meta key="iframely:title" property="iframely:title" content="Lowcoder" />,
352+
<meta key="iframely:description" property="iframely:description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />,
353+
<link key="preconnect-googleapis" rel="preconnect" href="https://fonts.googleapis.com" />,
354+
<link key="preconnect-gstatic" rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />,
355+
<link key="font-ubuntu" href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,700;1,400&display=swap" rel="stylesheet" />,
356+
// adding Clearbit Support for Analytics
357+
<script key="clearbit-script" src="https://tag.clearbitscripts.com/v1/pk_931b51e405557300e6a7c470e8247d5f/tags.js" referrerPolicy="strict-origin-when-cross-origin" type="text/javascript"></script>
358+
]}
359+
</Helmet>
345360
{!hideBodyHeader && <PreviewHeader />}
346361
<EditorContainerWithViewMode>
347362
<ViewBody $hideBodyHeader={hideBodyHeader} $height={height}>
@@ -354,6 +369,7 @@ function EditorView(props: EditorViewProps) {
354369
</CustomShortcutWrapper>
355370
);
356371
}
372+
357373
// history mode, display with the right panel, a little trick
358374
const showRight = panelStatus.right || showAppSnapshot;
359375
let uiCompView;
@@ -392,7 +408,19 @@ function EditorView(props: EditorViewProps) {
392408
toggleEditorModeStatus={toggleEditorModeStatus}
393409
editorModeStatus={editorModeStatus}
394410
/>
395-
<Helmet>{application && <title>{application.name}</title>}</Helmet>
411+
<Helmet>
412+
{application && <title>{application.name}</title>}
413+
{isLowCoderDomain && [
414+
// Adding Support for iframely to be able to embedd the component explorer in the docu
415+
<meta key="iframely:title" property="iframely:title" content="Lowcoder" />,
416+
<meta key="iframely:description" property="iframely:description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />,
417+
<link key="preconnect-googleapis" rel="preconnect" href="https://fonts.googleapis.com" />,
418+
<link key="preconnect-gstatic" rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />,
419+
<link key="font-ubuntu" href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,700;1,400&display=swap" rel="stylesheet" />,
420+
// adding Clearbit Support for Analytics
421+
<script key="clearbit-script" src="https://tag.clearbitscripts.com/v1/pk_931b51e405557300e6a7c470e8247d5f/tags.js" referrerPolicy="strict-origin-when-cross-origin" type="text/javascript"></script>
422+
]}
423+
</Helmet>
396424
{showNewUserGuide && <EditorTutorials />}
397425
<EditorGlobalHotKeys
398426
disabled={readOnly}

client/packages/lowcoder/src/util/dateTimeUtils.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,70 @@
1+
import { time } from "console";
12
import dayjs from "dayjs";
23
import relativeTime from "dayjs/plugin/relativeTime";
4+
import timezone from "dayjs/plugin/timezone";
5+
import duration from "dayjs/plugin/duration";
6+
import utc from "dayjs/plugin/utc";
7+
import quarterOfYear from "dayjs/plugin/quarterOfYear";
8+
import weekOfYear from "dayjs/plugin/weekOfYear";
9+
import isBetween from "dayjs/plugin/isBetween";
10+
import isToday from "dayjs/plugin/isToday";
11+
import isTomorrow from "dayjs/plugin/isTomorrow";
12+
import isYesterday from "dayjs/plugin/isYesterday";
13+
import customParseFormat from "dayjs/plugin/customParseFormat";
14+
import advancedFormat from "dayjs/plugin/advancedFormat";
15+
import updateLocale from "dayjs/plugin/updateLocale";
16+
import localeData from "dayjs/plugin/localeData";
17+
import localizedFormat from "dayjs/plugin/localizedFormat";
18+
import isLeapYear from "dayjs/plugin/isLeapYear";
19+
import isSameOrAfter from "dayjs/plugin/isSameOrAfter";
20+
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
21+
import isoWeek from "dayjs/plugin/isoWeek";
22+
import isoWeeksInYear from "dayjs/plugin/isoWeeksInYear";
23+
import weekYear from "dayjs/plugin/weekYear";
24+
import isMoment from "dayjs/plugin/isMoment";
25+
import calendar from "dayjs/plugin/calendar";
26+
import buddhistEra from "dayjs/plugin/buddhistEra";
27+
import minmax from "dayjs/plugin/minMax";
28+
import bigIntSupport from "dayjs/plugin/bigIntSupport";
29+
import objectSupport from "dayjs/plugin/objectSupport";
30+
import pluralGetSet from 'dayjs/plugin/pluralGetSet';
31+
import preParsePostFormat from 'dayjs/plugin/preParsePostFormat';
32+
import toObject from 'dayjs/plugin/toObject';
33+
import toArray from 'dayjs/plugin/toArray';
34+
35+
dayjs.extend(relativeTime);
36+
dayjs.extend(timezone);
37+
dayjs.extend(duration);
38+
dayjs.extend(utc);
39+
dayjs.extend(quarterOfYear);
40+
dayjs.extend(weekOfYear);
41+
dayjs.extend(isBetween);
42+
dayjs.extend(isToday);
43+
dayjs.extend(isTomorrow);
44+
dayjs.extend(isYesterday);
45+
dayjs.extend(customParseFormat);
46+
dayjs.extend(advancedFormat);
47+
dayjs.extend(updateLocale);
48+
dayjs.extend(localeData);
49+
dayjs.extend(localizedFormat);
50+
dayjs.extend(isLeapYear);
51+
dayjs.extend(isSameOrAfter);
52+
dayjs.extend(isSameOrBefore);
53+
dayjs.extend(isoWeek);
54+
dayjs.extend(isoWeeksInYear);
55+
dayjs.extend(weekYear);
56+
dayjs.extend(isMoment);
57+
dayjs.extend(calendar);
58+
dayjs.extend(buddhistEra);
59+
dayjs.extend(minmax);
360
dayjs.extend(relativeTime);
61+
dayjs.extend(bigIntSupport);
62+
dayjs.extend(localizedFormat);
63+
dayjs.extend(objectSupport);
64+
dayjs.extend(pluralGetSet);
65+
dayjs.extend(preParsePostFormat);
66+
dayjs.extend(toObject);
67+
dayjs.extend(toArray);
468

569
export const TIME_FORMAT = "HH:mm:ss";
670
export const TIME_12_FORMAT = "HH:mm:ss:a";

0 commit comments

Comments
 (0)